Archive for May, 2008
Friday, May 30th, 2008
Baru sadar, waktu lagi nyari sesuatu di Google, ada yang beda pada tampilan halaman Google.
Favicon Google berubah. favicon itu yang ada disebelah alamat URL pada address bar, dan juga biasanya ada di tab browser.
Biasanya selama ini favicon Google adalah huruf G dengan uppercase.
Sekarang jadi huruf g dengan lowercase.

Tapi ternyata tidak semua mirror Google yang berubah. Pada beberapa negara masih menggunakan favicon yang biasa. Setidaknya pada mirror Google di Indonesia, Prancis, Italy, Belanda, Rumania, dan Malaysia faviconnya berubah.
Bahkan di server utama nya http://www.google.com/ masih menggunakan favicon yang standar kebesaran Google.
Yah, biar tidak bosan kali…
Posted in Tech-News | No Comments »
Sunday, May 25th, 2008
| Name |
Description |
ASCII() |
Return numeric value of left-most character |
BIN() |
Return a string representation of the argument |
BIT_LENGTH() |
Return length of argument in bits |
CHAR_LENGTH() |
Return number of characters in argument |
CHAR() |
Return the character for each integer passed |
CHARACTER_LENGTH() |
A synonym for CHAR_LENGTH() |
CONCAT_WS() |
Return concatenate with separator |
CONCAT() |
Return concatenated string |
ELT() |
Return string at index number |
EXPORT_SET() |
Return a string such that for every bit set in the value bits, you get an on string and for every unset bit, you get an off string |
FIELD() |
Return the index (position) of the first argument in the subsequent arguments |
FIND_IN_SET() |
Return the index position of the first argument within the second argument |
FORMAT() |
Return a number formatted to specified number of decimal places |
HEX() |
Return a hexadecimal representation of a decimal or string value |
INSERT() |
Insert a substring at the specified position up to the specified number of characters |
INSTR() |
Return the index of the first occurrence of substring |
LCASE() |
Synonym for LOWER() |
LEFT() |
Return the leftmost number of characters as specified |
LENGTH() |
Return the length of a string in bytes |
LIKE |
Simple pattern matching |
LOAD_FILE() |
Load the named file |
LOCATE() |
Return the position of the first occurrence of substring |
LOWER() |
Return the argument in lowercase |
LPAD() |
Return the string argument, left-padded with the specified string |
LTRIM() |
Remove leading spaces |
MAKE_SET() |
Return a set of comma-separated strings that have the corresponding bit in bits set |
MATCH |
Perform full-text search |
MID() |
Return a substring starting from the specified position |
NOT LIKE |
Negation of simple pattern matching |
NOT REGEXP |
Negation of REGEXP |
OCTET_LENGTH() |
A synonym for LENGTH() |
ORD() |
Return character code for leftmost character of the argument |
POSITION() |
A synonym for LOCATE() |
QUOTE() |
Escape the argument for use in an SQL statement |
REGEXP |
Pattern matching using regular expressions |
REPEAT() |
Repeat a string the specified number of times |
REPLACE() |
Replace occurrences of a specified string |
REVERSE() |
Reverse the characters in a string |
RIGHT() |
Return the specified rightmost number of characters |
RLIKE |
Synonym for REGEXP |
RPAD() |
Append string the specified number of times |
RTRIM() |
Remove trailing spaces |
SOUNDEX() |
Return a soundex string |
SOUNDS LIKE(v4.1.0) |
Compare sounds |
SPACE() |
Return a string of the specified number of spaces |
STRCMP() |
Compare two strings |
SUBSTR() |
Return the substring as specified |
SUBSTRING_INDEX() |
Return a substring from a string before the specified number of occurrences of the delimiter |
SUBSTRING() |
Return the substring as specified |
TRIM() |
Remove leading and trailing spaces |
UCASE() |
Synonym for UPPER() |
UNHEX()(v4.1.2) |
Convert each pair of hexadecimal digits to a character |
UPPER() |
Convert to uppercase |
String-valued functions return NULL if the length of the result would be greater than the value of the max_allowed_packet system variable.
For functions that operate on string positions, the first position is numbered 1.
(more…)
Posted in coded | No Comments »
Sunday, May 25th, 2008
With Ubuntu, you can create ISO disk Images directly from CD/DVD and folder files. Then create MD5 Checksum files.
Assumed that the CD/DVD device is located at /dev/cdrom/
Turn a CD/DVD into an .iso
$ sudo umount /dev/cdrom
$ dd if=/dev/cdrom of=file.iso bs=1024
Turn a folder into an .iso
$ mkisofs -r -o file.iso /location_of_folder/
Generate an MD5 checksum file
$ md5sum file.iso > file.iso.md5
Check MD5 checksum of file
$ md5sum -c file.iso.md5
(more…)
Posted in ubuntu | No Comments »
Wednesday, May 21st, 2008
Yay, its arrived..! Linux Ubuntu 8.04 (Hardy Heron) free CDs. Requested it from https://shipit.ubuntu.com/
Kinda late, because i already downloaded and installed it since the first time released. And like always, i have to go to the Post Office, and pay Rp.7000 for the tax.
The Package:

