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> | |
int counter = 0; | |
#define MAX_WORKERS 10 | |
void worker() { | |
// do stuff; | |
counter--; | |
} |
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
"use strict"; | |
// white, black, grey are reserved, and should not be added here | |
var colours = [ | |
"red", | |
"green", | |
"blue" | |
]; | |
/** The colour to make squares once they're burned */ |
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 doSearch(colourMap, G) { | |
var open = [[0, 0]]; | |
var pt, x, y, col; | |
while (open.length > 0) { | |
do { | |
if (open.length > 0) { | |
pt = open.pop(); | |
x = pt[0]; | |
y = pt[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
#!/bin/bash | |
# Make sure all of the PHP files in the given directory compile | |
function verify_php { | |
for f in "$1"/* | |
do | |
item=$(echo "$f" | grep -o "\.php") | |
st2=$? | |
if [ -d "$f" ] |
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
<!DOCTYPE> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<!-- mobile support --> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" /> | |
<title>Title Here</title> |
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 <vector> | |
#include <bitset> | |
#include <set> | |
using namespace std; | |
#define LOG_LEVEL 0 | |
#define DEBUG(s) { \ | |
if (LOG_LEVEL) { std::cerr << s << endl; } \ | |
} |
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 <vector> | |
#include <algorithm> | |
#include <map> | |
using namespace std; | |
typedef long long ll; | |
const int MAX_M = 10000; | |
const int MAX_N = 10000; |
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 <vector> | |
#include <utility> | |
#include <set> | |
#include <bitset> | |
using namespace std; | |
typedef set<pair<int, int> > spi; | |
const int MAX_N = 200000; |
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 <set> | |
#include <bitset> | |
#include <cstring> | |
#include <vector> | |
#include <algorithm> | |
#include <utility> | |
using namespace std; | |
typedef set<int> si; |
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 <vector> | |
using namespace std; | |
struct region { | |
int pop, init, delta; | |
region() {} | |
region(int N, int I, int D) { | |
pop = N; | |
init = I; |
OlderNewer