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
public function getWrappedIndex( index:int, length:int ):int | |
{ | |
return ((index % length) + length) % length; | |
} |
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
public var process:NativeProcess; | |
[Bindable] | |
public var output:String = "waiting..."; | |
private function onAppComplete():void | |
{ | |
if( NativeProcess.isSupported ) | |
setupAndLaunch(); | |
else |
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
#include "stdafx.h" | |
#include <iostream> | |
#include <sstream> | |
#include <windows.h> | |
int _tmain(int argc, _TCHAR* argv[]) | |
{ | |
POINT pt; | |
int i = 1; |
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 swizConfig:SwizConfig = new SwizConfig(); | |
swizConfig.eventPackages = [ "com.as3offcuts.as3Swiz.events" ]; | |
swizConfig.viewPackages = [ "com.as3offcuts.as3Swiz.view" ]; | |
var swiz:Swiz = new Swiz( this, swizConfig, null, [ Beans ] ); | |
swiz.init(); |
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 com.as3offcuts.as3Swiz.controller.SomeController; | |
import com.as3offcuts.as3Swiz.model.SomeModel; | |
import org.swizframework.core.BeanProvider; | |
public class Beans extends BeanProvider | |
{ | |
public function Beans(beans:Array=null) |
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 originalTiNet = Titanium.Network; | |
var StubNetwork = function() {}; | |
StubNetwork.createHTTPClient = function() { return originalTiNet.createHTTPClient() }; | |
Titanium.Network = StubNetwork; |
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 stubClient = function() {}; | |
stubClient.send = function() {}; | |
stubClient.open = function(type, url) {}; | |
spyOn(Titanium.Network, "createHTTPClient").andReturn(stubClient); | |
spyOn(stubClient, "send"); | |
spyOn(stubClient, "open"); |
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
@Override | |
public void prepareTest(Object test) { | |
NutbarTestModule module = new NutbarTestModule(); | |
RoboGuice.setBaseApplicationInjector(Robolectric.application, RoboGuice.DEFAULT_STAGE, Modules.override(RoboGuice.newDefaultRoboModule(Robolectric.application)).with(module)); | |
Injector injector = RoboGuice.getInjector(Robolectric.application.getApplicationContext()); | |
injector.injectMembers(test); | |
} |
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
// the factory interface | |
public interface SMSSendingAlarmFactory { | |
public SMSSendingAlarm create(Context context); | |
} | |
// in the module class | |
protected void configure() { | |
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
<dependency> | |
<groupId>com.google.inject.extensions</groupId> | |
<artifactId>guice-assistedinject</artifactId> | |
<version>3.0</version> | |
<exclusions> | |
<exclusion> | |
<artifactId>guice</artifactId> | |
<groupId>com.google.inject</groupId> | |
</exclusion> | |
</exclusions> |
OlderNewer