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.
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.
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.
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 a darker color, but where’s the fun in that?). Either way, ended up making a little something that I thought I could share just for the fun of it. I learned a few things, so maybe someone else can too
So, here’s how to make a small transparent PNG filler image on-the-fly using PHP
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:
That was pretty simple, wasn’t it? But what if we need to authenticate with our server? And what if we want to send our message in a more secure manner?
Stumbled over the concept of Universal Greeting Time on IRC a little while ago. Found it kind of brilliant
UGT (abbr.): Universal Greeting Time.
UGT is convention initially established in #mipslinux on irc.openprojects.net (now irc.freenode.net) but slowly taking over the world. It states that it is always morning when person comes into a channel, and it is always late night when person leaves. Local time of any member of channel is irrelevant. Resistance is futile. Your ass will be laminated. (geoman is exception to this rule – his ass will be fried instead).Used as follows:
Good (UGT) Morning, Everyone! or good morning (ugt) (on entry to channel).
Good (UGT) Night – when leaving it.The idea behind establishing this convention was to eliminate noise generated almost every time someone comes in and greets using some form of day-time based greeting, and then channel members on the other side of the globe start pointing out that it’s different time of the day for them. Now, instead of spending time figuring out what time of day is it for every member of the channel, we spend time explaining newcomers benefits of UGT.
Source: UGT
Good night!
I’m a curious guy, so I wanted to see if there was anything interesting happening behind the Apple logo when the Mac I use at work boots up.
Turned out it was quite simple to enable and disable this feature. To enable it, just open up a Terminal and run the following command:
When you reboot the next time, you will see all the fun stuff happening during the boot up. If you get tired of it, you can disable it again by running:
That’s it!
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 really do prefer C# over PHP for oh so many reasons. But anyways, that wasn’t the point of this post. The point is that for my life to become hopefully quite a bit easier and hopefully a lot more organized I decided to go looking for a framework I can use as a base for the software I will be developing.
After much looking I finally stumbled over a framework called Kohana.