Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

November 19 2013

July 06 2013

install Matplolib into Window (2013)

In 2013, Enthought enhanced its EPD and re-branded it as “Canopy”. It includes Python packages  Numpy, Scipy, IPython,Matplotlib, Pandas, Traits, Enaml. Although free version only has 32-bits version. It is enough for normal daily usage. You can download the free version “Canopy Express” in following link:


run the “canopy-1.0.3-win-32.msi” to do the installation.

However, I believe it is some issue on the kit, please don’t click on the “update” on the “welcome to Canopy” window. I tried once, the update is never finished and also it broke the dependency on pylab. I took me some time to search the internet to solve it ( the solution is manually update the numpy to a  newer version).

January 17 2013

Send mail using “sendmail”

Just a note for myself about how to send mail using “sendmail”


cat > "$mail_file" <<-EOT
From: no-reply@(....)
To: someone@(....)
Subject: testing
MIME-Version: 1.0
Content-Type: testing subject
sendmail -t < "$mail_file"


October 30 2012

Java – file.renameTo() return false

In one of my program, the file.renameTo() returned false and failed to rename/move the file. However, it worked on other linux servers and window env.

File tmp = null;
tmp = File.createTempFile(report.getName(), null)
//.. do somthing...

After some googling, I find the problem here.

The root caused is, renameTo() only works in same filesystem (or same disk). In my case, the tmp and otherfile is on two different disks, that why it return false.

I check the Java Doc , although it did mention, I think it should be highlighted or explain in more details.

Below is extracted from Javadoc.

public boolean renameTo(File dest)

Renames the file denoted by this abstract pathname.
Many aspects of the behavior of this method are inherently platform-dependent: The rename operation might not be able to move a file from one filesystem to another, it might not be atomic, and it might not succeed if a file with the destination abstract pathname already exists. The return value should always be checked to make sure that the rename operation was successful.

July 05 2011

ultrasurf – free proxy to America


Ultrasurf is a product of Ultrareach Internet Corporation. Originally created to help internet users in China find security and freedom online, Ultrasurf has now become the world’s most popular pro-privacy, anti-censorship software, with millions of people using it to bypass firewalls and protect their identity online.


January 27 2010

Query the WEB : YSQL

surf the net, I come across and great introduction on YSQL.


YSQL (“Yahoo Query Language”) is a tool to query a lot of things from web.
For example, you can query 19 “cat” photos from flickr by statement:

select * from flickr.photos.search where text=”Cat” limit 10

and result can be in XML and JSON format.

The best of all, it has a excellent console for you to test out the query.


Older posts are this way If this message doesn't go away, click anywhere on the page to continue loading posts.
Could not load more posts
Maybe Soup is currently being updated? I'll try again automatically in a few seconds...
Just a second, loading more posts...
You've reached the end.

Don't be the product, buy the product!