Category Archives: Programming

Programming Challenges:110507 The Stern-Brocot Number System

Last night I was bored, and decided to tackle a Programming Challenges problem: 110507 The Stern-Brocot Number System seemed easy, and in the end it was. However it took two attempts, due to messing up the termination logic. ie run … Continue reading

Posted in Programming | Tagged | 1 Comment

GetTextMetricsW causing memory corruption

I have been converting our ANSI product to UNICODE, and today during testing I was getting “Run-Time Check Failure #2 – Stack around the variable ‘tm’ was corrupted.” error messages. Turned out it was this code: I isolated the code … Continue reading

Posted in C++, Programming | Comments Off

Why my file operations fail on the Mac

My first thought for why things fails is the the Environment.SpecialFolder don’t map, and thus I found this page talking about it So I ran the code on my Windows XP box and got: and on my MacBook I get … Continue reading

Posted in .Net, C#, Curse of the Azure Bonds, Games, MacBook | Comments Off

IDA Script: Remove empty auto labels

When working in IDA to reverse games, you can end up with lots of dummy/empty labels, that are auto generated when doing offset work. Here’s my script to remove them. First how it happens. You find a value you are … Continue reading

Posted in Programming | Tagged , | Leave a comment

Nant xmlpoke whole blocks

It took me awhile today to use the nant/xmlpoke/xpath to update our copyright message in our application so I’ll document it here. The xmlpoke documentation explains whole to replace parameters but not children nodes. The simple answer is just define … Continue reading

Posted in Programming | Comments Off