coding
Convert string to DateTime or output DateTime to string using .NET
Rob — December 1, 2010 - 20:14
I often times come across a situation where I have a string in a certain date time format and wish to convert that string into a .NET DateTime object for further manipulation. In one recent situation, a date was supplied in an XML node (without a specified data type) as a string, but the output of the date had to be in a specific format for my client.
Example: We need to convert <submit_date>2010-12-04 13:22:32</submit_date> and output it as December 4, 2010 at 1:22 PM
JavaScript Pagination with jQuery
Rob — November 27, 2010 - 16:06
I have seen many examples of JavaScript and jQuery pagination on the web, but none of them was what I wanted. I like to use small, compact code to perform simple actions such as paginating a list of items using JavaScript and jQuery. So I decided to write my own version. The JavaScript is about 100 lines of code (less if you removed the empty lines and comments) and works quite well for what I needed it for. So I would like to share my code with other coders and web developers.
Credit Card Numbers For Testing Your Applications
Rob — November 5, 2010 - 16:36
I have made a couple of apps that require credit cards numbers. To save time and hits to your merchant account, it is a good idea to validate the user credit card number BEFORE sending to your authorization service. Below is a list of some common credit card carriers and some test credit card numbers. These credit card numbers can be used to validate your credit card validation algorithm.
Credit Card Type - Credit Card Number
How to sort XSL output in order of custom string list or arbitrary strings
Rob — November 5, 2010 - 10:00
Have you ever wanted to sort the output of XSL using a custom string list or arbitrary text? Well, I came across such a situation with one of my clients where the order of nodes in an XML feed did not match the order that my client wanted. The answer is to use XPATH to test if the iterator is at the node you want (testing for a true or false), then use that boolean value and multiply by the intended position. Let's demonstrate this with an example.
The following is an example XML feed that we can use to demonstrate XSL arbitrary text sorting in action.
