- Run Android Devices and enable remote debugging
- ADB should be running in your machine (http://developer.android.com/tools/help/adb.html)
$you> adb start-server
$you> adb devices
List of devices attached
| var util = require('util'), | |
| EventEmitter = require('events').EventEmitter; | |
| var Server = function() { | |
| var self = this; | |
| this.on('custom_event', function() { | |
| self.logSomething('custom_event'); | |
| }); |
| var foo = function(a){ | |
| var promise = new Promise(); | |
| asyncAjaxFunction(a).done(function(){ | |
| promise.resolve(); | |
| }).fail(function(){ | |
| promise.reject(); | |
| }) | |
| }; | |
| foo.then(function(){ |
| class Animal { | |
| constructor(public name) { } | |
| move(meters) { | |
| alert(this.name + " moved " + meters + "m."); | |
| } | |
| } | |
| class Snake extends Animal { | |
| move() { | |
| alert("Slithering..."); |
| var spawn = require("child_process").spawn; | |
| var Q = require("q"); | |
| /** | |
| * Wrap executing a command in a promise | |
| * @param {string} command command to execute | |
| * @param {Array<string>} args Arguments to the command. | |
| * @param {string} cwd The working directory to run the command in. | |
| * @return {Promise} A promise for the completion of the command. | |
| */ |
| <div id="chart" data-dojo-type="me/web/widget/tweetpoll/detail/TweetPollChartDetail" | |
| tweetPollid="${tweetpoll.id}" | |
| question="${tweetpoll.questionBean.questionName}" | |
| completed="${tweetpoll.completed}" | |
| username="${tweetpoll.ownerUsername}"></div> |
| <plugin> | |
| <groupId>org.codehaus.mojo</groupId> | |
| <artifactId>wagon-maven-plugin</artifactId> | |
| <version>1.0-beta-1</version> | |
| <executions> | |
| <execution> | |
| <id>download-dojo</id> | |
| <phase>generate-resources</phase> | |
| <goals> | |
| <goal>download-single</goal> |
| // NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension | |
| { | |
| // Settings | |
| "passfail" : false, // Stop on first error. | |
| "maxerr" : 100, // Maximum error before stopping. | |
| // Predefined globals whom JSHint will ignore. | |
| "browser" : true, // Standard browser globals e.g. `window`, `document`. |
$you> adb start-server
$you> adb devices
List of devices attached
W3C Introduction to Web Components - explainer/overview of the technologies