Archive for June, 2007

A New Release of Yet Another Browser

I've changed my plan, Yet Another Browser(YAB for short) still looks like its sibling, if a brower has a MS-Word-like look-and-feel, is it weird? So far, I think YAB will be helpful for some guys. If you're addicted to online photo communities, like Flickr, it can help you download photos when you go surfing, you don't need to save the photos manually. Just one click, all photos are flying to your disk on autopilot.

Features:

  1. You can tune up the opacity of main window
  2. Multi-tab support
  3. Right-click Close-Button to click all tabs, Left-Click just close one.
  4. Your can rename the title of YAB, it will show what you want on task bar.
  5. You can set the length of tab's title.
  6. Keep a list of websites you recently closed, you can easily undo it.
  7. Just one-click to download all images in current tab
  8. You can change the default direcotry where images will be saved.

Todo:

  1. Boss key
  2. Regular-Expressions for downloading images
  3. Password Protection
  4. Favorites
  5. Clear hisotry
  6. Clear dropdown list
  7. Self-update
  8. i18n
  9. Auto-downloading images when you go surfing, even you don't need one-click.
  10. You can replace the icon of YAB with another one.

Homepage for YAB: http://charry.org/m/myapps/YetAnotherBrowser 
Stay tuned.

TabIndex != TabPages.IndexOf

TabControl的有个属性叫TabIndex,每个从Control派生来的控件都有这个属性,这个Tab是Tab键的顺序(MSDN说:A control with a lower tab index receives focus before a control with a higher index.)

我正好需要获取TabControl中某个Tab Page的Index。这些Tab Page保存在TabControl的TabPages中,它是一个集合,实现了IList接口,其中有个方法就是IndexOf (Determines the index of a specific item in the IList.)。

鬼使神差的,我把TabIndex属性当成了Tab Page在TabPages中的Index了,花费了N久时间,才发现问题所在。Tab Index和IndexOf,TabPages,这几个词放在一起,一不小心就会搞错,错误总在不经意间。

Find Out What People Search For and Compare Them

"With Google Trends, you can compare the world's interest in your favorite topics. Enter up to five topics and see how often they've been searched for on Google over time. Google Trends also displays how frequently your topics have appeared in Google News stories, and which geographic regions have searched for them most often."

Follow the links and check out the results:

http://www.google.com/trends?q=%E7%94%B7%E4%BA%BA%2C%E5%A5%B3%E4%BA%BA&ctab=0&geo=all&date=all&sort=0
http://www.google.com/trends?q=%E4%BD%A0%EF%BC%8C%E6%88%91&ctab=0&geo=all&date=all&sort=0
http://www.google.com/trends?q=%E5%A5%BD%E7%94%B7%E5%84%BF%EF%BC%8C%E6%88%91%E5%9E%8B%E6%88%91%E7%A7%80&ctab=0&geo=all&date=all&sort=0
http://www.google.com/trends?q=%E5%8C%97%E4%BA%AC%EF%BC%8C%E4%B8%8A%E6%B5%B7&ctab=0&geo=all&date=all&sort=0
http://www.google.com/trends?q=Windows%2C+Mac%2CLinux&ctab=0&geo=all&date=all&sort=0
http://www.google.com/trends?q=China%2CJapan&ctab=0&geo=all&date=all&sort=0
http://www.google.com/trends?q=China%2C+USA&ctab=0&geo=all&date=all&sort=0
http://www.google.com/trends?q=Chinese%2C+English&ctab=0&geo=all&date=all&sort=0
http://www.google.com/trends?q=VC6%2CVS2005&ctab=0&geo=all&date=all&sort=0
http://www.google.com/trends?q=C%2B%2B%2CC%23%2CJava%2CC&ctab=0&geo=all&date=all&sort=0
http://www.google.com/trends?q=centos%2Credhat%2Cubuntu%2Cfedora&ctab=0&geo=all&date=all&sort=0
http://www.google.com/trends?q=Google%2CBaidu%2CYahoo%2CLive+Search&ctab=0&geo=all&date=all&sort=0
http://www.google.com/trends?q=CVS%2CSVN&ctab=0&geo=all&date=all&sort=0
http://www.google.com/trends?q=Google%2CMicrosoft&ctab=0&geo=all&date=all&sort=0

Results are self-explanatory.

Wordpress, tinyMCE, realpath

