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 <chrono> | |
#include <thread> | |
int main() { | |
using namespace std::literals::chrono_literals; | |
std::cout << "hi "; | |
std::this_thread::sleep_for(2s); | |
std::cout << "bye"; | |
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 <chrono> | |
long add(int a, int b) { | |
return a + b; | |
} | |
int main() { | |
auto start = std::chrono::steady_clock::now(); | |
std::cout << "9 + 10 = " << add(9, 10) << '\n'; |
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 <string> | |
#include <WS2tcpip.h> | |
#pragma comment (lib, "ws2_32.lib") | |
// Example of HTTP GET request using windows sockets | |
// Author: Maniclout | |
void getrequest() { |
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 <fftw3.h> | |
#include <iostream> | |
int main() | |
{ | |
int numOfPoints = 8; | |
fftw_complex* input = new fftw_complex[numOfPoints]; | |
fftw_complex* output = new fftw_complex[numOfPoints]; | |
for (int i = 0; i <numOfPoints; i++){ |
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<sstream> | |
#include<string> | |
#include<cmath> | |
#include<ctime> | |
int random(int low, int high){ | |
return low + (std::rand() % (high - low + 1)); | |
} |