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(a,b){if(typeof exports==="object"){module.exports=exports=b()}else{if(typeof define==="function"&&define.amd){define([],b)}else{a.CryptoJS=b()}}}(this,function(){var a=a||(function(f,h){var b={};var c=b.lib={};var k=c.Base=(function(){function o(){}return{extend:function(q){o.prototype=this;var p=new o();if(q){p.mixIn(q)}if(!p.hasOwnProperty("init")){p.init=function(){p.$super.init.apply(this,arguments)}}p.init.prototype=p;p.$super=this;return p},create:function(){var p=this.extend();p.init.apply(p,arguments);return p},init:function(){},mixIn:function(q){for(var p in q){if(q.hasOwnProperty(p)){this[p]=q[p]}}if(q.hasOwnProperty("toString")){this.toString=q.toString}},clone:function(){return this.init.prototype.extend(this)}}}());var m=c.WordArray=k.extend({init:function(p,o){p=this.words=p||[];if(o!=h){this.sigBytes=o}else{this.sigBytes=p.length*4}},toString:function(o){return(o||i).stringify(this)},concat:function(u){var r=this.words;var q=u.words;var o=this.sigBytes;var t=u.sigBytes;this.clamp();if |
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
# -*- coding: utf-8 -*- 1 | |
import re | |
import sys | |
from reportlab.pdfbase import pdfmetrics | |
from reportlab.pdfbase.ttfonts import TTFont | |
from reportlab.lib.styles import ParagraphStyle | |
from reportlab.platypus import Paragraph, SimpleDocTemplate, PageBreak |
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
# -*- coding: utf-8 -*- | |
from PIL import Image, ImageDraw, ImageFont | |
import unpack_img | |
import os | |
pkg_path = os.path.abspath(os.path.dirname(__file__)) + '/' | |
road_src = unpack_img.map_resoure( pkg_path + 'grass.png') |
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 request = require('request'); | |
var req = request | |
.post('https://api.github.com/authorizations',{ | |
auth : { | |
username : 'ssddi456', | |
password : '', | |
'sendImmediately': true | |
}, | |
headers : { |
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
<meta charset="UTF-8"> | |
<textarea name="" id="in" cols="30" rows="10"> | |
here is some random direct text! | |
happy chart; | |
这是一段随机文字 | |
</textarea> | |
<div> | |
<label>chaos_lv</label> | |
<input type="radio" value="1" name="chaos_lv" checked> 1 | |
<input type="radio" value="1.5" name="chaos_lv"> 1.5 |
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 cp = require('child_process'); | |
var fs = require('fs'); | |
var cmd = 'git config --get remote.origin.url'; | |
var jd_git = 'code.jd.com'; | |
fs.readdirSync('.').forEach(function( dir ) { | |
try{ | |
var stat = fs.statSync(dir); | |
}catch(e){ |
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 table_to_json( table, normalized ){ | |
var head = table.getElementsByTagName('thead')[0]; | |
var keys = head.getElementsByTagName('th'); | |
var keys = [].map.call(keys,function( th ) { | |
return th.innerText; | |
}); | |
var body = table.getElementsByTagName('tbody')[0]; | |
var values= body.getElementsByTagName('tr'); | |
values = [].map.call(values,function( tr ) { | |
var val = tr.getElementsByTagName('td'); |
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 test( t : string ) : string { | |
return t + t | |
} |
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的减法运算. 但小数位不得超过6位 否则toFixed 可能会舍去超出部分 除非前6位中至少有1位具备有效数字 | |
function sub(arg1, arg2) { | |
var r1, r2, m, n; | |
try { r1 = arg1.toString().split('.')[1].length } catch (e) { r1 = 0 } | |
try { r2 = arg2.toString().split('.')[1].length } catch (e) { r2 = 0 } | |
m = Math.pow(10, Math.max(r1, r2)); | |
//动态控制精度长度 | |
n = (r1 >= r2) ? r1 : r2; | |
return parseFloat(((arg1 * m - arg2 * m) / m).toFixed(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
<html> | |
<body> | |
<style> | |
#bg,#test{ | |
width: 100px; | |
height: 200px; | |
background: #f00; | |
border-top: 3px solid green; | |
position: absolute; |