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<iostream> | |
#include<list> | |
#include<vector> | |
#include<random> | |
#include<chrono> | |
#include<algorithm> | |
using namespace std; | |
int main() |
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
// g++ main.cpp -o main -std=c++11 | |
#include <iostream> | |
#include <vector> | |
#include <cstring> | |
#include <cstdlib> | |
#include <ctime> | |
const size_t cKeyLength = 100; | |
// expecting exceptions |
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
// C++ exceptions short-note | |
// Example | |
#include <exception> | |
class MyException: public std::exception | |
{ | |
virtual const char * what() const throw() | |
{ | |
return "Exception's description"; | |
} | |
}; |
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
# Python implementation of Sieve of Erathosthenes algorithm for prime number search | |
# Description here: https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes | |
N = 10000 | |
p = 2 | |
numbers = range(p, N + 1) | |
pIndex = 0 | |
while p*p < N: | |
i = p | |
while i*p < N + 1: | |
n_i = i*p |
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
var arr = [ | |
{ | |
'name': 'Paul', | |
'salary': '5 000$' | |
}, | |
{ | |
'name': 'Jessica', | |
'salary': '6 000$' | |
}, | |
{ |
NewerOlder