Posts

Showing posts from 2009

Array functions in JavaScript

Here are some of the functions useful for array operations Push() - Appends one or more elements to the end of an array var data = [ "A" ]; data.push( "B" ); data.push( "C" ); Result data = ["A","B","C"] Pop() - Pops out (removes) one element from the end of an array var data = ["A","B","C"]; data.pop(); Result data = ["A","B"]; Unshift() - Adds one or more elements to the beginning of an array var data = [ "A" ]; data.unshift( "B","X" ); data.unshift( "C" ); Result data = ["C","B","X","A"] Shift() - Removes one element from the beginning of an array var data = ["A","B","C"]; data.shift(); Result data = ["B","C"]; Splice() - Removes elements specified number of items from the starting index and also op

Generate Fibonacci series using recursion with ColdFusion

Image
Recursion is a method which has been popular from the earlier age of computing. In simple terms, recursion is the process in which a function/method calls itself again and again till a condition is satisfied. It is mainly used to generate or find the sum of series of numbers like Fibonacci series. I seldom had chance to implement the recursion in programming. Lately I had to create a dynamic menu structure using Ext JS and I found recursion was the answer. I was able to neatly create the menu dynamically to 'n' levels. As the creation of menu includes Ext JS and other dependencies, I will try to explain the concept with generating Fibonacci series numbers in ColdFusion . As noted before, recursion is the process of a function calling itself again and again. It is infinite, so we will restrict our demo to values till 50 . Let us first look what a fibonacci series is. The series propagates in a manner such that a number in the series is the sum of two preceeding numbers an

Create shortcut for restarting ColdFusion 8 server

Image
     While developing applications in ColdFusion we may have to restart the CF server occasionally. We have to go to "Windows Services" and then restart the server. This can easily be achieved by creating a shortcut for the restarting process so that you can just click and restart the CF application server without going to the windows services window.      For this, you have to first find out the location of jrunsvc.exe. You can find this by going to Services window (by running services.msc) and open the ColdFusion 8 Application Server. Take the whole path from "Path to executable" along with quotes. Also take the "Service name" (this should be "ColdFusion 8 Application Server"). Now, open a notepad and enter two lines as below. <"Path to executable"> -stop <"Service name"> <"Path to executable"> -start <"Service name"> and save the file as a batch file with a name of your c

Location-Aware Browsing in Firefox 3.5

     Firefox 3.5 have incorporated the facility to let the websites identify the location of the site visitor. The technique is that, when the user browse a site that use location-aware browsing, Firefox will ask for user consent and send details like IP address to Geolocation service providers and get the location. This may not be accurate in India, but they were able to point out my location accurately to the city :-)      More details are in Firefox site  http://en-us.www.mozilla.com/en-US/firefox/geolocation/  where you can also see the demo.     I will do a demo and post the code on my site later.

Gartner Research note on Adobe ColdFusion

See the research note by Gartner on Adobe ColdFusion Past, Present and Future. http://www.adobe.com/enterprise/pdfs/Adobe3112.pdf

Adobe released ColdFusion 9 at Adobe Max

Folks, for your information, Adobe has officially released Adobe ColdFusion 9 at Adobe MAX today. http://www.adobe.com/products/coldfusion/

Create a twitter reader using JQuery

  The year of JavaScript has come and JQuery is one of the powerful JavaScript libraries out there. We could perform a multitude of tasks using these libraries. I have created a twitter reader that displays a user's timeline using JQuery. The implementation is very simple. See the code below.     <html> <head> <title>Twitter Reader</title> <script src="jquery.js" language="javascript"></script> </head> <body align="center" bgcolor="#181C21"> <script language="javascript" type="text/javascript"> $(document).ready(function(){ $.getJSON("http://twitter.com/statuses/user_timeline/prasanthkumars.json?callback=?", function(data){ $.each(data,function(i, item){ $("<div style='color:#865833'>"+item.text+"</div>").appendTo("body"); }); $("div").filter(function(index){ return (index % 2 == 0); }).css

Remove unnecessary blank lines from the ColdFusion output

