Learning On Demand Learning anything from anywhere

Archive for November, 2006

Step by step moving from blogspot beta to wordpress blog

11.28.2006 · Posted in PHP

I do like blogspot except for few things : No categories, I’m familiar with label in gmail but not label in blogspot beta No timestamp modification, I do try to use “future posting” but it’s show as immediately in blogspot not waiting for right moment. Performancing can’t upload image with blogspot beta. I think it’s ...

Top 10 SQL Performance Tips 5

11.25.2006 · Posted in Database

“Have good SQL query standards” Gee, seem easy to say but often difficult to deploy. Many people tend to use abstraction layer like adodb, pear, ezsql etc . They have coding convention and good manual. Portable SQL will lead on good application, seamless integration with other DB. How about You? ...

Top 10 SQL Performance Tips 4

11.24.2006 · Posted in Database

“Use benchmarking” Yes, big hit to database with not optimized configuration will make disaster and stress. More reading related to benchmarking. Stupid MySQL Benchmarking Lesson #153 MySQL Benchmarking ...

Top 10 SQL Performance Tips 3

11.23.2006 · Posted in Database

“increase temp table size in a data warehousing environment (default is 32Mb) so it doesn’t write to disk (also constrained by max_heap_table_size, default 16Mb)” Data working faster in memory process not in disk write mode. Nowadays many linux livecd distro created to gain that benefit, more memory more speed in windows try to find this ...

Top 10 SQL Performance Tips 2

11.22.2006 · Posted in Database

Another tip : “Don’t use DISTINCT when you have or could use GROUP BY” I prefer to use GROUP BY than DISTINCT since I can retrieve more field. SELECT DISTINCT town_name from city; SELECT town_id, town_zip, town_name from city group by town_name; the result also not quite accurate using DISTINCT, I still have duplicate data. ...

Top 10 SQL Performance Tips I

11.21.2006 · Posted in Database

Today Google show me interesting link : Top 10 SQL Performance Tips – MySQL Forge Right now it’s consist of 84 tips, I can understand some of them but many I don’t know what it means one of them : “partition your database when you have real data” Hmm, I’m totally agree I have to ...

PHP Ternary Operator

11.20.2006 · Posted in PHP

PHP ternary operator isn’t beautiful for reading reason It’s also make confuse, but for the sake of simple it’s OK Syntax : ( expr1 ) ? ( expr2 ) : (expr3) If expr1 return true, then it evaluates to ( expr2 )If expr1 return false, then it evaluates to ( expr3 ) it’s similar to ...

Recover Your Joomla Administrator Password

11.19.2006 · Posted in PHP

Joomla is very popular CMS, it’s easy to setup and require only working php and mysql installation. A problem may arise when your administrator password lost or forgot. Can I recover my admin password or create a new one ? It’s common question in "Setting your own Content Management System" workshop. Use php md5() function ...

Year Validation with PHP

11.19.2006 · Posted in PHP

This code snippet validate user input from a form : $year=strip_tags($year); if(empty($$year) || is_numeric($year) || strlen($year)!=4 || $year strip all html tags ( handle by strip_tags ) make sure the year in 4 digit (with strlen help) make sure its number not character (is_numeric) not empty (php empty function) force user enter year of birth ...

Regex, nightmare for newbie

11.17.2006 · Posted in PHP

Regex (Regular Expression) is nightmare for me, validation email, pattern recognizing task always depend on regex. A few software out there will help us (newbie) to learn regex faster with “experience mentor” I like these software : 1. Regexbudy A lot of video demo PHP section 2. Regexcouch For medium level, since I’m totally newbie ...

Performancing, blogspot beta and upload picture vi…

11.17.2006 · Posted in Speak

Still trying to upload picture to blogspot using API, trying both blogspot beta and wordpress and the result is :Blogspot beta : encounter error (fail to upload via API) WordPress : success I have try at home too : Home : Firefox 2.0 and performancing 1.3.5 Office : Firefox 1.5.0.8 and performancing 1.3.5 Example ...