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
public function when( ...args ):Promise { | |
if( args.length == 1 && args[0] is Array ) { | |
args = args[0]; | |
} | |
// 引数が0個ならreject | |
if( args.length == 0 ) { | |
return this.then( | |
function( value:* ):void { | |
Deferred.reject('arguments must not be empty.'); |
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
def hash_for_includes_all_masters(recursive=true, all_associations=[]) | |
all_associations << self.to_s | |
result_arr = [] | |
self.reflect_on_all_associations.each do |model| | |
association_name = model.name | |
class_name = model.class_name | |
next if all_associations.include?(class_name) | |
next unless class_name.include?('Master') | |
next if model.options.has_key?(:polymorphic) |
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
// ==UserScript== | |
// @name Canvasタグで作るお絵かきツール | |
// @namespace su10 | |
// @description せつめいぶんだよ | |
// @include http://* | |
// @version 1.0.0 | |
// ==/UserScript== | |
var body = document.getElementsByTagName("body")[0]; | |
body_style = document.defaultView.getComputedStyle(body, ""); |
NewerOlder