Yapahuwa


9:55am, November 27th, 2007

Facebook


9:28am, November 27th, 2007

Sri Lanka a safe destination


9:13am, November 27th, 2007

[JOBS] Web Admin @ PPSL

An opportunity to join well established UK based web development company in Sri Lanka as a Web Admin. The right candidate should be fluent in Spoken and written English, literacy in Internet and Web. School leavers & student’s who are interested forward your CVs to peiris [at] gmail [dot] com.

, ,

3:34am, November 27th, 2007

Neural Nets and English text to speach

Neural nets have some fine applications. I implemented a basic character recognition system using neural nets and it could recognize various forms of characters. The only difficulty was to identify the number of layers required and the number of hidden units.
(This was an assignment and the sample data sets can be found here. )

The NETtalk application is one of the very good applications of neural nets. It learns the memory representation of the pronunciations of English words by practice and it finally learns to read an English paragraph. Listen to this mp3 and see how NETtalk improves after several parses. If one doesn't know how this works, for him/her this is "real" intelligence.

(Thanks to Professor David Leake for posting this on our class web page)

10:39pm, November 26th, 2007

Binary XML vs Gzip (compression technos)

One question most people, including me, had was why we should go for binary xml instead of gzip or any other transport specific compression technology.
Well one of the obvious reasons of course is that gzip or any other is transport dependent and binary xml is not.
But the most important reason for me was not that. Once you serialize XML in to a binary xml, still you will see an xml tree. It might be optimized, depending on the binary protocol being used, but you can load that xml in to an XML object model. On the other hand, once you gzip something then you can not read the output. (Thanks Wei Lu for giving me a nice explanation on this)

Most of the people do not care about the wire message once they serialize that. So for them gzip will be a better and an easier option compared to binary XMLs (if they use http, which I think is the 95% of the case). Because for you to use binary serialization you might need to add addition libraries. Since most of the http implementors have gzip support by default, using that is much more trivial.

10:28pm, November 26th, 2007

Linus Torvalds on git


12:53pm, November 26th, 2007

Features of Firefox 3.0 Beta 1

Introduction of offline browsing, easier bookmarking and loads of technical improvements

11:55am, November 26th, 2007

Restoring Large MySQL dumps

A lot of things influenced me to write this post. In fact I wanted to write on this sometime back but finally I was able to squeeze some time. Lately I have been moving data between servers and the main problem I had was with large MySQL dumps because I have been using PHPMyAdmin for most of the MySQL operations and its one of the best tools available and most importantly its web-based. Even on my local development environment I'm comfortable with using PHPMyAdmin and on the web servers it can be very handy if the server is a shared hosting server. I would rather recommend using the command line client utilities that MySQL offers for import/export operations because its the safest. But you will need SSH access to your server. If you do have SSH access don't hesitate to choose this method above the others.

Export/Backup
Using the mysqldump client it is possible to backup a database into a SQL file which will contain SQL statements that can recreate the database tables when restored.

The following command from shell can be executed to backup a specific database
mysqldump -u [username] -p [password] [databasename] > [backupfile.sql]


Click Here for more options on using mysqldump

Import/Restore
You can use this command from shell to restore the database using the SQL dump file
mysql -u [username] -p [password] [databasename] < [backupfile.sql]


So thats quite basic and safest ways to import/export. But then you might ask whats the options you have if you are on a shared server and do not have SSH access. Well then PHPMyAdmin is the only choice available coz its web-based. Most servers have PHPMyAdmin as an option in the Server's Control Panel. Worst case if you don't have it or cannot find it you simply can download the source from www.phpmyadmin.net and upload the files via FTP and set it up. Installation is quite simple if you follow the Documentation.txt file. Once it is setup you can create databases etc. When you have selected a database from the left panel there will be tabs called SQL and Export. Using the SQL tab you can restore the database using your SQL dump file. Similarly you can use the Export option to export the data to a SQL file.

But then again you come across problems when you have a large MySQL dump. Exporting a large database won't be a problem but there are times that the SQL dump file tends to get corrupted for various reasons. Importing a large SQL dump file would create a problems coz with default installations there is a 2MB upload limit. This is not a PHPMyAdmin limit. This limit is set in the PHP configuration. To increase this upload limit you have to change the post_max_size and upload_max_filesize directives in the php.ini and then you can restore a large SQL dump. But if you are on a shared hosting server its highly unlikely that you can change the directives in the php.ini file. So thats where most people get stuck. When you are moving from your local machine to the server this is one problem you will face. Similar problem I faced when I had to move a large database from a server that I could SSH to a shared hosting server. I dumped the database to a SQL file using mysqldump command line utility and then when I tried to restore using PHPMyAdmin there was this upload limit. Arghh.. At that time I simply split the file manually into smaller files which are less than 2MB and uploaded one by one. It came to about 7 files at that time so didn't really bother about splitting them manually. This is a dirty trick but still effective but I won't suggest you to use this method. At a later time when I came across a similar instance I planned to write a tiny PHP script that would do the job. But thankfully I got a new server that I could SSH into.

So things can get bit messy at these situations so gotta figure out ways to overcome those with the limited resources we have. Lately I found BigDump: Staggered MySQL Dump Importer which seems to do the job on the web servers with hard runtime limit. So I guess I have more choices now. I haven't tried out this yet. Hopefully can play around with this next time when I have tight limits.

4:07am, November 26th, 2007

UI-patterns.com

Another UI pattern site

3:52am, November 26th, 2007

Wasgamuwa


9:56pm, November 25th, 2007

How you cannot become an MVP?

A

7:48pm, November 25th, 2007

Kevin Rudd to be Australia’s next PM


12:15am, November 25th, 2007

Why KDE4 (might) suck!


12:35pm, November 24th, 2007

Ubuntu Customization Guide v2

Nice guide on customizing your Ubuntu 7.10 installation

3:19am, November 24th, 2007

Links for 2007-11-23 [del.icio.us]


10:00pm, November 23rd, 2007

Welie.com - Patterns in Interaction Design

This site contains a lot of best practices in Interaction Design.

8:30pm, November 23rd, 2007

Database Optimization for Rails Apps

How to make your database queries fast without effecting much on your application code

8:21pm, November 23rd, 2007

The Secret Strategies Behind Many “Viral” Videos

How to get your video into YouTube's most viewed videos ;)

8:08pm, November 23rd, 2007

Ramaze

Another lightweight Ruby web framework, with MVC

6:42pm, November 23rd, 2007

« Previous Entries Next Entries »