To create a serpent (i.e. join a game)
All parameters are required
| #include <jni.h> | |
| #include <android/log.h> | |
| #include <stdlib.h> | |
| #include <BPMDetect.h> | |
| #include "FMODSystem.h" | |
| #include "FMODSound.h" | |
| #include "FMODDspBpm.h" | |
| #include "fmod.h" | |
| #include "fmod_dsp.h" | |
| #include "fmod_errors.h" |
| createClassLoader | |
| java.lang.Exception: Stack trace | |
| at java.lang.Thread.dumpStack(Unknown Source) | |
| at user$fn__1$fn__2.invoke(NO_SOURCE_FILE:7) | |
| at user.proxy$java.lang.SecurityManager$0.checkPermission(Unknown Source) ---- Second call to checkPermission | |
| at java.lang.SecurityManager.checkCreateClassLoader(Unknown Source) | |
| at user.proxy$java.lang.SecurityManager$0.checkCreateClassLoader(Unknown Source) | |
| at java.lang.ClassLoader.checkCreateClassLoader(Unknown Source) | |
| at java.lang.ClassLoader.<init>(Unknown Source) | |
| at sun.reflect.DelegatingClassLoader.<init>(Unknown Source) ---- Java creates a new ClassLoader |
| Config = [#{dirs => ["src"], | |
| filter => "tt_important_stuff.erl", | |
| rules => [{elvis_style, line_length, [80]}, | |
| {elvis_style, no_tabs, []}, | |
| {elvis_style, macro_names, []}, | |
| {elvis_style, macro_module_names, []} | |
| %% more rules... | |
| ] | |
| }], | |
| elvis:rock(Config). |
| import threading | |
| import time | |
| import random | |
| a = [] | |
| def add(x): | |
| for i in range(100): | |
| print x | |
| print len(a) |
| (defn timeout-channel | |
| "Creates a channel and a go block that takes from it. The go block keeps | |
| an internal status with two possible values, `:wait` and `:receive`. | |
| In ':wait' status, execution is blocked until there's a value available in the | |
| channel, it then enters the ':receive' status, until the timeout wins. | |
| Returns the channel where events need to be pushed." | |
| [timeout-ms f] | |
| (let [c (async/chan)] | |
| (async/go-loop [status :wait | |
| args nil] |
| (require | |
| '[cljs.repl :as repl] | |
| '[cljs.repl.browser :as browser]) | |
| (repl/repl (browser/repl-env) | |
| :watch "src" | |
| :output-dir "out" | |
| :optimizations :none | |
| :cache-analysis true | |
| :source-map true) |
Multi-Player Game on top of HDP protocol
The HDP protocol consists on 5 different messages types that share a common header with some basic user information. The protocol is defined with BNFs where ALL_CAPS_IMPLY_CONSTANTS, camelCaseImplyPrimitives and the '&' is used to denote "bitwise or" (super intuitive right?) while '|' denotes that one of multiple options can be chosen.
| -module(mapa). | |
| -behaviour(gen_server). | |
| -compile(export_all). | |
| init (_) -> | |
| process_flag(trap_exit, true), | |
| {ok, []}. | |
| terminate(R, S) -> | |
| io:format("R = ~p, S = ~p~n", [R, S]), |
I hereby claim:
To claim this, I am signing this object: