Thursday, August 30, 2007

SystemVerilog Data Types

This tutorial describes the new data types that Systemverilog introduces. Most of these are synthesisable, and should make RTL descriptions easier to write and understand.

Integer and Real Types

SystemVerilog introduces several new data types. Many of these will be familiar to C programmers. The idea is that algorithms modelled in C can more easiliy be converted to SystemVerilog if the two languages have the same data types.
Verilog’s variable types are four-state: each bit is 0,1,X or Z. SystemVerilog introduces new two-state data types, where each bit is 0 or 1 only. You would use these when you do not need X and Z values, for example in test benches and as for-loop variables. Using two-state variables in RTL models may enable simulators to be more efficient. Used appropriately, they should not affect the synthesis results.
Type Description Example
bit user-defined size bit [3:0] a_nibble;
byte 8 bits, signed byte a, b;
shortint 16 bits, signed shortint c, d;
int 32 bits, signed int i,j;
longint 64 bits, signed longint lword;
Two-state integer types
Note that, unlike in C, SystemVerilog specifies the number of bits for the fixed-width types.
Type Description Example
reg user-defined size reg [7:0] a_byte;
logic identical to reg in every way logic [7:0] a_byte;
integer 32 bits, signed integer i, j, k;
Four-state integer types
logic is a better name than reg, so is preferred. As we shall see, you can use logic where in the past you have may have used reg or where you may have used wire.
Type Description Example
time 64-bit unsigned time now;
shortreal like float in C shortreal f;
real like double in C double g;
realtime identical to real realtime now;
Non-integer types


In Verilog-1995, you could define scalar and vector nets and variables. You could also define memory arrays, which are one-dimensional arrays of a variable type. Verilog-2001 allowed multi-dimensioned arrays of both nets and variables, and removed some of the restrictions on memory array usage.
SystemVerilog takes this a stage further and refines the concept of arrays and permits more operations on arrays.
In SystemVerilog, arrays may have either packed or unpacked dimensions, or both. Consider this example:
reg [3:0][7:0] register [0:9];
The packed dimensions are [3:0] and [7:0]. The unpacked dimension is [0:9]. (You can have as many packed and unpacked dimensions as you like.)
Packed dimensions:
  • are guaranteed to be laid out contiguously in memory
  • can be copied on to any other packed object
  • can be sliced ("part-selects")
  • are restricted to the "bit" types (bit, logic, int etc.), some of which (e.g. int) have a fixed size.

By contrast, unpacked dimensions can be arranged in memory in any way that the simulator chooses. You can reliably copy an array on to another array of the same type. For arrays with different types, you must use a cast, and there are rules for how an unpacked type is cast to a packed type. Unpacked arrays can be any type, such as arrays of reals.
SystemVerilog permits a number of operations on complete unpacked arrays and slices of unpacked arrays. For these, the arrays or slices involved must have the same type and the same shape – i.e. exactly the same number and lengths of unpacked dimensions. The packed dimensions may be different, as long as the array or slice elements have the same number of bits.
The permitted operations are:
  • Reading and writing the whole array
  • Reading and writing array slices
  • Reading and writing array elements
  • Equality relations on arrays, slices and elements

SystemVerilog also includes dynamic arrays (the number of elements may change during simulation) and associative arrays (which have a non-contiguous range).
To support all these array types, SystemVerilog includes a number of array querying functions and methods. For example, you could use $dimensions to find the number dimensions of an array variable.


SystemVerilog’s data type system allows you to define quite complex types. To make this kind of code clear, the typedef facility was introduced. Typedef allows users to create their own names for type definitions that they will use frequently in their code. Typedefs can be very convenient when building up complicated array definitions.
typedef reg [7:0] octet;
octet b;
is the same as
reg [7:0] b;
typedef octet [3:0]
quadOctet qBytes [1:10];
is the same as
reg [3:0][7:0] qBytes [1:10];


SystemVerilog also introduces enumerated types, for example
enum { circle, ellipse, freeform } c;
Enumerations allow you to define a data type whose values have names. Such data types are appropriate and useful for representing state values, opcodes and other such non-numeric or symbolic data.
Typedef is commonly used together with enum, like this:
typedef enum { circle, ellipse, freeform } ClosedCurve;
ClosedCurve c;
The named values of an enumeration type act like constants. The default type is int. You can copy them to and from variables of the enumeration type, compare them with one another and so on. Enumerations are strongly typed. You can’t copy a numeric value into a variable of enumeration type, unless you use a type-cast:
c = 2;               // ERROR
c = ClosedCurve'(2); // Casting – okay
However, when you use an enumeration in an expression, the value you are working with is the literal’s integer equivalent; so, for example, it’s okay to compare an enumeration variable with an integer; and it’s okay to use an enumeration value in an integer expression.

Stuct and Union

Finally, SystemVerilog introduces struct and union data types, similar to those in C.
struct {
int x, y;
} p;
Struct members are selected using the .name syntax:
p.x = 1;
Structure literals and expressions may be formed using braces.
p = {1,2};
It is often useful to declare a new structure type using typedef and then declare variables using the new type. Note also that structs may be packed.
typedef struct packed {
int x, y;
} Point;
Point p;
Unions are useful where the same hardware resources (like a register) can store values of different types (e.g. integer, floating point, …)

Puzzle - The Spy

This one I heard a while back and saw that a version of it also appears in Peter Winkler’s excellent book Mathematical Puzzles - A Connoisseur’s Collection. Here is the version that appears in the book:

A spy in an enemy country wants to transmit information back to his home country.
The spy wants to utilize the enemy country’s daily morning radio transmission of 15-bits (which is also received in his home country). The spy is able to infiltrate the radio station 5 minutes before transmission time, analyze the transmission that is about to go on air, and can either leave as it is, or flip a single bit somewhere in the transmission (a flip of more than one bit would make the original transmission too corrupt).

how much information can the spy transmit to his operators?


  • The transmission is most likely a different set of 15-bits each day but can also repeat the last day’s transmission. Best, assume it is random
  • The spy is allowed to change a maximum of 1 bit in any position
  • The spy has agreed on an algorithm/strategy with his operators before he was sent to the enemy country
  • No other information or communication is available. the communication is strictly one way
  • The spy sees for the first time the intended daily transmission 5 minutes before it goes on the air, he does not hold a list of all future transmissions
  • The information on the other end should be extracted in a deterministic way

I believe this one is too tough for an interview question - it took me well over an hour to come up with a solution (well, that actually doesn’t say much…). Anyways, this is definitely one of my favorite puzzles.

This puzzle created some interest, but apart from one non-complete solution which demonstrates the principle only, I didn’t receive any other feedback. Here is my own solution, which is different than the one given in the Winkler book. Naturally, I believe my solution is easier to understand, but please get the Winkler book, it is really that good and you could decide for yourself.

Now for the reason you are reading this post… the solution… oh, if you don’t remember the puzzle, please take a few moments to re-read it and understand what it is all about.

I will (try to) prove that 16 different symbols can be transmitted by flipping a single bit of the 15 which are transmitted daily.
First, for convenience reasons we define the 15-bit transmission as a 14-0 vector.
We will now define four parity functions P0,P1,P2,P3, as follows:


Why these specific functions will be clear in a moment.
Let’s try to view them in a more graphical way by marking above each bit in the vector (with the symbols P0..P3) iff this bit affects the calculation of the respective “P-function”. For example, bit 11 is included in the formula for P0 and P3 therefore we mark the column above it with P0 and P3.
So far so good, but a closer look (diagram below) on the distribution of the “P-functions” reveals why and how they were constructed.


The “P-functions” were constructed in such a way that we have 1 bit which affects only the calculation of P0, one bit which affects only P0 and P1, one which affects only P0 and P2 and so on… Try to observe the columns above each of the bits in the vector - they span all the possible combinations!

From here the end is very close.
The operators on the receiving side have to calculate the P0..P3 functions and assemble them into a 4-bit “word”.
All the spy has to do, is calculate the actual “P-functions” given by today’s random transmission and get a 4-bit “word”. The spy compares this to the 4-bit “word” she wants to transmit and discovers the difference - or in other words: the bits which need to be flipped in order to arrive from the actual “P-functions” to the desired “P-functions”. She then looks up in the diagram above and flips exactly that bit which corresponds to exactly the “P-functions” that she needs to flip. A single bit flip will also toggle the corresponding “P-function/s”.

Since the above wording may sound a big vague, here is a table with some examples:


I have to say this again, This is really one of the most beautiful and elegant puzzles I came across. It is definitely going into “the notebook”…

Wednesday, August 29, 2007


  • 习惯简易信任的系统—— 建立简单的列表,并每日查看


GTD需要你将自己的任务(下一步行动)放到一系列的情境清单中,比如@工作、@电话、@家里、@差事、@等待, 等等。基本来说,你需要问自己:“基于我所在的场合以及我现有的工具,我现在能完成什么?”然后去完成这个任务。GTD通过将你的列表按情境划分从而简化了这一过程,你只需要去考虑自己现在所处的情境就好,不用去想其他的情境。GTD中还有其他一些清单,比如说“将来/某时”(Someday/Maybe清单:现在不能完成但以后可能会做的事)和“等待列表”。


  • Simple GTD:这是我的最爱,也是我正在使用的工具。我使用它便是因为的简单和易用。Simple GTD没有很多功能,但提供的都能满足你的需求,去尝试一下吧。
  • Moleskine:这也是我的最爱。事实上,任何能装进口袋的笔记本都非常不错,简单的笔记本对实施GTD来说完美极了。但Moleskine真的很特别, 它很漂亮也很易用。所以我强烈推荐它
  • Hipster PDA:Hipster PDA不是电子产品,它由一叠卡片和一个夹子组成。你可以找到它的模板然后打印出来,也可自己动手做。其方便之处在于卡片用完之后,你可以随时更换卡片。请参考《向您介绍Hipster PDA》和《组织你的Hiptster PDA
  • Tadalist:可能是这里面最简单的工具了,Tadalist就是一个简单的列表工具。界面不错,可以建立无数多的清单,打印它们,非常简单。
  • Todoist:另一款非常简单的任务清单管理工具。它有一些额外的功能,但也不是很复杂。我不太喜欢它的界面,也许你会觉得它不错的。
  • Thinkingrock:一款非常实用的GTD桌面软件。完全按照GTD的思想,简单易用,可以在各个平台上使用。请参考《ThinkingRock:最好的GTD软件》和《ThinkingRock:最好的GTD软件2




  • 习惯一心一意,每次只执行一件事



  1. 重大事件(Big Rocks):选择一个任务(最好是每日最重要的任务之一),做出决定:是一次全部完成、还是现在抽出一段时间(30分钟)去做它。更详细请参考《放置大石头的艺术:让你的效率翻倍》。
  2. 选择好环境:在你开始工作前,消去所有使你分心的事。关闭Email、关上手机、拔掉网线等等,把办公桌上堆积的混乱的东西写清理干净。
  3. 记录时间:设置一个计时器(像CoolTimer等等),或者尽可能的集中于你的任务不要松懈,不让自己变得心烦意乱的。
  4. 避免干扰:如果你在执行时被干扰了,马上把这些新到的信息或者任务记录到你的笔记本或收集箱中,然后继续原来的任务。重申一遍,千万不要尝试多线工作。
  5. 快速调整状态:如果你必需去检查你的Email或者执行其他的任务,那停下来,深呼吸,重新使自己的思绪集中,调整到正确的状态再继续任务。
  6. 不可避免的中断:无论如何,有时总会碰到一些我们无法避免和拖延的事情而中断现在的任务。当遇到这个情况时,把现在的任务进度记录下来,把所用的资料也都整理放到一旁。当你弄完那些无法避免的任务后,简单地把所有的资料重新拿出来,然后再看看记录的任务进度,又可以马上开始原来的任务了。
  7. 享受休息:深呼吸,舒展一下身子,在工作时也要享受好的休息。身体可是革命的本钱,千万不要亏待了哦~
  8. Ahhh:当你完成任务后,表扬你自己!奖励你自己上一会儿网,看一会儿电视——但是不要太长了(10分钟),然后继续你的下一步行动。千万不要让你被奖励冲昏了头脑,忘记了下面的任务。


  • 习惯设定每天,每周的最重要的事(MIT)


