iPhone and Android developer positions in Kochi

Posted on June 3rd, 2010 by Shibu Basheer

We are in a hiring spree and looking for some good talent to join our mobile platform development team.  If you are a graduate with good academic record and a passion for technology, please apply within.   You should have some experience with C, C++, or J2ME.  Freshers are encouraged to apply for Software Engineer Trainee positions.  For more details, see http://www.cabotsolutions.com/software-engineer-mobile.html

  • Share/Save/Bookmark

Creating Domain name entries in Linode DNS using the Linode API

Posted on May 6th, 2010 by Mahesh Murali

Linode is a popular Virtual Private Server (VPS) service provider which provides quality linux VPS services at affordable prices. Linode allows programmers to create domain name entries in the Domain manager using a language of your choice via their API.  This article describes how domains can be created programatically using PHP.

To use Linode API:

  • Needs Linode account
  • A user must have a Linode account to use the Api. A user can only perform the operations and actions on instances they have access.

  • All requests require an API key except User.GetAPIKey()
  • User.GetAPIKey() can be used to acquire or generate a user’s API key through the API itself.
    The API key can also be generated or regenerated any time via users profile page in linode site.

API Request format:

https://api.linode.com/?api_key=miasgyas09346hwejgn&api_action=domain.list&DomainID=87463

api_action – This parameter is a must to all requests.
domain.list – specifies the api method which the user wants
The last part of the url specifies the parameters needed for the execution of the method.
There can also be an optional parameter with the request: api_responseFormat.

In the above request the method to execute is domain.list and the parameter passes is the domain id.

API response format:

The optional parameter api_responseFormat can be set to either “json”, “wddx” or “human”.
The default is to output responses in JSON format.

Multiple Requests

The api supports supplying multiple requests that gives an array of responses.The format is

https://api.linode.com/?api_key=miasgyas09346hwejgn&api_action=batch&
api_requestArray=[{"api_action": "test.echo", "foo": "bar"},
{"api_action": "test.echo", "testing": "linodeapi"}]

Some api methods with php code samples:

domain.create

This methods create a domain record.

<?php
function add_linode_domain($domain, $sitesSubDomain, $api_key){

	$json_url = "https://api.linode.com/?api_key=$api_key&api_action=domain.create&Domain=$domain&Type=master&SOA_Email=youremail@anydomain.com";

	$json = file_get_contents($json_url,0,null,null);
	$json_output = json_decode($json);
	if(count($json_output->ERRORARRAY) > 0)
		return 0;
	else{									

		return $jsonOutputList->DATA->DomainID;	//Returns the id of newly created domain record.				

	 }								

}
?>

domain.resource.create

<?php
function add_linode_arecord($domain_id, $sub_domain, $target, $api_key){

	$url_add = "https://api.linode.com/?api_key=".$api_key."&api_action=domain.resource.create&DomainID=$domain_id&Type=A&Target=$target&Name=$sub_domain";

	$json_file = file_get_contents($url_add,0,null,null);
	$json_file_output = json_decode($json_file);
	if(count($json_file_output->ERRORARRAY) DATA->ResourceID;//returns a unique resource id of the new added item.
	}else
	     return 0;									    

	}
}
?>

domain.resource.delete

This method deletes a resource

<?php
function delete_linode_subdomain($domain_id, $resource_id, $api_key, $target){

	$url_del = "https://api.linode.com/?api_key=".$api_key."&api_action=domain.resource.delete&DomainID=$domain_id&ResourceID=$resource_id";

	$json_file = file_get_contents($url_del, 0, null, null);
	$json_file_output = json_decode($json_file);
	if(count($json_file_output->ERRORARRAY) DATA->ResourceID;
	}else
		return 0;

}
?>

domain.resource.list

This returns the list of resources of a particular domain.

