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
// simple cpp template | |
// | |
// Short description of what your project will do | |
#include<iostream> | |
// prototypes go here | |
int main() | |
{ |
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
git remote add upstream /url/to/original/repo | |
git fetch upstream | |
git checkout master # only needed if not already in master | |
git rebase upstream/master | |
git push | |
also, | |
git push --tags # to sync tags/releases | |
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
<?php | |
if ( function_exists( 'mail' ) ) | |
{ | |
echo 'mail() is available'; | |
} | |
else | |
{ | |
echo 'mail() has been disabled'; | |
} |
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
<?php | |
/* examples of usage: | |
// in php block | |
$relativePathToFile = "folder/exampleFile.php"; | |
ShowSourceCode.php?source_file=$relativePathToFile | |
// as html link | |
<a href="ShowSourceCode.php?source_file=exampleFile.php" target="blank">View the Source Code</a> | |
*/ |
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 randomTesting() { | |
cout << "Random Number Generation Testing" << endl << endl; | |
cout << "Seeding the number generator... "; | |
// srand(5); //seed the random number generator with 5 | |
cout << "Done!" << endl; | |
cout << "Generating 10 random integers..... "; | |
int extraCount = 0; | |
while (1) { | |
vector<int> randVector; //to store the random numbers |
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
random1 = rand() % 10; // range 0 to 9 | |
random2 = rand() % 100 + 1; // range 1 to 100 | |
random3 = rand() % 22 + 1999; // range 1999-2019 |
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
git rm -r --cached . | |
git add . | |
git commit -m "remove new ignored files" |
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
<?php | |
// 0-9 | |
echo '<br>ascii(48-57): '; | |
for ($i = 48; $i <= 57; $i++) { | |
echo chr($i); | |
} | |
// A-Z | |
echo '<br>ascii(65-90): '; |
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
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; connect-src http://localhost:3000 ws://localhost:3000; script-src 'sha256-6w7vfY25rjzxRvjgGUXxQWVtH2vipu/5/hnX06LWvHo=' ws://localhost:3000 http://localhost:3000;"> |
OlderNewer