Category archives: Experience

RSS feed of Experience

jquery grep(),inArray(), map() and join() in javascript

1.jquery grep(): Filtered through an array

   eg.
       var array = [1,2,3,4,5,6,7,8,9];
       var filterarray = $.grep(array,function(value){
           return value > 5;//filter out of more than 5
       });
       for(var i=0;i<filterarray.length;i++){
           alert(filterarray[i]);
       }
       for (key in filterarray){
           alert(filterarray[key]);
       }

2.jquery inArray ...

Continue reading

Linux mysql service mysql start fail can't run mysql

View error log:

******************************************************************
160104 22:02:31  InnoDB: Waiting for the background threads to start
160104 22:02:32 InnoDB: 5.5.42 started; log sequence number 1595675
160104 22:02:32 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
160104 22:02:32 [Note]   - '0.0.0.0' resolves to '0.0 ...

Continue reading

linux centos7 switch graphic mode and text mode

centos7 switch graphic mode and text mode

In the graphic mode using ctrl + alt + F2 to switch to a text mode.
text mode press ctrl + alt + F2 to switch back to the graphic mode.
Enter the command init 3 to switch to text mode.
Enter the command init 5 to switch to graphic mode.

If ...

Continue reading