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 x,nD,z,i;x=prompt("Pattern:", "");if(x!=null){nD=window.open().document;nD.writeln('<pre>');z=document.links;for(i=0;i<z.length;++i){if(z[i].href.indexOf(x)!=-1){nD.writeln(z[i].href);}}nD.writeln('</pre>');nD.close();}})(); | |
javascript:( | |
function(){ | |
var x,nD,z,i; | |
x=prompt("Pattern:", ""); | |
if(x!=null) { | |
nD = window.open().document; | |
nD.writeln('<pre>'); | |
z = document.links; |
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 read_input(): | |
import sys | |
data = [] | |
n = int(input()) | |
for i in range(n): | |
data.append(input()) | |
return data |
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 rat | |
(fn x [a] | |
'(a) | |
(if (< a 10000) | |
(x (+ a 4))))) | |
(def mouse | |
(fn [a] | |
'(a) | |
(if (< a 10000) |
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
#((fn fib [n xs] | |
(if (not (zero? n)) | |
(fib | |
(dec n) | |
(conj xs (+ (first (reverse xs)) (fnext (reverse xs))))) | |
xs)) (- % 2) [1 1]) |
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
[joe@numbercruncher ~]$ python | |
>>> 0.1 * 0.1 | |
0.010000000000000002 | |
>>> ^D | |
[joe@numbercruncher ~]$ sudo pacman -Rns python |
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
(defn flatn [xs] | |
(if (not (empty? xs)) | |
(if (seq? (first xs)) | |
(concat (flatn (first xs)) (flatn (rest xs))) | |
(conj (flatn (rest xs)) (first xs))))) |
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
(defn flatn [xs] | |
(if (not (empty? xs)) | |
(if (seq? (first xs)) | |
(concat (flatn (first xs)) (flatn (rest xs))) | |
(conj (flatn (rest xs)) (first xs))))) |
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
if (isNextToken((".", SYMBOL))) { | |
tokenizer.nextToken() | |
output.append("<symbol> . </symbol>") | |
compileIdentifier() | |
} |
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
SwingUtilities.invokeLater(new Runnable { | |
def run() { | |
guiStuff() | |
} | |
}) |
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
# CORRECT SPECIFICATION: | |
# | |
# the Queue class provides a fixed-size FIFO queue of integers | |
# | |
# the constructor takes a single parameter: an integer > 0 that | |
# is the maximum number of elements the queue can hold. | |
# | |
# empty() returns True if and only if the queue currently | |
# holds no elements, and False otherwise. | |
# |
OlderNewer