Review: Microsoft .NET Framework 4.5 Quickstart Cookbook (2013)

  • June 30, 2013
  • James Skemp
The following is a review of Microsoft .NET Framework 4.5 Quickstart Cookbook (2013), written by Jose Luis Latorre Millas, and published by Packt Publishing. The .NET Framework is just too big .NET 4.5 came out a short while ago, but the amount I've been able to do with it has been fairly limited. So when I was asked if I wanted a review copy of Microsoft .NET Framework 4.5 Quickstart Cookbook I went ahead and took the opportunity to do so, to see what I could look forward to.

Read More

Unofficial Xbox Live API wrappers

  • June 9, 2013
  • James Skemp
This morning I created two API wrappers for the Mashape implementations of XboxApi.com and XboxLeaders.com. These unofficial APIs allow you to pull information from Xbox Live for particular users. I've used a simiilar structure for both (based upon XboxLeaders.com's PHP wrapper, since I thought I was working against there API when I was in fact working against XboxApi.com's ...), and both are available on Github. XboxLeadersWrapper XboxApiWrapper In order to use these APIs you'll need to have an account on Mashape, subscribe, and generate keys.

Read More

Review: Instant .NET 4.5 Extension Methods How-to (2013)

  • May 3, 2013
  • James Skemp
The following is a review of Instant .NET 4.5 Extension Methods How-to (2013), written by Shawn R. McLean, and published by Packt Publishing. A quick introduction to .NET extension methods In the 5+ years that I've been doing .NET I've been created my own extension methods twice. I was already aware that LINQ was built on extension methods, but I very rarely found myself needing to extend something that I didn't already have the code for.

Read More

Excellent news - the BlogML project is not dead.

  • February 11, 2011
  • James Skemp
While it seemed to be near death, if not dead, at least as far as new releases, the BlogML project is not dead, and has been undergoing a number of needed changes since the end of January. My StackOverflow question "Is the BlogML project dead, and what are some alternatives?" was answered yesterday by the project originator (one of the great things about StackOverflow, and the entire network of sites).

Read More

Convert online image to base64 with C#

  • December 12, 2010
  • James Skemp
The following code will convert an online image to a base64 string. The code was specifically written for use in LINQPad, hence the use of Dump(). String url = "http://ecx.images-amazon.com/images/I/51MVXV3QQ6L._SL500_SS150_.jpg"; Uri uri = new Uri(url); WebClient client = new WebClient(); byte[] imageBytes = client.DownloadData(uri); string base64String = Convert.ToBase64String(imageBytes); base64String.Dump(); base64String.Length.Dump(); ("<img src='data:image/jpg;base64,” + “’ />").Length.Dump(); client.Dispose(); The length dumps are given to get an idea of what size would be added to a file if added inline.

Read More

ASP.NET charts example: Odin Sphere: Part 3 - Creating the chart

  • August 15, 2010
  • James Skemp
In part one of this series we covered what we'd be doing, and what data model we'd be using. In part two of this series we used LINQ to XML to query the XML file with the data we want to display. This time we'll be doing the heavy lifting of actually creating the chart and displaying it to the user. For ease, I'll be implementing very basic caching. Preliminary requirement Before you can use the charting functionality you need to have a reference to System.

Read More

ASP.NET charts example: Odin Sphere: Part 2 - Parsing the XML

  • August 14, 2010
  • James Skemp
In part one of this series we covered what we'd be doing, and what model we'd be using for the data. This time we'll parse the XML file that contains the data we need, and populate the objects. Loading the XML file The XML file we'll be loading is located at http://jamesrskemp.com/files/OdinSphere.xml, and to keep it simple, we'll load it in assuming we're on a different server/domain. First we'll need to add the following so we can make use of XDocument.

Read More

ASP.NET charts example: Odin Sphere: Part 1 - Introduction and model

  • August 13, 2010
  • James Skemp
For a while now I've been meaning to work with ASP.NET 4's built-in charting functionality. While I was going to use it alongside my gas tracking, I think I'm instead going to use my Odin Sphere leveling guide, so I don't have to create an XSLT for the output. In this part of the series I'll outline the data model I'll be using, and preliminary setups. Method So that this can easily be deployed anywhere, I'm going to opt not to use the control itself, but rather programmatically create the charts/graphs.

Read More

Tutorial: ASP.NET (C#) WCF WebHttp service with jQuery: Part 3 - Pulling JSON with jQuery

  • June 25, 2010
  • James Skemp
See the table of contents for more information. In this series we've started with a new loan class, that contains information about a loan, including the total amount due, how much is to be paid per payment, the interest rate, and etcetera. A method is available that will generate information about the number of payments required to pay off the loan. In the second part we created a WCF WebHttp service, or a WCF REST service, to use the class/assembly from that loan object and return XML data for GET requests.

Read More

Tutorial: ASP.NET (C#) WCF WebHttp service with jQuery: Part 2 - WCF WebHttp service

  • June 24, 2010
  • James Skemp
See the table of contents for more information. In the last part we created a Loan object, that we determined we would later use to power our Web service. Ths object has a handful of properties and a method to update a list of payments to bring the loan to $0. This time we're going to create a Web service to respond to requests from data. Requirements As this seems to be built for .

Read More