This file contains hidden or 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
protected FullLevelEvent loadLevel(final long currentUserId, final PlayerDataEntity playerModel, | |
final int levelIndex) { | |
final LevelEvent levelEvent = | |
new LevelEvent(GameController.SERVER_LOAD_LEVEL, levelIndex, playerModel.getId()); | |
levelEvent.setCurrentPlayerId(currentUserId); | |
levelEvent.setResponseKey("asd"); | |
final FullLevelEvent fetchedLevel1 = | |
(FullLevelEvent) handler.handleEvent(new LevelEvent(levelEvent, levelIndex, playerModel | |
.getId())); |
This file contains hidden or 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
getInvadeStartInstanceTransaction(long defendingPlayerId, long invadingPlayerId, Long defendingPlayerInstanceId, int defendingPlayerFloorCount) { | |
return new Transact<InstanceEntity>() { | |
@Override | |
public void run(DAOT daot) { | |
InstanceEntity instance = | |
defendingPlayerInstanceId != null | |
? daot.getInstanceEntity(defendingPlayerInstanceId) | |
: new InstanceEntity(defendingPlayerId, defendingPlayerFloorCount); | |
instance.addInvadingPlayer(invadingPlayerId); | |
instance.setCurrentFloor(invadingPlayerId, 0); |
This file contains hidden or 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
Initializing App Engine server | |
Mar 09, 2012 7:13:46 PM com.google.apphosting.utils.jetty.JettyLogger info | |
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger | |
Mar 09, 2012 7:13:47 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml | |
INFO: Successfully processed C:\Users\Nick\Code\Corpionage Kiln\corp-gwt-ui\war\WEB-INF/appengine-web.xml | |
Mar 09, 2012 7:13:47 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml | |
INFO: Successfully processed C:\Users\Nick\Code\Corpionage Kiln\corp-gwt-ui\war\WEB-INF/web.xml | |
Mar 09, 2012 7:13:47 PM com.google.apphosting.utils.jetty.JettyLogger info | |
INFO: jetty-6.1.x | |
Mar 09, 2012 7:13:51 PM com.google.apphosting.utils.jetty.JettyLogger info |
This file contains hidden or 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
public class Main { | |
static class Root {} | |
static class Sub extends Root {} | |
public static void main(String[] args) { | |
foo(new Sub()); | |
Root r = new Sub(); | |
foo(r); |
This file contains hidden or 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
(* Simple trie to store strings by Nick Heiner <[email protected]> *) | |
module CharMap = Map.Make(Char) | |
(* count of members of the set that end at this node * mapping from | |
next char => children *) | |
type trie = Node of int * trie CharMap.t | |
let empty = Node (0, CharMap.empty) |
This file contains hidden or 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
type scalar = float | |
type point = scalar * scalar | |
type vector = point | |
let s_plus = failwith "Slippy, get back here" | |
let s_minus = failwith "Slippy, watch out, bogey on your tail" | |
let s_times = failwith "Whoah, help me!" |
This file contains hidden or 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
(* Nick Heiner *) | |
let data = Array.toList ("LLLQLLQLQLLLQLELLLLLQLLQQLLLQE".ToCharArray()) | |
let transitionCounts = | |
let rec helper soFar = function | |
| [] -> soFar | |
| [hd] -> soFar | |
| first::((next::_) as tl) -> | |
let key = (first, next) |
This file contains hidden or 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
(* Nick Heiner - Info 2950 PS9 *) | |
(* Viterbi algorithm, as described here: http://people.ccmr.cornell.edu/~ginsparg/INFO295/vit.pdf | |
priorProbs: prior probability of a hidden state occuring | |
transitions: probability of one hidden state transitioning into another | |
emissionProbs: probability of a hidden state emitting an observed state | |
observation: a sequence of observed states | |
hiddens: a list of all possible hidden states |
This file contains hidden or 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
(* Nick Heiner <[email protected]> *) | |
(* Adapted from https://gist.github.com/1347308 *) | |
(* The func_ prefix is to avoid confusion with OCaml's standard Queue. *) | |
(* from F# *) | |
let (|>) g f = f g | |
type 'a func_queue = Func_Queue of 'a list * 'a list | |
let empty = Func_Queue ([], []) |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
/** | |
* @license AngularJS v1.1.2-c9d93708 | |
* (c) 2010-2012 Google, Inc. http://angularjs.org | |
* License: MIT | |
*/ | |
(function(window, document, undefined) { | |
'use strict'; | |
//////////////////////////////////// |
OlderNewer