Archive for the ‘Code’ Category

Working with the Canvas element

One of the biggest problems I’ve been having with taking the KnitProject to the next level is drawing with JavaScript. This is where the Canvas element comes in. If you’re an IE user you can leave right now, Unless you download some plugin, none of this will work. Frankly I don’t care about IE and [...]

  • Share/Bookmark
Read the rest of this entry »

Refactoring DBObject, Part 4

The keyPath I talked about last time is just to useful to wait on. So I added it. This lets you easly get values from DBObjects within other DBObjects. So on the death date example from last time. return (DateTime)((DBObject)valueForKey(“user_info”)).valueForKey(“column_death_date”); is replaced with return (DateTime)valueForKeyPath(“user_info.column_death_date”);

  • Share/Bookmark
Read the rest of this entry »

HashTable vs Dictionary<>

I’ve been using a Hashtable in my DBObject because, well, I’ve never seen any problems with it. But some people on the internet seem to hate the HashTable (something I’ve never understood.) So I decided to run my own test. I ran two tests, one with a HashTable that uses a string as the Key [...]

  • Share/Bookmark
Read the rest of this entry »

Objective-C makes C# look funny.

I’ve been learning Objective-C (and Cocoa) in my spare time and I’ve recently been playing around with CoreData. It does a lot of the work for you and helps you build full featured applications quickly. And I was wondering where this kind of technology is when I do windows programming. Granted I’ve been focused on [...]

  • Share/Bookmark
Read the rest of this entry »

Get Column name from MySqlDataReader

Recently someone found my blog by searching google asking how to get the column name from a MySqlDataReader. I doubt they found the answer on my blog, so I figured I’d write about, just in case anyone else needs to know.

  • Share/Bookmark
Read the rest of this entry »

SubSonic and ORM

Looking into other ORMs and Linq I came across subsonic. I watched the video and build a quick little sample application with it. I had a slight problem at first because it kept giving me an error with my MySql.Data reference. I upgraded my DLL and played around with it some more, still no luck. [...]

  • Share/Bookmark
Read the rest of this entry »

ASP.Net and MVC

I’m not sure how long this has been around, but ASP.Net now supports MVC with a framework. It’s about time! Not having MVC as always been a big disadvantage in my option (That and no real ORM until Linq). So I’m going to spend some time hopefully in the next few weeks playing around with [...]

  • Share/Bookmark
Read the rest of this entry »

jQuery Plugin, $.repeat()

While working on the Knit Project,  I discovered that I needed a way to repeat a string and then insert it into a jQuery/DOM object. So I created this little bit of code to do just that. //Repeater Plugin jQuery.fn.repeat = function(times, string) { //For each item matched this.each(function(){ var buff = string; for(var i=1; [...]

  • Share/Bookmark
Read the rest of this entry »

Knit Project Update

My girlfriend has suggested a very important update to the Knit Project program. She needs to be able to draw lines, It just takes to long to click each cell individually. It would also be nice if she could draw circles or squares as well. Another update is to allow adding/removing rows/columns of the current [...]

  • Share/Bookmark
Read the rest of this entry »

The C language, do people still use it?

Because of my ventures into the waters of Objective-C I’ve started to take another look at C. Why you ask? This is because Objective-C is just a thin layer on top of C, which means that anything that is written in C is also written for Objective-C. So do people still use C? I haven’t [...]

  • Share/Bookmark
Read the rest of this entry »