昨,搭建一个WordPress,发现tinyMCE不能使用,原来是虚拟主机提供商为了安全起见,把realpath函数屏蔽了,realpath的安全漏洞令商家不得不这么做,而这样将导致WP的后台管理不能使用WYSIWYG编辑文章。下面是解决这个问题的方法,如有朋友遇到,也许对您有帮助:

  1. 取得你的虚拟主机目录的物理路径,方法有多种,一般主机提供商给你开通服务的时候,会告诉你,假设这里是 /home/www/imchina.net/
  2. 找到 wp-includes\js\tinymce\ 下的 tiny_mce_gzip.php
  3. 打开tiny_mce_gzip.php,搜索realpath,将第一个替换为:“$cachePath = "/home/www/imchina.net/wp-includes/js/tinymce/";”,将第二个realpath替换为:“$path = "/home/www/imchina.net/wp-includes/js/tinymce/".$path;”。

Yet Another Browser

If you're a office worker, are you afraid of being busted by your boss when surfing? I make this semi-browser from scratch, it resembles a regular Microsoft Office Suit Application,  I'll add the following features to the browser, e.g.:

  1. Transparent window
  2. One-click to hide
  3. Download all images to your disk
  4. ...

I created it with C#,  it's easy to create your own browser with its powerful components, everyone can make it if he wishes.

Download it! (Make sure you have the .NET Framework 2.0 installed on your computer)

How To Create A Home Run Post [by Jane May]

原文出处:http://www.johnchow.com/how-to-create-a-home-run-post/ 译:Charry

关键字:网络赚钱,Blogger,如何写好blog

网上看到一篇文章,介绍如何写出好的blog来,感觉不错,翻译如下:

有很多博客把写blog作为一种爱好或者是网上赚钱的方式。不管目的何在,每个博客都希望能写出高水准的blog来。 写blog可不像你在学生时期的写作。显然,有诸多事情你必须得做,比如:文章的概要、正文、结论,不过,先别关心这些细节问题,让我们看看下面这些注意事项,确保你能做到这些,他们可以让你的blog出类拔萃。【译者: 作者用Home Run作为修饰,即‘全垒打’的意思,这里为了合乎文化习惯,使用‘出类拔萃’替代。】

  1. 一个贴切的标题。标题应该大致描述blog文章的内容,别忽略了blog的标题。比如,如果你要写一篇介绍SEO技巧的文章,题目叫‘6个不为人知的SEO小技巧’,比叫‘6个SEO技巧’来的好些。
  2. 和你的读者对话。你该让你的文章具有交互性而不是一篇生硬的让别人该怎么做的命令。blog是条双行道,你可以和你的读者来场对话,这个对话可以通过你的文章,以及文章的评论来完成。当你写blog时,你应该假设你正在和你的一个朋友聊天。最好用每个人都能理解的辞藻修饰你的文章。
  3. 切中要点。并非一个丰满如论文般的blog才是一篇好的blog。没有人愿意去读一篇本该是blog的文章。写blog可没有最小字数限制,所以记得切中要点。还有:你可以在你的文章中加入一个列表。人们喜欢跳跃式的阅读,他们会在自己喜欢的主题中跳跃。所以把这些关键字罗列出来是必要的。
  4. 不要跑题。写blog时,每句话都得和主题息息相关,没有人喜欢看天马行空的文章【意译】
  5. 内容对我有用吗?就我个人而言,如果我本以为一篇blog是关于张三的,结果等我读完后,发现它是关于李四的,我可不喜欢这样的文章,因为对于我它毫无价值。记得你写的文章要对你的读者有用。如果你用云云众生一样方式来写blog,那么你怎么能确保你写的blog就一定比别人写的有吸引力呢?你应该在你写blog的时候,问问自己这个问题。
  6. 抓住你的读者。你写blog,别人读你的blog。再次提醒,使用能吸引眼球的标题,并且向你的读者提出问题。这样会引发争论,读者会在评论中写下他们的看法,你可以从这些评论中获取更多的信息。不管你写什么,记得一定要有自己的观点,记得要附上你的观点,这样读者就有可能在一个更深的层次上和你沟通。

原文如下:

