I hereby claim:
- I am k2xl on github.
- I am k2xl (https://keybase.io/k2xl) on keybase.
- I have a public key ASBMOi1dbswQ7CItQm0ib--R4XU3bhtWTMSuAwEmVLMwZQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| var userChoice = prompt("Do you choose rock, paper or scissors?"); | |
| var computerChoice = Math.random(); | |
| if (computerChoice < 0.34) { | |
| computerChoice = "rock"; | |
| } else if(computerChoice <= 0.67) { | |
| computerChoice = "paper"; | |
| } else { | |
| computerChoice = "scissors"; | |
| } | |
| var compare=function(choice1,choice2){ |
| var radiusOfEachCircle:Number = 50; | |
| for (var n:int = 0; n < 10; n++) | |
| { | |
| var rad:Number = n>1?((radiusOfEachCircle)*Math.sin(Math.PI/n)):0; | |
| trace(n+" circles = "+rad); | |
| } | |
| OUTPUT: |
| controls = new THREE.FlyControls(@camera,@canvas); | |
| controls.movementSpeed = 1; | |
| controls.domElement = @canvas; | |
| controls.rollSpeed = 0.01; | |
| controls.autoForward = false; | |
| controls.dragToLook = true; |
| ←[1m←[30m←[46m gems←[1m←[36m Enter your selection:←[0m 1 | |
| run bundle exec rake db:drop from "." | |
| Couldn't drop myapp_development : #<PG::Error: could not connect to server: Connection refused (0x0000274D | |
| Is the server running on host "localhost" (::1) and accepting | |
| TCP/IP connections on port 5432? | |
| could not connect to server: Connection refused (0x0000274D/10061) | |
| Is the server running on host "localhost" (127.0.0.1) and accepting | |
| TCP/IP connections on port 5432? | |
| > |
| C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in `require': 193: %1 i | |
| s not a valid Win32 application. - C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql | |
| 2/1.9/mysql2.so (LoadError) | |
| from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2/mysql2.rb:2:in `<top ( | |
| required)>' | |
| from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2.rb:9:in `require' | |
| from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0.3.11-x86-mingw32/lib/mysql2.rb:9:in `<top (require | |
| d)>' | |
| from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `require' | |
| from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/runtime.rb:68:in `block (2 level |
| /** | |
| * @author Danny Miller [email protected] | |
| */ | |
| import java.util.Collection; | |
| import java.util.Iterator; | |
| import java.util.LinkedList; | |
| import java.util.List; | |
| import backtype.storm.task.OutputCollector; |
| 2011-12-21 20:25:58,797 [Thread-136] WARN backtype.storm.spout.KestrelSpout - Failed to read from Kestrel at localhost:22133 | |
| backtype.storm.spout.KestrelClient$ParseError: Kestrel Server Response: ERROR | |
| at backtype.storm.spout.KestrelClient.parseDequeueOutput(KestrelClient.java:160) |
| public void nextTuple() { | |
| ReceiveMessageRequest rmr = new ReceiveMessageRequest(myQueueUrl); | |
| rmr.setMaxNumberOfMessages(10); | |
| List<Message> messages = sqs.receiveMessage(rmr).getMessages(); | |
| for (final Message message : messages) { | |
| collector.emit(new Values(message.getBody()), message.getReceiptHandle()); | |
| } | |
| } | |
| public void ack(Object msgId) { | |
| sqs.deleteMessageAsync(new DeleteMessageRequest(myQueueUrl, "" + msgId)); |
| public void nextTuple() { | |
| ReceiveMessageRequest rmr = new ReceiveMessageRequest(myQueueUrl); | |
| rmr.setMaxNumberOfMessages(10); | |
| List<Message> messages = sqs.receiveMessage(rmr).getMessages(); | |
| for (final Message message : messages) { | |
| // probably not the best idea to delete messages synchronously... | |
| collector.emit(new Values(message.getBody())); | |
| sqs.deleteMessage(new DeleteMessageRequest(myQueueUrl, message.getReceiptHandle())); | |
| } | |