Skip to content

Instantly share code, notes, and snippets.

View pzzrudlf's full-sized avatar
💭
I may be slow to respond.

pzzrudlf pzzrudlf

💭
I may be slow to respond.
View GitHub Profile
@pzzrudlf
pzzrudlf / UUID.php
Last active August 28, 2015 06:36 — forked from dahnielson/UUID.php
Pure PHP UUID generator
<?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.
/**
* 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);
/**
* THE FIRST METHOD OF CONVERTING STRING TO JSON OBJECT
*
*/
function strToJson(str){
var json = eval('(' + str + ')');
return json;
}
/**
var checkbox_value = [];
$('input[name="chk"]:checked').each(function(){
checkbox_value.push($(this).val());
});
console.log(checkbox_value);
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中
}
<?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';
http://blog.csdn.net/qianqianyixiao1/article/details/42234809
[id="most-visited"]{display:none}
<?php
$json='{
"rec_items": [
{
"classes": "玄幻",
"gid": 6326585,
"author": "我吃西红柿",
"nid": 10079306,
"last_sort": 841,
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"=""