http://code.google.com/p/vimcolorschemetest/
另外相信对着几百个配色,一个个的color xx,也会吐血的,所以给大家介绍个插件
csExplorer.vim, 可以列出所有的配色文件,然后一个个选择就行啦~
大家是否有选到自己喜欢的配色?选好了要记得告诉我一声哦
另外相信对着几百个配色,一个个的color xx,也会吐血的,所以给大家介绍个插件
csExplorer.vim, 可以列出所有的配色文件,然后一个个选择就行啦~
大家是否有选到自己喜欢的配色?选好了要记得告诉我一声哦
因为现在比较闲了,前一段时间,突发奇想,我也弄点小钱,去重新找点市场的感觉如何?于是就在股海中游弋。做了一番功课以后,决定买同庆B和赛马实业,前者做长线后者做中长线,但如果有特殊机会就做短线。我很幸运,运气不错,那天基本上买进一个当日最低价。因为涨得不错,前天晚饭后我边吃橘子,边终于忍不住跟老婆说了。老婆很专业地看了看盘子和K线,冷不丁地问了一句:"谁告诉你这支股票的?""什么,你说什么?"我诧异。"买这支股票是谁推荐你的?"我差点连着橘子皮把橘子吞下去。
老婆的提问让我一直在想一个问题:我们的投资者已经形成了一种思维习惯:投资的事一定得问专家,如果没有专家就道听途说。反正,问自己不如问别人。我不知道这是不是严重到悲哀的程度了。
以我这么多年研究基金的经验。情况没有什么不同。学生或者朋友一问就是,"傅老师,帮我挑一只基金吧。"甚至有一次,老婆所在行的同行也拿了七、八只基金问我哪一只更好一点?在这种时候我总是很尴尬:我认为好的是你需要的吗?你的投资风格以及财务和心理风险承受能力和我的一样吗?你在生命周期曲线中的位置跟我一样吗?你的家庭环境跟我一样吗……?前几天记者说要采访我,我就问,你要问的是什么问题?他说了。我说那问题要说复杂就复杂要说简单就简单。记者就说,时间有限,你就往简单的说。我说,简单地说,世界上没有救世主,劳动还是靠自己。
我要说的是,我虽然对宗教没有研究,但却对世俗对佛的看法很有些看法。我在我的私人记载里有一句话叫"我就是佛,佛就是我"。这是题外话。
佛也好,基督教也好,基金投资也好,粗浅地说你在征求意见的时候,深层地说你在看神的时候,你一定要记住:你是你自己。专家也好,骗子也好,他们有他们很多的看法,即便对于你的经验来说他错了,你也不能说他错,因为"
道可道非常道"啊。所有的意见最后适合你的才是最好的。
屈原是一位伟大的殉道者
<卜居篇>表明,屈原在忠而被谤、遭到流放的情况下,内心焦虑彷徨,欲通过占卜决定命运,以获得精神突围.但卜者回答,万物皆有所长短,智慧也会遇到无法辨清的情况和时候(可能包括,卜不能决定屈原的选择,君王不能确知臣下的忠贞,还有屈原对现状的不满无法理解,等多个方面的智的迷惑);屈原最终选择了殉道。
万物各有优势和弱点,人人都会遇到智慧无法理清的情况
卜算有算不到的地方,神仙还有不灵通的时候
从你的心出发,做你想做的事。。。。。。
楚辞 卷六
卜居
屈原既放,三年不得复见,竭知眒忠,而蔽鄣於谗,心烦虑乱,不知所从。乃往见太卜郑詹尹曰:「余有所疑,愿因先生泀之。」詹尹乃端策拂龟曰:「君将何以教之?」屈原曰:
「吾宁悃悃款款,朴以忠乎?
将送往劳来,斯无竑乎?
宁诲锄草茅,以力耕乎?
将游大人,以成名乎?
宁正言不謒,以危身乎?
将从俗富賔,以偷生乎?
宁超然高举,以保真乎?
将唜訾栗斯,喔咿嚅儿,以事媎人乎?
宁廉洁正直,以自清乎?
将突梯滑稽,如脂如韦,以洁楹乎?
宁昂昂若千里之驹乎?
将氾氾若水中之鸨乎?
与波上下,偷以全吾躯乎?
宁与騯髃亢轭乎?
将杂驽駌之踖乎?
宁与黶鹄比翼乎?
将与鸡鷉争食乎?
此孰吉孰凶?
何去何从?
世溷浊而不清:
蝉翼为重,千钧为轻;
黶钟毁弃,瓦釜雷鴔;
谗人高张,贤士无名。
吁嗟默默兮,谁知吾之廉贞?」
詹尹乃释策而谢曰:「夫尺有所短,寸有所闸,物有所不足,智有所不明,数有所不逮,神有所不通,用君之心,行君之意。龟策诚不能知事。」
The first story is about connecting the dots.
I dropped out of Reed College after the first six months, but then stayed
around as a drop-in for another 18 months or so before I really quit. So
why did I drop out?
It started before I was born. My biological mother was a young, unwed
college graduate student, and she decided to put me up for adoption. She
felt very strongly that I should be adopted by college graduates, so
everything was all set for me to be adopted at birth by a lawyer and his
wife. Except that when I popped out they decided at the last minute that
they really wanted a girl. So my parents, who were on a waiting list, got
a call in the middle of the night asking: "We have an unexpected baby boy;
do you want him?" They said: "Of course." My biological mother later found
out that my mother had never graduated from college and that my father had
never graduated from high school. She refused to sign the final adoption
papers. She only relented a few months later when my parents promised that
I would someday go to college.
And 17 years later I did go to college. But I naively chose a college that
was almost as expensive as Stanford, and all of my working-class parents'
savings were being spent on my college tuition. After six months, I
couldn't see the value in it. I had no idea what I wanted to do with my
life and no idea how college was going to help me figure it out. And here
I was spending all of the money my parents had saved their entire life. So
I decided to drop out and trust that it would all work out okay. It was
pretty scary at the time, but looking back it was one of the best
decisions I ever made. The minute I dropped out I could stop taking the
required classes that didn't interest me, and begin dropping in on the
ones that looked interesting.
It wasn't all romantic. I didn't have a dorm room, so I slept on the floor
in friends' rooms, I returned Coke bottles for the 5-cent deposits to buy
food with, and I would walk the seven miles across town every Sunday night
to get one good meal a week at the Hare Krishna temple. I loved it. And
much of what I stumbled into by following my curiosity and intuition
turned out to be priceless later on. Let me give you one example:
Reed College at that time offered perhaps the best calligraphy instruction
in the country. Throughout the campus every poster, every label on every
drawer, was beautifully hand calligraphed. Because I had dropped out and
didn't have to take the normal classes, I decided to take a calligraphy
class to learn how to do this. I learned about serif and san serif
typefaces, about varying the amount of space between different letter
combinations, about what makes great typography great. It was beautiful,
historical, artistically subtle in a way that science can't capture, and I
found it fascinating.
None of this had even a hope of any practical application in my life. But
10 years later, when we were designing the first Macintosh computer, it
all came back to me. And we designed it all into the Mac. It was the first
computer with beautiful typography. If I had never dropped in on that
single course in college, the Mac would have never had multiple typefaces
or proportionally spaced fonts. And since Windows just copied the Mac, its
likely that no personal computer would have them. If I had never dropped
out, I would have never dropped in on this calligraphy class, and personal
computers might not have the wonderful typography that they do. Of course
it was impossible to connect the dots looking forward when I was in
college. But it was very, very clear looking backwards 10 years later.
Again, you can't connect the dots looking forward; you can only connect
them looking backwards. So you have to trust that the dots will somehow
connect in your future. You have to trust in something–your gut, destiny,
life, karma, whatever. This approach has never let me down, and it has
made all the difference in my life.
My second story is about love and loss.
I was lucky–I found what I loved to do early in life. Woz and I started
Apple in my parents garage when I was 20. We worked hard, and in 10 years
Apple had grown from just the two of us in a garage into a $2 billion
company with over 4000 employees. We had just released our finest
creation–the Macintosh–a year earlier, and I had just turned 30. And then
I got fired. How can you get fired from a company you started? Well, as
Apple grew we hired someone who I thought was very talented to run the
company with me, and for the first year or so things went well. But then
our visions of the future began to diverge and eventually we had a falling
out. When we did, our Board of Directors sided with him. So at 30, I was
out. And very publicly out. What had been the focus of my entire adult
life was gone, and it was devastating.
I really didn't know what to do for a few months. I felt that I had let
the previous generation of entrepreneurs down–that I had dropped the baton
as it was being passed to me. I met with David Packard and Bob Noyce and
tried to apologize for screwing up so badly. I was a very public failure,
and I even thought about running away from the Valley. But something
slowly began to dawn on me–I still loved what I did. The turn of events at
Apple had not changed that one bit. I had been rejected, but I was still
in love. And so I decided to start over.
I didn't see it then, but it turned out that getting fired from Apple was
the best thing that could have ever happened to me. The heaviness of being
successful was replaced by the lightness of being a beginner again, less
sure about everything. It freed me to enter one of the most creative
periods of my life.
During the next five years, I started a company named NeXT, another
company named Pixar, and fell in love with an amazing woman who would
become my wife. Pixar went on to create the worlds first computer animated
feature film, "Toy Story," and is now the most successful animation studio
in the world. In a remarkable turn of events, Apple bought NeXT, I
returned to Apple, and the technology we developed at NeXT is at the heart
of Apple's current renaissance. And Laurene and I have a wonderful family
together.
I'm pretty sure none of this would have happened if I hadn't been fired
from Apple. It was awful tasting medicine, but I guess the patient needed
it. Sometimes life hits you in the head with a brick. Don't lose faith.
I'm convinced that the only thing that kept me going was that I loved what
I did. You've got to find what you love. And that is as true for your work
as it is for your lovers. Your work is going to fill a large part of your
life, and the only way to be truly satisfied is to do what you believe is
great work. And the only way to do great work is to love what you do. If
you haven't found it yet, keep looking. Don't settle. As with all matters
of the heart, you'll know when you find it. And, like any great
relationship, it just gets better and better as the years roll on. So keep
looking until you find it. Don't settle.
My third story is about death.
When I was 17, I read a quote that went something like: "If you live each
day as if it was your last, someday you'll most certainly be right." It
made an impression on me, and since then, for the past 33 years, I have
looked in the mirror every morning and asked myself: "If today were the
last day of my life, would I want to do what I am about to do today?" And
whenever the answer has been "No" for too many days in a row, I know I
need to change something.
Remembering that I'll be dead soon is the most important tool I've ever
encountered to help me make the big choices in life. Because almost
everything–all external expectations, all pride, all fear of embarrassment
or failure–these things just fall away in the face of death, leaving only
what is truly important. Remembering that you are going to die is the best
way I know to avoid the trap of thinking you have something to lose. You
are already naked. There is no reason not to follow your heart.
About a year ago I was diagnosed with cancer. I had a scan at 7:30 in the
morning, and it clearly showed a tumor on my pancreas. I didn't even know
what a pancreas was. The doctors told me this was almost certainly a type
of cancer that is incurable, and that I should expect to live no longer
than three to six months. My doctor advised me to go home and get my
affairs in order, which is doctor's code for prepare to die. It means to
try to tell your kids everything you thought you'd have the next 10 years
to tell them in just a few months. It means to make sure everything is
buttoned up, so that it will be as easy as possible for your family. It
means to say your goodbyes.
I lived with that diagnosis all day. Later that evening I had a biopsy,
where they stuck an endoscope down my throat, through my stomach and into
my intestines, put a needle into my pancreas and got a few cells from the
tumor. I was sedated, but my wife, who was there, told me that when they
viewed the cells under a microscope the doctors started crying, because it
turned out to be a very rare form of pancreatic cancer that is curable
with surgery. I had the surgery and I'm fine now.
This was the closest I've been to facing death, and I hope its the closest
I get for a few more decades. Having lived through it, I can now say this
to you with a bit more certainty than when death was a useful but purely
intellectual concept:
No one wants to die. Even people who want to go to heaven don't want to
die to get there. And yet death is the destination we all share. No one
has ever escaped it. And that is as it should be, because death is very
likely the single best invention of Life. It is life's change agent. It
clears out the old to make way for the new. Right now the new is you, but
someday not too long from now, you will gradually become the old and be
cleared away. Sorry to be so dramatic, but it is quite true.
Your time is limited, so don't waste it living someone else's life. Don't
be trapped by dogma–which is living with the results of other people's
thinking. Don't let the noise of others' opinions drown out your own inner
voice. And most important, have the courage to follow your heart and
intuition. They somehow already know what you truly want to become.
Everything else is secondary.
When I was young, there was an amazing publication called "The Whole Earth
Catalog," which was one of the bibles of my generation. It was created by
a fellow named Stewart Brand not far from here in Menlo Park, and he
brought it to life with his poetic touch. This was in the late 1960's,
before personal computers and desktop publishing, so it was all made with
typewriters, scissors, and polaroid cameras. It was sort of like Google in
paperback form, 35 years before Google came along: It was idealistic, and
overflowing with neat tools and great notions.
Stewart and his team put out several issues of "The Whole Earth Catalog,"
and then when it had run its course, they put out a final issue. It was
the mid-1970s, and I was your age. On the back cover of their final issue
was a photograph of an early morning country road, the kind you might find
yourself hitchhiking on if you were so adventurous. Beneath it were the
words: "Stay Hungry. Stay Foolish." It was their farewell message as they
signed off. Stay Hungry. Stay Foolish. And I have always wished that for
myself. And now, as you graduate to begin anew, I wish that for you.
Stay Hungry. Stay Foolish.
Thank you all very much.
引用
$ convert -resize 50%x50% 1.jpg 1_small.jpg
就可以把 1.jpg 的尺寸缩小到越来的1/4
引用
$ convert -sample 400x300 1.jpg 1_small.jpg
就可以把 1.jpg 的尺寸缩小到400x300
注意,两个比率/数字之间的是字母x,不是乘号。
然后来个批量转换的东东(网上的教程是for,虽然我比较喜欢find)
引用
for img in `ls *.jpg`; do convert -resize 50%x50% $img small_$img; done
如果要递归地转换当前目录以及子目录的图像就用find吧:
引用
find -name "*.jpg" -exec convert -resize 50%x50% {} {}.small.jpg
先用如下命令装上Image Magick:
sudo apt-get install imagemagick
缩图方法一:convert -resize 50%x50% photos\*.JPG small\
这种方法转成的图片的文件名变成了数字,假如希望原文件名不变,可以用如下命令(实际上是一个四行合为一行的脚本)。
缩图方法二:for img in `ls photos\*.JPG`; do convert -resize 50%x50% $img
small-$img; done
感觉要比如以前Windows下的软件方便多了。
注:我之前曾象资料里用-sample参数,而非-resize。但前者可能不仅缩放了大小,还压缩了图像,所以我对缩小后的图片质量不太满足。用convert
-h可以显示其所有参数,我后来选用了-resize。
后续。。。
过了两天,我看到一篇文章,ubuntu自带的gThumb也可以缩小图片的。我一看,果然。它是界面操作,感觉还是没有convert的命令行来得快。不过,如果你只是偶然缩小一下图片,也就不必去装其他软件了,就用自带的gThumb好了。使用方法如下:
启动:我习惯进入到图片目录(我装了一个快速进入终端的右键菜单),然后用命令行启动:
gthumb
*.JPG。这样一启动gthumb所有图片都在那了。当然,也可以用主菜单"应用程序->图像->gThumb图像浏览器"来启动,再选择图片。
全选所有图片,然后"工具->scale
images....",重选一个保存目标。接下去就不用说了。
Ubuntu论坛的原文资料复制如下:
mage MagicK 是一个强盛的图象处理工具包。它提供了几个非常方便的命令行命令:
display animateimport
montagemogrifyidentify等,可以进行图象的显示,缩放,旋转,调色,加框,加注释等,还能制作GIF动画,图象索引,能自动生成图象.
1. 制作索引图和动画
!/bin/bash
montage -bordercolor red -borderwidth 3 -label "%f" -tile 5x3 *.JPG
montage.jpg
mogrify -format gif *.JPG
display montage.jpg
animate *.JPG
2. 缩放 convert -sample 80x40 input.jpg output.jpg
#注重:缩放后图像保持原来的长宽比例 convert -sample 25%x25% input.jpg
output.jpg
3. 为当前目录的所有图像生成缩略图
for img in `ls *.jpg`
do
convert -sample 25%x25% $img thumb-$img
done
4. 获取文件信息 libtiff
tiffinfo filename.tiff
pnginfo filename.png
5. 可以使用 ImageMagick 的 identify
identify -verbose sample.png
identify -format "%wx%h" sample.png
6. 旋转图像
convert -rotate 90 input.jpg output.jpg
7. 更改文件类型
convert input.jpg output.png
8. 为图像增加注释文字
convert -font helvetica -fill white -pointsize 36 \
-draw 'text 1050 "Floriade 2002 Canberra Australia"' \
floriade.jpg comment.jpg
convert -font fonts/1900805.ttf -fill white -pointsize 36 \
-draw 'text 10475 "stillhq.com"' \
floriade.jpg stillhq.jpg
9. 特别效果
convert -charcoal 2 input.jpg output.jpg #炭笔
convert -colorize 255 input.jpg output.jpg #着色 可以指定三种颜色
red/green/blue
convert -implode 4 input.jpg output.jpg #内爆效果
convert -solarize 42 input.jpg output.jpg #曝光,模仿胶片曝光
convert -spread 5 input.jpg output.jpg #随机移动,参数是位移大小
10. 一次执行多个操作
convert -sample 25%x25% -spread 4 -charcoal 4 input.jpg output.jpg