Sometimes you need to crawl a web page and extract specific data from it. It doesn’t have to be “evil” things like crawling competitors’ data. For example, you may want to do periodical checks for unreachable links in your own web pages – extract all links on the page and see if they’re still accessible.
For extracting specific parts from some text, we tend to think about regular expressions first. For example, the regular expression for extracting links might look like:
/<a.*?href=".*?">/im
Read the rest of this entry »
Posted in Development | No Comments »
Google just announced a Chrome extension listing page featuring web development tools on both Google webmaster central blog and Google code blog.
At first glance I was quite excited to see some extensions similar to the ones I had been using in Firefox. I tried them one by one – Measureit!, View Selection Source, Eye Dropper, and Chrome Editor. But only Chrome Editor worked.
It’s really frustrating. We’ll still rely on Firefox/Firebug when doing web development, while Chrome provides faster experience in daily web browsing.
Posted in General | No Comments »
Recently a lot of Mac users are complaining that the software update program is not working correctly and I also ran into this issue today. It just tells you “your software is up to date” but obviously there’s some software not up to date. For example, I opened iTunes and it told me there’s a newer version of iTunes, would you download it? I clicked “download” and the software update app opens but it told me that there’s no update – that made me crazy.
Read the rest of this entry »
Posted in Info | 2 Comments »
Do a quick google search for “ruby mysql mac” and you’ll find the first result:
How to install the MySQL/Ruby gem on Mac OS X Leopard
This article really helped me when I was using Mac OS X 10.5 and wanted to connect to MySQL with ruby. I just got a Macbook Pro with Mac OS X 10.6 (snow leopard) pre-installed and the method this article taught us no longer works. Do a simple test in irb and ruby will give you an error like:
>> Mysql.new('localhost', 'user', 'pass', 'db')
ArgumentError: wrong number of arguments (4 for 0)
from (irb):4:in `initialize'
from (irb):4:in `new'
from (irb):4
Read the rest of this entry »
Posted in General | 1 Comment »
The other day I wrote a blog post “Gravity unable to use GPS on E71?” complaining Gravity not being able to use E71’s GPS module. But now I know how to enable Gravity to use GPS on E71 so that we can check-in on foursquare and geo-tag our tweets.
Actually the problem is rather simple – just install the FP2 version! But before that I wasted a lot of time trying to figure out how to let Gravity use GPS.
Although it lacks documentation, Gravity is updated very frequently. Each time a new version is realeased by the author @janole, two different versions are available. For example, he just released the 6375 alpha, and sent two links on twitter: http://bit.ly/6375ALL, http://bit.ly/6375FP2. We all know that E71 is feature pack 1, but for Gravity, you must choose the FP2 version!
During install process, you’ll notice that on the data access alert screen, there’s a new item of GPS data – that means it will access your GPS module (great!). FP2 version runs without any problem. After installing this version, you should be able to find a new row “Places nearby” in foursquare account and after clicking it you will find a list of venues and select one to check-in. For twitter, you’ll also be able to use the up arrow key to switch GPS on/off when writing tweets.
By the way, don’t forget to turn on the geotagging feature in your twitter account settings (go to twitter.com, it’s not in Gravity).
Happy checking-in and geotagging!
Posted in General | 2 Comments »
Twitter just bought tweetie and made it free. But even before that, tweetie for iPhone cost just $2.99.
Gravity is a twitter client for Symbian s60 devices, but it costs $9.95. Still most users think that it’s unbelievable to build such a great (user experience) app on such a platform (dev difficulties), so it’s worth the money.
So Symbian devices may be cheaper than iPhone, but symbian lacks apps. Developing apps for symbian is more expensive, so apps are more expensive for users.
If It’s possible, I’d like to try out development process on both kinds of platforms and see the differences of dev environments.
Posted in General | No Comments »