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
for(int i = 0; i < 4; i++) { | |
pinMode(leds[i], OUTPUT); | |
} |
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
Note 1: The following CQ curl commands assumes a admin:admin username and password. | |
Note 2: For Windows/Powershell users: use two "" when doing a -F cURL command. | |
Example: -F"":operation=delete"" | |
Note 3: Quotes around name of package (or name of zip file, or jar) should be included. | |
Uninstall a bundle (use http://localhost:4505/system/console/bundles to access the Apache Felix web console) | |
curl -u admin:admin -daction=uninstall http://localhost:4505/system/console/bundles/"name of bundle" | |
Install a bundle | |
curl -u admin:admin -F action=install -F bundlestartlevel=20 -F |
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
.col-ms-1, | |
.col-ms-2, | |
.col-ms-3, | |
.col-ms-4, | |
.col-ms-5, | |
.col-ms-6, | |
.col-ms-7, | |
.col-ms-8, | |
.col-ms-9, | |
.col-ms-10, |
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
// 0. Override these in your MainViewController.m | |
// 1. your .startPage is http://www.google.com for example, set in your AppDelegate.m | |
// 2. don't forget to add that url in your whitelist | |
static BOOL isExternalUrlHack = NO; | |
- (NSString*) pathForResource:(NSString*)resourcepath; | |
{ | |
if ([self.startPage isEqualToString:resourcepath] && [self.startPage hasPrefix:@"http://"]) { | |
isExternalUrlHack = YES; | |
// return non-nil so it doesn't fail |
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
/* | |
* Normalized hide address bar for iOS & Android | |
* (c) Scott Jehl, scottjehl.com | |
* MIT License | |
*/ | |
(function( win ){ | |
var doc = win.document; | |
// If there's a hash, or addEventListener is undefined, stop here | |
if( !location.hash && win.addEventListener ){ |
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.pollensoft.pbt.twitter | |
{ | |
import mx.core.mx_internal; | |
import mx.messaging.messages.IMessage; | |
import mx.rpc.AsyncToken; | |
use namespace mx_internal; | |
import org.osflash.signals.Signal; | |
import mx.rpc.events.ResultEvent; |
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
/** | |
* User: jproulx | |
* Date: 12/21/10 | |
* Time: 10:15 AM | |
*/ | |
package | |
{ | |
import flash.utils.Dictionary; | |
import flash.utils.getDefinitionByName; | |
import flash.utils.getQualifiedClassName; |
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
// Flash/Chrome/FireBug logging through console: | |
function logMe(message:String):void { | |
ExternalInterface.call("console.log", message); | |
} |
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 lineTowards(g:Graphics, x:int, y:int, length:int):void | |
{ | |
var c:Number = Math.sqrt(Math.sqr(x) + Math.sqr(y)); | |
var ratio:Number = length / c; | |
g.lineTo(x*ratio, y*ratio); | |
} |
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
// http://help-aircanada.com/aircanada-help/js/aircanada_11112013.js | |
//This function is used to validate email address : Returns true if email is valid | |
function isEmailValid(emailToValidate){ | |
//var regex1=/^([_A-Za-z0-9-/&]+(\.[_A-Za-z0-9-/&]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.(([A-Za-z]{2,3})|(aero|coop|info|museum)))?$/ | |
//return regex1.test(emailToValidate); | |
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,17})+$/.test(emailToValidate)) | |
{ | |
return (true); |
NewerOlder