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 com.easystream | |
{ | |
import flash.display.DisplayObject; | |
import flash.events.NetDataEvent; | |
import flash.events.VideoEvent; | |
import flash.external.ExternalInterface; | |
import flash.net.NetStream; | |
import mx.controls.Alert; | |
import mx.core.mx_internal; |
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
var SpringAnalyticsJS = { | |
sensors: new SpringStreams("dbstream") | |
, screenX: 0 | |
, screenY: 0 | |
, duration: 0 | |
, position: 0 | |
, streamName: null | |
, uid: "test" + (new Date().getTime() * 10000 * Math.random()) | |
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
var trait:LoadTrait = pMediaPlayer.videoDisplay.mx_internal::videoPlayer. | |
media.getTrait(MediaTraitType.LOAD) as LoadTrait; | |
if (trait.__loader is RTMPDynamicStreamingNetLoader) { | |
var rtmpLoader:RTMPDynamicStreamingNetLoader = | |
trait.__loader as RTMPDynamicStreamingNetLoader; | |
if (rtmpLoader.__ns != null) { | |
mSensors.track(rtmpLoader.__ns, { | |
"stream": "livestreams/" + mCaption, |
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
describe 'auto increment' do | |
let!(:prev_widget) { FactoryGirl.create(:widget) } | |
let!(:new_widget) { FactoryGirl.create(:widget) } | |
subject { new_widget.sequence_no } | |
it { should be_incremented_by_one(prev_widget.sequence_no) } | |
end |
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
source 'http://rubygems.org' | |
gem 'sinatra' | |
group :test do | |
gem "rspec" | |
gem "rack-test" | |
end | |
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
<?php | |
class LazyLoadedModel { | |
private $instance = null; | |
private $refId = null; | |
private $initiated = false; | |
public function __construct($refId, $user) { | |
$this->refId = $refId; | |
$this->instance = $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
<?php | |
class UserFinder { | |
public static function find($id) { | |
return new LazyLoadedModel($id, new 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
<?php cache_fragment('user_welcoming_message'): ?> | |
<h4>Hi, <?php echo $this->assignedVariables('user')->getName(); ?></h4> | |
<?php end_cache_fragment; ?> | |
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
<h4>Hi, <?php echo $this->assignedVariables('user')->getName(); ?></h4> |
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
<?php | |
class UsersController { | |
public function show() { | |
$user = UserFinder::find(1); | |
$this->assignVariable('user', $user); | |
} | |
} |