这是ZTD中最简单也是最重要的一个习惯。它为你的每一天和每一周都设定了目标,因为与其去盲目的去完成那长长的任务清单,你总是在完成那些最重要 最有用的事情!当然,你还是要去完成其余的事情的。但是完成最重要的任务,会使你知道自己总在做真正想做的事——那些当你回顾的时候,会感到自豪的事,而 不会操劳一天后却发现自己一无所成。 以下是一些如何运用这个好习惯的小技巧:

  1. 重大事件(Big Rocks):在每周开始的时候(星期天 或星期一),坐下来看看你的任务清单。想想这周你最想要完成什么?刚开始的时候尽量将数目限制在4-6件,待到熟练了且你觉得自己能完成更多的时候,再添 加多的任务。不要忘了要确保这些重大事件中包含至少一项与你年度目标有关的任务。更详细请参考《放置大石头的艺术:让你的效率翻倍》。
  2. 安排日程:将本周重大事件放在你的周程计划中。每天放置只一个或两个,否则你会忙不过来。并且分出1-2小时的时间去完成它们,尽量把时间安排得越早越好。放置好这些重大事件后,你就可以计划其它的不是那么重要的事情了。
  3. 最重要的任务:每天早上,马上决定今日最重要的任务。这和你的重大事件很相似,每日选择1-3个最重要的任务,而这其中可能包括一个你已经安排了的重大事件和其它几个最重要的任务。同样的,尽量将它们安排在尽可能早的时段。如果安排的太晚,你常常会被其他的任务干扰,而导致任务失败。
  4. 完成它们:前面说的这些无非就是为了搞定这些最重要的任务。每天早上做的第一件事就是完成第一件最重要的任务,远离干扰,把所有精力都放在任务上直到完成它为止。做完之后可以简单的奖赏自己。然后去完成第二件最重要的任务!
  5. 回顾:如果你完成了最重要的任务,那一定感觉这一天特别棒。所以要记得回顾你所完成的,顺便表扬自己一下


更简单,更具行动力的终极高效系统:Zen To Done(简易做) 翻译系列,赶快到褪墨上阅读吧~

  • 习惯快速地对信息作出决定,从而避免收件箱堆积



列出所有你收集信息的途径,评估每一条途径带来的价值,合并某些收件箱或者删除那些无用的收件箱。若 认定某条途径没有价值,就抛弃它一周,然后再考虑是否确实要删除它。对于其他的一些途径,想想能够将它们合并成一个收件箱。比方说:家中 有好几个地方被你用来存放收到的信息?那改用一个收件箱来收集所有的邮件、工作记录、学校笔记、电话表、电脑输出文件、时间表等等。你有四个email邮 箱?尝试让它们都转发到一个邮箱中。总之,越少越好,尽量将收件箱数量控制在4~7左右。

第二,管理你的收件箱。长期 阅读 我博客的读者应该会觉得挺耳熟的,但是我还是要反复地强调:不要让你的收件箱溢出。留着大量未完成的原料未处理,绝对会让你感到巨大的压力。所以,赶快成为自己收件箱的管理大师!

每天检查并且处理你的收件箱。有一些收件箱,你可能需要检查几次(我每小时检查一次email),但是不要频繁的检查。这只会浪费你的时间,降低你的工作 效率 。但是也不能一天之内一次也不检查,否者你的原料又会堆积起来,记住堆积是你最大的敌人。

  1. 从上往下处理信息,马上做出决定。从收件箱中的第一项开始,立刻做出决定,不要跳过、拖后或延迟做出决定。
  2. 删除。如果你不需要这条信息,就删掉它(总是保持这个为优先选择)。
  3. 委派他人。你是做这件事的合适人选吗?如果不是,交给最适合的人。
  4. 立刻完成。如何这件事需要的时间少于两分钟,那立即完成它,而不要放到 任务清单 中。
  5. 等下在做的任务如果这件事需要的时间多过两分钟,马上把它列入任务清单中,并且等下马上完成它。
  6. 制作档案。你需要额外的参考文件来完成某件事情,那赶快为它制作一个档案。
  7. 无论如何,不要让收件箱里有剩余的项目删除或者制作档案,处理每一个项目直到收件箱为空。注意,如果你的收件箱中有上百的项目,那最好把它们放入另一个文件箱中等下处理(专门搁出几个小时去处理它们),接着再继续处理新进入收件箱中的信息。
  8. 重复这些步骤,保持你的收件箱为空。如果你有限制自己的收件箱数量,实现这一点并不难。保持收件箱为空会让你觉得棒极了,庆祝一下?!记住,不要一整天都在处理收件箱,最好形成习惯总是在固定的时刻去处理它们。


更简单,更具行动力的终极高效系统:Zen To Done(简易做) 翻译系列,赶快到褪墨上阅读吧~

这个习惯与 GTD 的完全一样:把所有在脑海里浮现的信息( 任务 , 想法, 项目 等等)记录到随身携带的小本子上(或者任何适合你的工具)。因为只有把信息从脑海里拿出来记在纸上,你才不会忘记它们。

ZTD只需要一个小巧、便携、易用的工具来记录信息——最好是一本小笔记本或者一小叠卡片,因为它们比PDA或者笔记本电脑更易于携带和方便使用(可以随意选择其他的工具)。每当你回到家或者办公室时,就立刻把信息从笔记本中清空,存入 任务清单 中(一个简单的任务清单就可以了)。

对于这个习惯,我更推荐大家使用纸质的工具而不非电子产品,比方说:非常流行的Moleskine笔记本和Hipster PDA。 如果觉得使用PDA或者Smartphone更适合你,那当然也可以。我推荐纸质工具的原因是因为它们速度快。使用电子产品,你先要开机,然后进入合适的 程序,最后添加条目才能开始输入。若使用纸笔,你只需要拿出来写就行了。总之什么工具更适合你,就采用什么工具。我只是认为工具越简单易用, 你就越有可能去使用它

全面收集的关键在于你必需在忘记事情之前赶紧把信息写下来, 并且尽快地把这些信息从笔记本中清除、存入任务清单中。千万不要拖延上面几步,否则信息会积累得越来越多,最后让你失去坚持下去的 动力 。记住要积极主动地规划你所收集的信息,不要让信息堆积堵塞你的动力。同样的,无论你在哪里(床上,商店,住院,等等),都要随身携带你的记录工具。最后再重申一遍,不管你用的是什么工具,它必须便于携带且能快速的记录信息。

Tuesday, August 28, 2007

更简单,更具行动力的终极高效系统:Zen To Done(简易做)

更简单,更具行动力的终极高效系统:Zen To Done(简易做) 翻译系列,赶快到褪墨上阅读吧~

Getting Things Done作为目前最好的提高效率的系统之一,我也是其忠实粉丝。可是, GTD系统并不是绝对完美的。所以以此为基础,我建立了一套新的提高效率 (Productivity)的系统:Zen To Done(ZTD)。 [译者注:我们为ZTD起了一个中文名字:简易做。]

与GTD相比,ZTD 更崇尚简单,更注重行动,同时也保持了GTD系统中非常完美的收集信息和规划行动的方法。

如果GTD并不是完全适合你,那为什么不试一试ZTD?从更实际的角度, 改变和培养好习惯 ;更注重行动和建立更简单的系统结构 —— 赶快阅读Zen To Done

  • 什么是ZTD(简易做)?

ZTD(简易做)致力于解决在实施GTD的过程中五个许多人都会遇到的问题。我应该首先指出的是,GTD 并没有本质上的缺陷因而并不需要本质上的调整。然而人人都有自己的独特之处,ZTD希望为不同个性的人们定做出适合他们的方案。

  • GTD中的问题和ZTD的解决方法?

1)GTD需要改变很多习惯。这 是很多人学习GTD最终失败的主要原因:GTD需要一次改变很多习惯. 如果有长期阅读Zen Habits,你就会知道“伤其十指,不如断其一指”的道理。与其一次改变很多习惯然后失败 ,不如将精力集中在改变一个习惯而最终成功.另外, 很多学习GTD的人都没有使用有效的方法来改变他们的习惯,从而导致失败。

ZTD解决办法:一次只改变一个习惯。你 不必一下子就接受整个系统:一次接受太多新习惯将使人不能将精力集中在改变习惯上。相反, 一次只改变一个习惯,使用那些已经被证明行之有效的方法(30天挑战, 承诺, 自我激励)等等[弥缝注: 最近将陆续翻译 这些话题,请关注褪墨Blog),最后一步一步地采纳整个系统。

2)GTD对于行动的过程没有足够重视。虽 然称作Getting Things Done,事实上GTD把很多时间都用在整理信息上了,存储信息到我们信赖的GTD系统中。《Getting Things Done》介绍了一种优秀的管理系统,它拥有实用的收集和处理信息的步骤方法,但是在完成实际任务的环节上却没有足够地深入探讨。


3)GTD对于很多人缺少结构性不具有严谨的结构是GTD的一个特点, 但是由此带来的GTD的即时决定, 反而让许多人产生困惑. 对于一些人, 他们在 生活 中需要有条理. 这样,GTD可能不能满足他们的要求. 毕竟不同的人有不同的管理方式。

ZTD的解决办法:培养两个习惯来加强组织性。第一个是加强 计划 的习惯,你只需要简单地计划好每天的三个MIT(最重要的事)和每周必需完成的事情(每周的大事)。第二个是要养成有规律的习惯。 你应该让自己每日和每周更有规律。就像ZTD所有的习惯一样,这些习惯都不是必需的。如果它们不适合你,那就不必采纳它们。但是对多数人来说,它们都会对GTD的很多部分贡献很多。

4) GTD 要做得太多。这样很可能导致压力太大而最终放弃。GTD 并不区分你的“收件箱”中所收到的任何东西,这也许是它的优点。然而问题出现在当我们把所有的事务都放在我们的 任务清单 上,我们要去做的是列表上所有事情,最终我们会因为超载而失败。这并不是GTD本身的问题,而是我们自己在实施GTD的过程中会出现的问题。但不管怎样,它应该被讨论。

