Posts filed as 'Code'

Free goodies for those who find them useful. Includes API and sample usage for each item.


  • Implementing ASP.NET Membership with a Custom Provider

    Perhaps one of the most ubiquitous means of user management in an ASP.NET application is the oft-maligned Membership library, but let's be honest; the default Membership tools are pretty terrible. If you use the default Membership, Roles, and Profile providers, you're going to have the awesome privilege of dealing with a database schema that revolves around serializing user information to BLOB fields.

    Continue reading…

  • C# Hashing Utility

    I've had a frequent need lately to create various hash-strings (implementing a Gravatar helper, for instance), and I thought some of you might find the utility class I created useful. It's self-contained (other than the obvious reliance on .NET assemblies) and includes an enumeration I created to make the hash-type more obvious to work with.

    Continue reading…

  • Using LINQ to Easily Serialize an Exception to XML

    I was working on my capstone project last semester, and ran into a need to log exception data to a portable format. I loves me some XML, so that was my obvious (and, let's be honest, only) choice. .NET includes a lot of built-in code in most data types to allow for seamless serialization, so I thought this would be a simple matter.

    Continue reading…

  • PHP Referrer Snippet

    This is a small chunk of code I use as part of my login script:

    Continue reading…

  • CSS Template 1

    This is the companion CSS template for the HTML template. Use both together as a starting point for your own website.

    Continue reading…

  • HTML Template 1

    I put together a simple HTML/XHTML template for anyone that wants it. If you're new to web design, this template should be a good way to get started. I also created a CSS template to go with this HTML template. You can find it here.

    Continue reading…

  • C# Sample: Timing Class

    This timing class can be used to test the execution time of your C# algorithms. We used it to compare the time it took various sort and search functions to complete execution.

    Continue reading…

  • C# Sample: RandomDataSet Class

    This is a class I had to code for a project to demonstrate a handful of sort and search algorithms. It is a self-contained class that can be used to build a List of integers. You could easily modify this class to manipulate pretty much any Collection.

    Continue reading…