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
// Puts work into a buffer so it can handle larger collections than the naive stack versions | |
template <class T> | |
struct QSWork { | |
T* begins; | |
T* ends; | |
static QSWork Create( T* begins, T* ends ) { | |
QSWork work; | |
work.begins = begins; | |
work.ends = ends; |
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
:nmap ; : | |
" tabstop: Width of tab character | |
" softtabstop: Fine tunes the amount of white space to be added | |
" shiftwidth Determines the amount of whitespace to add in normal mode | |
" expandtab: When on uses space instead of tabs | |
set tabstop =4 | |
set softtabstop =4 | |
set shiftwidth =4 | |
set expandtab | |
set number |
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
double CurProb = 1; | |
std::cout << 1 << ": " << 0.0 << std::endl; | |
for (int i = 1; i < 100; i++) | |
{ | |
double bp = (365.0 - (double)i) / 365.0; | |
CurProb *= bp; | |
std::cout << (i + 1) << ": " << (1.0 - CurProb) << std::endl; | |
} |
OlderNewer