made with esnextbin
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
/* | |
Your teacher has given you the task of drawing a staircase structure. Being an expert programmer, you decided to make a program to draw it for you instead. Given the required height, can you print a staircase as shown in the example? | |
Input | |
You are given an integer NN depicting the height of the staircase. | |
Output | |
Print a staircase of height NN that consists of # symbols and spaces. For example for N=6N=6, here's a staircase of that height: | |
# |
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
/* | |
Given a time in AM/PM format, convert it to military (2424-hour) time. | |
Note: Midnight is 12:00:00AM12:00:00AM on a 1212-hour clock, and 00:00:0000:00:00 on a 2424-hour clock. Noon is 12:00:00PM12:00:00PM on a 1212-hour clock, and 12:00:0012:00:00 on a 2424-hour clock. | |
Input Format | |
A single string containing a time in 1212-hour clock format (i.e.: hh:mm:ssAMhh:mm:ssAM or hh:mm:ssPMhh:mm:ssPM), where 01≤hh≤1201≤hh≤12. | |
Output Format |
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
Function.prototype.partial = function () { | |
var fn = this; | |
var first_args = Array.prototype.slice.call(arguments); | |
return function () { | |
var second_args = Array.prototype.slice.call(arguments); | |
first_args.forEach(function(args, index) { | |
if (!args) { | |
first_args[index] = second_args.shift(); | |
} | |
}); |
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
const log = function(args) { | |
args = Array.isArray(args) ? args : Array.prototype.slice.call(arguments) | |
console.log.apply(console, args); | |
}; | |
const tOut = function(time) { | |
return new Promise(function(resolve) { | |
setTimeout(() => { | |
resolve(time); | |
}, time); |
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
'use strict' | |
const R = require('ramda'); | |
const http = require('http'); | |
const log = function() { | |
const args = [].slice.call(arguments); | |
if (R.all(v => v, args)) { | |
console.log.apply(console.log, args); | |
} |
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 arr = [ | |
[-1, 1, -1, 0, 0, 0], | |
[ 0, -1, 0, 0, 0, 0], | |
[-1, -1, -1, 0, 0, 0], | |
[ 0, -9, 2, -4, -4, 0], | |
[-7, 0, 0, -2, 0, 0], | |
[ 0, 0, -1, -2, -4, 0] | |
]; | |
const sum = (a, b) => a + 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
defmodule Pinger.Destiny do | |
@moduledoc """ | |
Module responsible for the destiny struct, | |
which is the name and address of the ping target | |
""" | |
defstruct name: nil, | |
address: nil, | |
active: false |
I hereby claim:
- I am eduardonunesp on github.
- I am eduardonunesp (https://keybase.io/eduardonunesp) on keybase.
- I have a public key whose fingerprint is 7CB8 C87F C76E 6606 6C2C 95B0 AD17 F281 4EE9 E408
To claim this, I am signing this object:
I hereby claim:
- I am eduardonunesp on github.
- I am eduardonunesp (https://keybase.io/eduardonunesp) on keybase.
- I have a public key whose fingerprint is 86F2 9471 B6F1 5057 E7E1 85A1 36F2 A763 9C0C 2DF3
To claim this, I am signing this object: