Posts

JavaScript library for Date formatting

Hi all, You must have faced situations where you need to convert a date string to a different object. The usual procedure is to first parse the string into a Date object of that language, specifying your formatting string. The next step is to convert the Date object back into a string specifying the new formatter. In order to do this in JavaScript, I came across two libraries which I thought to share with you. Moment.js which is freely distributable under the MIT license. You can download it from here . There are two versions. You can download the minified source if you need to save space. The following example shows how to use it to convert from one format to another. First include the javascript in your files. var oldFormatTime = moment('2012-10-01','YYYY-MM-dd'); var newFormatTime = oldFormatTime.parse('d-MM-YYYY'); So, the final output would be 1-10-2012 In addition to this, I also found the following library. Datejs is an open source ...

View iCloud Files via Browser

Here is a neat little way to browse all the files on your iCloud account. Simply Browse iCloud Files  using this link. Cheers !!!

Show/Hide Mac Hidden Files

Hi all, You might need to view hidden files on a mac at times. Here is the command which you can use to view hidden files on a mac. Open a terminal window and type the following command and press return. defaults write com.apple.Finder AppleShowAllFiles TRUE After that, you need to restart your Finder to make the changes visible. killall Finder Now you can view all the hidden files. If you want to hide the hidden files back to the original settings, simply run the same command with parameter to FALSE defaults write com.apple.Finder AppleShowAllFiles FALSE Again restart the finder by typing killall Finder That's all for now folks :)

Convert wav file to caf file Mac

Hi all, Here is a command which you can use on the mac to convert a wav file to caf file. afconvert -f caff -d LEI16@44100 -c 1 inputMusic.wav outputMusic.caf Here is the  Link to Stack Overflow thread  where I found this from :)

iPhone SDK: Create .ipa file from Corona Build

Hi all !!! After a long time, I thought of putting a post on blogger. Suppose you simply have the build file from an iPhone project, and needs to build a .ipa file from it. It is very simple, if you have the project source code. But, suppose you only have the build, but needs to build a .ipa file from it. You will face this situation if you use Corona SDK for building games etc. Even so, there is a workaround for this. After receiving the build make a folder and name it to "Payload". Put the build inside it and zip it. Then simply rename it to "<projname .ipa>". Now you should be able to use the .ipa file as normal.

Send Gmail using Dot NET

Hi, in my previous posts, I have posted how to send mail using the Java API. In this section, I would like to demonstrate on how to send mail using Dot NET. Using Dot NET, it is equally easy to send mail. In this post I would use my Dot NET application to connect with Google's outgoing mail server (Google's SMTP server) and use that to forward my mail. (In my previous post, I've demonstrated on sending mail using my own SMTP server which ran on my machine. In this scenario, it will directly put the outgoing message into the Gmail's SMTP server) You will be using mainly few Classes to get the job done. System.Net.Mail.MailMessage System.Net.NetworkCredential System.Net.Security.SmtpClient These classes will provide the basic methods to get the job done. You will also be using System.Net.Mail.MailAddress class. (Though there is a way to get the job done without actually needing this.) First of all, you need to import the namespaces. using System....

Download File using Dot Net

In this post, I will demonstrate how easy it is to download a file from a web server to your local hard drive. In most scenarios, you may browse the net using your web browser and click on a hyperlink to start a downloading of a file from a remote site. Some of you may be interested in how to download this using their application code using Dot Net. This can be very easily achieved using the WebClient class under System.Net namespace. First, import the System.Net namespace. using System.IO; The above LOC will do so. Now, create an instance of WebCleient class. WebClient client = new WebClient(); Now, call the DownloadFile method client.DownloadFile(<url>, @"<fileDestinationName>.<filetype>"); Have fun. Cheers !!!!