I’ve finally moved into a place with bradband so after 4 months the shakes can finally stop. Whooooo
I’ve finally moved into a place with bradband so after 4 months the shakes can finally stop. Whooooo
Jordi Ribas, Microsoft’s director of technology strategy for Windows Digital Media breaks down the reasons Microsoft decided to back HD-DVD over Blu-Ray. According to Microsoft, Blu-Ray failed the test in six critical areas.
read more | digg storyAs soon as i get my internet connection sorted at my new place i will endevour to sort out the layout of the pages so that they’re a bit more readable and a bit less squashed. Too much dead space at the moment for my liking.
One of the only lacking things in nant is the ability to count nodes which match an xpath expression. which it turn would allow you to rotate through the entire list of matching nodes (using a simple emulated for loop) so i had to create one
using System;
using System.Text;
using System.Xml;
using System.IO;
using NAnt.Core;
using NAnt.Core.Attributes;
namespace XmlTasks
{
[TaskName("xmlcount")]
public class XmlCountTask : Task
{
private string m_strXmlDoc = "";
private string m_strPropertyName = "";
private string m_strXPath = "";
[TaskAttribute("file", Required = true)]
[StringValidator(AllowEmpty = false)]
public string XmlDocument
{
get
{
return m_strXmlDoc;
}
set
{
m_strXmlDoc = value;
}
}
[TaskAttribute("property", Required = true)]
[StringValidator(AllowEmpty = false)]
public string PropertyName
{
get
{
return m_strPropertyName;
}
set
{
m_strPropertyName = value;
}
}
[TaskAttribute("xpath", Required = true)]
[StringValidator(AllowEmpty = false)]
public string XmlPath
{
get
{
return m_strXPath;
}
set
{
m_strXPath = value;
}
}
protected override void ExecuteTask()
{
//Check the file exists
string strDocPath = Project.ExpandProperties(m_strXmlDoc, Location);
if (File.Exists(strDocPath) == false)
{
throw new BuildException("The xml document specified does not exist");
}
// Load the document and run the selection
XmlDocument doc = new XmlDocument();
doc.Load(strDocPath);
XmlNodeList list = doc.SelectNodes(m_strXPath);
Project.Log(Level.Info, "Found " + list.Count.ToString() + " nodes");
if (Project.Properties.Contains(m_strPropertyName) == true)
{
Project.Properties[m_strPropertyName] = list.Count.ToString();
}
else
{
Project.Properties.Add(m_strPropertyName, list.Count.ToString());
}
}
}
}
Thanks to http://blogs.geekdojo.net/rcase/archive/2005/01/06/5971.aspx for the basics on creating a custom nant task
Some how it’s ten to seven already How did that happen? I really have to go home soon….
Ok so at the moment i’m pulling my hair out as to how to write an encryption function. The details are as follows:
In order for an installer to work, and be upgradable at a later date certain variables must be installed in the local registery…. now most of these variables relate to non sensitive information, such as install path etc. However there is also a need to store an sql username and password. which makes it hellish as i’m coming up against a problem, encryption and decryption is not a problem, i can just use .net’s inbuild libraries. The problem comes with: where do i store the private key?
The installer is designed to be able to be run by any user [admins only] so using the windows DPAPI won’t work (what if a user doing the upgrade is different to that which originally installed the prog. the private keys for the users would be different. Also i can’t store the private key in the registry as that would seem to present the same problem as just storing the plain text in the registry.
Back to my research i guess
Hey look i’ve managed to export my posts from my old iouk web log to here. and it wasn’t very hard to do. lucky i’m not busy at the moment in work
edit: During the import all apostrophes changed to wierd symbols which should be fixed now
So i should really post this once the new logo for bgeek is in place but i can’t be bothered to do that now (got to actually do some work as this site took up a lot of my time yesterday.
But i was just wondering why i always do most of my work when i’m slightly high on coke (the drink no the drug) and it’s late at night?
got to sleep about 2am yesterday [today] as i just couldn’t sleep.
Haven’t checked the work i did yet, so maybe it’s rubbish. Soon find out.
I’ve decided to ditch my old photo album scripts and get a more up to date photo album, located here http://www.bgeek.net/photos
(check out the random image from the albums in the corner)
Take a look. Register. Even add your own album. (Andy that’s for you)
Also cool is the windows xp plugin that allows me to update the photo album form windows really easily.
This is the first post on the new bgeek.net site.
Whooo for me