HTML5 Form Elements Demo
Place Holder Email Type Required Attribute Number Type (N/A on firefox) Range Type (N/A on firefox)
Place Holder Email Type Required Attribute Number Type (N/A on firefox) Range Type (N/A on firefox)
It’s been so long that I haven’t touched C# and today I got the chance to use it again, as you know, Enum is kind of popular in C# and for sure I encountered the bitwise operation again. To quickly pick it up again, I came across this awesome article http://weblogs.asp.net/wim/archive/2004/04/07/109095.aspx
We need to leverage TEMPLATE_CONTEXT_PROCESSORS, the following example uses the “home” application add this to settings.py TEMPLATE_CONTEXT_PROCESSORS = (“django.contrib.auth.context_processors.auth”, “django.core.context_processors.debug”, “django.core.context_processors.i18n”, “django.core.context_processors.media”, “django.core.context_processors.static”, “django.contrib.messages.context_processors.messages”, “home.context_processor.remote_ip”) in home application, create a python file called context_processor.py in the context_processor.py add a function like this: def remote_ip(request): return {‘remote_ip’: request.META[‘REMOTE_ADDR’]} for any templates needs to use this processor… Read More »
function get_range_dates($start, $end){ $days = array(); $start_tmp = explode(“-“,$start); $end_tmp = explode(“-“,$end); $start_time = mktime(1,1,1, $start_tmp[1], $start_tmp[2], $start_tmp[0]); $end_time = mktime(1,1,1, $end_tmp[1], $end_tmp[2], $end_tmp[0]); while($start_time <= $end_time){ $days[] = date(“Y-m-d”, $start_time); $start_time += 86400; } return $days; } //calling the function get_range_dates(‘2011-02-01’, ‘2011-03-08’); Result: Array ( [0] => 2011-02-01 [1] => 2011-02-02 [2] => 2011-02-03… Read More »
Server Load: Just a quick tutorial on drawing the server load bar chart in php: serverload.php function get_server_load($windows = 0) { $os = strtolower(PHP_OS); if (strpos($os, “win”) === false) { if (file_exists(“/proc/loadavg”)) { $load = file_get_contents(“/proc/loadavg”); $load = explode(‘ ‘, $load); return $load; } elseif (function_exists(“shell_exec”)) { $load = explode(‘ ‘, `uptime`); return $load; }… Read More »
I have published a hash reverse lookup service http://hash.limsbros.com/ It provides: a web page for searching md5 and sha1 hashes restful service for search md5 and sha1 hashes Currently I am still importing the word list, so if you don’t get a result from your hash, please try it again in a few days.
I was writing a Python program to perform some routine tasks on twitter API, and came across this very helpful article for creating daemon process in Python… thought you might be interested… A simple unix/linux daemon in Python
Overview of Firebug 1.6 Firebug 1.6 supports Firefox 3.6 Console and Command Line Command line available on all panels New API for the console object: console.table() Console allows to filter its content Improved auto-completion now the best of all Logging of cut/copy/paste events Support for XPath console logging Descriptive background colors for console messages HTML… Read More »
A while ago I wrote some dokuwiki plugins: User Home Page Auto Include Index Table Math Modal Popup ACL Made Easy
If you have used JQuery, you should have already used something like this Ever wonder how to implement this? Let’s start: Have parameters to pass? No problem, see this