ejes consulting

Techincal Consulting Design and Automation

Posts Tagged ‘windows bugs

Revisit Royale Noir

leave a comment »

I know I’ve failed to post for the last little while.  But with good reason, my FreeNAS server crashed (destroying the drive) which I intend to post about once I’ve fixed it, I have also been writing a few pieces of software for my clients, and 1 for the open source community (again, I will post this once I have something more “polished” for general consumption)

But, since i’ve been looking at the same page of posts for the last couple of weeks i thought i owe it to you to write something… anything, just to keep you (and me) on our toes.

Since this is something of a revisit but I think it’s quite catching and really a nice personal touch that many of us can use to make our windows boxes just a little more unique.

It’s called “Royale Noir”, a secret hidden XP theme that is only available using a special “luna.msstyles” visual settings file by Microsoft.

Installation is a snap, you just download the royale_noir.zip file that I literally stole from the old “istartedsomething” post (see: http://www.istartedsomething.com/uploads/royale_noir.zip) unzip it into a “royale noir” subdirectory in your “%WINDIR%\resources\themes\” folder, double click on the “luna.msstyles” file and select “Noir” from the colour scheme.

Beautiful.

 Royal Noir Display Properties

Royal Noir Display Properties

If you want to see the original post: http://www.istartedsomething.com/20061029/royale-noir/

Written by ejes

September 29, 2009 at 2:18 pm

Bug: Visual Basic Scripting

leave a comment »

I was developing a source code repository with revision tracking system in VBS for a client.

In this repository each revision would be incremented by 0.01 on each commit to the repository.

Kind of like CVS but much, much simpler.

So it turned out to be quite simple (the source is in my Scripts Library) but I found some strange activity in VBS when it comes to floating point math.

VBS has a function to convert a signed decimal string to a number so that you can perform mathematical functions on it.  “CSng(string)”  is the function.

So once you’ve converted a number from a string, then add 0.01 it should effectively add 0.01 to the last number.

So, lets consider this code:

Version=CSng("0.01")
WScript.Echo Version
Version=Version+0.01
WScript.Echo Version

What would you assume the ouput would be?  0.02 right?vbs-csgn error

WRONG!  VBS outputs “1.99999997764826E-02″.

VBS Can’t Do Math!

Written by ejes

June 15, 2009 at 11:16 am

Follow

Get every new post delivered to your Inbox.