Archive

Author Archive

set datatable id carefully when using readxml

January 18th, 2010

As many of you know there are easy ways to read the contents of an xml file using the .net framework.

The choice I prefer for flat files is the ReadXML() method and for the longest time I could only get this to work with a dataSet and not the datatable. Frustrated by this I worked until I figured out my issue. Hopefully this helps someone else who has this issue.

When you call ReadXml() on a dataset you need no schema, or anything for that matter. You can do this for example:
dim ds as new dataset
ds.readxml(filename)
and your xml data is available in your tables collection in the table at index 0. Column names are inferred from node entries in the original document. It’s quick and dirty but it works and you don’t have to spend too much time on the logic. I expected similar results with the datatable but I did not get that.

Datatables MUST have a schema for the readxml() call to succeed. They also must have one more thing and that is an appropriately set name. The name must match the parent xml node of your actual file. Since we are reading directly to a datatable here we can assume your xml file is pretty simple otherwise you would be using the dataset.

Lets say your xml file has a root node, a node inside of that called “SqlParameters”, and inside of “SqlParameters” is a bunch of other nodes.   You will want to make sure that your datatable’s name/id property is “SqlParameters” (or whatever yours is called).  The datatable name is important because it provides a hook that the schema uses to map with the values from your xml file. In short, if you don’t set the name then the readxml call has no clue where to put the data so it errors out.

Another step required is to read in the xml file’s schema. You have to read in the schema before you call readxml on your datatable. I have found the easiest way to get a schema file is to open your xml file in visual studio and then click on the xml menu overhead and choose “create schema” and then save the outputted file. The drawback to this is that every time you make a edit to the xml file you will want to update the schema too. But, its easier than doing it by hand. Xml is tricky!

so, back to our example above with the “SqlParameters” xml file. Let’s say it’s called sqlparameters.xml and the schema is sqlparameters.xsl.

dim dt as new datatable(”SqlParameters”) ‘create table with name

dt.readxmlschema(”sqlparameters.xsl”) ‘read schema first

dt.readxml(”sqlparameters.xml”) ‘now read xml file

I will come back and update the code examples when I figure out why my [code] tag is not working.

Uncategorized

Maturity and Modding

August 24th, 2009

My time working on the celi has been an extremely helpful learning experience in many ways, and it continues to evolve as I get older. It’s surprising to think back to what was important for me to modify in my early days. Sidemarker lights, headlamp bulbs, all exterior stuff pretty much. Not many good performance parts were available besides the common intake, header, exhaust combos.

I used to enjoy wild and agressive looking cars, even went as far as to buy the first Veilside kit for the celica (it was a replica, BIG mistake!!). I put on a set of flashy tuner rims, an exhaust, an intake, and called it a day.

Then, one day the fitment problems on that kit started to bother me. Whichever day this was is definitely the beginning of me turning into a perfectionist about my mods. All of the sudden things were not just about “get it in there and working” it was about “get it installed PERFECTLY”.

Fast forward a couple of years and I was still being very picky about the fitment and finish of things on the car. I sold the veilside kit and bought a JP Co. Vizage kit. It was a lip kit, attached to the factory bumpers and therefore was almost guaranteed to fit 1000% better than the current setup. Things were better. Still was making small shortcuts here and there on the car but most importantly I was doing extra amounts of research before attempting anything.

Sometime in 2008 I decided that I was unhappy again with the car. I decided that, and this is important, “nothing should be messed with unless it has definitive benefits” and “I should not mess with anything unless I am taking the time to do it properly, even if that means waiting for more expensive parts”. I sourced a TRD kit and installed it. It fit SO nicely. What else should I expect from a factory part though?

So, keeping with that spirit, my two newest additions for my celica parts are a full factory interior from a 2004 celi and a set of OEM GT-S wheels. I keep damaging and flat-spotting my cheap rims so I am going back to what worked before. I keep repainting my interior so I am swapping it out and shouldn’t ever have to touch that crap again.

While the interior is halfway disassembled any extra wiring from my modding over the years is being taken out. Also, now that I know a bit more about running stereo wiring I am doing some cable rerouting to avoid cable crosstalk. I am also pulling any wiring associated with “neons” or interior lighting that was not factory.

I hope to have the car back to a more stock’ish look and feel quite soon. Once I get there then I will begin installing my new DD Manifold and making some power out of this PFC tune.

Maybe some others have had a change of taste and attitude towards modding as the years have passed with your celica. I feel that if I had prior experience modding a car I might know what to do and not to do. I would probably have taken a different path. If you had it all to do over again would you do your mods differently? Or would you never even begin modding? Would you even buy the celica?

Uncategorized , , , , ,

new celica parts: OEM gt-s wheels and 2004 interior

August 24th, 2009

This weekend I drove down to S. Atlanta to pick parts from a junkyard celica. I grabbed a full interior and stopped in for a set of factory wheels on my way home somewhere in N. Atlanta.

I have started to slowly change over the interior parts. The dash will take a while to complete, I anticipate. I will post pics after I have swapped it all over.

The tires will not be going onto the car for a while, I must save for a new set of tires for them. Also, one of them is curbed badly so I would like to grab one replacement.

