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://www.codewars.com/kata/521c2db8ddc89b9b7a0000c1/train/javascript | |
| snail = function (array) { | |
| var snake = []; | |
| while (true) { | |
| snake.push.apply(snake, array.shift()); | |
| if (array.length === 0) break; | |
| array = rotate_left(array); | |
| } |
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
| <-- GET /HNAP1/ | |
| --> GET /HNAP1/ 404 4ms - | |
| <-- GET /wp-admin/install.php | |
| --> GET /wp-admin/install.php 404 2ms - | |
| <-- GET /invoker/JMXInvokerServlet | |
| --> GET /invoker/JMXInvokerServlet 404 2ms - |
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
| <-- POST /cgi-bin/php?-d allow_url_include=on -d safe_mode=off -d suhosin.simulation=on -d disable_functions="" -d open_basedir=none -d auto_prepend_file=php://input -d cgi.force_redirect=0 -d cgi.redirect_status_env=0 -n | |
| --> POST /cgi-bin/php?-d allow_url_include=on -d safe_mode=off -d suhosin.simulation=on -d disable_functions="" -d open_basedir=none -d auto_prepend_file=php://input -d cgi.force_redirect=0 -d cgi.redirect_status_env=0 -n 404 2ms - | |
| <-- POST /cgi-bin/php5?-d allow_url_include=on -d safe_mode=off -d suhosin.simulation=on -d disable_functions="" -d open_basedir=none -d auto_prepend_file=php://input -d cgi.force_redirect=0 -d cgi.redirect_status_env=0 -n | |
| --> POST /cgi-bin/php5?-d allow_url_include=on -d safe_mode=off -d suhosin.simulation=on -d disable_functions="" -d open_basedir=none -d auto_prepend_file=php://input -d cgi.force_redirect=0 -d cgi.redirect_status_env=0 -n 404 4ms - | |
| <-- POST /cgi-bin/php-cgi?-d allow_url_include=on -d safe_mode=off -d suhosin.simulation=on -d disable_f |
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
| fib = Hash.new do |hash, key| | |
| if [0, 1].include? key | |
| hash[key] = key | |
| else | |
| hash[key] = hash[key - 1] + hash[key - 2] | |
| end | |
| end | |
| fib[123] | |
| => 22698374052006863956975682 |
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
| map = function(){ | |
| word = this.word.split(""); | |
| chars = {}; | |
| for(var i in word) | |
| if(! chars[word[i]]) | |
| chars[word[i]] = 1; | |
| else | |
| chars[word[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
| map = function(){ | |
| chars = this.word.split(""); | |
| length = chars.length; | |
| result = {}; | |
| for(var i = 0; i < length; ++i){ | |
| if(! result[chars[i]]) result[chars[i]] = 0; | |
| result[chars[i]] += 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
| <dict> | |
| <key>name</key> | |
| <string>diff.deleted</string> | |
| <key>scope</key> | |
| <string>markup.deleted</string> | |
| <key>settings</key> | |
| <dict> | |
| <key>foreground</key> | |
| <string>#DA4939</string> | |
| </dict> |
NewerOlder