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> | |
class MethodCaller { | |
public: | |
static int getMemoryAddress() { | |
int var = 2; | |
return var; | |
} | |
}; |
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
private static int[, ] createTriangle(int size) | |
{ | |
int[,] triangle = new int[size,size]; | |
for (int i = 0; i < size; i++) | |
{ | |
triangle[i, 0] = 1; | |
for (int j = 1; j < i; j++) | |
{ | |
triangle[i, j] = triangle[i-1, j-1] + triangle[i-1, j]; | |
} |
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
namespace SieveOfEratosthenes | |
{ | |
class SieveOfEratosphenes | |
{ | |
public static void printPrimesUntil(int n) | |
{ | |
List<int> primes = getPrimesUntil(n); | |
printList(primes); | |
} |
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
#!/bin/bash | |
USERNAME=<username> | |
PASSWORD=<password> | |
INSTANCE="<company>.atlassian.net" | |
LOCATION="./Backups/" | |
mkdir "Backups" | |
# Grabs cookies and generates the backup on the UI. |
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
function Book(isbn, title, author) { | |
if(this instanceof Book) { | |
this.isbn = isbn; | |
this.title = title; | |
this.author = author; | |
} else { | |
return new Book(isbn, title, author); | |
} | |
} |
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
function Book(isbn, title, author) { | |
if (this instanceof Book) { | |
this.isbn = isbn; | |
this.title = title; | |
this.author = author; | |
} else { | |
return new Book(isbn, title, author); | |
} | |
} |
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
#!/usr/bin/env bash | |
echo "================================" | |
echo "Dell XPS 13 1950 Fixes for Ubuntu 14.04" | |
echo "================================" | |
echo "Downloading required files" | |
echo "--------------------------------" | |
mkdir patch/ | |
cd patch/ |