So, you might be wondering why I bought this stuff that I have already “messed with” on my car. A long time ago I painted my purple/grey factory interior with some black paint and it looked good for quite some time but eventually as paint chipped away and collected dirt/dust on the clear coat it looked bad. The only way to darken my interior was to pick up the darker shade of interior that was introduced in the 2003 Celica model year.
Plus, if I ever sell the car, I can’t sell it with a paint chipping interior. It would give the immediate impression to the future buyer that a lot of shortcuts were taken when modding the car and would probably make them walk away. So, no matter how I look at it I see a win/win.

Ok, so why the FACTORY rims? Don’t you have 17″s?
.. Yeah I do, but what I have learned over the years is no matter how “cool” a set of rims looks unless they are FORGED wheels then they will not be strong enough to handle daily road conditions. Also, most times aftermarket wheels are heavier.
I really do want myself a set of some WORK, PIAA, 5Zigen, etc wheels one day since they are FORGED and lightweight, but they are $2000 a set roughly. I can’t afford that anytime soon.

Uncategorized , , ,

Firefox 3.5 crashes frequently

July 12th, 2009

These have been submitted to the bug report already but damn it’s quite annoying that my browser keeps crashing every five minutes when I randomly open a new tab or close the last tab in the collection.

At least the recover launch will restore all my tabs, but it really sucks when you open a new tab to research for a topic and that causes you to lose your writing that is on another tab.

But the memory footprint, Javascript engine, and HTML5 support are all quite awesome.

Thanks Mozilla but please address these two items sooner than later.

Tech, Web Design ,

Joel On Software….a quick review

July 12th, 2009

I just finished reading the book Joel On Software written by Joel Spolsky. This book is arranged in a very easy to follow format of brief essays/blog entries organized into a collection.

This book spans many topics such as how to pick the best developers, how to conduct developer interviews, how to compose software specifications, daily builds, Unicode and Character sets, Usability Testing, picking your QA dept, picking the proper development language, getting crash reports, and a breakdown of the .net strategy.

Not all of these topics will apply to everyone, but they are all quite entertaining. The sections called “Three topics Computer Science got Wrong” was one of my favorite sections because I can totally relate to the fact that working with remote files should NOT be a “local experience”.

All in all I would recommend this book to any software developer, especially beginners. This isn’t one of those “hold your hand and show you each step” kind of sources, it is more of a “here’s a lot of the follies that befall a development shop and some ways to prevent it from happening to you” sources.

Its actually quite harder to write about this than I thought. It’s hard to review a programming book. Just take my word that each rant of Joel’s in the book there are many golden nuggets of knowledge. I can bet many, if not all of them, could help you out.

Books

Runtime Styling a Status Strip Control

July 12th, 2009

Just a quick tip for anyone that fights to try and style the status strip control at runtime in one of their projects.

If you want to use runtime stylings you must keep the “rendermode” property of the status strip set to “System”. If you use the “Professional” choice instead of “System” you will get a skin style that matches your OS (So if XP then your status strip will render in XP style, if Vista or Win7 then you get their style).

However, no matter how correctly your code is written to modify the status strip it wont actually ever work unless you keep that rendermode property set to “System”

Code stuff, microsoft , ,

Microsoft values misdirection..response to IE8 chart

June 19th, 2009

I am pretty upset that microsoft would boldly state all of the following as ringing in true for IE8 when in all reality not a single one of their points holds water.

IE8 == secure? No.
More customizable? No. Show me where ie8 has add-ons to do even 5% of what the firefox extensions can do.

Here’s the whole chart. Anyone who knows why they should use alternate browsers should also be offended by this.

the following bullet points are only .0000001% true

What makes me most upset about this is that the millions of users that do not know any better will assume the data on this chart to be truth just because it’s posted on MS’s site.

I’ll keep firefox thanks.  But Bing is nice, good work guys!  But this…..THIS is not productive use of your resources.

Tech, Web Design, microsoft , ,

Developer’s Edition Wii Package

June 5th, 2009

This wii is pretty damn sweet right here.  It comes with a “preloader-like” application that allows you to set your video type and region on bootup. It also allows you to install any system menu strictly to ram and test the game this way.

It’s not so helpful for the homebrew guys because it would be twice as hard to get it set up to run the normal homebrew packages, but I find it funny that in an odd way it does some of what the homebrew guys have written apps to do.

I know it comes preinstalled with two special channels on its “special menu”, the disc check channel, and the system menu installer/uninstaller channel.  Since no system menu packages are actually installed to the NAND the whole menu interface must run from the paging file. There is probably a protected and encrypted partition of the nand that allows a menu to be installed. And, from that I am guessing that if it detects files there it stops loading from the paging cache.  These are all just my conclusions based on the evidence i’ve found on this thing.

Still don’t know how much it costs, where/how to order it, or how long it has been out.

I suppose it’s entirely possible that some of our Wii Hacking Forefathers reverse engineered some of this system if it existed way back at system launch date.  If I remember right, it wasn’t around, and because no “Developer’s package” existed the D2Pro and WiiKey were born.
Here’s some pics:

Tech, Wii , , ,

Black Wii consoles launch in Japan

June 5th, 2009

Hopefully this will be coming soon to America, but this week in Japan the black wii console was launched.

From everything I can gather nothing is different except for the color.

There is also a new series of black controllers, nunchucks, classic controllers, etc that will be coming out soon (source says 08/01/09)

black wii console from Japan

black wii console from Japan

Also, if you didn’t already know about it there is a special “Developer’s Edition” Wii that’s pretty cool looking too. Although, in my opinion not as awesome as the black one.

Tech, Wii , , , , ,

Project Natal could make the Wii look elementary

June 4th, 2009