<?php
function list_linode_subdomains($domain_id, $api_key){

	$json_url = "https://api.linode.com/?api_key=$api_key&api_action=domain.resource.list&DomainID=$domain_id";

	$json_file = file_get_contents($json_url,0,null,null);
	$json_output = json_decode($json_file);
	if(count($json_output->ERRORARRAY) > 0)
		return 0;//return zero if the result is an error

	foreach ( $json_output->DATA as $data ){

		print_r($data);
	}
	return 0;
}
?>

For more information on linode domain please refer http://www.linode.com/api/.

  • Share/Save/Bookmark

Senior Technical Lead / Architect Opening in Kochi

Posted on February 25th, 2010 by Shibu Basheer

We are seeking a technical lead / architect to join our growing team in Kochi. The applicant should have several years of experience in developing enterprise level web applications and should have experience in all levels of development life cycle.

For more details please see: Senior Technical Lead / Architect Opening in Kochi, Kerala

  • Share/Save/Bookmark

Create video gallery thumbnails using FFmpeg with multiple file format support for input video files

Posted on January 15th, 2010 by Murali Krishnan

Using FFmpeg , a complete, cross-platform solution to record, convert and stream audio and video , Cabot developed a unique solution to create Video Gallery using PHP and JQuery.

Features of this tool are:

1. Users can directly upload the video files to a folder on the web server using any FTP client software

2.  Thumbnails for the video files are automatically generated by the tool by reading the video file format.

3. It converts video files  of type s.avi, .wmv, .mov, .qt, mpg or .rm into flv.

A demo of this video gallery can be found here:

Minimum Requirements

1. The tool works only on a Dedicated Hosting Server in Linux

2. FFMPEG should be installed and configured.

FFMPEG can be downloaded and installed from here.

Source Code:

Download the source code from here.

  • Share/Save/Bookmark

Development of Enterprise CRM system with Flex, CodeIgnitor, and Ilog Elixir

Posted on January 12th, 2010 by Shibu Basheer

Cabot Solutions was approached by Sunny South Insulators, to build an integrated web based CRM application to help manage their client contacts, project estimates, scheduling, invoices and calendar modules.   The application was to assist the firm to effectively streamline and manage its business processes.

  • Manage client contacts and maintain a log of all communications with the client.
  • Easily Generate Estimates in printable PDF format.
  • Create, edit and print Work Orders.
  • Issue Invoices after work is completed.
  • Update status of projects.
  • Visually Schedule engineers to Projects in a calendar.
  • Web based software with Rich User Interface for a Desktop like software experience

Read the rest of this entry »

  • Share/Save/Bookmark

Displaying Math equations using MathML in mediawiki

Posted on December 28th, 2009 by Mahesh Murali

Mathematical Markup Language (MathML) describes mathematical notations and capturing both its structure and content. The objective of mathml is to integrate mathematical formulae into World Wide Web documents.
For examples of mathematical expressions and the syntax for writing them within a wiki refer
http://meta.wikimedia.org/wiki/Help:Formula
Example:<math>$ {x}^{2}+4x+4=0$</math> represents the expression

To setup mathml support in mediawiki, we have to install several modules in the server.  Please find the steps to make it work below.

1.Setup Tex proccessing in LocalSettings.php
Open the file LocalSettings.php and enable tex processing. This can be achieved by setting $wgUseTeX = true;

2. Install texvc
The mediawiki application by default comes with the source code for texvc in /mediawiki/math. To install this, we can follow any one of the options below.

  • Download the precompiled binary from http://prdownloads.sourceforge.net/wikipedia/texvc-linux-x86-20040107.tar.gz?download to the math folder.
  • Self compilation and copy to math folder.
    I prefer the (i) method. Also please make sure that the texvc binary file in the math folder has executable permission.

