dimanche 20 décembre 2009

【转】VirtualBox解决XP正版验证又一法

VirtualBox里面创建好了虚拟机之后会生成一个XML文件,比如你创建一个叫 我要请LC吃大餐 的虚拟机,就会有一个 我要请LC吃大餐.xml的文件,找个顺手的editor打开之,然后编辑,在

之间

加入这么几行

《ExtraDataItem name="VBoxInternal/Devices/pcbios/0/Config/DmiBIOSVendor" value="IBM Corporation"/》
ExtraDataItem name="VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor" value="IBM Corporation"/

※如果使用的是HP,则输入:HewLett-PacKard

然后保存。

然后插入IBM.iso安装就行了。IBMOEM.iso上哪儿去找?用MSDN版本的塞进7个文件,

EULA.TXT

OEMBIOS.CA_

OEMBIOS.SI_

WINNT.SIF

OEMBIOS.BI_

OEMBIOS.DA_

SETUPP.INI

就OK了。

手头有ACER Dell Hasee HP LEGEND TCL TOSHIBA Compaq Hedy IBM SAMSUNG SONY THTF(清华同方)这些牌子的OEM文件,想要的mail我。

免费的VirtualBox的绝大部分高级功能在GUI上面都没有,需要查用户手册用命令行实现。但是功能确实极其强大,NAT+端口映射(大于1024的端口)可以不用虚拟网卡就实现几乎所有的网络功能,可以挂载物理分区,物理硬盘,以及等等,玩法超多。

随着win7一起推出的VirtualPC RC就更有意思了,文件共享是用LanmanServer实现的,虚拟机的界面是用远程桌面实现的,真是把宿主机的功能利用到了极致啊。如果网络是用ICS来实现NAT就更Funny了。

收费的VMware貌似也可以通过修改BIOS信息来装OEM版本的windows xp。没有试过。看到VMware强制安装的那一堆网卡就堵得慌。

顺便说一句,微软发布了Security Essentials Beta, 消防队放火的好日子结束了。

vendredi 20 novembre 2009

【转】Java » 文件输入输出 » 文件

1. 创建文件


2. 创建一个临时文件


3. 创建一个临时文件并删除它退出


4. 创建一个目录(或几个目录)


5. 获取文件大小


6. 变更文件或目录上次修改的时间


7. 构建文件路径


8. 创建临时文件指定的扩展名后缀


9. 创建临时文件中指定的目录


10. 创建新的空文件


11. 比较两个文件路径


12. 删除文件


13. 删除目录(空目录)


14. 删除文件或目录时,虚拟机终止


15. 确定文件或目录


16. 确定文件是否可以读取


17. 确定文件是否可以这样写:


18. 判断是否存在文件或目录


19. 确定文件或目录是隐藏


20. 证明文件


21. 移动文件或目录到另一个目录


22. 查找目录


23. 从java.io.File获得所有的路径信息


24. Getting an Absolute Filename Path from a Relative Filename Path


25. Getting an Absolute Filename Path from a Relative Filename with Path


26. Getting an Absolute Filename Path from a Relative Filename parent Path


27. 获得绝对文件的路径


28. 获取以字节为单位文件大小


29. 获取父目录的File对象


30. 取得文件最后修改日期


31. File.getCanonicalFile() converts a filename path to a unique canonical form suitable for comparisons.


32. Getting the Parents of a Filename Path


33. Get the parents of an absolute filename path


34. Getting and Setting the Modification Time of a File or Directory


35. 制作只读文件或目录


36. 文件根列表


37. 驱动器列表


38. 列出目录内容


39. 重命名文件或目录


40. 迫使更新一个文件到磁盘


41. 随机文件


42. 创建一个目录;所有祖先目录必须存在


43. Create a directory; all non-existent ancestor directories are automatically created


44. 获取当前的工作目录


45. 改变文件属性为可写


46. 数据文件


47. 输出到一个文本文件


48. 选择文件


49. 读取文本文件数据


50. 复制文件


51. 查询文件信息


52. Working with RandomAccessFile


53. 获取文件列表,并检查是否任何文件丢失


54. 从Java删除文件


55. Java中临时文件


56. 比较文件日期


57. 排序文件,基于他们的最后修改日期


58. 字符串-提取打印二进制文件字符串


59. 得到扩展名,路径和文件名


60. 读取文件内容字符串使用输入输出工具


61. Get all xml files by file extension


62. 文件名组件


63. 获取文件类型图标


64. 改变文件属性为只读


65. 获取文件扩展名


66. 递归的搜索文件


67. 创建一个人类可读的文件大小


68. 设置文件属性

mardi 17 novembre 2009

【转】有道搜索2010预览版问世

邀您试用“更宽的”搜索! 有道搜索2010预览版问世


代号“犇牛”的有道搜索2010预览版今天与您见面。自牛年春节后,有道的工程师们就已开始为这个全新的版本而努力,历经半年多的开发,有道搜索2010版在功能、速度和易用性上都有了进一步的提升。目前,我们会保持现有版本和预览版两套系统同时在线运行;如果您输入http://ox.youdao.com,就能访问到有道搜索2010预览版,还请先睹为快!
这一版本的主要功能有如下新增:
o 三栏宽幅的全新界面
o 尺度更宽的搜索选项
o 看得更多的网页预览
o 更为丰富的智能结果
o 一目了然的结构化摘要

