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
(function(window) { | |
function Some(v) { | |
this.value = v; | |
} | |
Some.prototype = { | |
map: function(f) { | |
return some(f(this.value)); | |
}, | |
isNone: false, |
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
pub fn insert(&mut self, k: K, v: V) { | |
if k < self.key { | |
match self.left { | |
Some(ref mut l) => l.insert(k, v), | |
None => self.left = Some(self.make_child(k, v)) | |
} | |
} | |
else if k > self.key { | |
match self.right { | |
Some(ref mut r) => r.insert(k, v), |
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
module Game.Player { | |
class Player { | |
public skills: Skill[]; | |
} | |
export class Skill { | |
} | |
} |
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
observe_search_query({search_query, {product, PropsSorted}, OffsetLimit}, Context) -> | |
%% io:format("~p~n", [PropsSorted]), | |
#search_sql{select="*", from="product", tables=[{product, "product"}]}; | |
observe_search_query({search_query, Req, OffsetLimit}, Context) -> | |
z_notifier:first({search_query, Req, OffsetLimit}, Context). |
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
%begin | |
{R, cmsg_player_login, D} -> | |
{ok, CharId} = realm_patterns:cmsg_player_login(D), | |
Char = char_helper:find(CharId), | |
ok = set_dungeon_difficulty(S, -1), | |
MapPid = verify_world(S, Char), | |
ok = send_account_data(S), | |
ok = set_rest_start(S), | |
ok = set_tutorial_flags(S), | |
ok = send_spells_and_cooldowns(S), |
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
authenticate(Opcode, Data, State) -> | |
case logon_patterns:auth_request(Data) of | |
{ok, Build, Account} -> | |
case account_helper:find_by_name(Account) of | |
[AccountRecord] -> | |
H = srp6:challenge(AccountRecord), | |
NewState = State#logon_state{authenticated=no, account=AccountRecord, hash=H}, | |
{send, logon_patterns:auth_reply(H), NewState}; | |
_ -> | |
{send, logon_patterns:error(Opcode, account_missing), State} |
NewerOlder