Posts

Showing posts from 2010

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

Image
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  

CFContent is not creating Excel file

Image
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.

Unicode font for the new symbol of Indian Rupee

Image
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').

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

Have you heard about the automobile manufacturer 'VALVO'

Image
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.

Scientific meaning of Gaytri Mantra

Image
*** 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

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:

Adobe Flex launch event at Kochi (KADUG)

Image
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 GOD s 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 ser

My experience with Apple Macintosh

Image
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.

BSNL complaint online registration for Broadband/Telephone

Image
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.

Windows XP hibernating taking too long

Image
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: Right click on My Computer -> select 'Properties' Select the 'Hardware' tab from the Pop-up window. Select 'Device Manager' and from the 'Disk drives', right click your hard-disk -> select 'Properties'. In the 'Policies' tab, check the 'Enable write caching on the disk' and click OK.

Adobe released ColdFusion builder.

Image
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.

Using .jar (Java Archive) file with ColdFusion

Image
" 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.

Backup and restore settings, DSN from your ColdFusion server

Image
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

Image
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'.

Avalanche Breakdown (Semiconductor)

Image
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_b

View debug/log information inside Eclipse with NTail

Image
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:

Crystal ball juggler at Oberon Mall, Kochi, Kerala

Image
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.

Good article about IT workers and excuses

Image
I found this article very good. All, not just IT workers, should remember these points. http://blogs.zdnet.com/BTL/?p=31279

Funny parking sign for two wheelers, from Ernakulam

Image
A Two W h eeler parking sign from Ernakulam, Kerala , INDIA . Seems they did not had enough space for putting "H". From Prasanth's blog

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

Image
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">

Find details of mobile operator from the number

Image
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