ColdFusion outputs blank lines on the data sent to the browser which can sometimes get higher that it will be many times higher than actual output lines. In some cases this will eat into the bandwidth. To avoid this, check the 'Enable Whitespace Management' under 'Settings' in ColdFusion Administrator. This will remove many of the extra spaces, tabs, and carriage returns that ColdFusion might otherwise persist from the CFML source file. Enabling this could lead to a minor performance issue with the CF Server, but compare with the bandwidth gain and decide to use this feature.

OpenSearch - enabling your site with OpenSearch

Image
You must have seen list of search engines in mozilla search bar (usually to the right end after address bar). There are a list of sites like Google, Yahoo, Wikipedia on the list from which we can choose the default search engine. These sites are OpenSearch enabled. The Mozilla browser can directly send search queries from the search bar to these sites. There are lot of sites which are OpenSearch enabled. We can easily identify a site is OpenSearch by looking at the arrow icon on the search bar in Mozilla. If the site is OpenSearch enabled, there will be glow for the arrow icon You can click the arrow to see the option "Add " so that the search the site will also get listed in the search engine list. You can search that site by directly entering the search term on the mozilla browser search box and selecting the site from the list of search engines. More details, the demo and how to enable OpenSearch on the following link http://www.prasanthkumars.com/searchdemo.asp

Adobe Product Security Incident Response Team (PSIRT)

blog of Adobe Product Security Incident Response Team (PSIRT)

SAAS and other online free services - How to save your data remotely and access from anywhere?

The new model of software application development cannot ignore the methodology of SAAS that is beneficial for both the customers and companies. In SAAS method, you only pay for what you use, unlike buying the whole suite of applications in which you rarely use options other than a few. If you get MS Office as a SAAS app, you can pay for the Excel or Word and only for the time you use. Coming to the main point of this blog post, “How to save your data remotely and access from anywhere?” I remember the time around 10 years back when I bought my first PC. The Internet was available only for the elite community at a premium and that too dialup. We have to literally pray for the connection to get successful and pray more for not getting disconnected in between. With a little over 8 kbps max speed, you can browse a lot of static sites and check your mails. Hotmail was the free service that give you 2 MB which was more than enough, and who was out there to spam you?

25 Reasons Why Someone Should Join Twitter

One of my friends tweeted these links 25 Reasons Why Someone Should Join Twitter The Ultimate List of Twitter Tools

Y! = why not = Yahoo

Just came to my mind the Y! that is usually seen in Yahoo sites. Does that mean Why Not ? I'm not sure... but that will be nice to find out.

How to show blurry images first and then progressively show clear image

Image
Interlaced Normal We have a slow net connection and when we browse our site we can see that the images are loaded line by line from top to bottom. We can change this behaviour by saving the image as Progressive (jpeg) or Interlaced (gif). We can achieve this using GIMP or there are lot of free image editing softwares out there. The Interlaced image will have a bit more size than normal image, but the user will have a better experience. Try loading the two images in different window and see the difference. The Interlaced image will first load the whole image, but the image will be blurred. This will get sharper and finally the clearer image will be displayed. In case of normal image, the section of image loaded will be sharp, but the whole image will not be loaded at once.

Sava CMS - first impression

I tried setting up SAVA CMS standard in my machine. The installation was very easy. Just gave the required setup mappings in the ColdFusion administrator and DataBase and the site was up. The WYSIWYG editor is cool to use. I tried creating inner pages and links. They are displaying very nice. It even creates a bread crumbs. Try uploading items to Gallery. It will display very neatly. Click on the item, you can see the implementation of Shadow box. The team have surely done a nice work in bringing SAVA CMS.

Free ColdFusion CMS

Sava has released a free CMS in ColdFusion. More details after I try it...

Even adobe don't test site properly

Image
See the screengrab from http://www.adobe.com/misc/training.html on April 02, 2009. The commented out code is not proper....

A construction in Thiruvananthapuram, Kerala that is visible from sky.

Image
The Photos of Sree Padmanabha Swamy temple from Google Earth.

Easily viewable wallpaper

Image
Sometimes the icons on your desktop will not be easily recognizable due to the color of wallpaper. Just try this method to blur the part of wallpaper where the icons appear. You can easily view the desktop icons without much effect on the wallpaper. Using Photoshop or GIMP, select a rectangular area where the icons come and apply Gaussian Blur. Now use this image as wallpaper and see the difference. 

Eco friendly printing

