Skip to main content

Posts

Showing posts from June, 2013

Code Completion in Aptana Studio 3 for CodeIgniter 2

If you don't know code completion in Aptana Studio 3/ Eclipse for CodeIgniter 2 is very easy. Only thing required is to put following code in any new file in CodeIgniter project directory. It’s just a class in which all the codeigniter library clasees are initialized. You can even add support for custom classes by initializing it as shown. [php] <?php class _ { function _() { // any classes you want included in autocompletion $this->load = new CI_Loader(); $this->config = new CI_Config(); $this->email = new CI_Email(); $this->encrypt = new CI_Encrypt(); $this->pagination = new CI_Pagination; $this->session = new CI_Session(); $this->driver = new CI_Driver(); $this->benchmark = new CI_Benchmark(); $this->typography = new CI_Typography(); $this->form_validation = new CI_Form_validation(); $this->profiler = new CI_Profiler

jQuery support in Aptana Studio 3

I use Aptana Studio primarily for web development. It has great support for languages like PHP and JavaScript. But the problem is that I mostly use jQuery rather than code in JavaScript and Aptana does not have good support / content assist from beginning. So we need to install ruble for jQuery library. Ruble is short for Ruby bundle and is a runtime environment that allows the extensibility of Aptana Studio's editors by using Ruby. To install the jQuery bundle follow the following steps: Navigate to Commands | Bundle Developement | Install Bundle. Select jQuery and click OK. Aptana will clone jQuery ruble from github. Include appropriate jQuery sdocml in Project Build Path from Project Properties. Include a VSDoc file for jQuery in your project. [caption id="attachment_47" align="aligncenter" width="1313"] Aptana fetching jquery ruble from GitHub[/caption] You must include appropriate version VSDoc for correct Content Assist. [caption id="attac

flotjs labels on tooltips for categories plugin

I had been using awesome flot.js charting library on my results app . The charts were easy to generate and I included categories plugin to replace x-axis labels to words rather than integer values. But I faced some issues while enabling tooltips and having them display the labels rather than x coordinates. I checked up the source code. [caption id="attachment_35" align="aligncenter" width="646"] getAxes()??[/caption] plot.getAxes() method described in the documentation was giving me an undefined method error.I searched the docs, searched on Google, stackexchange etc.. but to no avail. Then I found solution thanks to firebug. I did a console.log() of the whole item object and began inspecting. I could see few objects that looked promising. Upon further inspection I found a way to map a value back to its label. [caption id="attachment_34" align="aligncenter" width="924"] Dumping entire item object in firebug[/caption] I foun

How to split large mp3 files using mp3splt

If you have a  lengthy  or large MP3 file and you want to  split  it into files of smaller size or duration, You can easily do this using mp3splt. Mp3splt   is an utility to split mp3 and ogg vorbis digital audio files without the need of decoding. It can be used to split a file into no of tracks of fixed duration and size or specified  split points. It supports variable bit rate mp3 files, silent detection, splitting with local .XMCD, .CDDB or .CUE file splitpoints or from external servers like   tracktype.org . It copies the original files first and then generates new, smaller files during the process of splitting without altering the original file. It does not do any encoding or decoding so the splitting is very fast and lossless. Steps to follow Navigate to directory where you have downloaded mp3splt { if using portable version } . Run and execute mp3slpt using the command   mp3splt  . Specify the options according to which you wanna split. The basic syntax is   mp3splt [file path]