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
// | |
// NSManagedObject+ImportFromApi.m | |
// ThermometerBLE | |
// | |
// Created by Tonny on 3/4/14. | |
// Copyright (c) 2014 Doouya. All rights reserved. | |
// | |
#import "NSManagedObject+ImportFromApi.h" | |
#import "CommunityHeader.h" |
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
#!/bin/sh | |
#------------------------------------------------------ | |
prework(){ | |
# Select the git format you want to use | |
GITFORMAT='%h' | |
echo "----------------------------------------------------" | |
# Enter a closing message |
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
// Underscore.js 1.7.0 | |
// http://underscorejs.org | |
// (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | |
// Underscore may be freely distributed under the MIT license. |
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() { | |
//匿名函数 | |
//通常js对象调用已存在函数:obj.func(),若方法不存在,又不想重复定义该方法,可以使用call或apply借用 | |
//obj2借用obj1的bar方法 | |
//var obj1 = {}; obj1.bar = function(){...} | |
//var obj2 = {}; obj.bar.call(obj1); | |
//用call借用匿名函数,此处this可不传,参数为null或undefined时会自动指向全局对象 |
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 root = this; //创建root局部变量,若在浏览器环境就是Window,若是Node环境就是node对象{exports:.. require:.. global:.. } |
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
//若你在导入undersocre之前已经使用了全局变量_表示laylow,为防止冲突,需要暂存起来 | |
//今后你只能var laylow = _.noConflict()来表示laylow,而_表示undersocre | |
var previousUnderscore = root._; |
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
//作为工具类库,这3个prototype在很多地方都会用到,索性来个局部变量减少向上索取工作量。 | |
//在underscore-min.js文件中,是这样的r=Array.prototype,e=Object.prototype,u=Function.prototype,48KB压缩成16KB | |
var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; | |
// 同理 局部快速索引 | |
var | |
push = ArrayProto.push, | |
slice = ArrayProto.slice, |
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 | |
nativeIsArray = Array.isArray, | |
nativeKeys = Object.keys, | |
nativeBind = FuncProto.bind; |
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
// Baseline setup | |
// -------------- | |
// Collection Functions | |
// -------------------- | |
// Array Functions | |
// --------------- | |
// Function (ahem) Functions | |
// ------------------ | |
// Object Functions | |
// ---------------- |
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(){ | |
var questURL = 'http://uni.priget.com/s/app/quest/enemy_encount_exec.php?guid=ON&qid=00000'; | |
var battleURL = 'http://uni.priget.com/s/app/quest/enemy_battle_exec.php?guid=ON'; | |
var battleDta = 'battle=戦闘&qid=00000'; | |
var trainingURL = 'http://uni.priget.com/s/app/training/training_solo_exec.php?GUID=ON'; | |
function xhrStart(method,url,data,requestHeader,callback){ | |
var xhr = new XMLHttpRequest(); | |
xhr.onload = function(){ |
OlderNewer