ZTD的解决办法:加强简化. 删去尽可能多的无用任务, 这样就能把精力放在重要的事情上面并且努力做好它们。

5) GTD 对目标重视不足. GTD是一个自下而上,循序渐进的系统,尽管GTD谈到了更高的层面, 但它并没有进行深入的讨论——GTD能把你身边发生的事情都管理的很好,而对那些你真正应该做的要事重视缺乏。

ZTD的解决办法:确定最重要的事。正如上面所说的,ZTD让你找出本周,本日最需要完成的大事. ZTD需要每周回顾自己的任务, 并且在一个长时期内保持这个习惯。虽然GTD也包括这方面的内容, 但ZTD将进一步拓展这个习惯。最后,GTD是一套杰出的系统,而且非常好用。 但ZTD希望解决了人们在实施GTD的时候出现的一些问题进而使之更好的适用于现实生活。

Monday, August 27, 2007



  1. 苹果含有丰富的维生素C,而维生素C可以帮助你强化免疫系统;
  2. 预防心脏病,因为苹果中所含的黄酮类物质有抗氧化的功效,可以对预防心脏病的产生积极的作用;
  3. 苹果是低卡路里(热量)。每个苹果的热量介于70-100卡路里之间,其热量仅相当于甜食的1/4。而且吃苹果可以遏制想吃甜食的欲望;
  4. 预防癌症,因为苹果对结肠癌、前列腺癌和乳腺癌等都起着预防作用;
  5. 苹果中的多酚能帮助降低胆固醇,从而预防胆结石;
  6. 预防蛀牙的形成。苹果的汁液能将口中80%的细菌消灭,所以每天一个苹果,就可以跟牙医拜拜了~
  7. 预防脑部疾病。苹果中所含的栎精可以预防老年痴呆症以及帕金森氏综合征;
  8. 使肺变得更健康。英国诺丁汉大学的一份研究报告表明:每周食用超过5个苹果,能减少包括哮喘在内的呼吸道疾病的发生。
  9. 苹果的味道非常鲜美!所以要多吃苹果,身体好好。

Thursday, August 23, 2007


由于信安易签名的不公开性,我们无法得知用它申请的证书的权限到底有多大!从而也导致很多人用它签名后手机仍然无法使用的问题!这个问题在NOKIA N73升级 V4 版本后尤为突出,用信安易签名的软件都不能使用!而用最老的方法到
注册一个使用帐号,申请证书,然后用DOS签名工具signsis签名后的软件则完全使用正常!而且信安易签名专家正式版v1.0 要求注册, 需要验证email和注册码,这点很烦! 最近不知道怎么搞的,又不能申请新的帐号!

今 天找到这个“Symbian证书生成器-软件签名-2合1(免输验证码版) V1.1.5 (20070627)”,用了下,觉得不错,而且最重要的就是它是完全使用的以前老的方法申请证书以及签名,只是把它后台化了一些,这样签名的软件是最好 的!非常感谢软件作者“醉开心”,兄弟辛苦了!推荐大家使用!

制作证书再也不用麻烦啦,点一个按钮自动生成证书, 还可以直接签名的哦 !


由于https://www.symbiansigned.com网站改版加了图片字母输入验证,2007年6月29日01时00分紧急更新为Symbian证书制作软件签名2合1(开心智能版) V1.2.0(20070629)!由于网站的改版,所以在使用中会要求输入2次验证码,请大家注意!

正 常情况下,本软件是能完成所有功能的.本软件支持XP,2000,其他操作系统未测试.如果在XP和2000下,出现一些错误,绝大多数原因是由于证书服 务器无响应造成的.看软件上方的提示栏"进展"中的消息就明白了.等在合适的时候再申请就是了.一般是凌晨和早上申请证书的速度很快.
Click Here To Download

Tuesday, August 21, 2007

