This file contains hidden or 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
if ($.inArray('old', clsName) == 1 || $.inArray('new', clsName) == 1) { | |
html.push('<td></td>'); | |
} else { | |
html.push('<td class="'+clsName.join(' ')+'"' + (tooltip ? ' title="'+tooltip+'"' : '') + '>'+prevMonth.getUTCDate() + '</td>'); | |
} | |
var event_dates = ['2014-03-01','2014-03-02']; | |
// console.log(prevMonth.getUTCFullYear()); | |
var s = prevMonth.getUTCFullYear() + '/' + prevMonth.getUTCMonth() + '/' + prevMonth.getUTCDate() ; |
This file contains hidden or 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
/*global module:false*/ | |
module.exports = function(grunt) { | |
var conf, pkg; | |
pkg = grunt.file.readJSON('package.json'); | |
conf = { | |
src: 'app', | |
host: '0.0.0.0', | |
port: 9000, | |
livereload: 35729 |
This file contains hidden or 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 Promise = function() { | |
this.state = 'pending'; | |
this.thenables = []; | |
}; | |
Promise.prototype.resolve = function(value) { | |
if (this.state != 'pending') { return; }; | |
this.state = 'fulfilled'; | |
this.value = value; |
This file contains hidden or 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 TemplateEngine = function(html, options) { | |
var re = /<%([^%>]+)?%>/g, | |
reExp = /(^( )?(if|for|else|switch|case|break|{|}))(.*)?/g, | |
code = 'var r=[];\n', | |
cursor = 0; | |
var add = function(line, js) { | |
js? (code += line.match(reExp) ? line + '\n' : 'r.push(' + line + ');\n') : | |
(code += line != '' ? 'r.push("' + line.replace(/"/g, '\\"') + '");\n' : ''); | |
return add; |
This file contains hidden or 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 commands | |
def get_cpu_temp(): | |
tempFile = open( "/sys/class/thermal/thermal_zone0/temp" ) | |
cpu_temp = tempFile.read() | |
tempFile.close() | |
return float(cpu_temp)/1000 | |
# Uncomment the next line if you want the temp in Fahrenheit | |
#return float(1.8*cpu_temp)+32 |
This file contains hidden or 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 time = 60000/360, init = 0, per = 2*Math.PI/360; | |
var c=document.getElementById("myCanvas"); | |
var ctx=c.getContext("2d"); | |
ctx.beginPath(); | |
ctx.arc(100,75,50,0,0*Math.PI); | |
ctx.stroke(); | |
This file contains hidden or 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> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Table with Persistent Headers</title> | |
<link rel="stylesheet" href="css/style.css"> | |
This file contains hidden or 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
https://github.com/emmetio/emmet-atom/issues/354 |
This file contains hidden or 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> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>我的生活</title> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
This file contains hidden or 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 gulp = require('gulp'); | |
// sass 插件 | |
var sass = require('gulp-sass'); | |
// 自动同步浏览器插件 | |
var browserSync = require('browser-sync'); | |
// 合并文件的插件 | |
var useref = require('gulp-useref'); | |
// 压缩js插件 | |
var uglify = require('gulp-uglify'); | |
var gulpIf = require('gulp-if'); |
OlderNewer