The benefits of using a file for Log Parser SQL queries

  • September 26, 2010
  • James Skemp
One of the things I always forget about when I'm using Microsoft Log Parser is that you can define your SQL query in a file and run it, instead of putting it in the command line. For example, the following will run whatever SQL is defined in strivinglife.robots.sql. logparser -i:w3c -o:xml file:strivinglife.robots.sql Where this comes in handy is for something like the Log Parser query I defined today, that parses IIS logs for requests to the robots.

Read More

Importing a custom namespace / custom type into an XSD

  • September 5, 2010
  • James Skemp
I have a custom type that I use in a couple of my documents. Unfortunately, in the past I was adding this to each xsd, as I needed it. However, I've now figured out how to import it into xsd files as needed. Original schema Currently I'm adding the following at the top of each xsd: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:simpleType name="customDateType"> <xs:restriction base="xs:string"> <xs:annotation> <xs:documentation><![CDATA[Allows for a year, a year and a month, or a year, month, and day, to be defined.

Read More

Onimusha: Dawn of Dreams data

  • September 3, 2010
  • James Skemp
From the archives, I've created an XML Schema and XML data file for Onimusha: Dawn of Dreams, for the Playstation 2. Currently the data only includes armor leveling information, from level 1 to 100. The data comes from an OpenDocument Spreadsheet (OnimushaDawnofDreams.ods) from way back in May of 2006. My characters and core weapons being completely maxed (not to mention souls), I may decide to replay the game to track this information as well, or just upgrade weapons.

Read More

Windows 7 Home Premium changes for IIS 7.5 access of Users directories

  • August 28, 2010
  • James Skemp
Not feeling much like debugging it too much, I made a couple of modifications to my IIS installation to allow access to files contained within my user directory. Background I turned the Internet Information Services feature on on my Windows 7 Home Premium machine before using the Web Platform Installer to add additional functionality. However, I kept running into a permissions issue, as the sites I setup were located in my Users directory (C:\Users\James).

Read More

Visual Studio 2010 complaints about ELMAH on a 64-bit machine - fixed

  • August 23, 2010
  • James Skemp
My laptop has quickly become my development machine for smaller projects, especially after I purchased a low-end desktop to host the Subversion repositories. I recently added ELMAH support to one of my sites, but since I run 64-bit, and have been using the built-in Cassini for quick development, I started getting a message in Visual Studio 2010 saying "ASP.NET runtime error: Could not load file or assembly 'System.Data.SQLite' or one of its dependencies.

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

Odin Sphere: Character data file

  • July 30, 2010
  • James Skemp
Similar to my Resonance of Fate data file and Muramasa demon blade listing, I've begun work on converting a notepad file's data to XML. The data is still raw, but ... I plan on completing it as much as I can. View/download the Odin Sphere data file. As noted in the file, data is licensed under the Creative Commons License Attribution-Noncommercial-Share Alike 3.0.

Read More

Function to Parse a Microsoft JSON DateTime returned from a WCF service in JavaScript

  • July 4, 2010
  • James Skemp
When a DateTime is converted to JSON in a WCF Web service (WebHttp in this particular case) it's semi-difficult to convert that to something we can use when we return the date to a client via JavaScript. For example: "LastPlayed":"\/Date(1278187099000-0400)\/" After almost an hour of research and goofing around with this, I've come up with the following, which seems to work just fine on Internet Explorer 8, Firefox 3.6, and Chrome 5.

Read More