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
[Inject( "userService" )] | |
public var ro:RemoteObject; | |
[Inject] | |
public var sh:ServiceHelper; | |
public function fetchUserRoles( user:User ):void | |
{ | |
sh.executeServiceCall( ro.fetchUserRoles( user.id ), fetchUserRoles_result, fetchUserRoles_fault, [ user ] ); | |
} |
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
package meridiantablet.views | |
{ | |
import meridiantablet.Assets; | |
import spark.components.IconItemRenderer; | |
public class PersonItemRenderer extends IconItemRenderer | |
{ | |
private static const IMAGE_WIDTH:int = 134; | |
private static const IMAGE_HEIGHT:int = 168; |
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
package | |
{ | |
import org.osflash.signals.Signal; | |
public class MyTestSignal extends Signal | |
{ | |
public function MyTestSignal() | |
{ | |
super( String ); | |
} |
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
package | |
{ | |
public class MyMediatorMap extends MediatorMap | |
{ | |
override protected function mapMediators():void | |
{ | |
map( match( SomeView ).and( ISaysHello ).to( BenMediator ) ); | |
map( match( SomeView ).or( ISaysGoodbye ).to( BenMediator ) ); | |
map( match( SomeController ).butNot( OtherController ).to( MyMediator ) ); | |
} |
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
#!/bin/bash | |
# current Git branch | |
branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
# v1.0.0, v1.5.2, etc. | |
versionLabel=v$1 | |
# establish branch and tag name variables | |
devBranch=develop |
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
[Embed(source="img.png", scaleGridTop="7",scaleGridBottom="61",scaleGridLeft="7",scaleGridRight="132")] | |
public static const IMG:Class; | |
... | |
<s:BorderContainer width="800" height="600" backgroundImageFillMode="scale" backgroundImage="{ IMG }" borderAlpha="0" /> | |
<s:Image source="{ IMG }" width="400" height="300" /> |
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
dataset = [] | |
w = 500 | |
h = 400 | |
padding = 30 | |
dataset.push [ Math.random() * w, Math.random() * h ] for [0..50] | |
svg = d3.select("body") | |
.append("svg") | |
.attr("width", w) |
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
//Dynamic, random dataset | |
var dataset = []; | |
var numDataPoints = 50; | |
var xRange = Math.random() * 1000; | |
var yRange = Math.random() * 1000; | |
for (var i = 0; i < numDataPoints; i++) { | |
var newNumber1 = Math.round(Math.random() * xRange); | |
var newNumber2 = Math.round(Math.random() * yRange); | |
dataset.push([newNumber1, newNumber2]); | |
} |
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
class Entity | |
clone: (obj) -> | |
for key, value of obj | |
@[key] = obj[key] | |
return @ | |
class Person extends Entity | |
constructor: (@age, @fName) -> | |
class Animal extends Entity |