This file contains hidden or 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
| name = VoxPelli OAuth Test | |
| core = 7.x | |
| dependencies[] = oauth_common | |
| dependencies[] = http_client |
This file contains hidden or 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
| /** | |
| * TaskRepository class deals with task persistence | |
| */ | |
| function TaskRepository() { | |
| this.tasks = []; | |
| this.nextId = 1; | |
| } | |
| /** | |
| * Find a task by id | |
| * Param: id of the task to find |
This file contains hidden or 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
| appView.addJavascriptInterface(this, "MyJSI"); | |
| @JavascriptInterface | |
| public void foo() { .... } | |
| (in onDeviceReady) | |
| if (window.MyJSI == undefined) console.log("javascript interface is undefined"); | |
| else if (window.MyJSI == null) console.log("javascript interface is null"); |
This file contains hidden or 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
| CREATE TABLE IF NOT EXISTS country ( iso CHAR(2) NOT NULL PRIMARY KEY, name VARCHAR(80) NOT NULL, printable_name VARCHAR(80) NOT NULL, iso3 CHAR(3), numcode SMALLINT ); INSERT INTO country VALUES ('AF','AFGHANISTAN','Afghanistan','AFG','004'); INSERT INTO country VALUES ('AL','ALBANIA','Albania','ALB','008'); INSERT INTO country VALUES ('DZ','ALGERIA','Algeria','DZA','012'); INSERT INTO country VALUES ('AS','AMERICAN SAMOA','American Samoa','ASM','016'); INSERT INTO country VALUES ('AD','ANDORRA','Andorra','AND','020'); INSERT INTO country VALUES ('AO','ANGOLA','Angola','AGO','024'); INSERT INTO country VALUES ('AI','ANGUILLA','Anguilla','AIA','660'); INSERT INTO country VALUES ('AQ','ANTARCTICA','Antarctica',NULL,NULL); INSERT INTO country VALUES ('AG','ANTIGUA AND BARBUDA','Antigua and Barbuda','ATG','028'); INSERT INTO country VALUES ('AR','ARGENTINA','Argentina','ARG','032'); INSERT INTO country VALUES ('AM','ARMENIA','Armenia','ARM','051'); INSERT INTO country VALUES ('AW','ARUBA','Aruba','ABW','533'); I |
This file contains hidden or 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
| // handle GCM notifications for Android | |
| onNotificationGCM = function(e){ | |
| alert('onGCM'); | |
| switch( e.event ) | |
| { | |
| case 'registered': | |
| if ( e.regid.length > 0 ) | |
| { | |
| console.log("Regid " + e.regid); | |
| //Do registration work here... |
This file contains hidden or 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 apn = require('apn'); | |
| //var token = "ce1c081e03ad5c16aa400756f274e753ec0b52b0d32ab6e10de5962f2d0393c6"; | |
| var token = "01f48c1d1159f3a0b3bd7da1d2481f90a51e0b03804a1adc203010e0750f5226" ; | |
| var device = new apn.Device(token); | |
| var notification = new apn.Notification(); | |
| notification.expiry = Math.floor(Date.now() / 1000) + 3600; | |
| notification.badge = Number(1) || 0; | |
| notification.alert = "This is a Push Notification=)"; |
This file contains hidden or 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 gcm = require('node-gcm'); | |
| // Create a message | |
| // ... with default values | |
| var message = new gcm.Message(); | |
| // ... or some given values | |
| var message = new gcm.Message({ | |
| collapseKey: 'demo', | |
| delayWhileIdle: true, |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <meta name="description" content=""> | |
| <meta name="author" content=""> | |
| <link rel="shortcut icon" href="img/favicon.png"> |
This file contains hidden or 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
| /* Code Brief | |
| ------ | |
| Get the gig id | |
| $uids = select userId_bids from gig where gigid=XXX | |
| append the new uid | |
| $uids = $uids +"," newuid ; |
This file contains hidden or 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
| git branch -m master master-old # rename master on local | |
| git push origin :master # delete master on remote | |
| git push origin master-old # create master-old on remote | |
| git checkout -b master dev # create a new local master on top of dev | |
| git push origin master # create master on remote |
OlderNewer