Introduction To Bash Shell Scripting


  • Getting Help

    • man Get off information about commands
    • man -k Get off information via keyword
    • info Read info documents
    • help Show help on shell built-in commands
    • command --help Help on command .i.e. cp --help Will give help on cp
    • bash -c "help" Short help on bash
    • bash -c "help set" Short help on bash options
  • Special Characters

    • Space Argument separator
    • \ Quote a single character A \ followed by a carriage return extend the current line
    • ' Quote rext with spaces in it i.e. 'Hello world'
    • $' Quote allows string expansion, backslash-escaped characters
    • " Quote rext, expands variables and command substitution
    • ` Command substitution i.e. echo "The date is `date`"
    • $ Denote a shell variable
    • # Comments the rest of the line
    • ; Commands separator
    • (commands) Run multiple commands in a subshell
    • Control-C Interrupt a command
    • Control-D Sends End of File from terminal
    • Control-U Erases the entire command line
    • Control-\ Is a stronger terminate than Control-c
    • Control-Z Suspend process
  • Redirection, Pipes and Filters

    • - Standard In for some commands
    • 0 Standard In
    • 1 Standard Out
    • 2 Standard Error
    • >2&1 Redirect standard error to standard out
    • &> Redirect standard error & standard out
    • <>
    • > Redirect output
    • >> Concatenate output to file
    • <<>
    • | Pipe
    • tee Command write to file and standard out
    • tee -a FILE #Allow appending to FILE
    • xargs Build command from standardin
  • Wildcards

    • * Wildcard for any character(s)
    • ? Wildcard for single character
    • [set] Wildcard for character in set
    • [^set ] Wildcard for not the character in the set
    • [!set ] Wildcard for not the character in the set
    • {ab,dc} Wildcard for alternate between commas
    • All wildcard work with existing files
    • Only {} alternate work to create files
  • Process Control

    • (command1; command) Run command1, then command2 in subshell
    • command1&&command Run command1, then command2 if command1 successes
    • command1||command Run command1, then command2 if command1 fails
  • Regular Expressions

    • Definition: Text pattern of text character and meta characters
    • Some Meta characters
      • Escape character \
      • Single Character Meta characters
        • . Matches any one character
        • [...] Matches any one character in a set
        • [^...] Matches any one character not in the set
      • Quantifiers
        • * Matches the previous character zero or more times
        • \{n\} Matches the previous character n times
        • \{n,m\} Matches the previous character at least n & at most m
        • \{n,\} Matches the previous character n or more times
      • Anchors
        • ^ Matching at the start the line
        • $ Matching at the end of line
      • Grouping \( \)
  • Commands that use regular expressions
    • awk Pattern scanning and text processing language
    • ed Line-oriented text editor
    • egrep extended grep
    • emacs Emacs full screen text editor
    • ex Line-oriented text editor
    • expr Command evaluates an expression
    • fgrep Grep from patterns in a file
    • gawk GNU pattern scanning and processing language
    • grep Searches file for pattern (also see fgrep & egrep)
        grep [OPTIONS] PATTERN [INPUT-FILE...]
      • -E same as egrep
      • -c Count
      • -e pattern (for multiple pattern on line)
      • -f same as fgrep
      • -i Ignore case
      • -l Only list files containing pattern
      • -q Quit (No output, only Return Code)
      • -v Invert sense mode
    • perl Perl scripting
    • python Python scripting
    • sed Applies a set of user-specified editing command to a file
        sed [OPTIONS] 'sed_command' [INPUT_FILE...]
      • -n Suppress automatic printing
      • -e expression - sed_command
      • substitute other_text for some_text sed 's/some_text/other_text/g' FILE > NEWFILE
      • multiple changes sed -e 's@abc@def@g' -e 's@xyz@mno@g' FILE
      • print out line with faq in them sed -n '/faq/p' FILE
      • change Page ### to (Page ###) at end of line sed 's/Page [0-9]+$/(&)/' file # & replace the match
      • delete blank lines sed '/^[ \t]*$/d
    • tcl Tool command language
    • vi Full screen text editor

Shell Variables

  • Built-in Shell Variables

    • CDPATH Path of shortcuts for cd (like PATH)
    • COLUMNS Numbers of columns on the display
    • EDITOR Path for editor
    • HISTSIZE Number of commands in command history (default 500)
    • IFS Input Field Separator
    • LINES Numbers of lines on the display
    • OFS Output Field Separator
    • SECONDS Seconds that this shell is running
    • SHELLOPT Colon separate list of shell options
  • Environment Variables

    • export var Will make a variable an environment variable
    • HOME User's home directory
    • LOGNAME User's name
    • MAIL Name of user's mailbox
    • PATH List of directories to be search by the shell
      to find programs whose names are type as commands
    • PS1 String that is used by the shell prompt
    • PWD Name of current directory
    • SHELL Name of current shell
    • TERM The kind of terminal being used
    • Environment variable are global to shell and subshells
  • User Variables

    • Can be either upper or lower case
    • var=value Define a variable
    • var="" Define a variable as null
    • local var Define a variable local to its scope
  • Positional Variables

    • $0 Name of function or script being called
    • $1 ... $9 Replace by arguments to shell or function
    • ${n} Replace by n-th arguments to shell or function required if number of argument is over 9
  • Special Variables

    • $? Exit status or return code of last command
    • $# Number of arguments
    • $@ Argument 1 thru n with Input Field Separator
    • $* "$1" $2" ... $n
    • $! Process id of last background process
    • $$ Process id of shell running this script
    • $- The current shell flags

Some Command Useful With Scripts

  • basename Strip directory and option suffix
  • declare Built-in command declares variable
  • dirname Strip non-directory part
  • echo Built-in command display message to standard out
  • echo -n Built-in command display message to standard out without newline
  • echo -e Builtin Command display message to standout with escape sequences
  • enable Built-in command to enable/disable (-n) built-in commands
  • env Built-in command displays environment variables
  • eval Built-in command evaluate arguments before executing results
  • exec Built-in command runs command as the shell process
  • exit Built-in command exits shell
  • expr Evaluates an expression and output its value
  • false Built-in command always return false condition
  • local Built-in command make variable local
  • read Built-in command reads data into variable from standard in
  • seq Print a sequence of numbers
    • seq [OPTION]... LAST
    • seq [OPTION]... FIRST LAST
    • -w equalize width by padding with leading zeroes
  • sleep Command causes execution to stop for a specified number of seconds
  • test Built-in command tests for various conditions, such as existence of a file, useful for controlling conditional script execution
  • time Built-in command times commands
  • times Print accumulated user and system times.
  • true Built-in command always return true condition
  • type Built-in command show what word is
  • wait wait for the completion of background processing; is used to ensure that critical processing is complete before proceeding in a script

Making Scripts Colorful

  • tput sgr0 #Reset text attributes to normal without clearing screen
  • Escape sequence to change colors #\e[${forground};${background}m example white on black sequence is \e[37;40m #Forground colors Backgrounfd Color black=30; bgblace=40 red=31; bgred=41 green=32; bggreen=42 yellow=33; bgyellow=43 blue=34; bgblue=44 magenta=35; bgmagenta=45 cyan=36; bgcyan=46 white=37; bgwhite=47
  • Turn text attribute off \e[0m
  • Change text attribute bold \e[1m
  • Change text attribute underline \e[4m
  • Change text attributer everse \e[7m

Shell Functions and Scripts

  • Functions

    • Function must be sourced just like .bashrc
    • type function will list the function
    • function functionname { shell commands }
    • functionname () { shell commands }
    • Example - a helpful function function givehelp { exec $1 --help | more; }
  • Scripts

    • #!/bin/bash Script name run script is run if execute bit is set
    • #!/bin/bash -x As above, but script lines are displayed
    • bash -x script As above
    • /usr/bin/env bash Use the environment bash for the script
  • Script Debugging options

      set -o OPTION Command line Action
    • set -o noexec sh -n Don't run command, just check for syntax
    • set -o verbose sh -v Echo commands before running them
    • set -o xtrace sh -x Echo commands after running them
    • set +o OPTION Turns OPTION off

Operation With Variables

  • Variable Usage

    • $var Value of variable var
    • "$var" Is null if variable is undefined avoids some shell syntax errors if variable is undefined
    • ${var} Value of variable var avoids confusion when concatenating with text
    • ${#var} Gives the length of the string contained in var
    • ${var:FIRST:N} Extract string from var starting at FIRST position and continuing for N-1 characters. Note FIRST starts at 0.
  • Passing an variable to a program or script

    • echo $var | command
  • Arrays

    • declare -a name Declare an array
    • name[index]=value Just assigning a value defines it
    • Index starts at zero
    • No maximum limit
    • Need not be contiguous
  • Setting Variable From Execution of Command

    • var=`command` var is set to output of command
    • var=$(command) same as above
  • Arithmetic Operation

    • $(( expression )) Almost the same as 'expr expression'
    • $[ expression ] Same as above
    • ( expression ) Groups expression within $(( ... ))
    • expr expression Note must quote *
  • Arithmetic operator

    • + add
    • - substract
    • * multiply
    • / divide
    • % remainder
    • # number conversion (Only in bash not expr)
  • Test Operation

    • [ -option arg ] Same as 'test -option arg
    • [[ -option arg ]] Same as 'test -option arg
    • [ arg1 -option arg2 ] Same as 'test arg1 -option arg2'
    • [[ arg1 -option arg2 ]] Same as 'test arg1 -option arg2'
    • See test command for test complete list of options
      • string1 = string2 String 1 equals string 2
      • string1 !=string2 String 1 not equals string 2
      • -n string String is not zero length
      • -z string String is zero length
      • -d FILE File is a directory
      • -e FILE File exists
      • -f FILE File exists and is a regular file
      • -r FILE File exists and is readable
      • -s FILE File exists and has length greater than zero
      • -w FILE File exists and is writable
      • -x FILE File exists and is executable
      • num1 -eq num2 Number 1 equals number 2
      • num1 -ne num2 Number 1 not equals number 2
      • num1 -lt num2 Number 1 less than number 2
      • num1 -le num2 Number 1 less than or equals number 2
      • num1 -gt num2 Number 1 greater than number 2
      • num1 -ge num2 Number 1 greater than or equals number 2
  • String Operation

    • ${varname:-word} Return var if exists and is not null, else word
    • ${varname:+word} Return word if var exists and is not null, else null
    • ${varname:?mess} Return var if exists and is not null, else display mess and return from script with error
  • Pattern Operations

    • ${variable#pattern} If the pattern matches the beginning of the variable value, delete the shortest part that matches and return the rest
    • ${variable##pattern} If the pattern matches the beginning the of variable value, delete the longest part that matches and return the rest
    • ${variable%pattern} If the pattern matches the end of the variable value, delete the shortest part that matches and return the rest
    • ${variable%%pattern} If the pattern matches the end of the variable value, delete the longest part that matches and return the rest

    The handy 'expr'

    • expr string : regrep Anchored pattern match
    • expr match string pattern Same as above
    • expr substr string pos {len] Substring beginning at pos of length len
    • expr length string Length of string

    Flow Control

    • if - general information

        if command               Test return code of command if command1 && command2  Test return code of command1 and command2 if command1 || command2  Test return code of command1 or command2  command can be condition i.e. [ $# -eq 0 ]
    • if/then/else or if/then/elif..

        if condition   then statements...   [else statements...] fi  if condition    then statements...   [elif condition     then statements...]     [else] statements...] fi 
    • return from Function

        return [ numeric expression or variable ]  This is the return code 
    • for

        for name [ in list ] do   statements  done  for  variable = start to end do   statements done 
    • while/until

        while condition do   statements done  until condition do   statements done 
  • break/continue

    • break [n] Break out of loop & select
    • continue [n] Continue next iteration of loop
  • case

      case expression in   pattern1[|pattern11] } statements ;;   pattern2[|pattern21] } statements ;;   ...  esac 

    User Interfaces

  • select

      select name [in list] do   statements that can use $name  done 
    • Generate a menu of each item in the list formatted with a number for each choice
    • Prompt the user for the number
    • Store the selected choice in name. The number is stored in REPLY
    • execute the statements in the do
    • Repeat the process again

    Command Line Options

    • shift Shift 1st argument form the argument list
    • getopts Used to process command line options
    • OPTIND Variable contains number of options
    • OPTARG Default variable for option
    • Example while getopts ":ab:c" opt; do case $opt in a) process_option_a;; b) process_option_b $OPTARG is the option's argument;; c) process_option_c;; esac done shift $(($OPTIND - 1))

    I/O in Scripts

    • printf Built-in command for formatted output
    • read Built-in command to read one line into variable(s) read #Everything entered goes to REPLY read var #Everything is read into var read a b #Read 1st word in to a and rest into b read -t 300 var #Read with 300 second timeout
    • Example how to use read from $file while read line; do do_something_with_line done <$file

    Process Handling

    • Signals

        Name  Number  Control Character 
      • EXIT 0 Used to trap exiting script
      • HUP 1 Logout
      • INT 2 Control-C
      • QUIT 3 Control-\
      • KILL 9 can not be ignored or trapped
      • TERM 15 Default kill
      • TSTP 24 Control-Z
    • Traps

      • trap "" signal-list Ignore signal
      • trap "cmds" signal-list Execute commands if signal is caught
      • trap signal-list Reset signal to original condition
      • trap : signal-list (undocumented) ignore signal, pass to child Signal are normally not passed to subprocesses
      • Examples trap 'rm tmpfile; exit' 0 1 2 #remove tmpfile on exit, logout, interrupt trap "echo 'You hit Control-C'" INT while true ; do sleep 60 done
      • Example parent child process #!/bin/bash #parent echo parent running trap 'echo parent exiting; exit' 0 trap :2 child sleep 1000 #!/bin/bash #child echo child started. pid is $$ trap 'echo child got signal 2; exit' INT sleep 1000

    Examples Useful Scripts or Function

    • # Function top5 Example how to set defaults # Usage top5 {n} #list n processes function top5 { ps -ef | head -${1:-5} }
    • # Function hereis Example of HERE IS FILE and handling arguments # Usage hereis word1 word2 ... function hereis { for name in "$@" do cat <
    • # Function pick Return selected items by user # Usage: .e.g var=`pick *` function pick { for name in $@ ; do #for each item in argument list echo -n "$name (y/n/q)?" >/dev/tty #ask user to select read ans #read answer from standard in case $ans in #Check choices y*) echo $name;; #selected q*) break;; #skip rest of arguments *) continue;; #skip item esac done }
    • # Function acal Display a nicer calendar # but will accept Alphabetic month function acal { m="" case $# in 0) cal; return;; #no arguments 1) m=$1; y=`date +%Y`;; #1 argument 2) m=$1; y=$2;; #2 arguments esac case $m in Jan*|jan* ) m=1;; Feb*|feb* ) m=2;; Mar*|mar* ) m=3;; Apr*|apr* ) m=4;; May|may } m=5;; Jun*|jun* ) m=6;; Jul*|jul* ) m=7;; Aug*|aug* ) m=8;; Sep*|sep* } m=9;; Oct*|oct* ) m=10;; Nov*|nov* ) m=11;; Dec*|dec* ) m=12;; [1-9]|1[0-2] ) ;; #numeric month *) ) y=$m; m="";; esac cal $m $y }
    • ## Function selectex - Example select # function selectex () { choices="/bin /usr /home" select selection in $choices; do if [ $selection ]; then ls $selection break else echo 'Invalid selection' fi done }
    • # Function fwhich Which command in $PATH is executed # function fwhich { if [[ $# -eq 0 ]] ; then cat <<>&2; return 2 Usage fwhich command #Example of parsing the $PATH Return 0 - found Return 1 - not found Return 2 - No arguments EndOfHelp fi for path in `echo $PATH | sed 's/^:/.:/ s/::/.:/g s/:$/:./ s/:/ /g'` do if [[ -x $path/$1 ]] ; # does executable file exists here? then echo $path/$1 # found it return 0 fi done return 1 # not found }
    • # Name: overwrite Copy standard input to output after EOF function overwrite { if [[ $# -lt 2 ]] ; then echo "Usage: overwrite file command [args]" 1>&2; return 2 fi file=$1; shift new=/tmp/overwrite1$$; old=/tmp/overwrite2$$ trap 'rm -f $new $old; return 1' 1 2 15 # clean up files "$@" > $new if [[ $? -eq 0 ]] ; # collect output then # command completed successfully cp $file $old # save original file trap '' 1 2 15 # we are committed; ignore signals cp $new $file # copy new file into file rm -f $new $old # remove temp files else echo "overwrite: $1 failed, $file unchanged" 1>$2 return 1 fi }
    • # Name: zgrep # Purpose: caseless grep of gzip files # Usage: zgrep text files.gz # function zgrep { if [ $# -eq 0 ] ; then echo "Usage: zgrep grep_text files.gz" return 2 fi text=$1 shift while [ $# -gt 0 ] do echo $1 gzip -cd $1 | grep -i $text shift done }
    • # Name: hgrep # Purpose: highlighting grep # Usage: hgrep pattern files # function hgrep { if [ $# -lt 2 ] ; then echo "Usage: hgrep pattern files" return 2 fi pattern=$1;shift sep=$'\001' #note use of $' ' to create control characters bold=$'\e[1m'; off=$'\e[0m' underline=$'\e[4m'; reverse=$'\e[7m' #other choices of highlighting sed -n "s${sep}${pattern}${sep}${reverse}&${off}${sep}gp" $* }
  • Monday, August 20, 2007

    run-parts scripts: a note about naming

    run-parts is used (on Debian systems, anyway) to run the scripts in /etc/cron.daily (hourly, weekly, etc) on the appropriate schedule. I had trouble this week with a Perl script I’d dropped into /etc/cron.daily failing to run. Ran fine from the command line, of course. Odd.

    Eventually it occurred to me, after a little light man page reading, to try run-parts --test /etc/cron.daily (which just prints the names of the scripts that would run). Script failed to show up. Most Odd.

    I finally found the answer via Google, although a slightly less
    light reading of the man page would have helped. Scripts to be run by
    run-parts must adhere to a particular naming convention - in
    particular, no .xx endings. So my script wasn’t being picked up due to that .pl ending. I renamed it to script and all was well.

    (I’m not actually sure what the logic of this is; I’m assuming it’s likely to be historical reasons. You can alter it with the --lsbsysinit option, if you prefer that. I know the .xx ending is by no means essential, but I prefer in general to have a quick visual of what language I’ve written a script in.)

    Powered by ScribeFire.



    1. 诚实.
    2. 检查错别字和文法错误.
    3. 不用写”我”这个字,看简历的人肯定知道写的是你.
    4. 先把你想写的都写出来,你可以稍后再做裁剪.
    5. 只包括高等教育.小学作文竞赛就不用提了.
    6. 去掉已经过时的术语和技术.没人关心你是不是会换色带.
    7. 雇主通常会用数据库管理和检索简历,所以格式尽量简洁,避免使用表格,尽量用空格而不是制表符,避免斜体,粗体.
    8. 香水纸,精致的字体和精美的图片都不重要.你需要出类拔萃,但不是靠这些.
    9. 使用易读的字体和清晰的设计让你的简历看起来更吸引人.
    10. 除非要求,不需要在简历中包含推荐人.

    Powered by ScribeFire.



    1. 坚持这个习惯三十天

    2. 每天都去练习它

    3. 开始时设定的目标要简单

    4. 时常提醒自己

    5. 保持始末一致

    6. 和一个同伴同时培养

    7. 制定一个措施,如果你要戒烟,那么每次在你想吸烟前咬你的手指

    8. 用更好的东西替代你失去的东西,如果你戒掉了烟,虽然你失去了香烟的享受,但是你却得到了无价的健康

    9. 不要追求完美

    10. 多对诱惑说”不”

    11. 远离周围的诱惑

    12. 与你的榜样交流

    13. 以做实验一样严谨的态度去对待

    14. 使用精神训练法。先想象你用坏习惯行事,然后想象着你去掉了坏习惯,并以好习惯行事。最后,想象着你在好习惯的影响下处于非常积极的状态。

    15. 将计划写在纸上

    16. 明确养成好习惯将为你带来的好处

    17. 明确坏习惯给你造成的痛苦

    18. 为自己而改变

    Powered by ScribeFire.


    1. 展示你对别人的兴趣——我在与人见面时,总是集中于给别人塑造一个自我的好形象而忽略了聆听对方的谈话。说起来,还真是讽刺,这往往使对方对你印象下降。
    2. 重复一遍名字——你可以重复一遍他的名字来确认自己是否记忆和发音正确。如果他的名字比较难记的时候,你可以多重复几遍。
    3. 多多使用名字——当你与对方交谈时,尽量多使用对方的名字,不一会儿你就会记下来了。
    4. 将名字对上人——将你记忆的名字与对方的相貌相互对应,心里重复这个联系并且记忆多次。
    5. 使用相联系的词语——如果对方名字和你所知道的某些词语或者与你的朋友的名字有着相似之处,那赶快将这个相似点记下来。
    6. 写下来——把他们的名字写下来,多翻几次笔记本,久而久之就印入你的脑海了。


    Powered by ScribeFire.

    Sunday, August 19, 2007

    SSH Menu - Save and Open SSH Connections from the Panel

    I was looking for a replacement for SecureCRT in Ubuntu. Something that would let me save all my SSH connections and make it possible to open a connection with the least effort.

    As is often the case, I found something better than SecureCRT - a panel applet for GNOME that gives me a drop-down list of SSH connections. SSHMenu is cool, way too cool.
    SSH Menu

    Above, you can see my list of ssh accounts in all their glory. A connection is just a click away.

    When you set up the connections, you can specify the geometry - ie, where on your desktop you want the gnome-terminal window to pop up, as well as a “profile” for the gnome-terminal instance - very handy if you want to have different color schemes for different ssh accounts to be able to distinguish between them better.
    SSH Menu Options

    What’s even better is, in the “Hostname (etc)” field, you can prepend ssh options to the hostname. The figure below shows my port forwarding setup for IRC at school, since I can’t chat using port 6667 at school.
    SSHMenu Account Options

    There’s a Debian/Ubuntu repository for SSHMenu, and of course, nothing stops you from downloading the .deb packages and installing them if you don’t wish to add another repository to you list of repositories. I wonder how long before SSHMenu finds itself into the Ubuntu repositories :)

    Once you get SSHMenu installed, you can add it to your panel by right-clicking on your GNOME panel, and selecting “Add to Panel”. SSHMenu should be listed as “SSH Menu Applet” under the “Utilities” section. Then all you have to do is use the tool to add accounts that pops-up when you install the applet, or add the accounts later by clicking on the “SSH” in your panel. However, this still doesn’t take us to “one-click” login, since you will be prompted for your password by the server you are trying to connect to.

    To make the connections truly one-click (or two-click), you might want to setup password-less logins using ssh-keygen and ssh-copy-id. A quick overview of that process follows:
    On your local computer, type:
    $ssh-keygen -t rsa
    When prompted for a password, you may want to enter none. If you enter a password there, you will have to enter it everytime you try to use the “passwordless” login, which kind of defeats the purpose.
    Once your RSA key-pair is generated, you need to add the public key to your server’s ~/.ssh/authorized_keys file. You can do this very easily by typing (on your local computer):
    $ssh-copy-id ~/.ssh/
    This will copy your public key for the just-generated RSA keypair to the ssh account, where your username is “username”.
    Of course, for this passwordless login to work, the server needs to accept this method of authentication. There’s an old article at the Debian Administration blog that describes the process in a little more detail, and countless others have written about this, so you won’t have trouble finding info.

    Vim Tip - Time based Undo (or Redo)

    Well these Vim tips have really been one of the more popular topics to come through this blog in a while. I’d like to keep with tradition and keep these going each Friday. This weeks tip is reverting or redoing changes based on time, vs simply the undo command (’u') and redo command (’ctrl-r’).

    From the vim :help section:

    :earlier {count} Go to older text state {count} times.

    :earlier {N}s Go to older text state {N} seconds before.

    :earlier {N}m Go to older text state {N} minutes before.

    :earlier {N}h Go to older text state {N} hours before.

    Also supported is the :later command following the same syntax pattern. Easily revert to changes at previous times with the :earlier, or re-do changes forward with :later. Of course :later won’t read your mind and create your document for you, but once you’ve gone back in time you can go back to the future.

    For more info on this tip type “:help earlier” within vim.

    Thursday, August 16, 2007

    N73 十二星座主题

    水瓶座 Aquarius
    1/20~2/18 水瓶座在十二星座中排行第十一,守护星是天王星,守护神在希腊神话中是优拉纳斯大神,他精通天文,学问丰富,有预知未来的能力。这个星座出生的人,反应灵敏,而且聪明有智慧。


    Click Here To Download
    双鱼座 Pisces
    2/19~3/20 双鱼座在十二星座中排行第十二,守护星是海王星。海王星在罗马神话中是海神,在希腊神话中则是掌管海洋、河川、泉水、地震的大神。这个星座出生的人,性情温和,有丰富的想象力及宽容心。

    Click Here To Download
    白羊座 Aries
    3/21~4/19 白羊座在十二星座中排行第一个,守护星是火星,守护神是希腊神话中的战神阿瑞斯,也是罗马神话中的马尔斯。这个星座出生的人,具有强烈的战斗本领,为了成为英雄,不畏艰难地奋力不懈。

    Click Here To Download
    金牛座 Taurus
    4/20~5/20 金牛座在十二星座中排行第二个,守护星是金星,守护神在希腊神话中称为阿佛罗狄忒,在罗马神话中称为维纳斯,是掌管爱与美的女神。这个星座出生的人,具有爱与美的象征,有很不错的艺术鉴赏能力,性情温和而值得信赖。

    Click Here To Download
    双子座 Gemini
    5/21~6/21 双子座是十二星座中的第三个星座,守护星是水星,守护神是希腊神话中的天使汉密斯,他是众神的传信者。这个星座出生的人,有很好的机智与反应能力,好奇心旺盛,有收集情报的能力。

    Click Here To Download
    巨蟹座 Cancer
    6/22~7/22 巨蟹座在十二星座中排行第四位,巨蟹座的守护星是月亮,守护神是希腊神话中的阿尔忒弥斯,也就是罗马神话中的狄安娜,代表了母性与丰收的象征。这个星座出生的人,渴望追求家庭的安全感,有强烈的母性精神。

    Click Here To Download
    狮子座 Leo
    7/23~8/22 狮子座在十二星座中排行第五,守护星是太阳,守护神是神话故事中太阳神阿波罗的前身,在象征太阳光和热的阿波罗守护下,这个星座出生的人,性格活泼洒脱,勇气绝佳,自尊心强。

    Click Here To Download
    处女座 Virgo
    8/23~9/22 处女座是十二星座中的第六个星座,守护星是水星,守护神是罗马神话中的墨丘利,在希腊神话中是天使赫尔墨斯,他是个知性的神,也是众神的传信者。这个星座出生的人,敏感、直觉力强,善于推测未来的变化并擅长把握良机。

    Click Here To Download
    天秤座 Libra
    9/23~10/22 天秤座在十二星座中排第七,守护星是金星,守护神是希腊神话中的阿佛罗狄忒,在罗马神话中是维纳斯,掌管美与爱及婚姻、谷物的丰盛收成。这个星座出生的人,有很高的美的意识,重视和谐与平衡。

    Click Here To Download
    天蝎座 Scorpio
    10/23~11/21 天蝎座在十二星座中排第八,守护星是冥王星,守护神在希腊神话中是哈得斯,在罗马神话中是冥府之王普鲁托,掌管生死、灵魂等事。这个星座出生的人,拥有强韧的生命力及永不疲倦的充沛精力。

    Click Here To Download
    射手座 Sagittarius
    11/22~12/21 射手座在十二个星座中排行第九个,守护星是木星,守护神是希腊神话中的宙斯,也是罗马神话中的尤皮特,他是个全知全能、自由奔放的神,也是众神之王。这个星座出生的人,对任何事充满好奇心,富有知识。

    Click Here To Download
    摩羯座 Capricornus
    12/22~1/19 摩羯座在十二星座中排行第十位,守护星是土星,守护神是罗马神话中的农神,也就是希腊神话中的司时神,主司大地与时光。这个星座出生的人,很有耐心与毅力,具有不可思议的吸引力。

    Click Here To Download


    拍出色-口袋里的影像大腕 Nokia N73
    享受自由自在的快乐Free Life

    别以为拍照就一定得用相机,如果你还认为手机拍照只是个"玩意儿",那就离时代潮流又远了一步.实际上Nokia N73的拍摄功能已经不输给一款普通的便携式DC,真正的机械快门搭配卡尔蔡司镜头,加上320万象素的实力,N73完全可以胜任随时记录精彩的任务.


    Nokia N73十大特色
    320万象素 2.4寸QVGA屏幕 ISO感光度 1/2000-2秒机械快门 卡尔蔡司光学镜头 8种拍照场景 AF自动对焦 3D音效铃声 视频防抖 特效音乐幻灯片

    Tips 关于卡尔蔡司镜头
    卡 尔蔡司镜头是来自德国的品牌,这是一家历史悠久的光学仪器厂商,其出品的镜头在传统相机领域向来都是"高贵"的代名词,许多摄影爱好者以拥有卡尔蔡司镜头 为荣.作为全球顶尖的相机镜头制造商,光学界的神话,卡尔蔡司制造出的镜头,有着高解析度,高对比度以及对色彩细致入微的表现力,所拍摄的影像几乎不变 形,同时可产生鲜明,锐利与绝佳对比度的超高水平画质.光学产品只要沾了蔡司镜头的边就有了品质的保障.
    150年历史的卡尔蔡司生产世界上屈指可 数的高品质透镜. 以其独有的色彩还原和成像特点令世界摄影爱好者爱不释手.蔡司开创了镜头工业中的诸多经典设计. 蔡司的创始者保罗鲁道夫就是镜头制造史上最有名的设计师之一.1890年,他设计出第一只消像散正光摄影镜头(Anastigmat),开创了蔡司镜头的 新纪元.1896年,鲁道夫又发表了大名鼎鼎的普兰纳(Planar)双高斯结构的镜头,对各种镜头像差都进行了出色的纠正.此后,世界各地生产的各种品 牌的标准镜头无不借鉴普兰纳镜头的设计. 1902年,他又设计出四片三组的"鹰之眼"---天塞(Tessar)镜头,成像质量惊世骇俗,明快锐利.Nokia在拍照手机上采用这款经典名镜,不 仅开创全球首例,更打造了N73不俗的光学性能.

    拍摄Tips by Nokia Official Guide Book of N73

    捕捉每一刻精彩 Perfect Images
    1 正确握持N73用N73拍照时,横向握持机身,快门正好在右手食指的活动范围,各种拍摄参数的设置可以很方便的用拇指进行调节.和普通DC一样,N73可以通过LCD屏幕进行取景,拍照时注意不要遮挡镜头和闪光灯.
    2 合理的构图
    突 出主题时摄影构图的主要目的,每一幅摄影作品,都有一个主题或者是趣味中心.初学摄影者最容易犯的错误就是把主体放在画面的正中间.的确,在正中间的主体 是最容易吸引人的注意力的,但是,一张好的照片应该是在吸引读者的目光后,能够引导读者的目光转移到其他地方去.如果,吸引人的主体放在正中间,很容易让 人专注在那个物体上,而令画面变得呆板. 既然要避免居中,就要知道所谓的"三分法则". 也称"黄金分割", "九宫格". "三分法则"是构图的基本的规则,意思是,把画面按照水平方向在1/3, 2/3位置画两条水平线,按垂直方向在1/3,2/3位置画两条垂直线,然后把主体尽量放在交点的位置上.这四条线交汇的4个点是人们的视觉最敏感的地方 所以当主体落在这四个点上,自然增加视觉上的吸引力,这也是符合了人的视觉心理习惯.
    和普通小型数码相机一样,N73采用中心点对焦.所谓中心点 对焦是指N73所测的距离是画面中心点处的物体到相机的距离.拍摄主题不在画面中心时,如果直接按下快门就有可能拍出主题虚背景实的照片.正确的拍摄方法 是先将画面中心点对准拍摄主题,半按快门完成对焦并按着不放,此时焦点被锁定在主题上,然后在移动N73至所需的构图位置,最终按下快门得到一张主题清晰 构图满意的照片.
    4 怎样选用角度
    正确选择拍摄角度是十分重要的,在同样的地方,同样的光线下,由于拍摄角度不同,所得到的照片艺术效果也不同.拍照的角度主要分为俯,仰,上,下,左,右等.例如: 用俯角能拍摄较大场面的照片,仰角可以表示高大,别致的效果.
    5 巧妙利用闪光灯
    在 逆光或者阴影下拍摄时,相机会根据背景的平均亮度测光,由于背景的平均亮度高,闪光灯不会开启,结果造成人物脸部曝光不足,这是N73的强制闪光灯模式就 可以排上用场了.利用强制闪光进行补光后,就可以得到一张人物与背景同样曝光正确的照片. 此外,下列环境一般是不适合用闪光灯的:
    a 超出闪光灯照明范围的场合,一般对超过2米的目标,使用内置闪光灯很难得到理想的效果
    b 物体过近时,比如在15cm以内近拍的时候一般不用闪光灯,否则物体表面亮度会不太均匀,某些部位可能会曝光过度.
    c 闪光灯与物体之间有障碍物的时候,如果闪光灯的光线被阻挡,反而会让照片曝光不足.
    6 正确使用夜间模式
    拍 摄夜景时如果仍用自动模式,N73会根据亮度自动闪光拍照,结果近处的人物被照亮了,背景却因为闪光灯照不到而漆黑一片.而采用夜景模式,N73会关闭闪 光灯,而通过延长曝光时间来获得满意的效果.如果采用夜景肖像模式,N73在开启闪光灯照亮人物的同时,也会以较慢的快门速度曝光,使人物和背景都能得到 准确的曝光.需要注意的是当使用这两种夜景模式的时候,由于快门速度很慢,最好利用支撑物来使N73保持稳定,同时拍摄对象也要保持静止不动,否则画面就 会拍虚。


    功能表--工具--情景模式里,在你要用的情景模式中选择“个性化选择”, 有一项"优先号码组" 平时是所有来电,只有你电话本里有分组才可以使用。



    先看你的电池仓后面的code是什么(欧版的不更改可是会升级成英文系统的哦,亚太和港行没事)0529815 0529825 都是亚太的;539696 539697 539698 是港行;0529790是欧版(资料来源于网上,请谨慎使用)


    港行普通版 亚太普通版

    N73 升级到V4.0723.2.0.1通知

    请先参见NSS软件-手机CODE随意改及N73 CODE详解.


    确保你安装了PC suit6.81(有的朋友说不用,不过为了保险起见,呵呵,谨慎一点)

    手机标准模式 最好换张电话打不进来的sim卡,取出minisd,保存数据,用pcsuit的同步,或者用备份把通讯录和短消息等转移到电脑里.


    等下载完升级包,大约66.1m(待下载 (66M) 这里可以拔线..但是拔了后到了66M后就说更新软件失败)


    下好以后从这里开始电脑与手机都不能进行任何操作否则会显示刷机失败, 如果显示失败,再选择"retry"重新刷.(刷机过程大约3-5min,加重起过程总共在10min以内)



    注:NOKIA最新发布Nokia PC套件 6.82 Rel22 简体中文版,新增了直接连接NOKIA官方网站在线刷机升级程序,手机升级不需要再去找奸商了~~才发现自己的USB联机线又多了一项功能。用PC套件,一路按Next就能完成刷机了~~

    1 打字的时候旁边的编号现在相当的清楚!以前是完全看不清的~!

    2 摄像头启动速度明显变快~! 第一次启动 3-4秒 第二次2秒左右!比之前V2快了很多

    3 前置摄像头照相变红现象完全改善,现在照相不红了~只是躁点太多的问题依然

    4 操作速度感觉稍微变快,特别是12宫格的速度,第一次2s,以后几乎一点就进

    5 名片夹默认搜索改成英文搜索

    6 增加调制解调器的选项

    7 部分程序的名称改变

    8 感觉系统更加的稳定

    欧版的朋友 可以用NSS将CODE号改成 0529815或者0529825 新加坡版 刷完后有中文简体和英文 改成0529814 港行 刷完后有繁体中文和简体中文还有英文










    18.C盘内存变成48M了 比以前多了6M



    n73来电视频播放软件SkyeTones for S60 3rd Edition
    诺基亚n73 来电通2.12正式版
    时刻关注本站N73 S60 3RD资源索引,掌握 S60 3RD资源最新流行动态!



    1.系统崩溃、无法进入待机画面。 2.系统装的软件过于杂乱,删除时在C:盘留下垃圾文件
    再次强调,不是万不得已,不要格式化手机! 很多网友反映输入指令不能格式化手机,是因为指令错了。



       附加功能--存储卡--选项--格式化存储卡,开始格式化。整个格式化的过程稍长,如果是128容量的MMC卡,完成格式化的过程大概需要10分钟左 右。如果有读卡器的话,可以在电脑上使用读卡器来进行格式化,这样时间会短些。不过需要注意的是,如果用读卡器在电脑上格式化存储卡,一定要把文件格式改 成FAT16,格式化完成时会提示输入存储卡名称。

    NOKIA s60手机前最高软件版本

    3250 ---RM-38 ---4.40
    5700 ---RM-230 ---3.27 APAC
    5700 ---RM-302 ---3.28.1 CHINA
    6630 ---RM-1 ---6.050340 APAC
    6680 ---RM-36 ---5.050440 APAC
    6681 ---RM-57 ---7.11.00 CHINA
    6682 ---RM-58 ---4.41.0
    E50 ---RM-170 --- APAC
    E50 ---RM-171 ---6.27.01 APAC
    E60 ---RM-49 ---2.06180608
    E61 ---RM-89 ---3.0633.09.04 APAC
    E61i ---RM-227 ---1.0633.22.05 APAC
    E62 ---RM-88 ---18.06.32 CHINA
    E65 ---RM-208 ---1.0633.18.01 APAC
    E70 ---RM-10 ---206180710 APAC
    E90 ---RA-6 --- APAC
    N70 ---RM-84 ---5.0705.3.0.1 APAC
    N70-5---RM-99 ---5.0635.2.5.3 APAC
    N71 ---RM-67 ---4.0642.1.05 APAC
    N71 ---RM-112 ---4.0642.5.05 CHINA
    N72 ---RM-180 ---5.0706.4.0.1 APAC
    N73 ---RM-132 ---3.0713.1.1.2 普通版
    N73 ---RM-132 ---3.0638.0.0.2 CMCC
    N73 ---RM-132 ---4.0727.2.4.1 国行IE版
    N73 ---RM-133 ---4.0723.2.0.1 普通版
    N73 ---RM-133 ---4.0727.2.2.1 音乐版
    N73 ---RM-133 ---4.0727.2.3.1 IE版

    N75 ---RM-128 ---10.2.055 LTA
    N76 ---RM-135 ---10.0.035 APAC
    N76 ---RM-149 ---10.1.048 CHINA
    N77 ---RM-194 ---2.0720.1.0.1 APAC
    N80 ---RM-92 ---5.0719.0.2 APAC
    N90 ---RM-42 ---5.0607.7.3 APAC
    N91 ---RM-43 ---4GB 2.20.008 APAC
    N91 ---RM-43 ---8GB 3.10.023 APAC
    N91-5---RM-158 ---4GB 2.20.008 CHINA
    N91-5---RM-158 ---8GB 3.00.060 CHINA
    N92 ---RM-100 ---2.0708.1.0.16 APAC
    N93 ---RM-55 ---20.0.058 APAC
    N93 ---RM-153 ---20.1.058 CHINA
    N93i ---RM-156 ---20.0.084 APAC
    N93i ---RM-157 ---11.1.009 CHINA
    N95 ---RM-159 ---12.0.013 APAC
    N95 ---RM-245 ---11.1.010 CHINA
    770 ---SU-18
    N800 ---RX-34 ---3200710-7


    0539343 可以刷v4.0727.2.2.1亚太音乐版
    0539366 可以刷V4.0727.2.3.1香港IE版
    0539361 可以刷V4.0727.2.4.1国行IE版

    CODE:0539361 国行网络加强版 V4.0723.2.1.1
    CODE:0529814 港行普通版   V4.0726.2.0.1
    CODE:0539366 港行IE版    V4.0727.2.3.1
    CODE:0539343 亚太音乐版   V4.0727.2.2.1

    N73 v4.0727.2.2.1 最新音乐版的改进

    View Full Version : N73 ME v4.0727.2.2.1

    New features 新特点:
    - FOTA (Flashing Over The Air) 无线刷机支持
    - Bluetooth Stereo 蓝牙立体声
    - A2DP Support 支持A2DP
    - Dial-up over IR 通过IR拨号
    - Lifetimer Reset for reflashed phones 重刷的机器通话时间重置
    - Vibra Boot notification 开机震动提示
    - Configurable Flash setting function for Camera 照相闪光灯设置功能可调
    - Secure Formatter with TCB and All-Files capabilities 安全格式化
    - N Series Music Player replaces S60 Music Player N系列音乐播放器替代原S60播放器
    - Online Album included 在线专辑添加
    - Active Standby + UI Grid layout + application locations changed in-line
    with Pre-Space UI layout. 激活待机+UI 网格布置+应用程序位置改变为嵌入式及预留式UI布置???

    Removed features 移除的程序:
    - Snakes 贪食蛇

    Improvements 以下问题得到改进:
    - Weather Deck wording alignement 某些程序名调整
    - Spurious “Out of Memory” indications 取消“内存不足”提示
    - Icons and text in Application Shell 图标和文档放在应用程序里
    - Icon in “Catalogs” “目录”中的图标
    - Folder validity updates 文件夹有效性更新
    - Alarm clock function, when handset is turned off 闹钟功能改进,当挂机后启动
    - Active Standby Shortcut 6 function 待机增加至6个快捷方式
    - Quick Office “Save” options Quick Office 增加“保存”选项
    - Bluetooth search “Searching for Devices” 蓝牙搜索时显示“搜索设备”
    - Camera can not be launched if RAM is low. 如果内存不足摄像头无法启动
    - Music player - Indicator appears on the idle state background, after
    saving a music track 音乐播放器 - 在保存音乐路径的时候,指示条停留在背景空档处
    - Phone reboots if wrong memory card password is entered 如果存储卡密码输错手机将重启
    - Memory card details are not read correctly if the card is locked by DUV 如果存储卡被DUV锁定该卡的详细信息无法读取
    - Tutorial – Occasional malfunction 教程功能 - 时常出错
    - Music player starts when BT stereo headset is switched OFF 当蓝牙耳机关闭,音乐播放器启动
    - Unable to create FOTA Server profile 无法创建FOTA(无线刷机)服务器信息
    - "System Error" occurs when trying to synchronize after restoring the backed up info. 当在恢复备份信息同步时,发生“系统错误”的提示
    - "App. Closed: Device manager" is detected after exiting from New server profile view. 在从新服务器信息退出时,出现“应用程序关闭:设备管理器”的提示
    - Gallery crashes or phone reboots when moving rocker after making a new album in gallery 当在创建了一个新的图集时,移动摇杆导致图像和视频功能关闭或手机重启
    - Long name for messaging settings makes messaging unusable 给信息设定较长标题时导致该信息不可用
    - Online Print improvement. 在线打印功能提升
    - Streaming improment for H3G H3G流媒体效果提升


    The firmware is awesome. fast, gallery starts faster, imaging wid camera amazing, music player louder wen using stereo sound n equlazers (5 Band), music player faster n performance improved.

    there use to be a bug in v3 music edition were if u put it to mass storage mode n tranfser songs n den go back to online mode or general profile n into music player to refresh list it would say Alredy in use has now been fixed !

    Support for Stereo bluetooth to just like standard v4 firmware







































    成功机理:选择一个容易出业绩的市场可以让你在很短的时间里就成为公司里一颗耀眼的明星。容易出业绩的市场一般可概括为:一是尚未开发的新市场,包 括公司还没有开发的和不准备开发的市场;二是明显具有发展潜力,已有人开拓但失败了的市场。这两类市场都有一定的风险,但是风险越大,回报也越大。

    成功案例:中南某省,市场以其独特的消费结构和复杂的管理环境而闻名。某补血类保健品企业曾经连续两年派员进行开拓,均无功而返。后来一刚到公司的 研究生主动请缨,在争取了相关的总部政策支持后,单枪匹马深入该省,起用当地员工,一改前人先打省会城市再做中小城市的思路,避开当时的领导品牌在省会等 重要城市的种种封杀,同时在营销手段和策略上大胆尝试。最后一举启动市场,沿着京广线杀回省会,一年间将市场业绩做到了全国第二的水平。次年,该研究生就 直接由区域经理被任命为西南大区经理,2年后成为年销售逾10亿元的集团公司行销总裁,而当时他才30岁出头。


    成功机理:出色的市场工作不仅表现在销售量上,而且还体现在对顾客、经销商、终端、政府部门甚至竞争对手细致入微的服务和协调过程中。一线营销人员 通过自己的行动在这些市场朋友中建立的良好口碑,迟早有一天会传到公司高层的耳朵里。通过这些人嘴里说出来的话,公司领导一般都是比较重视的。正所谓“桃 李不言,下自成蹊”。

    成功案例:笔者从前在企业工作时,曾经参加过一个客户答谢会。当时有一位顾客谈到直接从我们公司一员工手中购买产品一事,引起了各位高层领导的关 注,因为公司制度规定员工不能从事直销工作,一定要通过经销商和终端销售。但听完后才发现错怪了当地的销售人员。原来,这个顾客住在非常偏僻的农村,附近 没有药店,镇里的药店也不愿意为她一个人送货,结果她一个电话打到公司在当地的工作站求助。那个接电话的员工二话没说,到附近的药店里买了一个疗程的产 品,换乘三次车,一次船,又步行2公里送到她家,还耐心指导她服用。后来经过她的宣传,整个村子都知道了这件事,又有5家人买过公司的产品。答谢会后公司 领导立刻指派专人去调查此事,结果发现当地的经销商和终端营业员对那个一线员工的评价都很高。接下来发生的事我们可以猜出:他被立即安排参加公司的储备经 理培训,不久被任命为一个区域的市场经理。


    成功机理:对于一线营销人员来说,公司的一些重要会议是展现自己的最佳舞台。这些会议包括员工的培训总结会、月度或季度市场例会、公司领导的现场办 公会、市场观摩会、年终的表彰会等等。会议上公司高层或专业部门的负责人一般都会在场。笔者的个人体会是公司高层更愿意听取来自市场一线的声音,所以营销 人员一旦有机会参加这样的会议千万不要放过每一个发言的机会。你在会上的发言实际上反映了你的思维能力、对市场工作的认识程度。通过会前充分的市场调研和 资料准备,尤其是数据的整理挖掘,你就可以在会上从一线的角度从容不迫侃侃而谈了。这时,老总一面在听你的汇报,一面就在脑海里盘算你下一步的发展空间 了!

    成功案例:有一位市场一线的女员工,当时她所在的市场碰到了百年不遇的洪涝灾害,县城里一片混乱,分公司所在仓库里还堆着价值五万多元的货物,一怕 水淹,二怕人抢。这位女员工当时组织剩下的几位女促销员(经理被洪水困在别的县城),站在齐膝深的水中,把货物转移到安全的地方,洪水一退,就立刻清点在 经销商处存放的货物,帮助他们克服天灾的影响,最终完成了当月的销售任务。省公司该季度例会破例让她参加,当时她含泪的发言给在场的每个人留下了深刻的印 象,会后没有多长时间,其就被提拔为另外一个地级市场的经理。


    成功案例:Autodesk公司全球副总裁兼大中华区总裁高群耀接任吴仕宏女士职务不久,就开始对所有的代理商进行拜访。当时,公司一个前沿管理经 理(在平常情况下根本没有机会接触到公司高层)负责陪同高先生拜访她所负责的这个代理商。在从北京到广州的飞机上,她花了一个多小时时间充分地 “presentherself”,让高先生了解了她,知道了她在IBM、HP的工作经历,也发现了她的工作能力。后来,随着华南区总经理的离任,高先生 首先想到了这位女员工。然后她开始步步上升,连续三次获得破格提拔,还荣获了比尔·盖茨奖,荣幸地和比尔·盖茨共进午餐。现在,这位女经理已经是另一家著 名外企 中国区总裁了。


    成功机理:通常来讲,并不是每个一线员工都有接触高层经理的机会,所以寄希望于一次偶然相遇的想法无异于“守株待兔”。积极的做法应该是拓宽让高层 领导发现自己的渠道。而在公司领导关注的媒体上展现你的才华就是一种不错的选择。所谓公司领导关注的媒体一般有两类,一是内部媒体如公司自己的报纸、杂 志、网站论坛等;二是外部媒体,如公开发行的营销管理类的期刊、报纸、网站甚至电视等等。如果你确实对市场有深刻的认识,对公司一线的实际操作有心得,就 可以分类投到这两类媒体上,一方面锻炼自己的思维能力,另一方面也可以借助这个平台展示 自己的才华。

    成功案例:一位省级经理4年前刚刚入道的时候,天天呆在市场一线,与经销商和终端摸爬滚打。业余时间,他埋头苦读,然后结合实际市场操作,向公司内 的报纸投稿,偶尔有文章还见诸报端。一次,公司报纸组织有关售后服务大讨论的征文比赛,他就把平常自己在工作中的一些体会总结出来,然后运用有关营销理论 进行了分析,写出文章投过去。当时来自公司总部和各地市场的参选稿件有500多份,评出获奖者10名,他的名字排在了第三位。其文章恰好被当时分管市场工 作的一位副总裁看到,认为文才不错,有市场头脑,就调到身边从事市场调研工作,亲自进行传帮带,半年之后,又把他派到市场担任县级经理,然后是地级经理、 省级经理,最近听说他已经有新的发展计划了。


    成功机理:著名教授罗纳德在对美国500多名MBA进行调查后,总结了获得高薪(高职位)10大法则。其中一条就是拥有自己职业发展的 “良师董事会”,董事会的成员必须对你有兴趣,具有相关知识、智慧、专业和人际关系,而且在你寻求建议时,愿意以诚相待者。一般来说有七类人,包括你职权 上的上司、另一位高层经理(别找你的上司的上司,或是上司的“敌人”,这样会让你的上司感到紧张或你的不忠)、其他部门的同事、对你坦诚相见的部属、专业 知识上的导师、产业专家、老同学等。他们或者能给你提供发展的空间,或者能提供公司的、专业的、行业的、职业的信息等。当然,挑选和培养一群良师需要判断 力和敏锐度。对于市场一线的员工来说,要想脱颖而出,“良师董事会”这样一群人的帮助是不可或缺的。

    成功案例:笔者的一位朋友,进入了一家刚起步的民营企业,起初在一个区域经理手下做普通业务员。但是这个经理工作经验非常丰富,人很热情,手把手地 教他做业务。一年后,公司规模扩大,区域经理升迁为省级经理,就提拔了跟随自己的他。然后,每隔一年,老领导升一级,笔者的朋友就跟着上个台阶。最后,老 领导自己出来又开个公司,这个朋友就直接成为新公司的营销副总了。他的成功就在于遇到了一个好老师和好上司。

    归根结底,从营销学的角度解释这个问题,就是“营销你自己”。既然是营销,就必须有个好产品,这个产品就是市场一线人员自身的能力和素质。一线营销 人员如果没有优秀的个人综合素质,如果没有丰富的市场经验,如果不积极地在市场一线接受锻炼,那么再好的捷径在其面前也是漫漫雄关难逾越。这正如高群耀先 生所言,“在当今时代,市场机遇的分子和市场竞争对手的分母同时都在增加,当你发现一个职业发展的机会时,你的竞争对手也同时增加了一批。”所以,真正的 捷径来自我们对市场操作的上下求索,来自我们对营销问题的深刻认识,来自我们对发展机会的敏锐把握。



    • 认识自己不自信的来源。总觉得有人在背后责骂你?总是对什么事情感到羞耻?找到这些使自己不自信的来源,给它们一个称号,认识它。将这些来源告诉给朋友和爱人,大胆地表达出来。对别人说出来除是对自己勇气的提高,同时也可以获取他们的帮助,找到问题的根源。
    • 认识自己的长处和优点。为什么要沉迷于自己失败的一面呢?没有一个人是完美的,但是每个人都有自己优秀的地方。为你拥有的特长和优点感到自豪,毕竟自己还是挺厉害的嘛~
    • 对着镜子笑一笑,人生是积极的。给自己一个笑脸,不要对生活感到怜悯,也不要厌恶或者轻视自己。常常对镜子笑一笑,让你感到更快乐更自信。
    • 展现自己优秀的一面。让别人认可你,让他们觉得你很厉害,你的自信就会慢慢提升的,所以去展现你自己的才艺和优点。朝着自己热情的方向前进,培养多一些爱好,多交一些良友,让你变得自信满满。
    • 设定目标,做好准备。设定一个目标,贯注信念,专注其中。并且做好充分的准备,这样更容易让你达到目标。要经常鼓励自己,因为你就要成功了!
    • 不要逃避和不敢面对失败。只有弱小的自卑者才会盯着自己的失败和缺点不放手,他们逃避现实,不敢自我肯定。有句名言说“现实中的恐惧,远比不上想象中的恐惧那么可怕”,所以敢于面对挑战,鼓气勇气,多试几次,你的自信心就会慢慢高涨起来。
    • 为自己订下约束。给自己一点压力,制定一些约束,遵守这些约束。弥缝在参加生存训练时,就这么对自己说:不管怎么样的活动,什么都得给我尝试一遍。结果可想而知,弥缝不仅享受了其中的乐趣,还提高了自己的自信心。所以为自己订下约束,遵守约束和自我信赖,随着时间的推移你的信心就会成为你的勇气和力量。

    劲爆热推 果汁断食法


      给你好气色果汁── 芒果柳丁苹果汁


      材料:●芒果2个 ●柳丁半个 ●苹果1个 ●蜂蜜少许



      ● 加入250cc的开水。

      ● 打完后加入适量的蜂蜜,即可食用。




      材料:●奇异果2个 ●凤梨半个 ●苹果1个 ●蜂蜜少许






    Wednesday, August 15, 2007

    Prompt magic

    Why stick with the standard boring shell prompt when you can easily make it colorful and more informative? In this tip, Daniel Robbins will show you how to get your shell prompt just the way you like it, as well as how to dynamically update your X terminal's title bar.

    As Linux/UNIX people, we spend a lot of time working in the shell, and in many cases, this is what we have staring back at us:


    If you happen to be root, you're entitled to the "prestige" version of this beautiful prompt:


    These prompts are not exactly pretty. It's no wonder that several Linux distributions have upgraded their default prompts that add color and additional information to boot. However, even if you happen to have a modern distribution that comes with a nice, colorful prompt, it may not be perfect. Maybe you'd like to add or change some colors, or add (or remove) information from the prompt itself. It isn't hard to design your own colorized, tricked-out prompt from scratch.

    Prompt basics

    Under bash, you can set your prompt by changing the value of the PS1 environment variable, as follows:

    $ export PS1="> "

    Changes take effect immediately, and can be made permanent by placing the "export" definition in your ~/.bashrc file. PS1 can contain any amount of plain text that you'd like:

    $ export PS1="This is my super prompt > "
    This is my super prompt >

    While this is, um, interesting, it's not exactly useful to have a prompt that contains lots of static text. Most custom prompts contain information like the current username, working directory, or hostname. These tidbits of information can help you to navigate in your shell universe. For example, the following prompt will display your username and hostname:

    $ export PS1="\u@\H > "
    drobbins@freebox >

    This prompt is especially handy for people who log in to various machines under various, differently-named accounts, since it acts as a reminder of what machine you're actually on and what privileges you currently have.

    In the above example, we told bash to insert the username and hostname into the prompt by using special backslash-escaped character sequences that bash replaces with specific values when they appear in the PS1 variable. We used the sequences "\u" (for username) and "\H" (for the first part of the hostname). Here's a complete list of all special sequences that bash recognizes (you can find this list in the bash man page, in the "PROMPTING" section):

    \aThe ASCII bell character (you can also type \007)
    \dDate in "Wed Sep 06" format
    \eASCII escape character (you can also type \033)
    \hFirst part of hostname (such as "mybox")
    \HFull hostname (such as "")
    \jThe number of processes you've suspended in this shell by hitting ^Z
    \lThe name of the shell's terminal device (such as "ttyp4")
    \rCarriage return
    \sThe name of the shell executable (such as "bash")
    \tTime in 24-hour format (such as "23:01:01")
    \TTime in 12-hour format (such as "11:01:01")
    \@Time in 12-hour format with am/pm
    \uYour username
    \vVersion of bash (such as 2.04)
    \VBash version, including patchlevel
    \wCurrent working directory (such as "/home/drobbins")
    \WThe "basename" of the current working directory (such as "drobbins")
    \!Current command's position in the history buffer
    \#Command number (this will count up at each prompt, as long as you type something)
    \$If you are not root, inserts a "$"; if you are root, you get a "#"
    \xxxInserts an ASCII character based on three-digit number xxx (replace unused digits with zeros, such as "\007")
    \\A backslash
    \[This sequence should appear before a sequence of characters that don't move the cursor (like color escape sequences). This allows bash to calculate word wrapping correctly.
    \]This sequence should appear after a sequence of non-printing characters.

    So, there you have all of bash's special backslashed escape sequences. Play around with them for a bit to get a feel for how they work. After you've done a little testing, it's time to add some color.

    Back to top


    Adding color is quite easy; the first step is to design a prompt without color. Then, all we need to do is add special escape sequences that'll be recognized by the terminal (rather than bash) and cause it to display certain parts of the text in color. Standard Linux terminals and X terminals allow you to set the foreground (text) color and the background color, and also enable "bold" characters if so desired. We get eight colors to choose from.

    Colors are selected by adding special sequences to PS1 -- basically sandwiching numeric values between a "\e[" (escape open-bracket) and an "m". If we specify more than one numeric code, we separate each code with a semicolon. Here's an example color code:


    When we specify a zero as a numeric code, it tells the terminal to reset foreground, background, and boldness settings to their default values. You'll want to use this code at the end of your prompt, so that the text that you type in is not colorized. Now, let's take a look at the color codes. Check out this screenshot:

    Color chart
    Color chart

    To use this chart, find the color you'd like to use, and find the corresponding foreground (30-37) and background (40-47) numbers. For example, if you like green on a normal black background, the numbers are 32 and 40. Then, take your prompt definition and add the appropriate color codes. This:

    export PS1="\w> "


    export PS1="\e[32;40m\w> "

    So far, so good, but it's not perfect yet. After bash prints the working directory, we need to set the color back to normal with a "\e[0m" sequence:

    export PS1="\e[32;40m\w> \e[0m"

    This definition will give you a nice, green prompt, but we still need to add a few finishing touches. We don't need to include the background color setting of 40, since that sets the background to black which is the default color anyway. Also, the green color is quite dim; we can fix this by adding a "1" color code, which enables brighter, bold text. In addition to this change, we need to surround all non-printing characters with special bash escape sequences, "\[" and "\]". These sequences will tell bash that the enclosed characters don't take up any space on the line, which will allow word-wrapping to continue to work properly. Without them, you'll end up with a nice-looking prompt that will mess up the screen if you happen to type in a command that approaches the extreme right of the terminal. Here's our final prompt:

    export PS1="\[\e[32;1m\]\w> \[\e[0m\]"

    Don't be afraid to use several colors in the same prompt, like so:

    export PS1="\[\e[36;1m\]\u@\[\e[32;1m\]\H> \[\e[0m\]"

    Back to top

    Xterm fun

    I've shown you how to add information and color to your prompt, but you can do even more. It's possible to add special codes to your prompt that will cause the title bar of your X terminal (such as rxvt or aterm) to be dynamically updated. All you need to do is add the following sequence to your PS1 prompt:


    Simply replace the substring "titlebar" with the text that you'd like to have appear in your xterm's title bar, and you're all set! You don't need to use static text; you can also insert bash escape sequences into your titlebar. Check out this example, which places the username, hostname, and current working directory in the titlebar, as well as defining a short, bright green prompt:

    export PS1="\[\e]2;\u@\H \w\a\e[32;1m\]>\[\e[0m\] "

    This is the particular prompt that I'm using in the colortable screenshot, above. I love this prompt, because it puts all the information in the title bar rather than in the terminal where it limits how much can fit on a line. By the way, make sure you surround your titlebar sequence with "\[" and "\]", since as far as the terminal is concerned, this sequence is non-printing. The problem with putting lots of information in the title bar is that you will not be able to see info if you are using a non-graphical terminal, such as the system console. To fix this, you may want to add something like this to your .bashrc:

    if [ "$TERM" = "linux" ]
    #we're on the system console or maybe telnetting in
    export PS1="\[\e[32;1m\]\u@\H > \[\e[0m\]"
    #we're not on the console, assume an xterm
    export PS1="\[\e]2;\u@\H \w\a\e[32;1m\]>\[\e[0m\] "

    This bash conditional statement will dynamically set your prompt based on your current terminal settings. For consistency, you'll want to configure your ~/.bash_profile so that it sources your ~/.bashrc on startup. Make sure the following line is in your ~/.bash_profile:

    source ~/.bashrc

    This way, you'll get the same prompt setting whether you start a login or non-login shell.

    Well, there you have it. Now, have some fun and whip up some nifty colorized prompts!


    • rxvt is a great little xterm that happens to have a good amount of documentation related to escape sequences tucked in the "doc" directory included in the source tarball.

    • aterm is another terminal program, based on rxvt. It supports several nice visual features, like transparency and tinting.

    • bashish is a theme engine for all different kinds of terminals.