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
for name in ["Roger", "Roderick", "Brian"] | |
alert "Release #{name}" | |
for name, i in ["Roger the pickpocket", "Roderick the robber"] | |
alert "#{i} - Release #{name} | |
release prisoner for prisoner in ["Roger", "Roderick", "Brian"] | |
prisoners = ["Roger", "Roderick", "Brian"] |
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
class Task extends Spine.Model | |
@configure "Task", "name", "done" | |
@extend Spine.Model.Local | |
@active: -> | |
@select (item) -> !item.done | |
@done: -> | |
@select (item) -> !!item.done |
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 doc = fl.getDocumentDOM() | |
var lib = doc.library.items | |
lib.forEach(function(item){ | |
if(item instanceof SymbolItem){ | |
var timeline = item.timeline | |
timeline.layers.forEach(function(layer){ | |
layer.frames.forEach(function(frame){ | |
frame.elements.forEach(function(element){ | |
if(element instanceof Instance && element.libraryItem.name == "hoge"){ |
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(!Array.prototype.indexOf){ | |
Array.prototype.indexOf = function(obj){ | |
var l = this.length; | |
if(l){ | |
for(var i=0;i<l;i++){ | |
if(this[i] === obj)return i | |
} | |
} | |
return -1 | |
} |
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
$.fn.extend | |
test:(options)-> | |
self = $.fn.test | |
opts = $.extend {}, self.default_options, options | |
$.extend $.fn.test, | |
default_options: | |
version: '1.0' |
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
class Module | |
@isInputElement:(el)-> | |
el instanceof HTMLInputElement | |
@Module = Module | |
$.fn.extend | |
allChecked:()-> | |
@each (i,el)=> | |
el.checked = true if Module.isInputElement(el) |
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
<div id="h5p-message"></div> <script>window.h5please=function(a){ document.getElementById("h5p-message").innerHTML=a.html }</script> <script async src="http://api.html5please.com/websockets.json?callback=h5please&texticon&html"></script> |
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
codestream API_KEY |
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
#closeSign { | |
animation: swing ease-in-out 9s; | |
-webkit-animation: swing ease-in-out 9s; | |
-moz-animation: swing ease-in-out 9s; | |
-webkit-transform-origin: 50% 0%; | |
-moz-transform-origin: 50% 0% } | |
@-keyframes swing { 0% } | |
10% { -transform: rotate(-2deg) } |
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
NSData *data = UIImagePNGRepresentation([self trimImage:screenImage :CGRectMake(0, 0, 320, 400)]); | |
NSString *filePath = [NSString stringWithFormat:@"%@/test.png" , [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]]; | |
if ([data writeToFile:filePath atomically:YES]) { | |
NSLog(@"OK"); | |
} else { | |
NSLog(@"Error"); | |
} |