Set Negative and Zero Formatting in String.Format

Apart from setting the format you want the string to be shown, the format parameter in the String.Format method also allows to pass the negative formatting and zero formatting.

First is an example of the normal usage of this method:

String.Format(“{0:€ #,###.##}”, price);

To include the negative formatting add the following:

String.Format(“{0:€ #,###.##; (€ #,###.##)}”, price);

To include both the negative and zero formatting:

Continue reading

Remove Special Characters (like !, %, &, #) from String | Javascript

No, this post is not about dieting or anything like that… but to remove Special Kharacters. To do this, I was going to use a for loop in javascript that checks each character and if it is not between ‘A’ and ‘Z’, the character will be removed. Until I found this code lying around on the net which makes removing special characters very simple…

function removeSpecialChars(strVal)
strVal = strVal.replace(/[^a-zA-Z 0-9]+/g,”);

World Cup 2010 in Malta | Power Cut

For the world cup opening, our state of the art power stations made us a surprise… all Malta is in blackout. We have no power!! 🙁 Mmmm… hopefully we’ll manage to see the opening in two hours… come on power station guys!!! 😐

Update: Power was restored back! We can watch the World Cup 🙂


Shared Hosting | Unlimited Emails | Any Ideas?

Hmmm… I’m developing a website which will have a Newsletter Sender function to a list of emails… I’m seraching for a Shared Hosting which lets me send unlimited emails, or at least send about 2000 emails at one go. This will be used to send newsletters and email shots. Anyone has any idea if this type of hosting is available? And if yes which one?

Also someone told me to instead buy a VPS? Is it worth it for only one site?

HTC HD2 | Not Sending SMS

So a friend of mine just got a new HTC HD2… and let me tell you… the screen is amazing!! 4.3 inch full of color ;)… All worked well, phone calls, camera is great, sms received but he couldn’t send any sms. When trying to send, they remained in the outbox. We thought there was a problem with the sms service centre but there is no place where you can edit the service centre number.

After googling a bit, we found the Solution. You need to first… Continue reading

Sette Giugno | Today in Malta

Sette Giugno (from ItalianJune Seventh) is a Maltese national holiday celebrated annually on June 7. It commemorates events which occurred on that day in 1919, when following a series of riots by the Maltese population, British troops fired into the crowd killing four. (Wikipedia)

Today is also the day that the new iPhone is going to be shown to the world (hopefully)… plus a new multi touch track pad and also the new Safari 5… for the Maltese people, we’ll have to wait till tonight @ 7pm.

Websites June Refresh :]

Deep Design Malta

Just updated my websites to be all showing the same theme.. to start the month of June in style 🙂 Previously they only had the logo but now made some touch ups and really hope you like them.

With these designs i’m trying to make an identity for my sites… following more or less the same design principles. For now they only have one page so there’s not much to see… but they are still much better than before 🙂

You can access my websites using the below links..

Deep Design is my main brand and is the one I use when developing websites for clients. is the new place that this blog will be moving to. It’s still being developed and will let you know when it’s ready. is a new project that will be launching.. but i’ll have more details on this later 🙂

When I have more updates, I’ll let you know… btw hope you like the design 😉

If you have any comments or suggestions (which I too have many :]) please let me know.


Clive Ciappara

Google Event Tracking Failing

Google Analytics Event Tracking

We’ve been using Google Analytics events tracking starting from this year and they are very useful. This week we noticed that website events weren’t being tracked, and haven’t been from the beginning of May.

After checking, everytime we tried to call the pageTracker._trackEvent method, it always returned fail. After searching and testing a bit, we noticed that apparently google made some changes to the trackEvent method.

Where before they allowed the optional_value (the last parameter if the method) to be a string or a number, now it is allowed to be a number only… thus the correct params would be:

pageTracker._trackEvent(‘my_category’, ‘my_action’, ‘my_optional_label’, 14);

Hope this helped some people 😉 It helped me 🙂

Reference: click here