lundi 16 novembre 2009

您在全球财富排名 上网查得到

据自由时报报导,想要知道自己的财富在全球排名第几吗?只要登入最近出现的一个新网站http://www.globalrichlist.com,将自己的年薪换算成美元或英镑,输入网页的问卷中,电脑就会告诉您排行世界富豪第几名。
这个网站是由伦敦一家互动媒体公司所设立,目的是要「挑战人们对其所拥有财富的认知」,因为每年进入全世界有钱人圈内的人口逐渐增加,而在人比人的竞争心理下,对自己财富排名好奇的人士也跟著增加。

世界富豪排名表的计算基础是引用世界银行发展研究小组的资料,其假设是全球总人口为六十亿人,平均年收入是五千美元。根据这项统计资料,全球每年九.五% 的总收入是由一%的人所赚走,他们的平均年收入是四万七千五百美元;全球财富排名前十%的人,赚走了全球五十.八%的年收入。至于全世界年收入最低的十% 人口,平均每日收入仅有一.一美元。

假设以台湾法定最低基本工资月薪一万五千八百四十元台币来计算,一年的年薪就是五千五百七十五美元,成为全球首富排行榜上第八亿三千三百一十三万六千二百四十七名,而且跻身进入了全球前十四%的有钱人圈子里。

[转] 自由撰稿人必须知道的15个在线资源

Freelancer往往不是那么容易当的,特别是自己刚起步的时候。在放弃工作将自己切换到自由工作者之前,最好能有一些客户和一些项目,有的时候你的 手头可能会忙不过来,所以就不得不做出正确的选择。今天我列出15个很棒的网站,可以让自由工作者(程序员、编码师、设计师)找到一些项目。
这些网站不会让你成为百万富翁,但是你能找到正经的工作,还能获得财富并且扩大投资组合。你只能通过获得一定数量的工作才能成为一位经验丰富的自由工作者,所以这些网站为你带来的不仅仅是财富。

99Designs BidHire CoderBuyer DesignQuote Elance GetACoder GetAFreelancer Guru LimeExchange PostBidWin PeoplePerHour Project4Hire ScriptLance Task City My Zoox

99Designs

99d

BidHire

bidhire

CoderBuyer

codeb

DesignQuote

desq

Elance

elance

GetACoder

geta

GetAFreelancer

getafree

Guru

guru

LimeExchange

lime

PostBidWin

postbid

PeoplePerHour

pph

Project4Hire

project

ScriptLance

scriptl

Task City

task

My Zoox

zoox

mardi 10 novembre 2009

Enable Apache installed in Mac OS X

If you’re running Mac OS X it has some surprises for you. Seems, PHP and the Apache Web Server have been installed on your machine without your knowledge. Well, its no secret but running them both is somewhat of a mystery and the trick is to flush them out of their hiding spots.

Generally on a Mac there are Icons that represent programs and documents that you double-click to execute their existence. With PHP and Apache, they run in the background with no sign of an Icon in sight.

To start Apache Web Server, you must go into the “System Preferences Control panel located on the “Apple Menu”.

Click on the Icon labeled "Sharing". Then locate the tab labeled "File & Web". You will want to click the button labeled “Start” in the "Web Sharing " section. This starts up Web sharing which starts the Apache Web Server.

Apache Web Server is now running. Easy, huh? "How can I tell?” you ask. Simple. Start up your web browser of choice. In the web address or URL part of your browser, type: "localhost" (without the double-quotes)

Ex.
http://localhost

If everything is Okay, your browser will display the following:

"If you can see this, it means that the installation of the Apache Web server software on this system was successful. You may now add content to this directory and replace this page."

It worked! Hooray.

To access the pages of this directory, double-click on your hard drive and locate the "Library" directory. From there locate the "WebServer" directory and then the "Documents" directory where these web pages reside.

Note: If its not running, you either do not have web sharing enabled or something is wrong with Apache's files. It should work right out of the box.

Since Mac OS X is a multi-user system, every person has their own account and with that brings it’s own set of web pages. To access your personal web pages you must type the following in the browser address:

Ex.
http://localhost/~yourname/

To access your personal web pages, locate your account name directory under "Users" And locate the directory labeled "Sites".

/Users/yourname/Sites/your web pages are here <---

Now that you have Apache running, it would be great to write your own PHP scripts and run them locally on your Mac. This is the most difficult part and if you get past this, everything is downhill with ease.

lundi 9 novembre 2009

Change default document root for Apache 2 in Ubuntu

The default document root for Apache 2 is "/var/www/", if you input "http://localhost/" in your Web browser's URL address, you will get the contents of "index.html" in "/var/www/" directory.

If you want to change this default directory, modify the file "/etc/apache2/sites-available/default" (sudo gedit /etc/apache2/sites-available/default), and then, use the following two commands:

sudo apache2ctl -t

And then

sud apache2ctl restart

ps: sometimes you need to restart your apache server, here is the commands:

sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 restart