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
import store from './store' | |
export function render (container: any) { | |
if (!container) { | |
container = document.createElement('div') | |
container.id = ENGINE_CONTAINER | |
document.body.appendChild(container) | |
} | |
ReactDOM.render( |
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 hooks = { | |
foo: function() { | |
console.log(this) | |
}, | |
_default: function() { | |
console.log(this) | |
} | |
} | |
owner.foo() // hooks |
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 parse(result) { | |
var cursor = 1, | |
arr = [] | |
while (cursor <= result) { | |
if (result & cursor) arr.push(cursor) | |
cursor *= 2 | |
} | |
console.log(arr) | |
} |
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
{ | |
"type": "program", | |
"statements": [ | |
{ | |
"type": "mustache", | |
"strip": { | |
"left": false, | |
"right": false | |
}, | |
"escaped": 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
"use strict"; | |
/* global window */ | |
/* global define */ | |
/* global KISSY */ | |
/* | |
https://gist.github.com/nuysoft/7974409 | |
*/ |
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() { | |
$.extend({ | |
unparam: function(param) { | |
if (param[0] === '?') param = param.slice(1) | |
var re = {} | |
for (var i = 0, arr = param.split('&'), kv; kv = arr[i]; i++) { | |
kv = kv.split('=') | |
re[kv[0]] = kv[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
.not-ie .btn-big-red{background-color:#C63702;background-image:linear-gradient(167deg, rgba(255,255,255,0.1) 50%, transparent 55%),linear-gradient(top, rgba(255,255,255,0.15), transparent);border-radius:6px;box-shadow:0 0 0 1px #c63702 inset,0 0 0 2px rgba(255,255,255,0.15) inset,0 8px 0 0 #ad3002,0 8px 0 1px rgba(0,0,0,0.4),0 8px 8px 1px rgba(0,0,0,0.5);color:white;display:block;font-family:"Lucida Grande", Arial, sans-serif;font-size:22px;font-weight:bold;height:61px;letter-spacing:-1px;line-height:61px;margin:28px 0 10px;position:relative;text-align:center;text-shadow:0 1px 1px rgba(0,0,0,0.5);text-decoration:none !important;transition:all .2s linear;width:186px} | |
.not-ie .btn-big-red:hover{background-color:#d13902;box-shadow:0 0 0 1px #c63702 inset,0 0 0 2px rgba(255,255,255,0.15) inset,0 10px 0 0 #ad3002,0 10px 0 1px rgba(0,0,0,0.4),0 10px 8px 1px rgba(0,0,0,0.6);margin-top:26px;margin-bottom:12px} | |
.not-ie .btn-big-red:active{box-shadow:0 0 0 1px #ad3002 inset,0 0px 0 2px rgba(255,255,255,0.15) inset,0 0 |
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
package com.nuysoft.util; | |
public enum State { | |
// 环境 | |
RUN, // 生产环境 | |
DEBUG, // 测试环境 | |
// 状态 | |
NEW, // 新建 | |
READY, // 初始化 |
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
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
watch: { | |
dev: { | |
files: ['../dev/zuanshi-site-web/src/main/webapp/**/**'], | |
tasks: ['copy'] | |
} | |
}, | |
copy: { |
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(){ | |
try{ | |
return 1 | |
} finally { | |
return 2 | |
} | |
})() | |
// => 2 |
NewerOlder