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
/** | |
* @warning Funktionen fungerar bara i windows/linux, | |
* dock bör linux varianten fungera med alla *NIX varianter | |
* efter som vi inkluderar unistd.h (finns denna i MacOS X?) | |
*/ | |
void ClearScreen() | |
{ | |
#ifdef __linux__ |
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
/** | |
* @brief Alternerar "sov" funktionen beroende på plattform linux/unix sleep() finns i unistd, | |
* medan windows (egentilgen DOS) finns i conio.h inget av detta är C++ eller C ANSI standard. | |
* Funktionen är mest till för att visa hur fjånigt det kan bli i bland. | |
* | |
* @warning samma begränsning här med windows/linux och övriga *nix | |
*/ | |
void doSleep(int timetosleep) | |
{ |
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
#define BLACK_TEXT "\e[30;1m" | |
#define RED_TEXT "\e[31;1m" | |
#define GREEN_TEXT "\e[32;1m" | |
#define YELLOW_TEXT "\e[33;1m" | |
#define BLUE_TEXT "\e[34;1m" | |
#define DEFAULT "\e[0m" | |
int main(int argc, char *argv[]) | |
{ | |
printf(GREEN_TEXT); |
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 <vector> | |
class IShape{ | |
public: | |
virtual void print() = 0; | |
private: | |
}; | |
class Rect : public IShape{ |
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
package photo.mission; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import android.content.Context; |
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> | |
class Barney; | |
class Fred{ | |
public: | |
void tada(){ | |
std::cout << "tada" << std::endl; | |
} | |
private: |
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> | |
class Barney; | |
class Fred{ | |
public: | |
void tada(){ | |
std::cout << "tada" << std::endl; | |
} | |
private: |
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
package test.installer; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.util.Log; | |
public class InstallToolActivity extends Activity { | |
/** Called when the activity is first created. */ |
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) | |
find_package(Boost COMPONENTS python REQUIRED) | |
find_package(PythonLibs REQUIRED) | |
include_directories(${Boost_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS}) | |
set(CORELIBS ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) |
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) | |
find_package(Boost COMPONENTS python REQUIRED) | |
find_package(PythonLibs REQUIRED) | |
include_directories(${Boost_INCLUDE_DIR} ${PYTHON_INCLUDE_DIRS}) | |
set(CORELIBS ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) |