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
#include <stdio.h> | |
main() { | |
int i; | |
for (i=0; i<4; i++) | |
printf("jingle %s\n",(i<3)?"bells":"all the way"); | |
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
#!/usr/bin/perl | |
@words = ('hi', 'hihi', 'hello', 'hi', 'hi', 'hihi'); | |
%wordfreq = (); | |
foreach $w (@words) { | |
$wordfreq{$w} ++; | |
} | |
foreach $w (keys %wordfreq) { | |
print "$w appears $wordfreq{$w} times\n" | |
} |
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.*; | |
import java.util.concurrent.*; | |
public class Fibonacci { | |
public static void main(String[] args) { | |
int num = 1; | |
int out = 0; | |
try { | |
num = Integer.parseInt(args[0]); | |
} catch (Exception e) { |
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
public class Fib implements Runnable { | |
int curr=1, prev=1, counter=0, num; | |
Fib(int num) { | |
this.num = num; | |
} | |
private synchronized void calc() { | |
try { | |
System.out.println(Thread.currentThread().getName() + ": " + curr); | |
int tmp = curr; |
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
course.third.io | |
guard: | |
foreman: start services e,g., elasticsearch, mysql | |
dotenv: load variables from .env file into rails environment variables | |
mailcatcher: useful for debugging mailers | |
rails admin | |
association scopes | |
presenters |
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
require 'json' | |
file = File.read 'ads_merg_conf.json' | |
json = JSON.parse file | |
ir = json.flat_map do |placement, values| |
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
convert in.gif null: \( -font "../fonts/rounded-mplus-1c-bold.ttf" -gravity South -size 480 -stroke black -fill white -channel RGBA -background transparent -pointsize 30 caption:'text here' \) -layers Composite out.gif |
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
javascript:(function(){var t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var e=(document.charset||document.characterSet);if(t!=''){window.open('http://translate.google.com/translate_t?text='+t+'&hl=en&langpair=auto|en&tbb=1&ie='+e);}else{window.open('http://translate.google.com/translate?u='+escape(location.href)+'&hl=en&langpair=auto|en&tbb=1&ie='+e);};}()); |
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
javascript:(function(){document.querySelector('[id$=modal_signup_wrapper]').remove();}()); |
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
// usage: `scala beghilosz.scala < /usr/share/dict/words` | |
object Program { | |
val mask: Int = toBitmask("beghilosz") | |
def main(args: Array[String]): Unit = { | |
val lines: Iterator[String] = io.Source.stdin.getLines() | |
val filtered: Iterator[String] = lines.filter { (l: String) => | |
val b: Int = toBitmask(l) | |
(b & mask) == b |
OlderNewer