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
interface ILoaderDelegate | |
class LoaderMaxFacade implements ILoaderDelegate | |
interface IApplicationConfigLoaderDelegate extends ILoaderDelegate | |
//empty <- marker interface | |
interface IMediaPlayerConfigLoaderDelegate extends ILoaderDelegate | |
//empty <- marker interface |
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
//wherever you do your mapping | |
injector.mapSingletonOf( IConfigDataParser, XMLConfigDataParser ) | |
//IConfigDataParser | |
function parseData( rawData : String ) : ConfigDataVO | |
//XMLConfigDataParser implements IConfigDataParser | |
public function parseConfigData( rawData : String ) : ConfigDataVO{ | |
var output : ConfigDataVO = new ConfigDataVO(); | |
var xmlData : XML = new XML( rawData ); |
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 Obj = { | |
createProxy : function( o ) { | |
var F = function () { | |
}; | |
F.prototype = o; | |
return F; | |
}, | |
createObject : function( o ){ | |
//Crockford Object.create | |
var F = Obj.createProxy( o ); |
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
@media screen and (max-device-width: 480px){ | |
#foo{ | |
max-width: 270px; | |
} | |
} | |
/* wil overwrite previous rule if device resolution is bigger */ | |
@media screen and (min-device-width: 481px){ | |
#foo{ | |
max-width: 540px; |
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
["debug","onResourceRequested","file:///Users/creynder/Dropbox/Work/Projects/CREY%20-%20grunt%20jasmine%20task/gfranko/test/SpecRunner.html"] | |
["debug","onResourceRequested","file:///Users/creynder/Dropbox/Work/Projects/CREY%20-%20grunt%20jasmine%20task/gfranko/stylesheets/SelectBoxIt/jQuery.selectBoxIt.css"] | |
["debug","onResourceRequested","file:///Users/creynder/Dropbox/Work/Projects/CREY%20-%20grunt%20jasmine%20task/gfranko/libs/jasmine/jasmine.css"] | |
["debug","onResourceRequested","file:///Users/creynder/Dropbox/Work/Projects/CREY%20-%20grunt%20jasmine%20task/gfranko/libs/jasmine/jasmine.js"] | |
["debug","onResourceRequested","file:///Users/creynder/Dropbox/Work/Projects/CREY%20-%20grunt%20jasmine%20task/gfranko/libs/jquery/jquery-1.7.2.min.js"] | |
["debug","onResourceRequested","file:///Users/creynder/Dropbox/Work/Projects/CREY%20-%20grunt%20jasmine%20task/gfranko/libs/jasmine/jasmine-jquery-1.3.1.js"] | |
["debug","onResourceRequested","file:///Users/creynder/Dropbox/Work/Projects/CREY%20-%20grunt%20jasmine%20task/g |
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 BaseService{ | |
public function load():void{ | |
this.onLoadComplete() | |
} | |
public function onLoadComplete():void{ | |
} | |
} |
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
/* | |
Copyright (c) 2012 Camille Reynders, http://www.creynders.be | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
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
/* | |
searches all nodes (of all nodetypes) that reference <code>target_nid</code> and deletes them | |
dependencies: Entity, EntityReference | |
*/ | |
$conditions = array( 'type' => 'entityreference' ); | |
$include_additional = array( 'include_inactive' => TRUE ); | |
$fields = field_read_fields( $conditions, $include_additional ); | |
foreach( $fields as $field ){ | |
$query = new EntityFieldQuery(); |
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
function mymodule_pre_hook(){ | |
register_hook( 'mymodule_form_foo_node_form_alter', 'mymodule_handle_nodetype_form_alter' ); | |
register_hook( 'mymodule_form_baz_node_form_alter', 'mymodule_handle_nodetype_form_alter' ); | |
} | |
function mymodule_handle_nodetype_form_alter( &$form, &$form_state, $form_id ){ | |
//do what you need | |
} |
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 arraySort | |
{ | |
import mx.utils.ObjectUtil; | |
public class ArraySort{ | |
public function run() : void{ | |
var i : int; | |
var n : int = 500; | |
var arr : Array = []; | |
for ( i = 0; i<n; i++ ){ | |
arr.push( { |
OlderNewer