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/env ruby | |
# Usage example: sml hw1test.sml | truecolor.rb | |
require 'colorize' | |
true_pat = /\btrue\b/ | |
false_pat = /\bfalse\b/ | |
true_count = 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
import scala.annotation.tailrec | |
object TestRun extends App { | |
val tree = Leaf.add(10).add(5).add(7) | |
println(tree.valuesByBreadth mkString ", ") | |
} | |
abstract sealed class Tree[+A] { | |
import Ordered._ |
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> | |
#include <assert.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include "stack.h" | |
int check(char* expression){ | |
int i; | |
for(i=0; i<= strlen(expression); i++){ | |
if(expression[i]=='(') |
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
incident/accident/case случай | |
distinguished выдающийся, знаменитый | |
faith вера | |
conduct поведение | |
ascent восхождение, подъём | |
bright яркий, блестящий, умный | |
daring дерзкий | |
be concerned with/deal with заниматься, интересоваться | |
sustain поддерживать (горение, реакцию) | |
explosive взрывчатка |
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
.warmst equ $ff7c | |
tcnt equ $100e | |
tctl1 equ $1020 | |
tctl2 equ $1021 | |
tic1 equ $1010 | |
toc2 equ $1018 | |
tflg1 equ $1023 | |
cforc equ $100b |
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
eruption извержение | |
astound изумлять, поражать | |
summit вершина | |
destroy разрушать,уничтожать | |
tear разрывать | |
disintegrate раздроблять, разделять(ся) на составные части | |
devastate разорять | |
event событие, происшествие | |
edge кромка, край | |
stir шевелить(ся) |
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
def quick(a) | |
return a if a.min == a.max | |
m = a[rand(a.size)] | |
quick( a.select { |i| i <= m } ) + quick( a.select { |i| i > m } ) | |
end | |
describe "Quicksort" do | |
it "should sort an empty array" do | |
quick([]).should == [] | |
end |