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 | |
/** | |
* UUID class | |
* | |
* The following class generates VALID RFC 4122 COMPLIANT | |
* Universally Unique IDentifiers (UUID) version 3, 4 and 5. | |
* | |
* UUIDs generated validates using OSSP UUID Tool, and output | |
* for named-based UUIDs are exactly the same. This is a pure | |
* PHP implementation. |
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
/** | |
* ajax请求json格式数据给highchart绘图 | |
* @url http://kunyali.blog.51cto.com/4890065/1292803 | |
*/ | |
$.ajax({ | |
type: "POST", | |
url: "seriesjson.action?region="+encodeURI(region_name), | |
dataType:"json", | |
success: function(data){ | |
alert(data); |
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
/** | |
* THE FIRST METHOD OF CONVERTING STRING TO JSON OBJECT | |
* | |
*/ | |
function strToJson(str){ | |
var json = eval('(' + str + ')'); | |
return json; | |
} | |
/** |
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
var checkbox_value = []; | |
$('input[name="chk"]:checked').each(function(){ | |
checkbox_value.push($(this).val()); | |
}); | |
console.log(checkbox_value); |
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
var obj=document.getElementsByName('test'); //选择所有name="'test'"的对象,返回数组;取到对象数组后,我们来循环检测它是不是被选中 | |
var s=''; | |
for(var i=0; i<obj.length; i++){ | |
if(obj[i].checked) s+=obj[i].value+','; //如果选中,将value添加到变量s中 | |
} |
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 | |
$time1 = "2015-10-03 12:02:11"; | |
$time2 = date('Y-m-d H:i:s',strtotime("$time1 -2 year")); | |
echo $time2."<br>";//"2013-10-03 12:02:11" | |
$time3 = '2015'; | |
$time4 = date('Y',strtotime("$time3 -3 year")); | |
echo $time4."<br>";//"2012" | |
$time5 = '2015-01-01'; |
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
http://blog.csdn.net/qianqianyixiao1/article/details/42234809 |
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
[id="most-visited"]{display:none} |
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 | |
$json='{ | |
"rec_items": [ | |
{ | |
"classes": "玄幻", | |
"gid": 6326585, | |
"author": "我吃西红柿", | |
"nid": 10079306, | |
"last_sort": 841, |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\*\shell\runas] | |
@="获取管理员权限" | |
"NoWorkingDirectory"="" | |
[HKEY_CLASSES_ROOT\*\shell\runas\command] | |
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F" | |
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F" | |
[HKEY_CLASSES_ROOT\exefile\shell\runas2] | |
@="获取管理员权限" | |
"NoWorkingDirectory"="" |
OlderNewer