There are many bloggers out there that are blogging as a hobby or to make money online. Regardless of your cause, every blogger wants to write a successful post. Writing a blog post is different than the writing you used to do in school. Obviously, there are things that you have to do so your post makes sense (introduction, message, conclusion); but instead of worrying about the details, take a look at the following items that you want to make sure you cover in your post in order for it to be a home run:

  1. Have a must-read title. Every title must be descriptive of your post’s content. However, make the title something that cannot be passed up. For example, if you are giving SEO tips, a title might be “6 Untapped SEO Secrets.” That’s a lot more captivating than “6 SEO Tips.”
  2. Talk with your readers. You want your post to be interactive and not a set of demands you are ordering everyone to do. Blogging is a two way street and you want to create a conversation through your text and comments. You want to imagine that you are talking to a friend when you blog. You can use simple vocabulary that everyone can understand.
  3. Get to the point. A post doesn’t have to be an essay to be a successful post. No one wants to read a book when it’s meant to be a post. There is no minimum length requirement with blog posts so feel free to get to the point. One way to do this is by incorporating lists into your posts. People like skimming for interesting items. It’s possible to cover these valuable points in just a few words.
  4. Stay on track. Make sure every sentence relates back to the central idea. You don’t want to see a pretty bird and go off on a tangent.
  5. What’s in it for me? I personally don’t like reading something that I thought was going to be about one topic and ends up being about another. It just doesn’t bring any value to me. Make what you write a benefit to your readers. If you write what everyone else writes about in the same exact way, how will that bring more value to your readers than the next blog? You want to answer the questions your readers will ask when thinking about writing your post.
  6. Capture your audience. You want to write so people will read your posts. Again, use catchy headlines and ask your readers questions. This will promote interaction in the comments and you can get more material to write about from those comments. What ever you write, make sure you have your own personal voice behind it. Be sure to include your opinion or observations. It allows readers to relate to you on a more personal level.

This post was guest blogged by Jane May. She teaches readers how to create and monetize blogs on Jane May Blogs, and writes about career and entrepreneurial development at CareerRamblings.com.

A parser for Netscape Bookmark File Format

There're many kinds of bookmark formats for browsers, Netscapte Bookmark File Format is a popular one. it has a long story, the HTML-like bookmark is not easy to parse, XML is the best alternative, if I've got choice. but the well-known browser FireFox still use this format. In order to parse it, you have to do it using the basic string operation, like 'find', 'substring', etc. I wrote a small app for parsing bookmarks.html which is located in "...\Application Data\Mozilla\Firefox", the project was built with VS2005(UNICODE version). Follow this link to download the project files.

I'v got a question: How to sort IE's favorites, IE saves its favorites in a directory, but the order is saved in Windows Registry([HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Favorites]). The binary data is saved as private data format, AFAIK there is no articles about this format on MSDN. I saw some articles illustrating how to 'GUESS' the real meaning of it. but guessing is not the perfect solution, if you know about this, please tell me :).

I'm an adult!!!!

因项目需要一个大容量的邮箱,公司的邮箱太小,可能会被撑爆。正好我注册过微软的Windows Live Custom Domains,它可以把自己的邮局托管到微软的hotmail服务器。因为我的邮箱可以自己随意开,所以就开通个 report [at] mail.charry.org,把项目的邮件forward到这个地址。在填写用户的国家时,我担心填写非美国地区可能容量不是2G,所以就选择了‘美国’。注册过hotmail的都知道,第一次登录的时候,要填写一些基本信息,诸如:密码,生日等。在填写生日的时候,我就随便填了一个‘1999’,后面的情况让我哭笑不得:

下一步后,hotmail提示我:如需使用他们的服务,需要我家长的同意云云。

2007-06-04_10-59-05.jpg

我尝试着自己给自己验证一下,就点了‘Get Permission Now’,hotmail提示:“根据你填写的出生日期,阁下还是个三岁小儿,如需使用服务,让你爸来”

2007-06-04_11-00-09.jpg

呵呵,看来MS十分的怀疑我的年龄,点击‘Yes’后,出现下图:

 2007-06-04_11-00-37.jpg

惨,竟然要填写我的信用卡号,我没有信用卡,这下玩完了。看来Credit Card在美国是如此的普及,做什么都离不开这玩意。最后折腾了半天,还是不行,只有证明我是个成人,我才能使用这个邮箱。由于没有信用卡,我这个邮箱基本上是废了,只能再开一个,如果有朋友注册MS的服务,可得看仔细了,生日可不能随便填写。