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
ERE: | |
unbackslashed: | |
basic: | |
^$ | |
. | |
[](){} | |
extended: | |
?+| | |
backslashed: | |
gnu: |
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
(defun Y-combinator (f) | |
((lambda (h) | |
(funcall h h)) | |
(lambda (self) | |
(funcall | |
f | |
(lambda (&rest args) | |
(apply | |
(funcall self self) | |
args))))) |
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
#ifndef RINGBUFFER_H | |
#define RINGBUFFER_H | |
#include <stdexcept> | |
template <class T> | |
class Ringbuffer { | |
public: | |
explicit Ringbuffer(const int size); | |
~Ringbuffer(); |
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
Capitalized, short (50 chars or less) summary | |
More detailed explanatory text, if necessary. Wrap it to about 72 | |
characters or so. In some contexts, the first line is treated as the | |
subject of an email and the rest of the text as the body. The blank | |
line separating the summary from the body is critical (unless you omit | |
the body entirely); tools like rebase can get confused if you run the | |
two together. | |
Write your commit message in the present tense: "Fix bug" and not "Fixed |
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 static String read(URL url) throws IOException { | |
Reader reader = new InputStreamReader(new BufferedInputStream(url.openStream())); | |
String data = ""; | |
while(reader.ready()) { | |
data += (char) reader.read(); | |
} | |
return data; | |
} |