A Pen by Ujjwal Sharma on CodePen.
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
# Save.rb : Ujjwal Sharma and Kush Bansal | |
class Note | |
attr_reader :text, :title, :color | |
def initialize(text,title,color) | |
@text = text | |
@title = title | |
@color = color | |
end | |
def marshal_dump |
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> | |
#include <algorithm> | |
#include <vector> | |
using namespace std; | |
bool exists(vector <int> a, int val) { | |
if(find(a.begin(), a.end(), val) != a.end()) | |
return true; | |
return false; |
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
/*************************************************************** | |
* maxfive.c : Ujjwal Sharma * | |
* This program finds the five maximum numbers * | |
* in a 3x3 matrix and prints its sum to STDOUT * | |
***************************************************************/ | |
#include <stdio.h> | |
int main() { | |
int elems = 0, i, j, max[5], sum = 0; /* elems is the number of elements in the max array */ |
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 <stdio.h> | |
void printArray(int array[], int length) { | |
int i; | |
for (i = 0; i < length; i++) { | |
printf("%d ", array[i]); | |
} | |
printf("\n"); | |
} |
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 <stdio.h> | |
struct Time { | |
int hours; | |
int minutes; | |
int seconds; | |
}; | |
struct Runner { | |
char name[20]; |
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
{ | |
"nodes": [ | |
{"id": "Myriel", "group": 1}, | |
{"id": "Napoleon", "group": 1}, | |
{"id": "Mlle.Baptistine", "group": 1}, | |
{"id": "Mme.Magloire", "group": 1}, | |
{"id": "CountessdeLo", "group": 1}, | |
{"id": "Geborand", "group": 1}, | |
{"id": "Champtercier", "group": 1}, | |
{"id": "Cravatte", "group": 1}, |
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 Complex { | |
int real; | |
int imaginary; | |
} | |
struct Complex addComplex(struct Complex* a, struct Complex* b) { | |
struct Complex c; | |
c.real = a->real + b->real; | |
c.imaginary = a->imaginary + b->imaginary; | |
return c; |
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
# | |
# /etc/pacman.conf | |
# | |
# See the pacman.conf(5) manpage for option and repository directives | |
# | |
# GENERAL OPTIONS | |
# | |
[options] | |
# The following paths are commented out with their default values listed. |
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
➜ ~ sudo pacman-mirrors -g | |
.: Info ping google.com x 1 | |
.: Info ping repo.manjaro.org x 1 | |
.: Info Downloading mirrors from repo.manjaro.org | |
.: Info Using default mirror file | |
.: Info Querying mirrors - This may take some time | |
1.050 Australia : http://mirror.ventraip.net.au/Manjaro/ | |
1.339 Australia : http://manjaro.uberglobalmirror.com/ | |
1.567 Australia : http://manjaro.mirror.serversaustralia.com.au/ | |
1.362 Austria : http://mirror.inode.at/manjaro/ |
OlderNewer