Techinque for loading batch file parameters/settings

This technique allows you to define all of your parameters in a single file and not have to pass them all in on the command line.

This command reads in all of the tokens from the settings file and sets a series of environment variables

for /f "eol=# tokens=1,2 delims==" %%i in (settings.ini) do SET %%i=%%j

The settings file looks like this

# Comment
FirstVariableName=A value

# Comment
AnotherVariableName=A value

Just repeat those blocks. You can then do some validation on the enviroment variables if needs be.

I learnt this technique a little while ago, but I cannot remember where, so I cannot give credit where it is due.

Just wanna kill zombiez!

“I don’t care, just as long as I am shooting zombies.”

Visual Studio exiting when attempting to view properties, resources or settings

I was working on a small project today, when I attempted to open the settings for my project. At whch point Visual Studio just closed.

I have seen this behaviour at few times, generally I have just assumed that the settings/resource files have become corrupt or something. And usually deleting them seem to do the job, however on this occasion it did not.

Also every time I went to access the project properties VS died. Even attaching to VS gave no hints to what the problem was.

Looking around on the net it seems to be quite a common problem yet, quite difficult to reproduce.

I have seen several connect issues opened and closed where support could not reproduce it. Seems a bit poor that MS would close so many issues that have similar symptoms.

Most of the solutions I have found were around closing open XAML files in VS and docking any floating windows. This didn’t help.

After removing almost everything from my project short of the project itself I deleted the supporting project files and this seemed to cure the problem (this time!).

If you run into the same problem and can’t find a fix that works, try deleting all of the .suo and .user files and anything else you can find. Trim down your solutions to thier bare minimum (ie, the code), and get rid of anything that is not part of the solution.

Life with no toungue…

Life with no toungue would be really difficult. Aside from the problem talking, how about eating food? Or holding your breath?

If you had no teeth that would really make it difficult

Firefox is not so bad…

Most of my friends know me as a bit of a M$ fanboy, and if you read some of my previous posts I don’t agree with some of the comments people make about IE… but IE8, Oh.. My.. God.. (to put it lightly)

I think they (you know, them) are right, IE8 could break the internet. I started using it when it was in Beta, and I have tried using the RC, and I still find it failing to do an adequate job.

So I had a choice, continue using IE and get used to the fact that my browsing experience may become a bit more brittle, or find another browser.

I have used Opera for a long time as an alternative browser. Its fast and easy to switch off all the javascript and “content” (i mean flash etc) which makes it very secure and quick webbrowser. But, Opera still feels to “alien”. I wanted an experience like IE, yet better. I want my tabs to open my homepage. I want the pages to actually look the same as they did in IE. (As I often found previously that pages not only rendered differently but fonts and various objects always looked different to me)
It just boiled down to the fact that I like IE. (Or the way IE does it without the crappy crashy bits)

Hmm… better be careful… this could turn into a moany whiney post :P

So I tried Firefox 3, and I was surprised at how quickly it felt so natural. It was quick, much quicker than my previous experiences of Firefox 2. Pages I frequently visited looked the same as they did in IE.

Not only that, I found add ons that reproduced various behaviours that I liked in IE.
Like Tab Mix, so my homepage loads in my new tab. How new tabs open next to my old one, how and when new tabs are opened from other tabs. Really sublte finicky things like that makes a really big difference to me.

But one of the nicest things I love in Firefox is the NoScript add on. Its really easy to block things on pages, I find that I have used Opera less and less to open pages that I don’t like the look of. NoScript blocks the scripts and content, and if I need to I will allow it in a simple click.

So it’s official, Firefox 3 has turned me into a convert!

phpBB 3 Permissions

I have seen so many people make the move from phpBB 2 to 3, then make so many mistakes with permissions. I don’t really know what causes this but they seem to apply permissions to objects rather than use roles. I can understand that the permissions in 3 can seem a bit overwhelming but once you understand the part that roles play it should all click into place.

So here are my recommendations for dealing with permissions in 3:

Use Roles
Roles are sets of permissions. Avoid explicitly setting permissions on any object (person, group, forum etc) in the system. Instead reuse the existing roles or setup new ones.
This helps because you cannot easily see or manage lots of permissions on individual objects. If you use a role, you can grant additional permissions or remove all permissions (if for example, you plan to remove that role).
 