3. Install TeTeX (http://www.tug.org/teTeX/)

4. Install Ghostscript (http://www.ghostscript.com/)

5. Install ImageMagick (http://www.imagemagick.org/)

6. Install AMS fonts (http://www.ams.org)

Please make sure that latex, dvips, convert and gs are installed.
To know whether these modules are installed and the path, use the commands “which latex” , “which dvips” etc in the console.

7. Install libstdc++5(sudo apt-get install libstdc++5)

8. Please make sure the Ghostscript and ImageMagick do not have conflicting versions.

9. PNG files for mathematical expressions are stored in the math directory. Please check the subdirectories math and tmp in the upload subdirectory to see their contents. Sometimes if the
conversion process ceases or has any issue in certain stage, files of that type may remain in the tmp directory only.

  • Share/Save/Bookmark

Seasons Greetings from the team at Cabot Solutions!

Posted on December 23rd, 2009 by Shibu Basheer

The team at Cabot Solutions would like wish all our clients, well wishers and vendors a very happy holiday season.

  • Share/Save/Bookmark

Generating string combinations for a url shortening service using PHP

Posted on December 23rd, 2009 by Mahesh Murali

Url shortening is a technique in which a larger URL is made available by accessing a relatively shorter URL.  This is useful for sending links with via email, twitter,  sms etc.  Popular URL shortening services include tinyurl.com and bit.ly.

Usually, the long web page url is mapped to a randomly generated string-numeric combination such that by typing the
url http://shorteningservice.com/randomstring will redirect to the original long url.

I have made the generation of random strings in a uniform way using php by using the characters A to Z.
This is explained below (Usage Examples: 2). This method provides the user a chance to predict the next short url.

Usage Examples:

1. Permutation of strings:

permutations(”ABCDEF”, 3) will return an array of 130 string sequences from ABC to DEF.
This is the permutation of 6 charecters taken 3 at a time. Here ABC and ACB are taken as seperate entities.

2. Permutation with repetation:

That is a sequence of the form AAA, AAB, …., ZZZ, AAAA,AAAB,AAAC,…ZZZZ,…..,ZZZZZZZZZZ…ZZ.
I can show you a function that returns the next element of the above series when the current string is given.

Php Code:

<?php
//function to get the array permutation string sequences
function stringPermute($orgString,$num){
    $last = substr($orgString, 0, $num);
    $result = array();
    while($last != substr($orgString,  -$num)){
        $result[] = $last;
        $last = getNextString($orgString,$last,$num-1);
    }
    $result[] = $last;
    return $result;
}
//Function to get the next string sequence in order
function getNextString($fullString,$string,$char){
    if($string{$char} <> lastElement($fullString)){
        $string{$char} = $fullString{strpos($fullString,$string{$char})+1};
        return $string;
    }else{
        $string = change($string,$fullString{0},$char);
        return getNextString($fullString,$string,$char-1);
    }
}

function lastElement($string){
    return $string{strlen($string)-1};
}

function change($string,$char,$start = 0,$end = 0){
    if($end == 0)
        $end = strlen($string)-1;
    for($i=$start;$i<=$end;$i++){
        $string{$i} = $char;
    }
    return $string;
}
?>
  • Share/Save/Bookmark

Cabot Solutions at NASSCOM Product Conclave

Posted on October 27th, 2009 by Murali Krishnan

Cabot Solutions is represented by Shibu and Venkatesh at the NASSCOM Product Conclave and we will be available for discussions with potential clients on the 26th and 27th. Call us at 9995978616 or 9446481825 to schedule a chat.

  • Share/Save/Bookmark

New Joomla site developed for backyardaquaponics.com

Posted on October 15th, 2009 by Shibu Basheer

Cabot recently developed a Joomla based solution for backyardaquaponics.com. Backyard Aquaponics Pty Ltd, is a leading edge aquaponics company based in Western Australia. Originally started by Joel Malcolm as a means to provide information packages to people, who were interested in learning more about the subject, the company has now grown and changed quite a bit since those early days.  Aquaponics is the symbiotic cultivation of plants and aquatic animals in a recirculating environment.

The new site was developed in Joomla and has the following features:

  • Innovative new design
  • Search Engine Friendly URLs
  • E-commerce shopping cart
  • RSS integration with PhpBB Forum
Backyard Aquaponics Screenshot

Backyard Aquaponics Screenshot

  • Share/Save/Bookmark