Skip to content

Instantly share code, notes, and snippets.

View deanpanayotov's full-sized avatar

Dean Panayotov deanpanayotov

  • Sofia, Bulgaria
View GitHub Profile
java -jar compiler.jar --js Snake.js --js_output_file Snake_compiled.js
var randomnumber=Math.floor(Math.random()*(MAX_NUMBER_THAT_CAN_BE_RETURNED - 1));
Basic example. The dialog is actually an activity with theme set to "@android:style/Theme.Dialog". Pressing the snooze button will trigger the dialog again after an amount of time.
A simple example. Receiver is declared as inner class of MainActivity. "receiver" block should be added within the "application" block.
A simple test using v7 appcomapt library. Tested on 2.3.3 emulator.
  • Download the Support Libraries
    1. goto Android SDK Manager
    2. goto Extras --> Android Support Library
    3. Install packages...
  • Attach to project
    1. goto File --> Import...
    2. goto Android --> Existing Android Code Into Workspace
  1. pick %ADT_BUNDLE_DIR%\sdk\extras\android\support\v7\appcompat
A simple self-contained stopwatch. Live sample here: http://codepen.io/d_panayotov/pen/xjgLB