Creating a QR Code Reader App for Windows Phone 7

If you’ve updated Windows Phone 7.5, you might have noticed that it has some nice built-in functionality for reading QR Codes using Bing Vision search.  After trying it out for a while, I pretty quickly started wondering how I could use this in an app, and equally quickly I was disappointed to find that there…

PowerShell Diversion #5: Discussion

[Follow-up discussion for PowerShell Diversion #5 ] Here is an implementation of FizzBuzz that solves the original request to display the ‘numbers’ between 1 and 100: foreach(\$i in (1..100)) {     \$out = ""         if(\$i % 3 -eq 0)     {         \$out += "Fizz"     }         if(\$i % 5 -eq…

PowerShell Diversion #5: Let’s Play FizzBuzz

Here’s a quick diversion to exercise your basic scripting skills: FizzBuzz is a game often played by schoolchildren as a way to practice their metal arithmetic abilities (or as a game for drunken adults, if you listen to Wikipedia).  The rules we will use are: Count from 1 to 100, displaying the numbers as you…

WMI Date Formats … PowerShell to the Rescue

If you use WMI in your PowerShell scripts you’ll probably have noticed that dates are shown in a rather odd format.  For example: Get-WmiObject –Class Win32_BIOS |      Format-Table Description, ReleaseDate -AutoSize Description          ReleaseDate              ———–          ———–              Phoenix ROM BIOS A14 20090511000000.000000+000 While you can read the dates (they are in “year-month-day-hour-minute-second” format), they are difficult…

PowerShell Diversion #4: Discussion

[Follow-up discussion for PowerShell Diversion #4 ] OK, first the stats: There are 86 solutions if you allow for leading zeros in EFGH and consider ‘AB x CD’ to be distinct from ‘CD x AB’ There are 52 solutions if you rule out any with leading zeros in EFGH.  Leading zeros in AB or CD…

PowerShell Diversion #4: Can You Count on PowerShell?

Here’s a problem that is more abstract and a bit trickier than the previous ‘diversions’.  It doesn’t require anything very sophisticated or obscure in terms of PowerShell, but might take a bit of extra thought on how to construct your solution. Recently I say the following tweet from @standupmaths: Multiple two two-digit numbers to get…

PowerShell Diversion #3: Discussion

[Follow-up discussion for PowerShell Diversion #3] So, it looks like 35 people attended the different sessions for PowerShell Week.  The following one-liner can generate a list of their names and email addresses from the individual attendee lists (linked in the original post): 1..5 |     ForEach-Object { Import-Csv (“Session\$_.csv”) } |         Select-Object Name, Email…

PowerShell Diversion #3: PowerShell Week

Last week was “PowerShell Week” in our office*.  In an effort to introduce my colleagues to the wonders of PowerShell, I arranged a series of “PowerLunches”, each one lasting an hour and covering a different aspect of PowerShell scripting.   Enrolment was open to anyone in the office, and people were free to attend as many…

PowerShell Diversion #2: Discussion

[Follow-up discussion for PowerShell Diversion #2] There are a number of things we need to look at to make a table with a  built-in chart (as mentioned in the hint file from the original post).  The first is working out how to read events from the event log: This code will do that for us:…

PowerShell Diversion #2: Charts, Tables and Events

In an old post I discussed using the Microsoft Chart Controls to generate some professional looking charts from PowerShell.  These are great if you want to use the charts in a formal report or presentation, but what if all you want is a basic bar chart to help you quickly compare some values in a…