Tuesday, 24 July 2012

What is JSON?

JSON is JavaScript Object Notation. It is a lightweight data-interchange format and language independent also. It is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of the JavaScript Programming Language. JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C-family of languages, including C, C++, C#, Java, JavaScript etc. These properties make JSON an ideal data-interchange language.

JSON data comes in two structures
  1. Name/Value pairs   
  2. An ordered list of values
These are universal data structures. Virtually all modern programming languages support them in one form or another.
JSON value can be string, number, null, array, object.
JSON data can one of these form(s).

Name/Value pair
JSON data is written as name/value pairs.
A name/value pair consists of a field name in double quotes, followed by a colon, followed by a value.
e.g. "age" : "28"

JSON Objects
JSON objects are written inside curly brackets,
Objects can contain multiple name/values pairs:
e.g. { "Name":"John" , "age":"28" } 

JSON Arrays
JSON arrays are written inside square brackets.
An array can contain multiple objects:
e.g. {
{ "Name":"John" , "age":"28" },
{ "Name":"mick" , "age":"23" }

The MIME type for JSON text is "application/json".

Monday, 11 June 2012

What is codec?

A codec is a program, capable of encoding or decoding a digital data stream or signal. The word codec is a short form of "compressor - decompressor" or "coder - decoder", takes a raw data file and turns it into a compressed file.
A codec encodes a data stream or signal for transmission, storage or encryption, or decodes it for playback or editing.

Why we need codec?

video and audio files are large, so difficult to transfer across the Internet quickly. To help speed up downloads, mathematical "codecs" were built to encode ("shrink") a signal for transmission and then decode it for viewing or editing. Without codecs, downloads would take three to five times longer than they do now.

What are the common codecs people use?

Some codec examples are MP3, WMA, RealVideo, RealAudio, DivX and XviD. There are many other more obscure codecs.

what is Audio codec?

An audio codec converts analog audio signals into digital signals for transmission or storage. A receiving device then converts the digital signals back to analog using an audio decompressor, for playback. Example of this are the codecs used in the sound cards of personal computers.

what is Video codec?

An video codec converts analog video signals into digital signals for transmission or storage. A receiving device then converts the digital signals back to analog using video decompressor.

Means if there is a string with double quotes and if you place a variable in that, it will substitute its value in string.
This is the main difference.
Reference : http://www.scriptvenue.com/2011/10/difference-between-double-quotes-and-single-quotes-in-php/

What is a Payment Gateway?

A payment gateway is a technique to process transactions electronically. Payment gateways provide the tools to process payments between customers, businesses, and banks.A payment gateway is a necessary part of the transaction between customer, business and the banking institutions that both are using. A payment gateway is used to facilitate electronic transactions. These are very safe, as it uses Encryption of payment and personal data.