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 test = function(){ | |
return 'test success!'; | |
} | |
var testObj = new test(); |
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 | |
/* 修改wordpress默认登录地址 */ | |
function wb_redir_login() { | |
wp_redirect(home_url('/').'/login'); //这个地址可以随意修改 | |
exit; | |
} |
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 JsonUti = { | |
//定义换行符 | |
n: "\n", | |
//定义制表符 | |
t: "\t", | |
//转换String | |
convertToString: function(obj) { | |
return JsonUti.__writeObj(obj, 1); | |
}, | |
//写对象 |
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 | |
$data = array ('context' => '明天去打篮球'); | |
$data = http_build_query($data); | |
$opts = array ( | |
'http' => array ( | |
'method' => 'POST', | |
'header'=> "Content-type: application/x-www-form-urlencoded\r\n" . | |
"Content-Length: " . strlen($data) . "\r\n", | |
'content' => $data, | |
'timeout' => 10 |
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
.arrow{ | |
width: 48px; | |
height: 48px; | |
background-color: #08c; | |
box-shadow: 1px 1px 4px #888; | |
transform: rotate(45deg); | |
-webkit-transform: rotate(45deg); | |
position: absolute; | |
left: -24px; | |
top: -24px; |
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
/** | |
* 微信网页端调用JS | |
* @author dodge | |
* @contact [email protected] | |
* @link http://blog.4wer.com/wechat-timeline-share | |
* @version 1.1 | |
* | |
* 自定义分享使用: | |
* WeixinJS.hideOptionMenu() 隐藏右上角按钮 | |
* WeixinJS.hideToolbar() 隐藏工具栏 |
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
e.preventDefault(); | |
mousedown = false; | |
var data=ctx.getImageData(0,0,w,h).data; | |
for(var i=0,j=0;i< data.length;i+=4){ | |
if(data[i] && data[i+1] && data[i+2] && data[i+3]){ | |
j++; | |
} | |
} | |
if(j<=w*h*0.1){ | |
alert('ok'); |
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
/** | |
* jQuery Rotate On Axis In IE Plugin 1.0.0 | |
* | |
* Copyright (c) 2014 Aryeh Citron | |
* | |
* Licensed under MIT: http://www.opensource.org/licenses/mit-license.php | |
*/ | |
(function ($) |
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
console.log(function(){/* | |
if you want to join we, | |
please explain this ! | |
*/}.toString().split(/\n/).slice(1,-1).join("\n")) |
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
$.fn.serializeObject = function() { | |
var o = Object.create(null), | |
elementMapper = function(element) { | |
element.name = $.camelCase(element.name); | |
return element; | |
}, | |
appendToResult = function(i, element) { | |
var node = o[element.name]; | |
if ('undefined' != typeof node && node !== null) { |
OlderNewer