Category: Code

Installing Perl Modules

Install Perl modules on a linux system – must be connected to the net perl -MCPAN -e shell If CPAN…

Decompiling CHM File to HTML

hh.exe -decompile <FolderName> <Chm_File_Name> Example hh.exe -decompile “E:\Backup\” E:\All Song4s.chm [tags]windows,chm,help,decompile,html,file[/tags]

Find Difference Between 2 Dates in PHP

This function will find the difference between two given times. Does PHP already have a native function for that? //The…

Find the Fourth Sunday

Javascript code for finding the fourth sunday in any given month. function findFourthSunday(year,month) { var fourth_sunday = 0; var sunday_count…

Shortest way to create an XMLHttpRequest object

For best results use a framework – like jx http = window.XMLHttpRequest ? new window.XMLHttpRequest : (window.ActiveXObject ? new ActiveXObject(“MSXML2.XMLHTTP”):…

Command to Replace a String in all Files in Current Directory

Replaces all instance of ‘<old string>’ with ‘<new sting>’ in all the files of the current directory. perl -pi -e…

Using PHP’s Curl functions behind a Proxy

Using PHP’s Curl functions even if the net is accessible only thru a proxy. This is the only way curl…

Changing separator with Perl

This will join all lines of a file together. Sometimes I have a list of something in a file, one…

Object or Array

Find whether the given variable is an object,or is an Array? function isArray(testObject) { return testObject && !(testObject.propertyIsEnumerable(‘length’)) && typeof…

Submition to Social Bookmarking sites.

<div id=”social-bookmarking”> <strong class=”social-tagline”>Share this…</strong> <ul> <li><a href=”http://del.icio.us/post?url=http%3A%2F%2Fwww.technacular.com%2F2007%2F02%2F12%2Fcollection-of-sites-providing-free-web-icons-and-buttons%2F&title=Collection+of+Sites+Providing+Free+Web+Icons+and+Buttons” title=”del.icio.us”><img src=”http://www.technacular.com/wp-content/plugins/sociable/images/delicious.png” title=”del.icio.us” alt=”del.icio.us” class=”sociable-hovers”></a></li> <li><a href=”http://digg.com/submit?phase=2&url=http%3A%2F%2Fwww.technacular.com%2F2007%2F02%2F12%2Fcollection-of-sites-providing-free-web-icons-and-buttons%2F&title=Collection+of+Sites+Providing+Free+Web+Icons+and+Buttons” title=”digg”><img src=”http://www.technacular.com/wp-content/plugins/sociable/images/digg.png” title=”digg” alt=”digg” class=”sociable-hovers”></a></li>…