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 "template.h" | |
#include <vector> | |
#include <iostream> | |
int main(){ | |
std::vector<int> V{1, 2, 3, 4, 5}; | |
std::vector<int> filtered = filter( [](int i){return i %2 == 0;}, V); | |
for( auto f : filtered ){ | |
std::cout << f << std::endl; | |
} |
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
class A( object ): | |
def __init__( self ): | |
print("A") | |
super( A, self ).__init__() | |
class B( object ): | |
def __init__( self ): | |
print("B") | |
super( B, self ).__init__() |
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 javax.crypto.spec.SecretKeySpec; | |
import javax.crypto.Cipher; | |
import javax.crypto.spec.IvParameterSpec; | |
import java.util.Base64; | |
public class Test{ | |
/** | |
* @param args the command line arguments | |
*/ | |
public static void main(String[] args) throws Exception{ |
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 <cassert> | |
#include <sstream> | |
#include <iomanip> | |
#include <iostream> | |
#include <map> | |
#include <set> | |
#include <vector> | |
#include <gcrypt.h> | |
#include <string> |
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 <unistd.h> | |
#include <iostream> | |
#include <map> | |
#include <set> | |
#include <vector> | |
#include <pthread.h> | |
class Base{ | |
public: | |
int x; |
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 <unistd.h> | |
#include <iostream> | |
#include <map> | |
#include <set> | |
#include <vector> | |
#include <pthread.h> | |
class Base{ | |
public: | |
int x; |
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 java.math.BigInteger; | |
import java.security.PublicKey; | |
import java.security.PrivateKey; | |
import java.security.KeyFactory; | |
import java.security.Security; | |
import java.security.KeyPairGenerator; | |
import java.security.KeyPair; | |
import java.security.SecureRandom; | |
import java.security.spec.PKCS8EncodedKeySpec; | |
import java.security.spec.ECGenParameterSpec; |
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
/* | |
* Small test of the performance of | |
* - unordered_set vs set | |
* - unordered_map vs map | |
* Compile with g++ main.cpp -std=c++11 | |
* As expected, the unordered versions are faster because they use hash functions, not trees. | |
*/ | |
#include <unordered_map> | |
#include <map> |
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
/* | |
Compile me with g++ main.cpp -lssl -lcrypto | |
The computeNeededSharedMemory() function has alot of stuff that is duplicated in main(). It should be refactored. | |
Also I forgot to free some stuff at the end. Just add the appropriate calls to the appropriate free methods. For me, its lunchtime | |
now. | |
*/ | |
#include <cassert> | |
#include <string> |
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 <mpi.h> | |
#include <openssl/evp.h> | |
#include <openssl/ec.h> | |
#include <iostream> | |
#include <cstring> | |
#include <cassert> | |
void handleErrors(){ | |
; | |
} |