Archive

Archive for September, 2006

FileHelpers

September 13th, 2006 No comments

Now I’ve not tried ths yet but I’m very interested.  A colleague here has just had to write a CSV parser and this would have saved some time.

www.filehelpers.com

Thanks to secretgeek for the heads-up.

Categories: Uncategorized Tags:

Sharepoint "Hit Counter"

September 12th, 2006 No comments

I’ve been asked to look at doing a web part for this.  Now whilst I think that the old web odometer hit counters are a really bad Idea, that’s what’s required.  However considering how many times a web part could be called in just one page render, it would be daft to try and do it like this.

So I found this

site.GetUsageData(…)

Provided that you have turned on the Usage analysis processing it may be possible to get this information via a web part.

The original article that does this via another web is found here.

*Update* : More details on this

tags: ,

Categories: Sharepoint Tags:

Budding Game Designer

September 12th, 2006 No comments

Since I started looking at XNA my son has been poking over my shoulder asking what’s that.  I explained that this is how you could write computer games.  Now he wants me to write him a game,  I should have known this was coming.

So he gave me the design for the game he wants.

It has to have pirates, starwars and spiderman who fight and help each other the evil dog robots (from starwars I, they look like dogs to him) are there as well as singing walking chairs and at the end is an elephant and a rhinocerous.

So it’s a little rough aroud the edges but he is 4.  Think I might struggle with licensing.

Categories: Misc Tags:

I need this

September 11th, 2006 No comments

I have set my screensaver to time out in 3 minutes of inactivity, because even the act of going for a cup of tea requires a keyboard lock and if I forget then I’m under attack from co-workers who think its funny to leave lock your keyboard notes on my screen in notepad.  It is rather funny, I must admit I’ve done it myself, not within 2 seconds of getting a cup of tea though !

So I need a device to auto lock windows when I get up.  I reckon that either a web cam that monitors the mass in front of the screen or a pressure device in the chair could on receipt of a signal to a USB receiver just lock the keyboard after a time-out of say 10 seconds to x minutes  as a replacement for the screensaver timeout.  This could work in conjunction with the standard screensaver timeout and energy savings so when the user has left the area it can auto turn off monitors helping reduce electricity usage.

It was recently mentioned to me that the screensaver timeout is a real annoyance to some upper management.  Its these type of workers who could really benefit from this device as they could have a higher Screensaver timeout capacity, if there is someone there it would not switch off at all until they leave. This makes the locking mechanism more secure for upper management email and files as has been proved by my fun loving colleagues it takes less than 30 seconds to access the machine, in that time you can change the password and go access files safely elsewhere in the building.

Now that ideas out of the way onto my auto-feed cable that gets installed a-top of rotary clothes lines.  Lately my head just keeps filling up with odd ideas for inventions, most of them as bad as this.

tags: ,

Categories: Uncategorized Tags:

SWM To X Converter and Mesh Loader

September 8th, 2006 2 comments

Haven’t tried these yet but as the family are away this weekend I will be trying them out, but if you want to beat me to it here they are.

X To SWM File Converter

Mesh Loader

 

tags: ,

Categories: development, xna Tags:

Seasonal Food

September 7th, 2006 No comments

Whilst trying to recognise a tree at work, I came across this site.

http://www.eattheseasons.co.uk/index.htm

Being a fan of seasonal food rather than shipping it halfway across the world this site rather appealed to me and they have a food of the week on the home page.

For those interested I have this book Food For Free which is a handy sized guide for when your walking in the woods.  Elderberries are ripe at this time and make an evil wine, don’t try them raw !

The tree was a chestnut and I believe the nuts are edible, but I will know more about that when they ripen.

tags: , ,

Categories: Uncategorized Tags:

XNA Trouble

September 6th, 2006 No comments

So I did my 2d now I’m trying to knock together a 3d.  I understand now that a mesh is essentially a pre-created bunch of triangles that save you coding things.

So first things first then.  Lets create a mesh file.

Can’t – Need tools.

Ok so Maya do a free to learn version, oh damn it plasters text over everything.
Ah found some free things, blender, an opensource 3d creator tool

Lets create a model then.

Can’t need talent.

Lets find a free one.

Great, hmm what’s this 3ds format, lwo format

Lets load it

Cant DirectX needs .x format

Convert it

Blender can export, great.

Lets Load it

Cant XNA only reads sml files all .x format capabilities, the original and most common are not in this release.

So convert that then

No tools to convert this yet, some hombrew version thats explodes but in XNA, nowt.

Sod it I’m gonna watch CSI instead.

Categories: development, xna Tags:

XNA First Play

September 6th, 2006 No comments

Yesterday I finally managed to sit down, install and try the XNA framework.  After some initial struggle, more to do with my hardware than anything else its on.

I read the read me and decide to start with appropriately a starter kit. Wow, that’s a lot of code but it is a working game, not a very good one, but it works.  I had a look through and what struck me was the content folder and how many different types of file there was, from the TGA textures files and backdrops and sprite files, to the unknown SWM mesh format.  From this I concluded I have a hell of a lot to learn about 3d programming.

So I started with a blank project instead.  Whilst it’s nice to have a bells and whistles project to reference there is no substitute to starting from scratch.  Within minutes I had me a bouncy ball sprite program that ran very smoothly in next to no code very easy to understand.  This is the “Your first XNA program” in the help files so its no wonder the web is filling up with new versions of pong.  I haven’t gone as far as creating pong, it will be a good exercise, but I think I need to find out just what you get from the framework, all this talk of tools and I see nothing.

If you are brand new to DirectX programming and XNA then expect a very hard struggle and dust off those trig books from school you will need them from essentially what you could class as “lesson 2″.

In the forums people are complaining that they want more tools a kind of VB for games, drag and drop Doom, I don’t want this, that would be bad and we would end up with the same tired old excuse for a format with differing graphics.  What I DO want from MS and the XNA guys is a primer on what you need to do in a step by step guide with why you do it that way and where the tools are you need to do it, at least a link to tools you may need to purchase.

One tool you have to have is Paint.NET because the hobbyist can’t afford Photoshop.

I’m going to dig out my managed DX book and see if what I need is in there.

tags: , ,

Categories: development, xna Tags:

Reading XML that has namespaces

September 4th, 2006 2 comments

In trying to convert this blog I had to knock up an application to read dasBlog dayentry files and write out a large RSS style wordpress import file.

Now I don’t do XML that often but when I do its been with simple XML so a quick “//Entries” XPath query and away you go.  However the dasBlog XML is done properly with lots of namespaces.

So when I’ve been doing my simple XPath query it returns nothing.  So for those having similar problems the solution is this.  You need a namespace manager.

Here is a quick code snippet that explains how you would use it.

 

XmlNamespaceManager mgr=new XmlNamespaceManager(xmlDoc.NameTable);
mgr.AddNamespace(“def”,”urn:newtelligence-com:dasblog:runtime:data”);

foreach(XmlNode innerNode in xmlDoc.SelectNodes(“//def:Entry”,mgr) )
{
    //Do things with innerNode;
    title=innerNode.SelectSingleNode(“def:Title”,mgr).InnerText;
    //Do more things
}

Simple as that.

tags: , , , ,

Categories: Technical Tags:

Blog Migration

September 1st, 2006 No comments

I am currently trying to bring all the old content from my dasBlog to wordpress.  There may be problems but I am trying to sort them out be patient of files are missing or even content.

Categories: blog Tags: