- G+: Google+ created so much hype that even some of my anti-social friends are a http://t.co/erj9HyI #
- New note : Motorola Defy – XDA-Developers http://t.co/VLi6rBW #
- I favorited a @YouTube video http://t.co/Mak2s7P HELO TC: Operation Cube Farm Freedom #
- Shared: Contaminated chocolate recalled http://t.co/JAgjnLi #
- Shared: Leaked papers put Christofias in a tight spot http://t.co/IYYDYsm #
Month: August 2011
Pukkelpop festival tragedy in Hasselt, Belgium
Associated Press reports:
HASSELT, Belgium (AP) — The death toll from a fierce thunderstorm that mangled tents and downed trees and scaffolding at an open-air music festival in Belgium has risen to five, officials said Friday.
Hasselt Mayor Hilde Claes said that two more people died overnight. About 140 were injured in the storm, 10 of them seriously, she said.
All the dead were Belgians, Claes said.
Organizers canceled the annual Pukkelpop festival near Hasselt, 50 miles (80 kilometers) east of Brussels. Buses and trains were pressed into service to transfer the 60,000 festival goers home.
This is the same Pukkelpop festival that I went to in 2009. My sincere condolences to the friends and families of the victims.
Day in brief – 2011-08-18
- I favorited a @YouTube video from @BattleStrats http://t.co/Aleae8W Battlefield – Battlefield 3: 64 Player Mult #
- Shared: no. 430 – @kellysdf http://t.co/PDiw14L #
- New note : headjs.com – speedup and simplify javascript and css http://t.co/IZjX6NZ #
- I favorited a @YouTube video http://t.co/YbnXF00 Unlimited Detail Real-Time Rendering Technology Preview 201 #
- I favorited a @YouTube video http://t.co/d02jvHi 2CELLOS Cover Nirvana Classic "Smells Like Teen Spirit" Liv #
- Shared: EAC managed to repair one of the Vasiliko turbines http://t.co/XJBIVFs #
- Shared: Alex King: oEmbed Gist Plugin for WordPress http://t.co/oDkPZbv #
- My old blog post about Markov chains gets unusually high traffic today. What's that all about? http://t.co/z5dnMWE #
- Shared: Updated KVM ISOs http://t.co/bpAm7QY #
- We just got a power cut in the office. It's been a while since we had those. #limassol #cyprus #
- New note : Regex Tutorial – Unicode Characters and Properties http://t.co/iNHxtVo #
- G+: If GoDaddy website could waterboard me, it would. http://t.co/3H4VT16 #
- Split Family Faces – http://t.co/3CiANDk #
- I'm at The Ship Inn w/ @alex_mamchenkov http://t.co/7997vOd #
- Shared: Kamil Páral: Git Tip of the Day – splitting changes into several patches http://t.co/XVSvJoV #
- Movenpick ice cream. You have to try it. (@ Ζορπας) http://t.co/z4V41wg #
Trailer : Senna
Here is a trailer for a biographical documentary of a legendary Formula 1 driver Ayrton Senna.
[youtube=http://www.youtube.com/watch?v=HrbJPsPtTyU]
PHP regular expression to match English/Latin characters only
Today at work I came across a task which turned out to be much easier and simpler than I originally thought it would. We have have a site with some user registration forms. The site is translated into a number of languages, but due to the regulatory procedures, we have to force users to input their registration details in English only. Using Latin characters, numbers, and punctuation.
I’ve refreshed my knowledge of Unicode and PCRE. And then I came up with the following method which seems to do the job just fine.
/** * Check that given string only uses Latin characters, digits, and punctuation * * @param string $string String to validate * @return boolean True if Latin only, false otherwise */ public function validateLatin($string) { $result = false; if (preg_match("/^[\w\d\s.,-]*$/", $string)) { $result = true; } return $result; }
In other words, just a standard regular expression with no Unicode trickery. The ‘/u’ modifier would cause this to totally malfunction and match everything. Good to know.