Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
-module(merge_sort). | |
-export([merge_sort/1]). | |
% bottom-up merge sort | |
merge_sort([]) -> | |
[]; | |
merge_sort(L) -> | |
iterate([[X] || X <- L]). | |
iterate([Xs]) -> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
function asUint8Array(input) { | |
if (input instanceof Uint8Array) { | |
return input; | |
} else if (typeof(input) === 'string') { | |
// This naive transform only supports ASCII patterns. UTF-8 support | |
// not necessary for the intended use case here. | |
var arr = new Uint8Array(input.length); | |
for (var i = 0; i < input.length; i++) { | |
var c = input.charCodeAt(i); | |
if (c > 127) { |
This file contains 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
-export([graceful_stop/1, graceful_stop_proc/1]). | |
graceful_stop(Timeout) -> | |
lists:foreach(fun stop_listener/1, supervisor:which_children(cowboy_sup)), | |
proc_lib:spawn(?MODULE, graceful_stop_proc, [Timeout]). | |
graceful_stop_proc(Timeout) -> | |
true = register(graceful_stop, self()), | |
lager:critical("SHUTDOWN with timeout of ~p msec", [Timeout]), | |
TRef = erlang:start_timer(Timeout, self(), not_so_graceful), |
This file contains 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
/* | |
Resources: | |
Learn more about colors here: | |
- https://developer.mozilla.org/en-US/docs/Web/CSS/color_value | |
Having trouble with overriding rules? Learn about CSS specificity: | |
- http://specificity.keegan.st/ |
This file contains 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
body { | |
background: linear-gradient(to top, green, black); | |
height: 100%; | |
background-repeat: no-repeat; | |
background-attachment: fixed; | |
margin: 0; | |
color: white; | |
} | |
div.game { |
This file contains 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
ruby '2.2.4' | |
source 'https://rubygems.org' | |
gem 'numbers_in_words' | |
gem 'money' |
NewerOlder