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
| // ©2012 Usagi Ito / Wonder Rabbit Project, License is MIT/X11 | |
| // Usagi Ito <[email protected]> | |
| // this source delivered from: | |
| // http://blog.katsuma.tv/2007/10/javascript_const.html | |
| var main = function(){ | |
| const N = 1000 * 1000 * 1000; | |
| console.log( 'N = ' + N ); |
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
| // ©2012 Usagi Ito / Wonder Rabbit Project, License is MIT/X11 | |
| // Usagi Ito <[email protected]> | |
| // this source delivered from: | |
| // https://gist.github.com/2274188 | |
| var main = function(){ | |
| const N = 16 * 1024; | |
| console.log( 'N = ' + N ); |
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
| tmp: | |
| @ mkdir tmp | |
| test-darkhttpd: | |
| @ darkhttpd _site --index main.html | |
| test-darkhttpd-daemon-start: tmp | |
| @ darkhttpd _site --index main.html --daemon --pidfile tmp/darkhttpd.pid | |
| test-darkhttpd-daemon-stop: tmp/darkhttpd.pid |
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
| // (c) 2012 Usagi Ito / Wonder Rabbit Project <[email protected]>. License is MIT/X11. | |
| var v = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'; | |
| var | |
| a1 = [v], | |
| a2 = [[v]], | |
| a3 = [[[v]]], | |
| a4 = [[[[v]]]], | |
| a5 = [[[[[v]]]]]; |
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 fizz_buzz = { | |
| range : { | |
| begin : 1, | |
| end : 100, | |
| }, | |
| test : function(target_value, test_value) { | |
| return target_value % test_value === 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
| var binary = { | |
| number_to_string: function(v) { | |
| var r = ""; | |
| while ( v >= 2 ) { | |
| var m = v % 2; | |
| r = m + r; | |
| if (m === 1) | |
| v = (v - 1) / 2; | |
| else |
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
| #/bin/sh | |
| argc=2 | |
| echo '/bin/shの任意番目(例えば$argc=2)の引数へさくっとアクセスするテスト' | |
| eval echo \$$argc |
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
| #include <iostream> | |
| int main(){ | |
| struct c{ c(): x(123) { } int x; }; | |
| auto a = new c(); | |
| std::cout << a->x; | |
| } |
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
| static class sample { | |
| class c{ | |
| public c() { this.x = 123; } | |
| public int x; | |
| } | |
| static void Main(){ | |
| var a = new c(); | |
| System.Console.WriteLine(a.x); | |
| } | |
| } |
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 c { | |
| c() { this.x = 123; } | |
| int x; | |
| } | |
| class Main { | |
| public static void main(String[] args){ | |
| c a = new c(); | |
| System.out.println(a.x); | |
| } |