ibnuyahya
Software developer's note
Software developer's note
Sep 2nd
If you want to create a new table as same as existing table structure, you can use the following command. CREATE TABLE new_table_name LIKE existing_table
Aug 1st
If you found this error on linux.. you can use “iat” to convert it into iso9660 To install sudo apt-get install iat Usage iat target_iso_file.iso
Jul 22nd
if your project is require to connect into 3rd party script and that script is encrypted, you can use this function to list down all available function in that page. print_r(get_defined_functions()); for more info http://php.net/manual/en/function.get-defined-functions.php
Jul 21st
This week I got 2 feedback from our customer. Both user give same feedback which is they can’t access on page A. After do debugging, I found no error in our code and everything is smooth when we test it. I assume that error happen when you browse using different internet connection speed such as
Jul 15th
lets say you want to do this rule 1. Insert record if record is new record 2. update record if record already exist. To do that, you can use INSERT … ON DUPLICATE KEY UPDATE syntax for example INSERT INTO table(a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE c=c+1; more info http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html
Jul 13th
What do the _() and _e() functions in WordPress do? In WordPress, strings in the php files are marked for translation to other languages, and localization using two “tags” which are actually functions. They are: _() _e() These accept a string as an argument. For example: _(“Translate Me”) _e(“Translate Me”) The only functional difference between
Jul 2nd
How to convert bytes to Kilobytes, megabytes and so on?. function format_bytes($size, $precision = 2){ $base = log($size) / log(1024); $suffixes = array(”, ‘kB’, ‘MB’, ‘GB’, ‘TB’ , ‘PB’ , ‘EB’); return round(pow(1024, $base – floor($base)), $precision) . $suffixes[floor($base)]; } how to use it echo format_bytes(888888);
Jun 29th
As a PHP programmer , maybe we quite familiar with single quote and double quotes to display string for example echo ‘This is my sample text’; //will print //This is my sample text echo “This is my sample text”; //will print //This is my sample text double quotes can interpret more escape sequences for special characters.
Jun 23rd
In linux.. you can use wget as your download manager. Wget has many features to make retrieving large files or mirroring entire web or FTP sites easy. How to use it?.. actually it’s pretty simple. Say you want to download a url. Just type: wget http://ibnuyahya.com/ But what will happen if the connection is slow,
Jun 16th
Method 1 Basic concept. Load image when page is loaded if (document.images) { img1 = new Image(); img1.src = “image.jpg”; img2 = new Image(); img2.src = “image2.jpg”; } Method 2 Improve method 1. Create function function preload(images) { if (document.images) { var i = 0; var imageArray = new Array(); imageArray = images.split(‘,’); var imageObj