When playing Minecraft on VMware Player's guest OS, the game and the host OS both try to grab the mouse. Hence when you move the mouse, the scene of the game moves wildly.
One trick to fix that is to disconnect the mouse from the host OS so that only the game will control the mouse.
Step 1: before starting the VM image, change its settings: Hareware -> USB Controller -> Check the checkbox of Show all USB input devices.
Step 2: Starts the VM image. After it is booted, find in the top right corner the icon that represents the mouse. Right click it and choose to Connect (Disconnect from host).
Step 3: Enjoy the game.
Step 4: When finish playing, shut down the guest OS and the host OS will gain back the control of the mouse.
Showing posts with label Fun. Show all posts
Showing posts with label Fun. Show all posts
Saturday, September 10, 2016
Monday, June 1, 2015
Speeding ticket issued with SSL/TLS handshake protocol (fiction)
Servaas is stopped by a cop because of speeding. In this virtual world, people communicate in secure ways. Here is the conversation between the cop (C) and Servaas (S):
C: Hello. You are stopped because of speeding. Before we start, I have assigned a random case number RNC for this case.
You can access your case in the speeding ticket system by Windows, iOS, Android. Which one are you going to use?
And, can I see your driver's license?
S: Hello. I am test driving this car so its plate number is like a random number to me. Oh, the plate number is RNS.
I am going to use Android to access my case in the system.
Here is my driver's license.
(Being bold) Can I see your badge?
C: (Checking the driver's license.)
Here is my badge.
S: (Checking the badge.)
C: Here is the description of your case with my signature and badge number.
S: (Checking the description and the signature.)
C: Now I am giving you the encrypted ticket number. It is encrypted by your driver's license number.
S: (Decrypt the ticket number with his own birthday date and time -- which should be private to himself in this virtual world.)
Both C & S: (Compile RNC, RNS and Ticket# into a key to login to the speeding ticket system to get connected and start chatting.)
C: Hello. You are stopped because of speeding. Before we start, I have assigned a random case number RNC for this case.
You can access your case in the speeding ticket system by Windows, iOS, Android. Which one are you going to use?
And, can I see your driver's license?
S: Hello. I am test driving this car so its plate number is like a random number to me. Oh, the plate number is RNS.
I am going to use Android to access my case in the system.
Here is my driver's license.
(Being bold) Can I see your badge?
C: (Checking the driver's license.)
Here is my badge.
S: (Checking the badge.)
C: Here is the description of your case with my signature and badge number.
S: (Checking the description and the signature.)
C: Now I am giving you the encrypted ticket number. It is encrypted by your driver's license number.
S: (Decrypt the ticket number with his own birthday date and time -- which should be private to himself in this virtual world.)
Both C & S: (Compile RNC, RNS and Ticket# into a key to login to the speeding ticket system to get connected and start chatting.)
Friday, August 17, 2012
Ruby programming: check lottory numbers
This script checks the lottery tickets against the Winning Numbers.
*** ABSOLUTELY NO WARRANTY AND NO LIABILITY. The program is for fun purpose only. Not for use in real lottery ticket checking. ***
### ABSOLUTELY NO WARRANTY AND NO LIABILITY. The program is for fun purpose only. Not for use in real lottery tickets checking. ###
To play with it, copy and paste the above code to a file and save it. (In Linux) change the file's permission to executable. Put the winning numbers and the bought numbers into a file, e.g.
And then run it (e.g. the script file is named lottery.rb and the numbers are in file lottery_numbers):
*** ABSOLUTELY NO WARRANTY AND NO LIABILITY. The program is for fun purpose only. Not for use in real lottery ticket checking. ***
#!/usr/bin/env ruby class WinningNumbers attr_reader :numbers def initialize() @numbers = nil end def set(numbersString) @numbers = numbersString.split(' ') print("Winning Numbers: " ) @numbers.each { |number| print(number, " ") } print("\n" ) end end class Group def initialize(numbersString) @numbers = numbersString.split(' ') end def check(winningNumbers) print("Group: ") @numbers.each { |number| print(number, " ") } print(" ==> ") @numbers.each do |number| winningNumbers.numbers.each do |winNumber| if winNumber == number print(number, " ") end end end # check bonus @numbers.each do |number| winningNumbers.numbers.each do |winNumber| bonusNum = "(" + number + ")" if winNumber == bonusNum print(bonusNum, " ") end end end print("\n") end end if __FILE__ == $0 winningNumbers = WinningNumbers.new if !ARGV[0] puts("Usage: #{$0} <lotto file with Winning Numbers in the 1st line>") exit end file = File.open(ARGV[0]) file.each do |line| case line when /Winning Numbers[:\s]\s*(.+)/ winningNumbers.set($1) when /\S+/ group = Group.new(line) group.check(winningNumbers) end end end
### ABSOLUTELY NO WARRANTY AND NO LIABILITY. The program is for fun purpose only. Not for use in real lottery tickets checking. ###
To play with it, copy and paste the above code to a file and save it. (In Linux) change the file's permission to executable. Put the winning numbers and the bought numbers into a file, e.g.
Winning Numbers: 01 02 03 04 05 06 07 (08) 03 04 11 12 13 14 15 01 03 08 09 10 11 12 11 12 13 14 15 16 17
And then run it (e.g. the script file is named lottery.rb and the numbers are in file lottery_numbers):
$ ./lottery.rb lottery_numbersThe result of the above example is:
Winning Numbers: 01 02 03 04 05 06 07 (08) Group: 03 04 11 12 13 14 15 ==> 03 04 Group: 01 03 08 09 10 11 12 ==> 01 03 (08) Group: 11 12 13 14 15 16 17 ==>
### ABSOLUTELY NO WARRANTY AND NO LIABILITY. The program is for fun purpose only. Not for use in real lottery tickets checking. ###
Saturday, October 22, 2011
Google Chrome extension: Bulk Player Mate
Bulk Player for YouTube is an online tools that let you play a list of YouTube videos continuously. After one video is done playing, the next one will be played automatically without your intervention. It is useful when you want to play a bunch of YouTube musics or watch a program in series from a distance -- e.g. you have a big display, or your computer is connected to a TV.
Bulk Player for YouTube requires you to input the URL's of the videos in order to play them. You drag and drop the links into the input box. Sometimes you can find people post links of their videos on the web, and you can just copy and paste those links into the input box of Bulk Player for YouTube to play them.
If you are using Google Chrome, you can install this convenient extension Bulk Player Mate to help you select and post YouTube videos to Bulk Player. Here is an example of how to use it.
Step 1: Install Bulk Player Mate.
From the official Google Chrome extensions site: https://chrome.google.com/webstore/detail/lcfkapkpnbcnpapegepoknbechdbgbmp
After it is installed, you can see its icon in the toolbar.
Step 2: Search videos on YouTube.
For example, if you want to watch some Shania Twain videos, input your search string "shania twain by kenlizotte" into the search box of youtube.com. You may notice the "by kenlizotte" at the end. That helps to narrow down the result to those by that submitter only.
Step 3: Click on the Bulk Player Mate icon and the selection dialog pops up.
Click on the checkbox of each video you want to play. Click on the OK button to play them. Your Google Chrome will open a new tab to load the online Bulk Player for YouTube web page and play these videos there.
There are some helpful buttons on the selection dialog. The move-up and move-down buttons are used to change the orders of the selected videos. For example, if you want to watch the last four videos first, click the checkboxes of them, then click on the move-up button until they go all the way up.
The Select All and Clear All buttons allow you to select all the videos or deselect all of them.
On the upper side of the dialog, there is a "Select video links" drop down list. All videos found on the web page are divided into 3 groups: videos with text link, videos with image link and embedded videos. You can use this drop down list to view only one group. If you choose "all of the above", all the videos are shown, while duplicate videos from different groups are merged.
Step 4: Watch the video on Bulk Player for YouTube
To watch them in full screen mode, click on the YouTube video's full screen button. You only need to do it once. All the rest of the videos will continue to play in the full screen mode.
Bulk Player for YouTube requires you to input the URL's of the videos in order to play them. You drag and drop the links into the input box. Sometimes you can find people post links of their videos on the web, and you can just copy and paste those links into the input box of Bulk Player for YouTube to play them.
If you are using Google Chrome, you can install this convenient extension Bulk Player Mate to help you select and post YouTube videos to Bulk Player. Here is an example of how to use it.
Step 1: Install Bulk Player Mate.
From the official Google Chrome extensions site: https://chrome.google.com/webstore/detail/lcfkapkpnbcnpapegepoknbechdbgbmp
After it is installed, you can see its icon in the toolbar.
Step 2: Search videos on YouTube.
For example, if you want to watch some Shania Twain videos, input your search string "shania twain by kenlizotte" into the search box of youtube.com. You may notice the "by kenlizotte" at the end. That helps to narrow down the result to those by that submitter only.
Step 3: Click on the Bulk Player Mate icon and the selection dialog pops up.
Click on the checkbox of each video you want to play. Click on the OK button to play them. Your Google Chrome will open a new tab to load the online Bulk Player for YouTube web page and play these videos there.
There are some helpful buttons on the selection dialog. The move-up and move-down buttons are used to change the orders of the selected videos. For example, if you want to watch the last four videos first, click the checkboxes of them, then click on the move-up button until they go all the way up.
The Select All and Clear All buttons allow you to select all the videos or deselect all of them.
On the upper side of the dialog, there is a "Select video links" drop down list. All videos found on the web page are divided into 3 groups: videos with text link, videos with image link and embedded videos. You can use this drop down list to view only one group. If you choose "all of the above", all the videos are shown, while duplicate videos from different groups are merged.
Step 4: Watch the video on Bulk Player for YouTube
To watch them in full screen mode, click on the YouTube video's full screen button. You only need to do it once. All the rest of the videos will continue to play in the full screen mode.
Tuesday, November 30, 2010
How confident is Google about its language detection?
Google provides a very handy online tool for language detection -- http://www.google.com/uds/samples/language/detect.html. After you input something and hit the Detect Language button, the result is shown below telling you what language Google thinks it is, together with whether Google thinks the result is reliable or not, and how confident it is.
The confidence level is between 0-1, so a value of 0.08 means Google has a confidence level of 8%.
I played with it and found some interesting results. First, I tried the word bell. Google thought it was English with a confidence level of 4.75%. Then Jingle bells. Surprisingly, two English words got a lower confidence level 1.36%. Well, that may be because jingle was an English word with a confidence level of 0.27%, and bells (with an s, it went lower to) 1.62%. But Jingle bells got a confidence of bells minus (yes, minus, not plus) Jingle.
Let us continue --
The confidence level is between 0-1, so a value of 0.08 means Google has a confidence level of 8%.
I played with it and found some interesting results. First, I tried the word bell. Google thought it was English with a confidence level of 4.75%. Then Jingle bells. Surprisingly, two English words got a lower confidence level 1.36%. Well, that may be because jingle was an English word with a confidence level of 0.27%, and bells (with an s, it went lower to) 1.62%. But Jingle bells got a confidence of bells minus (yes, minus, not plus) Jingle.
Let us continue --
- Jingle bells, jingle bells, (1.36%. Repetition does not increase the confidence.)
- Jingle all the way; (32.91%)
- Oh! what fun it is to ride (59.7%)
- In a one-horse open sleigh. (34.12%. The confidence drops.)
- the whole thing (Jingle bells, jingle bells, Jingle all the way; Oh! what fun it is to ride In a one-horse open sleigh.) is 81.57%.
- plural form (or other forms) lowers the confidence;
- more words may lower the confidence;
- repetition does not increase the confidence;
- your input history does not help Google to build up the confidence;
- overconfidence is bad. Google is not 100% confident with any words, so Google is conservative.
Monday, August 2, 2010
Online tool: Bulk Player for YouTube
Many long videos are split into small pieces and uploaded to YouTube. After you watch one part of them, you need to click on the next one to continue. But I just want to seat back and enjoy the whole video without clicking on each part separately.
Bulk Player is a little online tool to let you input a bunch of URLs of the videos. When you click the Play All button, all the listed videos will be played one by one continuously. You can seat back and enjoy the whole batch without getting up.
To use the Bulk Player, you can
1. Search the videos you want. Right-click on the link of the video and select Copy Link Location from the popup menu.
2. Past the link to the input box of Bulk Player.
Alternatively, if you have opened Bulk Player in a new window, you can drag and drop the link of the wanted video into the input box.
3. Repeat step 1 and 2 until you have pasted all the wanted videos into the input box. Remember, each link of the video should be in a separate line.
4. Click the Play All button and the videos will be play one by one without a stop.
There are several other buttons to give you some control of the playback:
Previous: Play the previous video.
Next: Skip to the next video.
Small: Set the screen to small size.
Medium: Set the screen to medium size.
Big: Set the screen to big size.
At the end of each YouTube video, you can see a Replay button. Just ignore it, Bulk Player will continue your next video after 1 ~ 2 seconds.
Go to http://www.toptip.ca/p/youtube-bulk-player.html and enjoy!
You can also install the Firefox extension Bulk Player Mate to search, select and input the videos to play.
Bulk Player is a little online tool to let you input a bunch of URLs of the videos. When you click the Play All button, all the listed videos will be played one by one continuously. You can seat back and enjoy the whole batch without getting up.
To use the Bulk Player, you can
1. Search the videos you want. Right-click on the link of the video and select Copy Link Location from the popup menu.
2. Past the link to the input box of Bulk Player.
Alternatively, if you have opened Bulk Player in a new window, you can drag and drop the link of the wanted video into the input box.
3. Repeat step 1 and 2 until you have pasted all the wanted videos into the input box. Remember, each link of the video should be in a separate line.
4. Click the Play All button and the videos will be play one by one without a stop.
There are several other buttons to give you some control of the playback:
Previous: Play the previous video.
Next: Skip to the next video.
Small: Set the screen to small size.
Medium: Set the screen to medium size.
Big: Set the screen to big size.
At the end of each YouTube video, you can see a Replay button. Just ignore it, Bulk Player will continue your next video after 1 ~ 2 seconds.
Go to http://www.toptip.ca/p/youtube-bulk-player.html and enjoy!
You can also install the Firefox extension Bulk Player Mate to search, select and input the videos to play.
Saturday, September 26, 2009
Subscribe to:
Posts (Atom)