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
class CombinedIterator[A, B](first: Iterator[A], second: Iterator[B]) extends Iterator[(Option[A], Option[B])] { | |
def hasNext = first.hasNext || second.hasNext | |
def next = (if (first.hasNext) Some(first.next) else None, if (second.hasNext) Some(second.next) else None) | |
} |
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
.knob { | |
width: 40px; | |
height: 40px; | |
-webkit-border-radius: 20px; | |
-moz-border-radius: 20px; | |
border-radius: 20px; | |
position: relative; | |
background-color: #F6F4F4; | |
background-color: #f2f0f0; | |
background-image: -moz-linear-gradient(top, #f6f4f4, #edebeb); |
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
for(var b = $("systemBody_controls_0_body_grid_table").querySelectorAll("tr"), k = 0, id, c; k < b.length; k++) { id = b[k].querySelector("td").innerText, c = document.createElement("div"), c.innerHTML = "<a href=\"http://ovogentracktest:8091/#CUS1000.SCR?CUSTOMER="+id+"\">"+id+"</a>", document.body.appendChild(c); }; |
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
object Unique { | |
def main(args: Array[String]) { | |
val h = collection.mutable.Set[String]() | |
def uniq(ln : String) = Some(ln) filter (h.add(_)) | |
for (ln <- io.Source.stdin.getLines; | |
ln <- uniq(ln)) { | |
println(ln) | |
} |
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
void setup() { | |
pinMode(10, OUTPUT); | |
pinMode(11, OUTPUT); | |
pinMode(12, OUTPUT); | |
pinMode(14, INPUT); | |
} |
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
grep -E 'ExceptionLogger: .+ Account\(' --line-buffered | perl -lpe 's/^.+?Account\(([a-z0-9]+).+/Account \1/g' | perl -ne '$H{$_}++ or print' | wc -l |
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 PromiseTracker(changeFunc) { | |
var tracked = []; | |
var events = []; | |
function fireOnChange(isActive) { | |
for (var i = 0; i < events.length; i++) | |
events[i](isActive); | |
} | |
function removePromise(promise) { |
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
grep regex file | perl -ne '$H{$_}++ or print' |
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
val form1 = StringForm("aAabBbaB") | |
val grammar1 = new StringGrammar( | |
"A" -> "aAB", | |
"A" -> "aa", | |
"B" -> "bbbb") | |
val derivation1 = StringDerivation("aAB") | |
form1.applyFirst(grammar1) | |
form1.applyFirst(derivation1) |
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
<html> | |
<head> | |
</head> | |
<body> | |
<script> | |
var rootContext = { | |
loop: function loop( context, endPromise, times, _ ) { |