this.isThe('code');
-removed('code');
+added('code');
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() { | |
// any codes | |
$('#time').text(new Date().toString()); | |
// call own self | |
var INTERVAL = 10; | |
setTimeout(arguments.callee, INTERVAL); | |
})(); |
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 s = parseObject(data); | |
console.log(s); | |
*/ | |
function parseObject(data) { | |
function f(data, indent, result) { | |
for (var p in data) { | |
var s = indent + p + ':'; | |
if (typeof data[p] != 'object') { | |
result[result.length] = s + data[p]; |
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
<p> | |
gistと連携したと聞いて。 | |
</p> |
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
"<{value}{value}{value}>" | |
.match(/^(.*?)(?:{(\$)?(\w+)})(.*?)$/) | |
"<{?cond}ttt{?cond2}TTT{:cond2}FFF{/cond2}{:cond}fff{/cond}>" | |
.match(/^(.*?)(?:{([?#]?)(.+)}(?:(.*?)(?:{\:\3}(.*)?)?{\/\3}))(.*?)$/) | |
"<{?cond}ttt{?cond2}TTT{:cond2}FFF{/cond2}{:cond}fff{/cond}>" | |
.match(/^(.*?)(?:(\$)?(\w+)}|{([?#]?)(.+)}(?:(.*?)(?:{\:\5}(.*)?)?{\/\5}))(.*?)$/) | |
"<{value}{value}{value}>" |
continued line
-removed line
+added line
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 PageModel = Backbone.Model.extend({ }); | |
var PageView = Backbone.View.extend({ | |
events: { | |
'click .other-page': 'open' | |
}, | |
initialize: function() { | |
this.models = {}; | |
}, |
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
// ./Gruntfile.js | |
module.exports = function(grunt) { | |
grunt.loadTasks('hoge'); | |
}; |
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
/** | |
* Runs the function immediately. | |
* @param {Array} [args] Arguments for the function. | |
* @param {Object} [context] Context for the function. | |
* @param {Function} fn Target function. | |
* @returns {Any} Value returned by the function. | |
* @example run(function(){ console.log('done!'); }); | |
* @example run([1,2], function(a,b){ return a+b; }); | |
* @example var date = Date.now(); run([Date.now()], {start:date}, function(stop){ return stop-this.start; }); | |
*/ |
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
/** | |
* @param {HTMLElement} elem | |
* @param {String} name | |
* @param {Object} [data] | |
* @param {Boolean} [pvt] It will be `true` if called in _data not data | |
*/ | |
function internalData( elem, name, data, pvt /* Internal Use Only */ ){ | |
if ( !jQuery.acceptData( elem ) ) { | |
return; | |
} |
OlderNewer