Rob's blog
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
Useful Linux Commands
Rob — November 28, 2010 - 22:37
This blog entry is going to be my collection of useful Linux commands that I wish to refer back to in the future. I hope you find them useful as well.
Finding files
Find all files in the home folder (and its subfolders) with a 'txt' extension, sort the results, then output to a file:
find /home -name '*.txt' | sort >> text-files.txtRenaming files
The following will rename the extension of all files in the current working directory from 'avi' to 'AVI':
rename 's/\.avi/.AVI/' *.aviJavaScript 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.
Configuring the GXT NAS 2 Port USB Dongle Print Server on Windows 7
Rob — November 26, 2010 - 23:59
I purchased a GXT 2-Ports NAS USB Dongle model number NAS-R104A from future shop about a week ago hoping to allow network printing to my USB printer with little configuration. But, much to my surprise, I could not get the printer to print.
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
Get Drupal 6 working with Windows Live Writer
Rob — November 5, 2010 - 14:37
This is my fist blog post using Windows Live Writer 2011 on Drupal. I must say, so far, it is quite slick. I am wondering if I can just paste an image from my clipboard right on the canvas?
Wow! I just pasted the screen shot below (from Snipping Tool) and it even scaled the image down for me! That is too cool! Anyway, I followed the instructions on this page to get it working.
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.
Custom Date Range Selection for Basecamp Time Reporting
Rob — October 15, 2010 - 16:50
I use Basecamp at work and I love it. We use the time reporting feature of Basecamp extensively, so I have to be sure I have added my time for the day. I find there are too many clicks needed to get the hours for yesterday or the day before. So I came up with this handy tool that allows you to choose and view today's logged in just one click. It also allows you to select a date range with only a few clicks. Maybe in the future I can add more features.
How to add an inline MP3 player on an HTML page
Rob — September 5, 2010 - 17:27
A while ago Martin Laine of 1PixelOut created a WordPress plugin that allows a cool MP3 player to be easily added to your blog post (if you are running WordPress). But what if you were not running WordPress and just wanted to add a player to a regular HTML file? Here is an example of what the 1PixelOut MP3 player looks and acts like (just click the play button).
Online graphics and image manipulation just like Photoshop
Rob — September 3, 2010 - 07:24
This is my first blog post on my newly themed website. The first thing I wanted to do after installing this theme was to create a logo to replace the original. Since I do not have Photoshop installed I was thinking there could be an online tool? I then recall that a friend of mine sent me a link to such a tool, but I had deleted the email and forgot the name of this little gem. However, I did remember the interface and that it was very similar to Photoshop. So I Googled "online photo editing" and the first hit was the site http://www.pixlr.com/editor/ .. found it! Pixlr Editor is a very slick Adobe Flash application - and has many features. I created the logo on this site using very little of these features one of which is the Text tool, let's explore...