-
And the package content:

-
There’s some difference from edubuntu cd. its called “Education Edition Add-on CD”. Ubuntu Education Edition is an additional selection of free and open source software for education to be used with Ubuntu. This CD is does not offer LTSP installation directly. To get the same out-of-the-box-set-up as before, start from the Ubuntu alternate install CD, and select “Install an LTSP server” from the Modes menu.
The Ubuntu Promise
- Ubuntu will always be free of charge, including enterprise releases and security updates
- Ubuntu comes with full commercial support from Canonical and hundreds of companies around the world
- Ubuntu includes the very best translations and accessibility infrastructure that the free software community has to offer
- Ubuntu CDs contain only free software applications; we encourage you to use free and open source software, improve it and pass it on
(more…)
Posted in ubuntu | 3 Comments »
Friday, May 16th, 2008
PHP allows you to write code in two flavours, one is procedural and the other
is object oriented. You can even write procedural code in PHP5 and it will run
without any problems. If you are not clear about procedural and object oriented
programming, then we will have a look at these two different coding styles. The
following two examples are not fully running examples rather a pseudo code:
<?
$user_input = $_POST[‘field‘];
$filtered_content = filter($user_input); //user input filtering
mysql_connect(”dbhost”,”dbuser”,”dbpassword”); //database
mysql_select_db(”dbname”);
$sql = “some query”;
$result = mysql_query($sql);
while ($data = mysql_fetch_assoc())
{
process ($data);
}
process_user_input($filtered_content);
?>
You will notice using a lot of inline processing either directly or via using functions.
It may stand as an example of typical procedural operation. Let’s see how it looks
after converting it to OOP:
<?
$input_filter = new filter();
$input_filter->filter_user_input(); //filter the user inputs
$db = new dal(”mysql”); //data access layer
$db->connect($dbconfig); //using mysql
$result = $db->execute($sql);
ReportGenerator::makereport($result); //process data
$model = new Postmodel($filter->get_filtered_content());
$model->insert();
?>
Now if you take a look into these two code snippets, you will find that the latter
one is much more readable. Well, you can make the first one more readable by
introducing some more functions into it, but how many functions are you ready
to search into when you use them? The latter snippet is better organized because
you know which object is handling which process. If you write big applications in
procedural style, it will be almost impossible to manage after a few versions. Of
course you can implement strict coding conventions, but it is agreed by millions
of developers that it won’t give you the ultimate manageability and usability if it’s
procedural unless you do it in OO style. Almost all big applications are written using
the object oriented approach. (more…)
Posted in coded | No Comments »