This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$raw = array( | |
array( | |
'id' => '11', | |
'name' => 'n1', | |
'music' => 'm1'), | |
array( | |
'id' => '12', | |
'name' => 'n2', | |
'music' => 'm2'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//get certain date. | |
$date_case = strtotime('+1 month', strtotime('201405071011')); | |
$month_later = date('YmdHi', $date_case); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* swap without tmp variable, merely with +/-. | |
Notice: this is restricted to number swap. | |
*/ | |
function swap(a, b){ | |
a = a+b; | |
b = a-b; | |
a = a-b; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function compareTest(){ | |
//1)纯数字之间比较 | |
alert(1<3);//true | |
//2)数字字符串比较,会将其先转成数字 | |
alert("1"<"3");//true | |
alert("123"<"123");//false | |
//3)纯字符串比较,先转成ascii码 | |
alert("a"<"b");//true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.Start the mysql server instance or daemon with the --skip-grant-tables option. (security setting) | |
$ mysqld --skip-grant-tables | |
2.Then Execute these statements. | |
$ mysql -u root mysql | |
$mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root'; | |
$mysql> FLUSH PRIVILEGES; | |
3.Finally, restart the instance/daemon without the --skip-grant-tables option. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<meta property="wb:webmaster" content="edcf77ed05a8765f" /> | |
<title>ninja test group asyn</title> | |
<meta name="viewport" content="width=device-width"> | |
<style> | |
#result li.passed { color: blue; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<meta property="wb:webmaster" content="edcf77ed05a8765f" /> | |
<meta name="viewport" content="width=device-width"> | |
<style> | |
#result li.passed { color: blue; } | |
#result li.failed { color: red; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<meta property="wb:webmaster" content="edcf77ed05a8765f" /> | |
<meta name="viewport" content="width=device-width"> | |
<script> | |
var ErrorOverLimit = new Error('>= 31.'); | |
var ErrorMsg = new Error('invalid time.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe width="100%" height="300" src="http://jsfiddle.net/Williammer/Yp9gf/1/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe> | |
<script> | |
/** javaScript **/ | |
var findNodes = function (callback, callback_obj) { | |
var i = 10, | |
nodes = [], | |
found; | |
// check if callback is callable |
OlderNewer