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
| ko.bindingHandlers["holderJs"] = { | |
| init: function (element, valueAccessor) { | |
| var value = valueAccessor(); | |
| $(element).attr("data-src", ko.unwrap(value)); | |
| Holder.run({ images: element }); | |
| } | |
| }; |
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 A { | |
| public a() { | |
| alert("A!"); | |
| } | |
| } | |
| class B extends A { | |
| public b() { | |
| alert("B!"); | |
| } | |
| } |
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
| //from http://yosuke-furukawa.hatenablog.com/entry/2014/07/31/093041 | |
| $traceurRuntime.ModuleStore.getAnonymousModule(function() { | |
| "use strict"; | |
| var $__2 = $traceurRuntime.initGeneratorFunction(fibonacci); | |
| function fibonacci() { | |
| var fn1, | |
| fn2, | |
| current; | |
| return $traceurRuntime.createGeneratorInstance(function($ctx) { | |
| while (true) |
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
| [ /'//*' ] && exec cscript -E:jscript -nologo `cygpath -w $0` $* #*/ ] ; | |
| var spVoice = WScript.CreateObject("SAPI.SpVoice"); | |
| var args = WScript.Arguments; | |
| for (i = 0; i < args.length; i++) { | |
| spVoice.Speak(args(i)); | |
| } |
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 A { | |
| private m = 123; | |
| func(ev: Event) { | |
| console.log(this); | |
| console.log(this.m); | |
| } | |
| } | |
| var a = new A(); |
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
| RewriteEngine on | |
| RewriteCond %{HTTP:Accept-Encoding} gzip | |
| RewriteCond %{REQUEST_FILENAME}\.gz -s | |
| RewriteRule .+ %{REQUEST_URI}.gz | |
| <FilesMatch "\.js\.gz$"> | |
| ForceType application/x-javascript | |
| AddEncoding x-gzip .gz | |
| </FilesMatch> |
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 type _JQueryAjaxSettings = object | |
| method accepts : Ts.any Js.prop | |
| method async : Ts.typeReference Js.prop | |
| method beforeSend : (Ts.typeReference -> Ts.typeReference -> Ts.any) Js.prop | |
| method cache : Ts.typeReference Js.prop | |
| method complete : (Ts.typeReference -> Ts.string -> Ts.any) Js.prop | |
| method contents : Ts.typeLiteral Js.prop | |
| method contentType : Ts.string Js.prop | |
| method context : Ts.any Js.prop | |
| method converters : Ts.typeLiteral Js.prop |
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
| int code_execcmd( void ) | |
| { | |
| //... | |
| try { | |
| while(1) { | |
| if ( GetTypeInfoPtr( type )->cmdfunc( val ) ) { // タイプごとの関数振り分け | |
| if ( hspctx->runmode == RUNMODE_RETURN ) { | |
| cmdfunc_return(); | |
| } else { | |
| hspctx->msgfunc( hspctx ); |
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
| // http://d.hatena.ne.jp/nowokay/20140330#1396177524 | |
| import java.util.*; | |
| import java.util.function.*; | |
| import java.util.stream.*; | |
| public class LoopBench2 { | |
| public static void main(String[] args) { | |
| List<Integer> list = IntStream.range(0, 100_000).boxed().collect(Collectors.toList()); | |
| array = list.toArray(new Integer[0]); | |
| for (int i = 0; i < 10; i++) { |
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 class Nan { | |
| static void f(double a) { | |
| long t0 = System.nanoTime(); | |
| double acc = a; | |
| for (int i = 0; i < 100000000; i++) { | |
| acc += i; | |
| } | |
| long t1 = System.nanoTime(); | |
| System.out.println("time:" + (t1 - t0) / 1000000 + " " + acc); |