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
void qsort(int array[], int end, int start = 0) { | |
int i=start, j = end; | |
int temp; | |
int pivot=array[(start+end)/2]; | |
cout << "Sorterar från " << start << " till " << end << " pivot " << pivot << endl; | |
while (i <= j) { | |
while (array[i] < pivot) { | |
i++; |
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
void printRecursiveReverseString(string s) { | |
// Om strängens längd är 0, returnera | |
if(s.length() == 0 ) { | |
return; | |
} | |
// Character är tar den första charen i strängen | |
//cout << "Character: " << s.substr(0, 1) << endl; | |
string character = s.substr(0, 1); | |
// rekursivt anrop (Kallar på sig själv). |
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
int main() | |
{ | |
locale swedish("swedish"); | |
locale::global(swedish); | |
srand((unsigned)time(NULL)); | |
string playerName; | |
int nrOfCardDecks = 1; | |
int cardSum = 0; | |
int cardPos = 0; | |
Card lastCard; |
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
{ | |
"installed_packages": | |
[ | |
"DocBlockr", | |
"Emmet", | |
"Gist", | |
"Package Control", | |
"SendToPasteBin", | |
"SFTP", | |
"SublimeLinter", |
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
alias commit='git commit -m' | |
alias l='ls -lF' | |
#trolol alias because of http://xkcd.com/530 | |
alias highvolume="osascript -e 'set volume 7'" | |
alias mute="osascript -e 'set volume output muted true'" | |
# List only directories | |
alias lsd='ls -l ${colorflag} | grep "^d"' |
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
template<typename T> | |
void List<T>::insertAt(T data, int pos) { | |
// Om pos = 0, lägg först | |
// Listan är tom: lägg först | |
// Pos > antalet noder, lägg sist | |
// pos > & <= antalet noder lägg emellan. | |
// skapa en ny nod | |
if(pos < 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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="intheloop" | |
# Example aliases |
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
{ | |
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night-Eighties.tmTheme", | |
"default_encoding": "UTF-8", | |
"default_line_ending": "unix", | |
"detect_indentation": false, | |
"file_exclude_patterns": | |
[ | |
".DS_Store", | |
"Desktop.ini", | |
"*.pyc", |
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
INSERT INTO Deliveries (S, P, QTY) | |
VALUES (1, 1, 300), | |
(1,2,200), | |
(1,3,400), | |
(1,4,200), | |
(1,5,100), | |
(1,6,100), | |
(2,1,300), | |
(2,2,400), |
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
{ | |
"color_scheme": "Packages/Predawn/predawn.tmTheme", | |
"default_encoding": "UTF-8", | |
"default_line_ending": "unix", | |
"detect_indentation": false, | |
"file_exclude_patterns": | |
[ | |
".DS_Store", | |
"Desktop.ini", | |
"*.pyc", |
OlderNewer