Wednesday, April 30, 2008
Wednesday, April 23, 2008
Use AcetoneISO2 (AcetoneISO). It cannot mount .daa files directly, but you can convert the file to .iso if you click on Conversion > Convert (it will ask if it can automatically install poweriso).
Features:
http://forum.geonames.org
Get and unzip allCountries.zip and alternateNames.zip.
Create a database named geonames. Select it, then run the following SQL queries:
CREATE TABLE `geonames` (
`geonameid` int(10) unsigned NOT NULL default '0',
`name` varchar(200) NOT NULL default '',
`ansiname` varchar(200) NOT NULL default '',
`alternames` varchar(200) NOT NULL default '',
`latitude` double NOT NULL default '0',
`longitude` double NOT NULL default '0',
`feature_class` char(1) ,
`feature_code` varchar(10) ,
`country_code` char(2),
`cc2` varchar(60),
`admin1_code` varchar(20) default '',
`admin2_code` varchar(80) default '',
`admin3_code` varchar(20) default '',
`admin4_code` varchar(20) default '',
`population` int(11) default '0',
`elevation` int(11) default '0',
`gtopo30` int(11) default '0',
`timezone` varchar(40),
`modification_date` date default '0000-00-00',
PRIMARY KEY (`geonameid`)
) CHARACTER SET utf8 ;
CREATE TABLE `alternateNames` (
`alternateNameId` int(11) NOT NULL,
`geonameid` int(11) NOT NULL,
`isolanguage` varchar(7) NOT NULL,
`alternatename` varchar(200) NOT NULL,
`isPreferredName` enum('','1') NOT NULL,
`isShortName` enum('','1') NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
load data infile '/permanent1/www/geonames
(your path will be different)
ALTER TABLE `geonames` ADD INDEX ( `name` );
ALTER TABLE `geonames` ADD INDEX ( `ansiname` );
ALTER TABLE `geonames` ADD INDEX ( `population` );
ALTER TABLE `geonames` ADD INDEX ( `alternames` );
ALTER TABLE `alternateNames` ADD INDEX ( `alternatename` );
ALTER TABLE `alternateNames` ADD INDEX ( `geonameid` );
Monday, April 21, 2008

Accepted in the Google Summer of Code 2008 program
I have been selected to participate in the Google Summer of Code program. I submitted two applications, to the WinLibre and Coppermine Photo Gallery projects. As both of them were selected, I got to choose which one I wanted. It was a difficult decision as I'm getting along very well with the WinLibre guys, but I chose Coppermine in the end. The reason is that the Coppermine project is more in line with my future career, which will involve distributed systems and data mining (~Artificial Intelligence).
Here are my two applications, if you're interested: mtodo and Scaling Coppermine.
Looking forward to try on the T-Shirt :D
Friday, April 18, 2008
sudo apt-get install txt2pdbdoc
then you can use the converter like this:
txt2pdbdoc pdas pdas.txt pdas.pdb
Where pdas is the title of the new document, pdas.txt is the source text and pdas.pdb is the destination pdb file.
Then you can upload it with jpilot.
Wednesday, April 16, 2008
Drive: WDC WD1600JS-00NCB1
OS: Ubuntu 6.10 (Edgy Eft)
To install:
apt-get install smartmontools
To activate SMART on the HDD:
smartctl -s on -T permissive -d ata /dev/sda
Print all SMART information about the disk:
smartctl -a -d ata /dev/sda
Run a long test on /dev/sda:
smartctl -t long -d ata /dev/sda
Output:
smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Extended self-test routine immediately in off-line mode".
Drive command "Execute SMART Extended self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 64 minutes for test to complete.
Test will complete after Thu Apr 17 09:55:21 2008
Use smartctl -X to abort test.
Friday, April 11, 2008
Thursday, April 10, 2008
Monday, April 07, 2008
FYI, if you have a .asia website you need to change the is_email($email) function on line 341 in admin/commonlib/lib/userlib.php
Change it from
$pattern =
"^[\&\'-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ac|ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cat|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dev|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|home|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|je|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|loc|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|quipu|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$";
to
$pattern =
"^[\&\'-_.[:alnum:]]+@((([[:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]])\.)+(ac|ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|asia|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cat|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dev|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|home|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|je|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|loc|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|quipu|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$";
I just added asia after as in the list of top level domains.
The above lines are actually very long, but are not shown in Blogger. You can see them correctly if you copy/paste the text of this post.
Wednesday, March 19, 2008
The LLVM Compiler Infrastructure - http://llvm.org/Features.html
How Difficult is it to Write a Compiler? - http://tratt.net/laurie/tech_articles/articles/how_difficult_is_it_to_write_a_compiler
Lex and YACC primer/HOWTO - http://www.ds9a.nl/lex-yacc/cvs/output/lexyacc.html
Compiler Books - http://www.amazon.com/exec/obidos/tg/detail/-/0201100886/002-8651299-9372828?v=glance
Flex (The Fast Lexical Analyzer) - http://www.gnu.org/software/flex/
Bison - GNU parser generator - http://www.gnu.org/software/bison/bison.html
Let's Build a Compiler, by Jack Crenshaw - http://compilers.iecc.com/crenshaw/
http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=amazon+Brinch+Hansens
Grammar (formal language theory) - http://en.wikipedia.org/wiki/Formal_grammar
An Incremental Approach to Compiler Construction - http://scheme2006.cs.uchicago.edu/#anincrementalapproachtocompilerconstruction (pdf link on the right side)
Thursday, March 13, 2008
If you get this error:
checking for gcc bug PR28045... configure: error: your compiler has gcc PR28045 bug, use a different compiler, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28045add --disable-gcc-vcheck CFLAGS="-O0" to ./configure, like this:
./configure --prefix=/usr/local/clamav-0.92.1/ --disable-gcc-vcheck CFLAGS="-O0"
Thursday, February 21, 2008
"The goal of this blog is to publish news and links about the so called Microsoft Tax. The Microsoft Tax is the “tax” added to almost every computer sold in computer shops today. This tax represents the cost of the preinstalled Windows shipped with most computers, as it is forced upon buyers, which usually don’t have a say in which Operating System is preinstalled on their computers.
The End User License Agreement that comes with Microsoft Windows states that “By using the software, you accept these terms. If you do not accept them, do not use the software. Instead, return it to the retailer for a refund or credit.”. So in theory buyers have the option of returning Windows and getting a refund. In reality, this turns out to be almost impossible."
Tuesday, February 12, 2008
(Following text copied Verbatim from a Slashdot comment)
Many reasons:
1. There is already an ISO standard for this same purpose.
2. There are exclusions in Microsoft's Open Specification Promise, meaning Microsoft can sue over other parties writing implementations of some of the things that the OOXML standard references (ActiveX and VBA are examples).
3. OOXML is designed so that fully-compliant applications can only be written by Microsoft, and mostly-complaint applications can be written by other parties but only to run on a Windows platform. Therefore OOXML is not inter-operable with other applications and especially not with non-Windows platforms, and the whole purpose of making something a standard is to facilitate such inter-operation.
4. OOXML is technically very inferior to the existing standard, ISO 26300. For example, OOXML specifies three different implementations of "a table", instead of just one common to different Office applications. This means that you cannot write a "table handling class" as a library, but instead you have to duplicate equivalent functionality several times over.
5. OOXML includes deliberately mandating bugs (such as dates before 1900) just to pander to errors in Microsoft software.
6. OOXML is controlled by just one corporation... ISO 26300 belongs to ISO.
7. ISO 26300 already has many implementations by many vendors on multiple platform. OTOH even Office 2007 running on Windows Vista does not implement OOXML... there is not one compliant application for the OOXML that is being proposed as the standard.
8. ISO 26300 even works with Microsoft Office (up to Office 2003) using a free plugin written by Sun. Microsoft deliberately broke Office 2007 file filters so that this plugin (or any other plugin not written by Microsoft) would not work in Office 2007.
9. ISO 26300 has a compliance test suite. You can use this test suite to make sure a given application works properly with ISO 26300. No such thing exists with OOXML.
10. It makes no sense to have "choice in standards"... that just costs everybody a lot of money. It is fine to have "choice in applications" ... but ideally they should all read and write to the same standard file format ... and ISO 26300 is by far the best choice for that.
Saturday, February 02, 2008
Both Axel and Prozilla let you download the same file using parallel connections, which usually leads to an overall increase in download speed.
As Prozilla is not maintained anymore, I searched for a replacement. I found Axel, which is available in the Ubuntu repositories.
apt-get install axel
Saturday, December 01, 2007
These are my raw notes on this video. Facts are not checked, some names could be wrong.
03:40 - 2007 GPS breadcrumbs
06:40 - a year roughly to put together a car - Stanford joined the race only in the 2005 version - timeline slide
07:50 - made a course DARPA Grand Challenge - no syllabus
08:00 - 40 people, 20 people stayed on - got in touch with Volkswagen - Touareg
08:20 - first thing they did - equipped the car with inertial guiding systems - GPS + inertial measurement unit that measures accelerations and rotational velocities => extrapolate between different GPS measurements
09:00 - low level steering control - make your front tires parallel to your reference trajectory - take image from here
- if you get off the trajectory, measure your error and steer in proportion to it
10:30 - they put lasers on the roof - image
- a laser beam goes into a rotating mirror that gets directed into the environment - the laser light goes out, it is being reflected by objects - received by the sensor - we can measure the "time of flight"
11:00 - online motion planning
12:54 - test - December 1 - California - ~off-road-desert - went further than CM went in 2004, but not much - the many obstacles pushed the car around a lot - too slow for racing
13:15 - replaced driving modules with new versions, based on the feedback in the dessert
14:03 - software architecture
14:15 - faced first big hurdle - DARPA had 195 submissions - they wanted to find 40 good ones - they had to submit a video - first time they drove the car without a person inside - 43 semi-finalists
18:00 - get out bugs - goal: hundreds of miles without intervention
18:50 - Stanley gone wild - all of a sudden - go crazy out of no apparent reason - drive maybe into a ditch, down a cliff etc - car had to berescued
19:25 - 3 different innovations we worked on
20:15 - Obstacle detection - simple logic - something vertical hit by laser - image
20:40 - Effect of pitching
19:50 - Probabilistic error model
23:00 - Had to populate the probabilistic model with human driving - discriminative learning - label flat terrain as flat an non-flat as non-flat - if the human driver drove oversomething, it was flat - they managed to basically eliminate all false positives without affecting the correct positive rate
25:25 - they wanted to drive really fast (35 mph goal), but the lasers don't cover more than a 20 meter distance - couldn't stop in time when the lasers caught an obstacle
25:40 - used a camera to find roads - how do you extract from a camera image where the road is - turns out it's not easy
26:13 - they started with the idea that maybe roads are brownish - doesn't work for paved roads
26:25 - maybe the road is the smoothest thing in the image - but the smoothest thing in the image is the sky :))
27:00 - Stanley's Adaptive Vision - extract drivable region with lasers (as far as lasers can go), and use the extracted pixels as training examples - mixture of Gaussian
27:50 - if the road changes it's color you just slow down and the lasers take care of it
29:00 - the car got too fast - they had to find a way to make it slow down when the terrain got bad - adaptive mechanisms for speed control - train with human driving - stretch in the mountains - built a controller that copied that. The speed controller considers: filtered vertical shock, terrain slope, road width
31:28 - 1000+ miles of testing
32:35 - funny videos from the Berkeley team + funny Carnegie Mellon picture
33:00 - Rainy day Mojave desert (July) - couldn't see - relied on the software to drive - robot was better than human driving
34:03 - The race took place at the Fontana speedway (national qualifications), and then in Prim in Nevada. Fontana - selected the 20 finalists - Stanford 2 cars
- gate
35:20 - the most difficult obstacle was a tunnel - emulated an underpass under a highway - no GPS coverage in a tunnel - have to drive locally - this can also kill you when you get out of the tunnel and realize you are somewhere else
37:00 - one of the contestants programmed the car to go full throttle when it lost GPS signal
~37:30 - funny videos
38:22 - 23 finalists - race on October 8th
38:40 - image with the race day timeline (5:30 - DARPA chases 12 cows off the race course)
38:58 - 6:30 - race began
41:23 - "It was a complete act of randomness that Stanley actually won. It was really a failure of Carnegie Mellon's engine that made us win, and no more and no less than that"
42:10 - Last obstacle - treacherous mountain pass - reached only by 5 vehicles - Stanley was the first car to clear it - 42:23 - image
43:50 - five teams finished - four within half an hour of each other
44:26 - description of Urban Challenge 2007
45:30 - The Big Picture
45:40 - Military perspective slide
45:50 - Social perspective - cars are deadly instruments - 42000 die every year in the US because of traffic accidents - 90% caused by human error
46:20 - Commuting - people spend 1.25 hours/day in average commuting - free that time => more productive / save money
46:56 - Aging population, people who can't drive (blind people, drunk people, children) / Increase highway throughput - most space on highways is not used
Thursday, November 15, 2007
Wednesday, November 07, 2007
Wednesday, October 31, 2007
While testing iptables rules on a remote server you can add the following line to crontab:
*/10 * * * * /sbin/iptables -F
This will reset your rules every 10 minutes, so if you made a mistake you will still be able to gain access to your router in a maximum of 10 minutes.
Source
