Tuesday, September 23, 2008

Uno in C#

Finally! Such a relief!

I have been trying to create the project on Sourceforge for my game. Somehow, I couldn't upload the source code.. till now. The link to the game project is here.

Right now, I am trying to develop a web site for it =)

Saturday, September 6, 2008

Modifying templates

Donn is definitely confused with new blogger template :D

His question is, "How can I change text comments to something else?"

Before I start, I must warn you that you will be tampering with your blogger's template. Any customization already done on it might be lost. Please take backup of your template before you modify it.

For old template users –
Open up your template in an editor. Search for text <$I18NNumComments$>
Replace it with <$BlogItemCommentCount$> comments

For new template users –
You can replace <data:top.commentlabel> with comment
And <data:top.commentlabelplural> with comments

Notice the plural nature of the latter.

Hope you find the above texts easily :)
Noobs can stop reading here now =P

When you replace the texts, try to pad the code with angle brackets with at least one space to its left and right ends. The reason is something like this - HTML is messy.
These patterns in blogger code are not treated nicely all the time.

There is high probability of not seeing the results in expected manner.

The correction can be done like this - by inserting a space in between the angle brackets.

Now, just in case you are wondering where the heck is space here, I should tell noobs :P that &nbsp; is equivalent of single space character. Its better to code this way than relying on normal coding because the blogger engine is designed to work this way. Its simple and robust.
If you are not sure what ever code you wrote is going to be interpreted correctly by blogger, then use this site for converting it to blogger friendly (and not so human friendly) code.

You just need to read carefully the template. It would become very easy to modify the content once you take some time to understand the basic structure.
Read this for more help.

Friday, September 5, 2008

Regex problem


It took me so long to understand the difference between \w and \b in Regular Expressions!!!

Although both mark the word boundary, \b is more effective (IMHO). Try search whole word text which is just at the end of a text file. Something like,

blah blah blah

If you are searching for text 'blah' (notice the one at the end of file) then \w will skip it. So, better use \b!!

Regex re = new Regex(@"\bblah\b");

Happy coding! =)

Wednesday, September 3, 2008

Google Chrome!

You have to see this!

Check Google Chrome - the latest free browser. Its extremely fast and lightweight, probably because it lacks plugins and many other features (like it failed Java tests). Though it offers spelling correction, it doesn't offer the alternatives yet, leaving user to wonder what is wrong with what he typed.

Mind that it is new and in early stages and that makes it not really worthy of being compared to FF or IE or any other standard browser for that matter. But the speed, light-weight, sleek design make it my instant favourite!

But I am going to stick to FF for the love of extremely customizable interface and its robustness. I must say I missed greasemonkey the moment I started GC.

I really hope Google keeps up the good work and give us more customizable version with the lightness and speed of it's current version.