• Home
  • About
Blue Orange Green Pink Purple

Archive for the ‘Uncategorized’ Category

Dec 16

I'm sure all us C# guys, at some point or another, have looked 'over the fence' with envy at all those juicy Java libraries. In my case, recently I needed to export and import some Excel files, and found that there aren't really any good C# libraries for it.

Nov 17

This snippet of code shows how to use the generic System.Data.Common types to connect to any database, using a string to define which database provider you want to use. The magic happens with the 'Activator.CreateInstance' below, where C# has the ability to create a class from a string.

Oct 29

Hi again,
When setting up scheduled tasks to run on an windows server, i've found it useful to wrap my executable with a batch file,

Jun 10

Here are some DHTML tricks i've been using to make the user experience a bit more keyboard-friendly. These are all asp.net specific, but general in nature.

Mar 18

Had an issue recently trying to figure out what application was holding a connection open on a SQL server, and here's the lowdown on tracing it down. Firstly, go into a query window and do the following:

sp_who
select spid,hostname,hostprocess from master.dbo.sysprocesses

The 'sp_who' will list the open connections. Look through this list to find any where the ‘dbname’ column is the database you're interested in, and then look for the value in it’s SPID column. The 'sysprocesses' query will give you, for each SPID, the hostname and windows process id (‘hostprocess’) which you can then look up in the task manager on that particular computer.

Mar 10

I've recently been experimenting with C#'s delegates, and here is an example of
how they can be used for multithreading. I've used a ray tracer as a good example
of something that can be multithreaded easily.

Jan 14

I've discovered that the GZip compression built into C# (System.IO.Compression.GZipStream) doesn't really do that good a job at compressing data. I heard (cannot confirm) that MS had to tread lightly around some patents which results in pretty poor compression ratios. I needed to compress some data, and compress it well, as I had a whole bunch of data files from a reporting project totalling up to 5gigs. So the GZipStream wouldn't do.

Dec 22

I know, you'd think this would be simple, but i keep needing to refer to it:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

Dec 17

I likey…

http://rubyrags.com/products/2

Oct 17

Well, here's my first post. Mainly this is to test out Wordpress.

So - while you're here, check out my open source project:

http://rosters.rubyforge.org

Chris' Babble

  • About
    Hi, i'm Chris Hulbert, a software guy from Sydney Australia.
  • Categories
    • code
    • Portfolio
    • Uncategorized
  • Recent Articles
    • How to implement DES and Triple DES from scratch
    • How to use Cookies in Struts 2 with ServletRequest and ServletResponse
    • How to use sessions with Struts 2
    • Using Quartz Scheduler in a Java web app (servlet)
    • Javascript date picker that Doesn't Suck!(tm)
    • Using Oracle XE with Hibernate


  • Home
  • About

© Copyright Chris' Babble. All rights reserved.
Designed by FTL Wordpress Themes brought to you by Smashing Magazine

Back to Top