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
# http://askubuntu.com/questions/126737/make-gnome-terminal-show-the-command-running-as-title | |
# If this is an xterm set the title to user@host:dir | |
case "$TERM" in | |
xterm*|rxvt*) | |
prompt_prefix() | |
{ | |
if [ "$USER" != "jmcgirr" ] || [ "$HOSTNAME" != "jmcgirr-ld1" ]; then | |
echo -n "${USER}@${HOSTNAME}: " | |
else | |
echo -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
Index: binaries/data/mods/public/simulation/components/Foundation.js | |
=================================================================== | |
--- binaries/data/mods/public/simulation/components/Foundation.js (revision 16918) | |
+++ binaries/data/mods/public/simulation/components/Foundation.js (working copy) | |
@@ -33,6 +33,12 @@ | |
this.maxProgress = 0; | |
this.initialised = true; | |
+ | |
+ // Give our foundation a small amount of initial health, so that |
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
observ := observable.NewObservable(g, 0) | |
observ.OnChanged(g, func(new observable.Object, old observable.Object) { | |
if new.(int) < 1 { | |
return | |
} | |
fmt.Println("First set", new, "(", old,") call gets", observ.Get()); | |
}) | |
observ.OnChanged(g, func(new observable.Object, old observable.Object) { | |
if new.(int) < 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
/** | |
* Executes the SQL query on the database | |
* | |
* params: | |
* query: @string the query to execute | |
* | |
* returns: The result of the query | |
*/ | |
SQLDatabase::Query(query) { | |
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
# This file is borrowed from | |
# https://github.com/github/linguist/blob/master/lib/linguist/repository.rb | |
# Most of my modifications near the bottom. | |
# Appologies if the code is difficult to understand, I don't really | |
# know ruby very well... | |
require 'linguist/file_blob' | |
module Linguist | |
# A Repository is an abstraction of a Grit::Repo or a basic file | |
# system tree. It holds a list of paths pointing to Blobish objects. |
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
PROCESS (OneMhzModClk) BEGIN | |
IF (rising_edge(OnMhzModClk)) THEN | |
CASE state IS | |
WHEN GFLASH => | |
g <= TenMhzModClk; |
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
string intToString(int number) { | |
char * buffer = new char[10]; | |
sprintf(buffer, "%d", number); | |
return *(new string(buffer)); | |
} | |
void debugPrint(ostream& out, HashTable* table, map<int, string> expected) { | |
out << "**My map state:" << endl; | |
table->debugPrint(out); |
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 <sstream> | |
#include <string> | |
#include <vector> | |
#include <cassert> | |
#include <cstdlib> | |
#include <cstdio> | |
#include <map> | |
using namespace std; |
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 <sstream> | |
#include <string> | |
#include <vector> | |
#include <cassert> | |
#include <cstdlib> | |
#include <cstdio> | |
#include <map> | |
using namespace std; |
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 test(HashTable* table) { | |
int size = 5; | |
printf("%s", ((*table)[5]).c_str()); | |
bool errorThrown = false; | |
map<int, string> expected; | |
int exp; | |
int res; | |
NewerOlder