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
date +"%s" |
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
cmake_minimum_required (VERSION 2.8) | |
project(demo) | |
set(CMAKE_CXX_FLAGS "-Wall -std=c++0x") | |
add_executable(demo main.cpp) | |
target_link_libraries(demo ) |
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
cmake_minimum_required (VERSION 2.8) | |
project(demo) | |
find_package(Boost 1.4.2) | |
include_directories(${Boost_INCLUDE_DIR}) | |
set(CORELIBS ${Boost_LIBRARIES}) | |
add_executable(demo ${CORELIBS} main.cpp) |
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
export DROPBOX=~/Dropbox/repos | |
export newRepo=project-name | |
export NAME=$(git config --global --get user.name) | |
cd ~/projects/$newRepo | |
git init | |
git add . | |
git commit -m 'initial' | |
HERE=$(pwd) |
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
#include <iostream> | |
#include <string> | |
#include <map> | |
enum TMemoryValue{YES=1, NO, MAYBE, UNKNOWN}; | |
int main () { | |
std::map<std::string, TMemoryValue> memorymap; | |
std::map<std::string, TMemoryValue>::iterator it; | |
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
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <chrono> | |
#include <ctime> | |
class FLog{ | |
public: | |
FLog(std::string logfile); | |
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
#include <iostream> | |
#include <fstream> | |
/** | |
* @brief a quick sample code to answare a beginers question about file paths in C++, this code is free to use for anyone. | |
*/ | |
class Path{ | |
public: | |
Path(std::string path, std::string file); | |
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
/** | |
* best and easiest way... improvement can still be done ;) | |
*/ | |
bool wortdateoOeffnen(){ | |
bool openSuccess = false | |
string Dateiort; | |
cout << "Bitte die Datei inklusive Pfad angeben" << endl; | |
//Text noch rot machen | |
cout << "ACHTUNG: Bei Windows bitte / (Slash) mit \ (Backslash) austauschen " << endl << endl ; | |
cout << "---> "; |
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
#include <iostream> | |
#include <array> | |
int main(){ | |
//col, row | |
std::array<std::array<int, 10>, 10> mymap{{ | |
{{1,2,3,4,5,6,7,8,9,0}}, | |
{{1,2,3,4,5,6,7,8,9,0}}, | |
{{1,2,3,4,5,6,7,8,9,0}}, | |
{{1,2,3,4,5,6,7,8,9,0}}, |
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
#include <string> | |
#include <iostream> | |
#include <stdio.h> | |
/** | |
* This is not tested in windows. | |
* Windows users should use _popen and _pclose. | |
* http://msdn.microsoft.com/en-us/library/aa298534(v=vs.60).aspx | |
*/ |