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
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|gawk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}' |
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
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|gawk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}' |
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
FROM ubuntu | |
# Update Ubuntu | |
RUN apt-get update && apt-get -y upgrade | |
# Add oracle java 7 repository | |
RUN apt-get -y install software-properties-common | |
RUN add-apt-repository ppa:webupd8team/java | |
RUN apt-get -y update |
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
import java.util.*; | |
public class Test { | |
public static void main(String[] args){ | |
List<Integer> numbers = Arrays.asList(1,2,3,4,5); | |
/* Lambda Functions, figures out the type */ | |
// numbers.forEach((val) -> { | |
// System.out.println(val); |
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
import Data.List | |
list = 1 : 1 : [a + b | (a,b) <- zip list $ tail list] | |
fib :: Int -> Int | |
fib n = last $ take n list |
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
import Data.List | |
import System.IO | |
{- | |
- THE PROBLEM: | |
- For every real number a>1a>1 is given the sequence gaga by: | |
- ga(x)=1ga(x)=1 for x<ax<a | |
- ga(x)=ga(x−1)+ga(x−a)ga(x)=ga(x−1)+ga(x−a) for x≥ax≥a | |
- G(n)=gn√(n)G(n)=gn(n) | |
- G(90)=7564511G(90)=7564511. |
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(name, definition) { | |
var hasDefine = typeof define === 'function', | |
hasExports = typeof module !== 'undefined' && module.exports; | |
if (hasDefine) { | |
define(name, definition); | |
} else if (hasExports) { | |
module.exports = definition(); | |
} else { | |
this[name] = definition(); |
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
const Timer = require('./timer.js'); | |
/** | |
* This class manages 2 timers, a break timer and a task timer. | |
* | |
* @class Pomodoro | |
* @constructor | |
*/ | |
module.exports = class Pomodoro { |
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
// you can write to stdout for debugging purposes, e.g. | |
// console.log('this is a debug message'); | |
function solution(S) { | |
// If there are no sentences get out quick. | |
if(S.length <= 0){ | |
return 0; | |
} | |
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 solution(A, B) { | |
if (A == B){ | |
// Same values | |
return 0; | |
} else if(A > 0 && B > 0){ | |
// Positive values | |
var left = Math.sqrt(A); | |
var right = Math.sqrt(B); | |
return (Math.floor(right) - Math.floor(left)) + 1; |
OlderNewer