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
C++ | |
The C++ Programming Language, Fourth Edition | |
By: Bjarne Stroustrup | |
Programming: Principles and Practice Using C++, Second Edition | |
By: Bjarne Stroustrup | |
A Tour of C++ | |
By: Bjarne Stroustrup |
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
# doing a strace on a process | |
strace -c -f ./D4Adaptor | |
# listening on multicast group in iperf | |
/usr/local/bin/iperf -s -i 1 -u -B 224.0.28.46 -p 6313 | |
# spamming multicast | |
/usr/local/bin/iperf -c 224.0.28.46 -u -T 32 -t 60 -i 5 -p 6313 |
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
Programming Books Review | |
http://accu.org/ | |
Whitepapers | |
http://arxiv.org/ | |
http://www.goodreads.com/author/quotes/205.Robert_A_Heinlein | |
http://mitpress.mit.edu/sicp/full-text/book/book.html - Structure and Interpretation | |
of Computer Programs |
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
struct BufferPos{ | |
uint8_t write; | |
uint8_t read; | |
}; | |
std::atomic<BufferPos> bufferPos; | |
-- | |
Thread 1 |
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
#!/usr/bin/env python | |
for x in range(0, 100): | |
if x%3==0 and x%5==0: | |
print 'FizzBuzz' | |
elif x%3==0: | |
print 'Fizz' | |
elif x%5==0: | |
print 'Buzz' | |
else: | |
print x |
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
net.createServer( | |
function(sock) { | |
console.log("Received connection from " + sock.remoteAddress + ':' + sock.remotePort); | |
sock.on('data', function(data){ | |
string = data.toString('ascii') | |
setTimeout(function(){ | |
sock.write(data.slice(0, 20)); | |
}, 3000); | |
}); | |
sock.on('close', function(data){ |
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
// C | |
#include <stdio.h> | |
int main(void){ | |
char string[] = "elvino"; | |
int len = strlen(string); | |
int mid = len / 2; | |
len--; | |
int i = 0; | |
char tmp; | |
while(i!=mid){ |
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
reverse' :: [a] -> [a] | |
reverse' [] = [] | |
reverse' [x] = [x] | |
reverse' (x:xs) = reverse'(xs) ++ [x] |
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
#!/usr/bin/env python | |
# iterative | |
string = "testing" | |
newstring = "" | |
for s in string[:]: | |
newstring = s + newstring | |
print newstring | |
# recursive |
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
palindrome :: (Eq a) => [a]->Bool | |
palindrome (xs) | |
| xs == reverse(xs) = True | |
| otherwise = False |
OlderNewer