Why not save ink while printing? Here is the Eco friendly font that is designed specially to save ink. It is free to download and use. http://www.ecofont.eu/ecofont_en.html Tip: If you are using mono laser printer, another way to save ink is to change the font color to red. This will reduce the amount of ink used while printing.

Printer friendly page

Usually we see links in web pages to show another version of page that is printer friendly. But, we can create a page such that it will display correctly in browser, but while printing, we can decide which all content to be printed. This is achieved with CSS. The method is simple. You create a style sheet such that the content that you do not want to appear in print will be given the attribute 'display:none'. This style sheet is add to you page with an additional attribute media="print". So, when the user choose to print the page, this style sheet will be considered and the content that are given the display:none attribute will be hidden. http://envisionic.com/webtips/user_experience/printer_friendly.php

'Simple' difference between Proprietory and Free software

Image
See the two images from Visual Studio and Eclipse. While Studio tells 'Close all but this', Eclipse simply tells 'Close Others'.

IT magazine stops print edition

The magazine I.T from the efy group had sent out his last print issue. In the editorial of the Mar 2009 issue they have informed the subscribers about their decision to stop print and move entirely to web which will be available for free. The existing users will get an option to get a refund of the remaining subscription amount or switch to another magazine from the group.

Flash Movie always on top in browser

If you happen to embed a Flash / Flex .swf file in a HTML page and also put a full screen Div over the content, you could probably see that the flash file is on top of the Div even though you set the z-index of the Div. The solution is simple. Add the wmode param while setting the swf Object to the page. This will make the flash file appear below your Div.

IIS very slow after ColdFusion 8 service is stopped.

This is a technote from my experience. I had ColdFusion 8 server installed on my machine. After I stopped ColdFusion service (change to start manually) and restarted the machine, IIS was responding very slow. I was not aware that CF8 had created this issue. I tried to find the reason using the tools provided by Microsoft (DebugDiag.msi and ApplicationVerifier.x86.msi) and found that the JRun of CF server is making the IIS unresponsive. The solution was simple. Just start the CF server service on the machine and IIS will be back to normal.

Danger from Space Debris

As man had reached to outer space, so do the waste. Now the amount of space debris had reached to a serious level that UN had issued a warning about them causing danger to space flights. Space debris often are created by the remains of rockets, parts of satellites and even defunct satellites. Recently, an Iridium communication satellite had collided with a defunct Russian satellite above Sibera. The Iridium communication satellite was a part of the 66 satellites that are used to provide satellite communication.  The debris that fall to earth usually get burned out in outer atmosphere itself, but some metals like Ti will not be burned out and can cause damage to earthly objects. In years to come the amount of debris will only increase which will create considerable safety problems to the ISS.

Relaunched my site

Finding time for updating my site was a bit difficult. But I have completed the homepage and projects page of my new site and uploaded as per schedule.  If we have to find time for something, then you will. After all, all the great achievers had 24 hours a day.

QR (Quick Response codes)

You have seen about barcodes. They provide with basic information about a product. Now comes the QR (Quick Response) code that can store lot more information. QR code is having a matrix structure or can be called as a two-dimensional barcode. QR code is open and we can create one by visiting one of the free code generating sites.

PSLV and GSLV

I just had a quick search on the Polar satellites and Geo stationary satellites.  PSLV is used to launch satellites to Polar orbits. That means the satellite passes above or nearly above both the poles. Also, these satellites passes over a point in earth at the same local time. for eg:, the satellite passes over any point in earth at 1 P.M local time. They are usually used for earth mapping, observation and some weather data collection. GSLV is used to launch satellites to Geo stationary orbits.  Geo stationary orbits means the satellite's orbit will be directly above the equator and will have a period or revolution equal to the period of rotation of earth. The orbit will be roughly 35,786 km above equator. They are usually used for Satellite communications, weather data collection and GPS.

Google's explanation to the "This site may harm your computer" on every search result error that occurred yesterday

Google's explanation to the "This site may harm your computer" on every search result error that occurred yesterday
a good feature in live.com search. Want wallpapers that fit your current resolution ? Search images in live.com and refine search by size -> Desktop.

Hello World!

Hello World! Wow! The same old Hello World!. So, I have started blogging.... :-) more to come...