Monday, December 27, 2010

Converting a number in ColdFusion to specified base (binary, hexadecimal etc)

Just a quick post on converting numbers to different base using ColdFusion. The FormatBaseN can be used to convert a number to a different base.

Function Syntax
FormatBaseN(number, radix)

Parameter Description
number Number to convert
radix  Base of the result (2, 10, 16)

More details on the Adobe link 

Tuesday, November 9, 2010

CFContent is not creating Excel file

I am facing a weird problem with my ColdFusion server. I cannot export data to Excel using the <cfheader> and <cfcontent> tags. If I create an Excel file, the content will have all the table, tr, td tags. It had been long time since I tried this so think I must have changed some settings in CFAdmin.

I will try to fix this and post an update. If any of you have an idea on how to resolve this, please comment.

***** UPDATE  *****
This was actually not a problem with ColdFusion. The Open Office was the problem. It was not rendering the content correctly.

Friday, September 3, 2010

Unicode font for the new symbol of Indian Rupee

Finally Indian Rupee (`) got a symbol. On July 15th 2010, the winner of the contest was announced and the new symbol of Indian Rupee was shown to the world.  The symbol is derived from a combination the Devanagari letter ‘र’ and English letter ‘R’.
The font can be downloaded here.

Installation instructions

  • Unzip the zip file to C:\temp folder.
  • Open Control Panel -> Fonts
  • Select File->Install New Font... 
  • In the new window, under Folders, select c:\temp
  • The font will be listed in the 'List of fonts:' box.
  • Click the font name and click 'OK', the font will be installed in your machine.

Using the font

  • In MS Word (or other word processing or similar applications), select the font 'Rupee Foradian' in the font list.
  • To type the character, use the '~' key (top left key above 'Tab').

Saturday, August 28, 2010

ColdFusion 8 Decrypt error with CFMX_COMPAT algorithm hotfix

I was trying with encryption and decryption in ColdFusion for a demo iPhone app using SOAP. Well, the problem was with the ColdFusion end. I tried with default (CFMX_COMPAT) algorithm. I was getting an error "The input and output encodings are not same" while decrypting. After trying to fix this for some time, I googled and found that it was the problem with ColdFusion 8 (bug ID : 75676) and need to apply the hotfix (Cumulative Hot Fix 3 for ColdFusion 8.0.1). I applied it to the server and the error was resolved.

Hot fix can be obtained from here. Cumulative Hot Fix 3 for ColdFusion 8.0.1

Wednesday, June 16, 2010

Have you heard about the automobile manufacturer 'VALVO'

I saw this vehicle on the way home, near Kollam. See the 'VALVO' written neatly on the back of this mini bus. They even have a Merc logo on the rear window.

Thursday, May 6, 2010

Scientific meaning of Gaytri Mantra

*** This is the content of a mail forwarded to me. I found it interesting and like to know more. Please let me know if you know other links or related materials. ***


Gayatri mantra has been bestowed the greatest importance in Vedic dharma.
This mantra has also been termed as Savitri and Ved-Mata, the mother of the Vedas.

Om bhur bhuvah swah
Tat savitur varenyam
Bhargo devasya dheemahi
Dhiyo yo nah prachodayat

Thursday, April 29, 2010

Working with large numbers in ColdFusion

I just thought of sharing my friend's experience with managing large numbers using ColdFusion. They got an assignment that will manipulate numbers and things seem good at first. When the numbers started getting larger(20 digits), we had a problem. In CF, the limit of Integer is -2,147,483,648 and 2,147,483,647 (32-bit signed integers) and the calculations started giving unexpected results.
After quite a bit of Googling and posting in forums, they got the solution from a user in the Adobe forums. It is to use the Java Math object and convert the number to BigInteger. Here is the code:

Tuesday, April 13, 2010

Adobe Flex launch event at Kochi (KADUG)

I got the opportunity to attend the Adobe Flex launch event at Kochi, thanks to @Juwalbose, @Jerrydon and others. They made it happen. After the first meeting of GODs a few months ago which I was not able to attend, they should have worked really hard to organize this event.
I was really happy to see my ex-colleagues and of course, my friends at GODs and twitter. This was the first time I met them in person. I got new friends too from this event. It was nice meeting them.

I reached a bit early for the event and got some time to chat with others. @Harish Sivaramakrishnan did the first presentation about Flex. Even though he reached a bit late due to a delay of his flight, the wait was worth. I was amazed to see the new capabilities of Flex builder. The developer does not even have to touch the code to achieve something, and that too like creating a full fledged video player !. Awesome. I had moved away from Flex development around 1 year ago, but seeing his presentation I seriously think of coming back to Flex :-).

Equal amazement was from new Photoshop CS5 from Adobe. @Juwalbose showed a video of new capabilities of Photoshop. The Intelligent fill is fantastic.

@Diana Kulke from Bridge-India who sponsored the event invited us to the Open Coffee event at Kochi. I hope to attend that too.

@Thasleem did a presentation on the new ColdFusion Builder and CF 9. It was nice to know about the new features Adobe has incorporated into their first ever ColdFusion IDE.

Later we had a few presentations on Action script.

I was lucky to get an Adobe Flash Platform T-Shirt after the event. They gave away a few T-shirts, notebooks and few pens. We took a couple of photos before we left.

http://picasaweb.google.com/prasanthkumar.s/KADUGFlexLaunchEvent

This was a nice event and I hope they will organize more such events in future to share knowledge and get in touch with others in IT field.

*** UPDATE ***
This post won the blog contest for Adobe Flash Builder 4 / ColdFusion Builder 1.0 on #KADUG.

Thursday, April 8, 2010

My experience with Apple Macintosh

I had earlier used the Mac in office for a few times for testing. That was for a very short time. For the last one week I had been using solely a Mac after moving to iPhone development. The one I had is a mac mini with Intel processor. Having seen those bulky Windows PCs I always wondered how Apple managed to pack all the stuff like DVD drive, USB, blue tooth, firewire, wi-fi etc in such a small cute box.
It is irrestible to explore the facilities in a mac. The display, animation, performance... everything is awesome. I liked the way the user interface and the applications are managed. The speed each application is launching is something that can be dreamed of in Windows PCs. The Spotlight facility to search is the one MS has copied to its Windows 7.
There is elegance in a mac.

Saturday, April 3, 2010

BSNL complaint online registration for Broadband/Telephone

One of my friends gave me this link to register complaint about BSNL service.

http://mis.bsnl.co.in/pgs/internet/pgwebregn.asp

I had a complaint with my broadband connection that it became slow and started to drop frequently. I registered a complaint in this page and within 1 hr got a call from the exchange. Now, after 2 hours, they came to my home and fixed the problem.
Hope everyone using BSNL could avail this facility.

Friday, March 26, 2010

Windows XP hibernating taking too long

My Windows XP machine suddenly started taking very long time to hibernate. It was working fine and I was puzzled with the situation. I had not installed and apps and suspected virus infection.
But then I remembered disabling "Enable write caching on the disk' for my hard-disk few days ago. I enabled the option. Bingo. Problem solved.

Steps:
  1. Right click on My Computer -> select 'Properties'
  2. Select the 'Hardware' tab from the Pop-up window.
  3. Select 'Device Manager' and from the 'Disk drives', right click your hard-disk -> select 'Properties'.
  4. In the 'Policies' tab, check the 'Enable write caching on the disk' and click OK.



Monday, March 22, 2010

Adobe released ColdFusion builder.

Adobe released ColdFusion builder. See the link  http://www.adobe.com/products/coldfusion/buy/#cfb
It comes lot of facilities and support for ORM with ColdFusion 9.
You will also get a complimentary copy of Flash Builder 4 Standard with this version.

Thursday, March 18, 2010

Using .jar (Java Archive) file with ColdFusion

"Java is running under the hood of ColdFusion and it is easier to use Java / Java Archives" with ColdFusion. I have been hearing about this since I have started studying ColdFusion. So I decided to take a look at it. I have studied Java only during my course and does not have much experience with it. Now, with the help of Eclipse, it is very easy to create a Java project and export it as archive.

Tuesday, March 16, 2010

Backup and restore settings, DSN from your ColdFusion server

When you have to re-install the Operating System or re-install Adobe ColdFusion server in your machine, you think of the tedious task of having to re-do all the settings and create the datasources again. Using the ColdFusion Archives available in the ColdFusion Administrator, you can backup and restore the settings from your ColdFusion server. The settings are stored as .car files and can be used to port the settings.

Analyze ColdFusion code for errors and code compatibility using ColdFusion Administrator

ColdFusion Administrator gives the facility to analyze your code for compatibility with current version of ColdFusion and also for errors. To start the Code Analyzer, go to ColdFusion Administrator (should be available at http://localhost/CFIDE/administrator/index.cfm) and go to 'Debugging & Logging' -> 'Code Analyzer'.

Friday, March 5, 2010

Avalanche Breakdown (Semiconductor)

IBM researchers invent a device that uses light to help computer chips to communicate. What I found interesting in this is the phenomenon of Avalanche Breakdown in Germanium.

From Wikipedia : "Most of the time, the electron and hole will just move to opposite ends of the crystal and stop. Under the right circumstances, however, (ie. when the voltage is high enough) the free electron may move fast enough to knock other electrons free, creating more free-electron-hole pairs (ie. more charge carriers), increasing the current. Fast-"moving" holes may also result in more electron-hole pairs being formed."

That is, in Germanium, an incoming light pulse frees a few charge carriers that, in turn, free others until the original signal is amplified many times.

More details:
http://www.nature.com/nature/journal/v464/n7285/full/nature08813.html
http://domino.research.ibm.com/comm/research_projects.nsf/pages/photonics.index.html
http://en.wikipedia.org/wiki/Avalanche_breakdown

Thursday, March 4, 2010

View debug/log information inside Eclipse with NTail

Implementing Debugging and Logging functionality in your application will help you a lot when tracing the details of an error - while developing and also after deployment.
There are lot of libraries out there like log4j, which you can integrate with your app for easier log management. Log4j/log4net have the provision to either log the information to a file or send email.
So, will it be helpful if you can directly see the logs in Eclipse that will get updated whenever the log file gets updated ?

Using NTail, you can achieve this. The content of the log file will be shown in a window inside Eclipse which will automatically get updated.

Steps:

Wednesday, March 3, 2010

Crystal ball juggler at Oberon Mall, Kochi, Kerala

I saw an amazing maneuver of crystal balls at the show in Oberon Mall, Kochi. I had my digital camera with me and recorded some moments from the show. See them below.

Saturday, February 27, 2010

Thursday, February 25, 2010

Create a Zip file and make available for download using Coldfusion 8

Coldfusion 8 has the tag CFZIP by which we can zip/unzip a folder in the server. For creating a file download, that is, the user will be prompted for saving the file, we can use CFHEADER tag. We can use CFCONTENT tag to deliver the content in an unpublished directory (not mapped to web server) to the user.

Now, let us begin with cfzip.

<cfzip action="zip" source="C:\myfiles\myphotos" file="c:\download\myphotos.zip">

Tuesday, February 23, 2010

Find details of mobile operator from the number

Just came across this wikipedia page showing the list of allocated numbers to different mobile operators in India. If you get the first four digits of the mobile number, then you can go through the chart in the page to find out the operator and the state.
http://en.wikipedia.org/wiki/Mobile_telephone_numbering_in_India