Subscribe: Calvin Hsia's WebLog
http://blogs.msdn.com/calvin_hsia/rss.aspx
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
cards  file  hand  internet things  iot  poker hand  poker  raspberry  studio  visual studio  visual  windows internet  windows iot  windows 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Calvin Hsia's WebLog

Calvin Hsia's WebLog



thoughts from a professional developer



Last Build Date: Tue, 31 Oct 2017 19:55:12 +0000

 



The Central Limit theorem, Normal Distribution and Poker hand distributions

Tue, 31 Oct 2017 19:55:12 +0000

In Graph Poker Hand Distributions I showed some code to graph poker hands and the distributions of their values: e.g.  how many times a Pair, Full House, etc. were found in sets of one thousand random hands.It shows that the probability of a Pair is roughly 42% of deals. A royal flush was .000169%, pretty...



Create a Visual Studio Extension with minimal impact on VS startup performance

Tue, 19 Sep 2017 01:53:36 +0000

The good news: It’s very easy to create an extension in Visual Studio. The bad news: It’s also easy to make that extension have an adverse effect on the start time of Visual Studio. Let’s examine how we can mitigate the impact on Visual Studio performance. Make sure your VS Installation has installed Extensibility by...



Graph Poker Hand Distributions

Thu, 31 Aug 2017 00:38:56 +0000

Last time I showed how to Calculate Poker hand probabilities with code that showed how often a particular hand occurred, such as a Pair or a Full House. Now that we can calculate these probabilities, lets graph them. You’ll need to add references to some assemblies: System.Windows.Forms, System.Windows.Forms.DataVisualization, WindowsFormsIntegration First we’ll accumulate the results of...



Calculate Poker hand probabilities

Tue, 01 Aug 2017 01:44:42 +0000

In the last post I showed some code that displays playing cards using WPF. Now we’ll have some fun with the cards. Let’s calculate the probability of getting a particular poker hand. The program below shuffles the deck, then deals 5 cards by taking the first 5 cards into a “hand”. The hand is then...



Display Playing cards in WPF

Fri, 30 Jun 2017 00:49:38 +0000

I remember each version of Windows had new games. On Windows 3.1 many people played Solitaire. Windows for Workgroups 3.11 introduced Hearts. Somewhere along the way came FreeCell, MineSweeper and Spider Solitaire. This was years before more modern User interfaces, such as WPF existed. Windows no longer ships Cards.dll which has the images of the...



Debugging Monkeys on a Raspberry Pi

Wed, 31 May 2017 00:31:30 +0000

The last couple times I wrote about using a RaspBerry Pi and Windows IoT: https://blogs.msdn.microsoft.com/calvin_hsia/2017/03/16/getting-started-with-windows-internet-of-things-windows-iot/ https://blogs.msdn.microsoft.com/calvin_hsia/2017/04/29/create-a-security-system-with-cameras-on-your-windows-iot-raspberry-pi/ I was contemplating getting Monkeys working on an Arduino, but that would have required a lot more effort (I’d have to implement a lot of the base functionality, like collection classes, hash tables, I/O, etc.) and it would not...



Create a security system with cameras on your Windows IOT Raspberry Pi

Sat, 29 Apr 2017 02:14:14 +0000

Last time I wrote about getting started using a Raspberry Pi and Windows Internet Of Things. This time I played around with adding USB Web cameras to the Raspberry Pi. The code below will dynamically check for cameras as they get connected and disconnected from the device. It runs on Windows IoT, so works on...



Getting started with Windows Internet of Things (Windows IoT)

Thu, 16 Mar 2017 00:49:56 +0000

With just a few items you can get started building apps for Windows Internet of Things using VB, C# or C++ on a Raspberry Pi 3. The Pi is a small quad core 64 bit ARM processor clocked at 1.2 GHz. It has built in blue tooth, WiFi, Ethernet, HDMI, and 4 USB ports. Read...



Cannot open include file: ‘metahost.h’: No such file or directory

Mon, 13 Feb 2017 19:28:47 +0000

You might upgrade your Visual Studio Project to VS 2017 and you might get errors like: 1>c:\memspect\vsassert\pch.h(20): fatal error C1083: Cannot open include file: 'metahost.h': No such file or directory On  machine with an older version of Visual Studio, I found metahost.h at: c:\Program Files (x86)\Windows Kits\8.1\Include\um\metahost.h Looking at the file, I see that there...



Faster monkeys

Tue, 31 Jan 2017 03:01:42 +0000

Last time I showed how to simulate monkeys typing on typewriters, using letter frequencies based on input text, like Hamlet’s soliloquy. The results were remarkably similar to the input text, but the output was relatively slow. Below is a version that has the “Optimum” option that outputs much faster if the “-o” command line parameter...