Lol what a surprise..
I’ve been pulling my hair why my custom cursor wouldnt work. Turns out, IE (yes, big surprise) takes site url instead of stylesheet as baseurl when it comes to cursors.
I’ve been pulling my hair why my custom cursor wouldnt work. Turns out, IE (yes, big surprise) takes site url instead of stylesheet as baseurl when it comes to cursors.
There are mb_strlen() and mb_substr() for multibyte characters however there is no mb_str_word_count. Hence my previous post.
Always check for local time Despite the fact that my server timezone was set correctly, somehow time() was giving wrong ( UTC) hour. So i ended up using wp’s functions to make sure. $now = current_time( ‘timestamp’, 0 ) ;$local_ts = get_the_time(‘U’,$post->ID);
is_numeric doesnt check strings for numbers. You need to use preg_match(‘#[0-9]#’,$string)
It’s always a pain to work with multibyte characters; most fonts only support ISO-8859-1 English letters. I was working with Imagemagick but some of the strings contained Arabic, Chinese, Russian letters, even some Chinese / Korean, and i did not want to end up with ???’s instead of non-supported characters all over the place. The…
Actually, you do not want to open memcached port in your firewall. #ref: http://serverfault.com/questions/530051/memcached-ports-and-csf
Time and again i fall for this same simple mistake. This may not be intuitive in the context of serialized arrays. If you fetch a serialized array with this method you want $single to be true to actually get an unserialized array back. If you pass in false, or leave it out, you will have…