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
#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
/** | |
* @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
/** | |
* @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
package test.demo; | |
import java.io.File; | |
import java.io.RandomAccessFile; | |
import java.nio.channels.FileChannel; | |
import java.nio.channels.FileLock; | |
import java.util.Date; | |
import android.app.Activity; | |
import android.os.Bundle; |
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.demo; | |
import java.io.File; | |
import java.io.RandomAccessFile; | |
import java.nio.channels.FileChannel; | |
import java.nio.channels.FileLock; | |
import java.util.Date; | |
import android.app.Activity; | |
import android.os.Bundle; |
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
import java.io.File; | |
import java.io.RandomAccessFile; | |
import java.nio.channels.FileChannel; | |
import java.nio.channels.FileLock; | |
import java.nio.channels.OverlappingFileLockException; | |
import java.util.Date; | |
/** | |
* @author fredrik Persson |
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
#!/bin/bash | |
#Desc: Ett mindre fint bashscript för att skapa en mpeg-film av ett gäng bilder | |
# med morphad övergång mellan bilderna. Scriptet kräver ffmpeg och ImageMagick. | |
#Version: 1.1 | |
#Coder: Fredrik Persson | |
#E-mail: [email protected] | |
#Download/webpage: | |
#Licens: BSD | |
#TODO: Exif-rotation? |
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.6) | |
project(demo) | |
find_package(Boost 1.4.2) | |
include_directories(${Boost_INCLUDE_DIR}) | |
set(CORELIBS ${Boost_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.6) | |
project(demo) | |
find_package(Boost 1.4.2) | |
include_directories(${Boost_INCLUDE_DIR}) | |
set(CORELIBS ${Boost_LIBRARIES}) | |