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
### Keybase proof | |
I hereby claim: | |
* I am jonluca on github. | |
* I am jonluca (https://keybase.io/jonluca) on keybase. | |
* I have a public key ASDsjXLhDp24xm9FCMS0jqWhF81R4Zd5Uz1ii5QzCHxingo | |
To claim this, I am signing this object: |
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
int mVar = 0; | |
void setVarToOne(){ | |
mVar++; | |
} | |
setVarToOne(); | |
ASSERTEQ(mVar,1); // true |
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
let mVar = 0; | |
function setVarToOne(mVar){ | |
mVar = 1; | |
} | |
setVarToOne(undefined); | |
ASSERTEQ(mVar,0); |
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
int mVar = 0; | |
void setVarToOne(int* mVar){ | |
if(mVar) *mVar = 1; | |
} | |
setVarToOne(nullptr); | |
ASSERTEQ(mVar,0); //true |
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
int mVar = 0; | |
void setVarToOne(int* mVar){ | |
if(mVar) *mVar = 1; | |
} | |
setVarToOne(&mVar); | |
ASSERTEQ(mVar,1); //true |
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
void setVarToOne(int* mVar){ | |
if(mVar) *mVar = 1; | |
} | |
std::srand(time(0)); | |
int mVar = 0; | |
setVarToOne(&mVar); | |
ASSERTEQ(mVar,1); //true |
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
int mVar = INT_MAX; | |
void setVarToOne(int* mVar){ | |
if(mVar) *mVar = 1; | |
} | |
setVarToOne(&mVar); | |
ASSERTEQ(mVar,1); //true |
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
#define MAX_SET_TO_ONE 1000 | |
int mVar = 0; | |
int mTimesSetToOne = 0; | |
void setVarToOne(int* mVar){ | |
if(mVar && mTimesSetToOne < MAX_SET_TO_ONE){ | |
*mVar = 1; | |
mTimesSetToOne++; | |
} |
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 { | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
server_name jonlu.ca www.jonlu.ca; | |
root /var/www/html; | |
index index.html index.htm; | |
location ~ /.git { | |
deny all; |
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{ | |
listen 80; | |
server_name jonlu.ca www.jonlu.ca; | |
root /var/www/html; | |
index index.html index.htm; | |
location ~ /.git/ { | |
deny all; | |
} | |
location ~ / { |
OlderNewer