Skip to content

Instantly share code, notes, and snippets.

View scottdavis's full-sized avatar

Scott Davis scottdavis

View GitHub Profile
<?php
/**
* @package functional_test
* */
require_once('nimble/lib/test/phpunit_testcase.php');
class TaskControllerTest extends NimblePHPFunctonalTestCase {
public function setUp() {
}
<?php
class CountableResults implements Countable {
public function count() {}
}
class NimbleResult extends CountableResults implements Iterator {
private $array = array();
public function __construct($array, $options = array())
<?php
preg_match_all('/({[a-z0-9_\(\)]+})/', "name: {name} --- {foo()}", $matches);
var_dump($matches);
?>
array(2) {
[0]=>
array(2) {
[0]=>
<?php
require_once(dirname(__FILE__) . '/../../../nimble_support/lib/command_line_colors.php');
class MigrationRunner {
static $dir = 'test';
public static function migration_table_name() {
return 'migrations';
}
<?php
private static function find_executable() {
$filename = basename(pathinfo(__FILE__, PATHINFO_FILENAME));
if(isset($_SERVER['_']) && substr(basename($_SERVER['_']), -1 * strlen($filename)) != $filename) {
return $_SERVER['_'];
}
$seperator = ':';
if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {$seperator = ';';}
$path = explode($seperator, $_SERVER["PATH"]);
foreach($path as $_path) {
import mx.controls.Image;
public function init() :void {
myLoader.source = 'Fig23_Clip1.swf';
myLoader.addEventListener(Event .COMPLETE, loaded);
}
public function loaded(e:Event) :void {
var timeline:MovieClip = e.currentTarget.content as MovieClip;
timeline.gotoAndStop(60);
trace(timeline.framesLoaded);
import mx.controls.Image;
[Embed(source='Fig23_Clip1.swf', mimeType='application/octet-stream')]
public static var MySwf:Class;
public function init() :void {
var swf:Object = new MySwf();
var myLoader:Loader = new Loader;
myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded);
myLoader.loadBytes(ByteArray(swf));
?xml version="1.0" encoding="utf-8"?>
<GraphicBorderSkin xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="http://www.degrafa.com/2007">
<!-- use skinWidth and skinHeight for setting component dimensions -->
<fills>
<SolidFill color="#6C6844" id='upFill' />
<SolidFill color="#000000" id="topStroke"/>
package org.hubblesite.webprint
{
import flash.display.Loader;
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.utils.ByteArray;
import mx.controls.Image;
import mx.core.Application;
<?php
public function pearfarm_build() {
$tags = $this->get_tags();
$tag = array_pop($tags);
if($this->has_spec($tag) == false) {
$this->cleanup();
return false;
}
if($this->get_tag($tag)) {
$specfile = $this->temp_location . '/pearfarm.spec';