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
// adjust to deque for pushing back on front | |
using cellQueue = deque<shared_ptr<SudokuCell>>; | |
class SudokuBoard { | |
cellQueue cells; | |
public | |
/* | |
* ..... | |
*/ |
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
using cellQueue = queue<shared_ptr<SudokuCell>>; | |
class SudokuBoard { | |
cellQueue cells; | |
public: | |
// initialize board | |
SudokuBoard(){/* ... */} | |
// fill the board with valid solution | |
void fillCells(){/* ... */} |
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
---------------------------------- | |
| | 7 | | | |
| | 7 | | | |
| | 7 | | | |
---------------------------------- | |
| 7 7 7 | 6 7 7 | 7 7 7 | | |
| | 7 7 7 | | | |
| | 7 7 7 | | | |
---------------------------------- |
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
class SudokuCell { | |
public: | |
coord pos; | |
set<coord> neighbors{}; | |
int value = 0; | |
// set position and generate neighbors | |
void setPosition(coord pos); | |
private |
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
struct coord { | |
int i = 0; | |
int j = 0; | |
}; | |
// equality comparison between two coors | |
inline bool operator == (const coord &lhs, const coord &rhs) { | |
return lhs.i == rhs.i && lhs.j == rhs.j; | |
} |
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
alert('yo'); | |
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
# attach and detach for node debugger | |
'atom-text-editor': | |
'F4': 'node-debugger:attach' | |
'shift-F4': 'node-debugger:stop' | |
# exec command for vim | |
'atom-text-editor.vim-mode-plus.normal-mode': | |
':': 'vim-mode-plus-ex-mode:open' | |
'!': 'vim-mode-plus-ex-mode:toggle-setting' |
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
source ~/.profile | |
export ZSH=/Users/{USER}/.oh-my-zsh | |
ZSH_THEME="robbyrussell" | |
plugins=(git) | |
source $ZSH/oh-my-zsh.sh | |
# autojump | |
[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh |
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
/* | |
server-start starts up nodemon | |
the output is corrected to show new lines correctly. | |
*/ | |
var nodemon = require('gulp-nodemon'); | |
var replace = require('stream-replace'); | |
var gutil = require('gulp-util'); | |
// Start server with nodemon |
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
set nocompatible " be iMproved, required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
filetype off | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') |