Use Groups
Add users to a groups, then grant groups a role against certain forums.
This makes it really easy to categorize lots of users, and there is no reason why you cannot have more than one user in more than one group, so you can make some of the groups really specialized.
For example, our officers group, only has permissions to the officers forum and nothing else. But they also belong to the members group so they also have permissions to the rest of the forum.
 
 
So, this is how you grant roles to a group against a certain forum:

     

  • Go to the Forums tab
  • Go to the Groups’ forum permissions
  • Pick the group your are interested in
  • Select the forum or forums you wish to set roles on (at the moment you have a managable number of forums that you can tick All Forums, however later on I wouldn’t recommend it. Lots of javascript can slow the browser down)
  • For each forum listed, select the appropriate Role you wish to assign
  • Now click Apply.

To test it, go to a users profile (back to the main index, click on the user or administrate the user and view the profile)
You get an option which says “Test out user’s permissions”, using this you essentially become the user, and you can see and do everything that the user can do. Really helps with testing out settings, means you don’t have to create test users all over the place.

Brainzzz

Dear diary,

I woke up this morning with the most peculiar craving for human flesh. I can’t quite put my finger on it; I am missing my right hand.

Walking into the kitchen I was greeted by my parents; my father rolling around on the floor and my mother bumping into the table.

*Sigh* Looks like rain, I should find a hat to cover the hole in my head.

Kiel the Zombeezz!! Best sport ever!

Felt left out on sunday. My fellow guild mates had bought Left 4 Dead and sounded like a hoot.

Before I comment on the game, I just want to state how far and how good Steam has come along in the several years it has been about. When I first used it, it so flaky that I had to scrap it and go back to CS1.5 and running Valve games from the start menu instead of through Steam (you know what I mean)

But now it is really stable now I cannot believe it. Another gripe I used to have with it was that all games in the store were listed in dollars, and you could only use credit cards to pay for new games (at the time I didn’t have a credit card).

I was also against buying “the virtual box”; I loved to purchase the game box in store. Feel the box and take pride in the artwork. It is a very different matter nowadays, it is a real pain in the arse to keep track of all those disks. In fact, I find myself favouring services like Steam and Stardock over the physical game since I don’t have to worry about installing the thing or keeping it up to date, that is all done for me.

Anyway, they game.

BEST GAME EVER!

It is so simple, 4 people, kill zombies, achievements, great laugh. Best played drunk I think.

Computer Build – Part 2

Well I finally finished putting the thing together on saturday. I nabbed the sound card and the DVD drive out of my old machine and fitted them in my new machine. Spent ages routing the cables behind the motherboard tray but eventually it all when in. Looks really tidy too.

One failing I found, which could be attributed to the case really, is that because the power supply is located at the bottem, it is a real stretch for the 4pin power to reach the top of the mother board. Also, the main 24pin power socket is kind of awkwardly placed. If you have a graphics card that is longer than the one I have, it will interfere with the power supply cable. Also the placement for some of the ports made it difficult to route the cables nicely.

I couldn’t be arsed with taking photos of the second part, it was just too much bother for a boring part of the build. i do have some of the result however =D

 

Installed Vista with no problems. On first impression I would bet that my old machine is faster for desktop actions, I am sure it boots faster. Once in Windows however, its fine.

Got a lovely 5.9 for everything from Vista. And its quite a quiet machine, doesn’t rattle like my old machine. I left all the fans on medium, seems to be the best overall choice.

Blue screened my machine twice though within as many hours, nTune was not happy, so I cannot find out the temps for my graphics card. CPUIDs Hardware Monitor puts the CPU @ 45ish C on idle and 60 C under load. Couple of months time I’ll stick a new cooler on it.

Once all the crap was out of the way I got stuck into installing games. Vegas 2 runs like a dream, only I still die as much… can’t use the stuttering anymore as an excuse ;)

Also stuck Sacred 2 on it as well. Now, this was the game that gave me the nudge to get a new machine as it failed to render graphics on my old machine. However I ran into the same problem again. Thanks to Matt though, he gave me a command line to use (/skipopenal). It seems to be an issue with Sound Blaster sound cards, can’t understand why but that all works now too.

End result, I am a happy chappie.

Computer Build – Part 1

I could not build it last night, wasn’t “allowed” to clear off the table >.<

Managed to get it cleared off tonight, and started work.

Heres some piccies, I apologise for the quality and lack of more pictures but the anti-shake seems to fail much of the time, so I had to cull alot of them. Sadly this is the cream of the crop.

The CPU heatsink was the most difficult part. I struggled to push the pins into the board and I was scared of breaking it. In the end I took it out of the case, placed the board on top of its anti static bag and resting the lot on a blanket I managed to get the pins through the board. Looking at it closely the board is slightly warped, will have to see what damage I might done once I boot it up.

During one attempt my thumb slipped and I cut it open on one of the heatsink fans. I saved you a picture of the gash (bit excessive :P)

Thats it for the night, I plan to continue tomorrow and will post more pictures.