- Greetings! I am Torleif Berger, 25 years old, a Seventh-Day Adventist and currently working as a Software Developer. Have a look around c'',)
Category Archives: Software Development
JavaScript: Uppercase first letter in a string
In PHP there is a very handy function called ucfirst which Returns a string with the first character of str capitalized, if that character is alphabetic. Needed that in JavaScript, but discovered there was no such thing.
PHP: How to easily provide JSON and JSONP
Have some server-side data that you would like to grab through an AJAX call? For example by using the jQuery.ajax method? A really easy way of doing this is by using the JSON format.
PHP: Generating transparent PNG fillers
So, I was fooling around the other day with an HTML table and wanted to make the odd rows slightly darker. Figured I could use for example an 80% transparent black PNG to do that (or could have just assigned … Continue reading
C#: How to send emails
Sending a basic email message in a C# application is quite easy thanks to a class called SmptClient. We simply need an address to send to, an address to send from, the message we want to send and the client: … Continue reading
Kohana PHP framework
As you might know, I am developing some internal software for LifeStyleTV at the moment. Because of various slightly annoying circumstances I am stuck using PHP and MySQL for this. Not the worst of course, but I must say I … Continue reading
How to check for duplicates
Say you have an IEnumerable<t></t> of some sort and you want to check if it contains any duplicates. How do you do that?
Test-Driven Development: By Example
I earlier wrote about the book, The Art of Unit Testing, which I finished a while ago. That book was very good and was focused on how to write good unit tests. It also mentioned Test-Driven Development, TDD, but not … Continue reading
















