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 flash.events { | |
public class EventDispatcher { | |
// This would actually dispatch event to captured/uncaptured listeners... | |
// Assume this and the rest of event dispatcher behave as you'd expect :) | |
private function _dispatch(event, captured:Boolean = false):void { | |
var listener:Function; | |
event.currentTarget = this; | |
if (captured) for each (listener in capturedListeners[event.type]) { | |
if (event.stoppedImmediatePropagation) break; | |
listener(event); |
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 jubishop { | |
import mx.collections.ArrayCollection; | |
public class Set extends ArrayCollection { | |
public function removeItem(item:Object):int { | |
var itemIndex:int = getItemIndex(item); | |
if (itemIndex == -1) return -1; | |
removeItemAt(itemIndex); | |
return itemIndex; | |
} |
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
#!/usr/bin/env ruby | |
PATH_TO_DIFFMERGE = "/Applications/DiffMerge.app" | |
at_exit { | |
call("rm -rf clone/") | |
} | |
def call(cmd) | |
IO.popen(cmd) {|io| io.read } |
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
#!/usr/bin/env ruby | |
require 'tempfile' | |
require 'rubygems' | |
require 'mojombo-grit' | |
include Grit | |
PATH_TO_DIFFMERGE = "/usr/bin/diffmerge" |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> | |
<head> | |
<title>Flash</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | |
<style type="text/css" media="screen"> |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> | |
<head> | |
<title>Flash</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | |
<style type="text/css" media="screen"> |
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
- (BOOL) respondsToSelector:(SEL)selector { | |
NSString* methodName = NSStringFromSelector(selector); | |
NSLog(@"selector: %@", methodName); | |
return [super respondsToSelector:selector]; | |
} |
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
Walmart | |
McDonalds | |
Anything with (High Fructose) Corn Syrup | |
Anything consumable from China | |
Anything with Trans Fat | |
Milk |
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 RiskProbability | |
@@odds = { | |
[1,1] => {[1,0] => 41.67, [0,1] => 58.33}, | |
[2,1] => {[1,0] => 57.87, [0,1] => 42.13}, | |
[3,1] => {[1,0] => 65.97, [0,1] => 34.03}, | |
[1,2] => {[1,0] => 25.46, [0,1] => 74.54}, | |
[2,2] => {[2,0] => 22.76, [0,2] => 44.83, [1,1] => 32.41}, | |
[3,2] => {[2,0] => 37.17, [0,2] => 29.26, [1,1] => 33.58} | |
} | |
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
<?xml version="1.0" encoding="utf-8"?> | |
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" | |
xmlns:facebook="com.pbking.facebook.*" | |
creationComplete="creationComplete()"> | |
<mx:Script><![CDATA[ | |
import flash.events.Event; | |
import mx.events.CloseEvent; | |
import mx.controls.Alert; | |
import com.pbking.facebook.Facebook; |
OlderNewer