-
index is the 0 based index value of the button pressed
-
label is the text label of the button pressed
function showConfirm() { var confirmDelegate = navigator.notification.confirm( 'You are the winner!', // message
'Game Over', // title
| reverted: | |
| --- b/aliases | |
| +++ a/aliases | |
| @@ -1,2 +1,3 @@ | |
| # See man 5 aliases for format | |
| postmaster: root | |
| +root: [email protected] | |
| reverted: | |
| --- b/apparmor.d/abstractions/tor | |
| +++ a/apparmor.d/abstractions/tor |
| /************************************************************************** | |
| * Name: EmbedPicasaGallery | |
| * Author: Tobias Oetiker <[email protected]> | |
| * Demo: http://tobi.oetiker.ch/photo/ | |
| * $Id: jquery.EmbedPicasaGallery.js 474 2011-06-16 09:02:45Z oetiker $ | |
| ************************************************************************** | |
| Description: | |
| [elided] |
| from nltk.probability import ELEProbDist, FreqDist | |
| from nltk import NaiveBayesClassifier | |
| from collections import defaultdict | |
| train_samples = { | |
| 'I hate you and you are a bad person': 'neg', | |
| 'I love you and you are a good person': 'pos', | |
| 'I fail at everything and I want to kill people' : 'neg', | |
| 'I win at everything and I want to love people' : 'pos', | |
| 'sad are things are heppening. fml' : 'neg', |
| from nltk.probability import DictionaryProbDist | |
| from nltk import NaiveBayesClassifier | |
| from nltk import FreqDist | |
| train_samples = { | |
| 'I hate you and you are a bad person': 'neg', | |
| 'I love you and you are a good person': 'pos', | |
| 'I fail at everything and I want to kill people' : 'neg', | |
| 'I win at everything and I want to love people' : 'pos', | |
| 'sad are things are heppening. fml' : 'neg', |
| # Author: Pieter Noordhuis | |
| # Description: Simple demo to showcase Redis PubSub with EventMachine | |
| # | |
| # Update 7 Oct 2010: | |
| # - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
| # the WebSocket protocol implementation in the cramp gem does not work | |
| # well with Chrome's (newer) WebSocket implementation. | |
| # | |
| # Requirements: | |
| # - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
| from tasks import task1 | |
| def get_results(queries): | |
| query_procs = task1.delay(queries).get() | |
| tasks = [] | |
| for query_proc in query_procs: | |
| tasks.extend(query_proc.subtasks) | |
| while tasks: | |
| current_task = tasks.pop(0) |
| from tasks import task1 | |
| def get_results(queries): | |
| query_procs = task1.delay(queries).get().join() | |
| results = [] | |
| for query_proc in query_procs: | |
| # while the following iterate() is happening, the other query_procs are ignored. | |
| # ideas on iterating over all of them at once? | |
| for result in query_proc.iterate(): | |
| yield result |
| USER = "your_twitter_user" | |
| PASS = "your_twitter_pass" | |
| if "your_twitter" in USER+PASS: | |
| print "You didn't set your twitter username and password in the script!" | |
| USER = raw_input("Username>") | |
| PASS = raw_input("Password>") | |
| import urllib2, json, base64, sys, os |