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

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…

0

Graph Poker Hand Distributions

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…

0

Calculate Poker hand probabilities

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…

0

Display Playing cards in WPF

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…

0

Debugging Monkeys on a Raspberry Pi

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…

0

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

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…

0

Faster monkeys

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…

0

More Shakespearean Monkeys

  While I was in high school, I attended a lecture at Yale University in 1974 about monkeys at a typewriter by William R. Bennet, Jr, one of the inventors of the helium-neon laser. Quote: He was also frequently seen at various sites around the Yale campus collecting data for his popular course on “The…

0

Mapped Files give very fast access to huge amounts of data

Sometimes you write a program and it requires lots of extra storage. Perhaps it needs to deal with lots of information. If the requirements are large there are several alternatives to consider: 1. use main process memory (HeapAlloc, VirtualAlloc, or any API that eventually calls these, such as C++ new, C# new, etc). a. 32…

0

Visual Sorting Algorithms part II

In the days before the internet, email and cell phones: My ice hockey team was in the locker room talking about skating when the topic of a video showing me roller staking in Boston in 1980. https://www.youtube.com/watch?v=IxlV_lOLmrk see Visual Sorting Part I Below is the new version that uses a background thread to do the…

0