Pages

Monday, October 31, 2011

Tips To Turn Off Your Computer Without Software Quickly


Unlike TV's, computers can not just push the off button if we wanna turn it off. It needs a process to terminate some programs until it is completely finished before she would shutdown. unless you are ready to risk losing data because of failure on shutdown process.

Sunday, October 30, 2011

Create user, grant privileges in mysql

Have you ever been createe a database-based application using mysql??. This blog will discuss about creating a user in the mysql database as well as providing a database object privileges for that user.
The following is script to do that
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON [db_name].* TO '[db_user]'@'[db_host]' IDENTIFIED BY '[db_user_password]';
From that script, if you want to limit user privileges just on manipulating data, you should use select, insert, update, delete.
Because of db_host parameter, we have to define each user for each different host.

Saturday, October 29, 2011

Find content in element using jquery


Have you ever get a problem on append some text in an element while you don't want to append it if that element already has contained it using jquery??. If so the following is algorithm to solve that :
  1. find element that contains text
  2. check whether that element length more than 0 or not
  3. if yes then append text
  4. if not just leave it
Here is the code :

Don't Forget To Join Our Community
×
Widget