Guitar tabs of the title song from movie "Aashiqui 2" (Intro part). Kyun ki Tum hi ho, ab tum hi ho,.. Zindagi ab tum hi ho is a very romantic song by Arijit Singh. I am trying to play this on guitar, so check and leave your comments. :)
How to play this song on Guitar? --> Check out the following notes.
MySQL has very strong system to log queries and events, It allows you to log
1. General queries - General record of mysqld activities.
2. Binary log - These are nothing but events describing the changes in database e.g. table creation. It plays important role during database replication.
3. Error logs - It logs all critical errors during of running MySQL server. MySQL is smart , if it finds any table that needs automatic repair then it updates error log file with respected message.
4. Slow query log - MySQL can store SQL statements which takes more time than long_query_time seconds, defined in my.cnf file, which is configuration file of MySQL server. The default value of this variable is 10. This is very important step in order to optimize the MySQL server performance by identifying slow queries.
That's not enough about log, but just gave you rough idea about its log system, lets see how to enable different logs in MySQL.
1. General Query Log -
OS : Ubuntu 12.04.1 LTS
MySQL version : 5.5.28
1. Locate and edit my.cnf file. We need to change two variables in this file to enable general query log.
a. sudo gedit /etc/mysql/my.cnf
b. Locate this variable in the file : general_log_file
c. It must have some default value, this variable is nothing but the path of log file.
d. The default value is "/var/log/mysql/mysql.log", you can change it as per your wish.
e. Now locate variable "general_log", and set it to 1. The means turning on the log system.
f. Now restart the MySQL server by running : sudo service mysql restart
d. now if you open the mysql.log file, you can see all SQL queries in it. :)
Will update the steps for other log system soon. :)
This week I started using my VPN connection for some work. But I notice that whenever I connect my VPN, my machine was loosing the local internet connection. Previously it was not the issue with my machine, but it started appearing once I started using wifi for local internet connection. I am using WINDOWS 7 machine. Here is a fix for this issue.
How to enable local internet connection while using VPN network.
1. Right click on the VPN connector in your network connections.
2. Click properties.
3. Then click on the networking tab.
4. Then click on TCP/IP settings. i.e.(Internet protocol version 4..)
5. Then click on Properties button to view "Internet protocol version 4" properties.
6. This will open a new window.
7. Click on advanced button.
8. Now under IP-settings tab you will find a check box which reads "Use default gateway on remote network".
9. UNCHECK this checkboox.
10. Save all settings.
This will surely get your internet back while connecting VPN.
"jQuery validator" is really a very good plugin for validating your web forms on client side. Why I am recommending this plugin is because its flexibility and set of methods which offers complete customization. Plugin offers lots of different methods so that you can customize it as per your requirement very easily. I have used it in many applications. There are many other jQuery based form validation tools which actually using this plugin as back bone of there plugins.
I was working on one application yesterday in which I need to load some form fields dynamically from AJAX call. In this case once input fields are populated in your form you may need to apply validation rule for these fields. This step is necessary because the original $("#formId").validate method was initiated during the page load. So how to add dynamic rule to jQuery validator?? check the following solution.
If you want to add validation rule to form which is already loaded then its kind of tricky and you may need to use following function.