(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
on("add:character", function(obj) { | |
// If there aren't any ability objects to grab, then we're probably in the middle of a sandbox spin-up | |
if (findObjs({ _type: "ability"}).length === 0) | |
return; | |
var abil = findObjs({ _type: "ability", _characterid: obj.id}); | |
if (abil.length === 0) // Only create the abilities if the character doesn't have any | |
{ | |
createObj("ability", { | |
name: "Init", |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<?php | |
namespace Framework; | |
use \PDO; | |
use \Exception; | |
abstract class Model { | |
private static $_host; | |
private static $_username; | |
private static $_password; | |
private static $_database; |
/** | |
* $.parseParams - parse query string paramaters into an object. | |
*/ | |
(function($) { | |
var re = /([^&=]+)=?([^&]*)/g; | |
var decodeRE = /\+/g; // Regex for replacing addition symbol with a space | |
var decode = function (str) {return decodeURIComponent( str.replace(decodeRE, " ") );}; | |
$.parseParams = function(query) { | |
var params = {}, e; | |
while ( e = re.exec(query) ) { |