So to celebrate me getting a new motherboard/CPU/Memory combo I decided to top it off with my new Coolmaster Case which I got in the mail yesterday. Being all nice and prep’d to get this new case all together I drove right into moving my parts over… but I decided to leave my memory and CPU on the board as I moved it (my mistake). Well thanks to the weight of my 8 GB of memory and the CPU heatsink I bloody well broke my old motherboard (new one yet needs to be sent in for RMA) while I was holding it.  So now I’m with out my awesome setup until I get my new motherboard back from NCIX, but on the bright side at least the new case turned out really cool as well.

Previous ArticleNext Article
S.

Screen Rotation on the M200

After upgrading your video drivers on the M200 to something decent, like the Forceware 98.16 drivers, the automatic screen rotation will cease to function. However not having the screen auto-rotate doesn’t spell the end of the world. To correct the orientation of your screen simply press Windows key + X to open the Windows Mobility Center. Once the Windows Mobility Center opens, press the R key until the screen is in the desired orientation.

If you want to change the sequence of the screen rotation, go into your Control Panel and find Tablet PC Settings. Near the bottom of the window there should be a link Go to Orientation, and in there you can change or remove rotation sequences. I’ll also have to suggest that you calibrate your screen, if you haven’t done so already, before you rotate your screen. To calibrate your screen with your pen, press the Calibrate… button in the Table PC Settings window and follow the instruction.

R.

Regex and Anchor tags

I had been looking on the Internet for a solution to a program I had be working on and sadly didn’t come up with one. I was trying to find a way to use regular expressions to find all the html anchor tags in a string along with matching a wild card URL (ie: secnem.com.*test.html). And after many hours of thrusting my head into my keyboard I came up with:

/<a [^><]*href=[\”\’][^\”\’><]*<rule>[^\”\’><]*[\”\’][^>]*>\s*.*\s*<\/a>/iU

You’d replace <rule> with what ever url rule you want, except for any wild cards in the url I needed to use [^\”\’><]* instead of just .* . This would prevent it from matching outside of the anchor. Bascially [^\”\’><]*  means: match any character except a double quote, single quote, greater than sign, or less than sign. All of which should not be in the href field to begin with.

If you wanted to see what the content of the anchor tag was or the matched href, simply put some brackets around like so:

/<a [^><]*href=[\”\’]([^\”\’><]*<rule>[^\”\’><]*)[\”\’][^>]*>(\s*.*\s*)<\/a>/iU

Hope this helps someone. You can of course adapt this to other html tags by replacing ‘a’ for ‘table’ or w/e. Same with the href. larsolavtorvik.com has a great resource for testing regex in real time and addedbytes.com has a great cheat sheet as well.