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
// arrcontainer cc = arrcontainer(20); | |
int* ip = (int* )realloc(cc, sizeof(int)*10); | |
// int* ip = (int* )calloc(8, 1000); | |
ip[1] = 10; | |
cout << *ip; |
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 *arr = new int[10]; | |
int *ptr = arr; | |
int *ptr_new; | |
ptr_new = (int *)realloc(ptr, sizeof(int)*3); | |
ptr_new = (int *)realloc(ptr, sizeof(int)*3); |
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
#include <iostream> | |
using namespace std; | |
int main(int argc, char const *argv[]) | |
{ | |
int *cc = new int[20]; | |
int size = 0; | |
for (size_t i = 0; i < 5; i++) |
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 readInt(string output = "") | |
{ | |
cout << output; | |
int input = 0; | |
bool valid = false; | |
// while the input isnt correct. keep asking | |
// istream (cin) will flag itself if there was an issue reading | |
// eg. a char was entered | |
while (!valid) | |
{ |
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
from range_regex import bounded_regex_for_range | |
a = input('Enter your input:') | |
b = input('Enter your input:') | |
print(bounded_regex_for_range(int(a), int(b))) |
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
// fix launch.json by adding this. | |
// make sure to change the gcc version, currently on 9.2.0 | |
// check with: ``c++ --version`` | |
// reference | |
"setupCommands": [ | |
{ | |
"description": "Enable pretty-printing for gdb", | |
"text": "-enable-pretty-printing", | |
"ignoreFailures": 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
# Beware this will not create a subfolder for RepoB in RepoA | |
If you want to merge project-b into project-a: | |
cd path/to/project-a | |
git remote add project-a path/to/project-b | |
git fetch project-b --tags | |
git merge --allow-unrelated-histories project-b/master | |
git remote remove project-b |
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
/* General styling */ | |
html, body, div, p, section, article | |
{ | |
background-color: #222 !important; | |
color: #aaa !important; | |
} | |
h1, h2, h3, h4, h5, h6, a { | |
color: #eee !important; | |
} |
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
/* ==UserStyle== | |
@name forbes ad blocker blocker | |
@namespace github.com/openstyles/stylus | |
@version 1.0.0 | |
@description block the modal popup and unfreeze the page | |
@author Roland Egerton-Warburton | |
==/UserStyle== */ | |
@-moz-document domain("forbes.com") { | |
/* Block the ad blocker*/ |
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
npm | |
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash - |