Freelance Jobs Freelance Jobs

Sunday, May 23, 2010

Twiter Blocked in Pakistan

Twitter is now blocked in the Pakisatan. Pakistani authorities already blocked facebook, and Youtube in Pakistan.


It mean now Pakistani users cannot log in to Twitter. The browser displayed a message “this site is restricated.”, when users tried to browse the site.

Pakistani Telecommunication Authority said that due to “sacrilegious contents”, Twitter is blocked in the Pakistan.Pakistani Authorities has been blocked more thatn 450 url in Pakistan.

Sunday, May 9, 2010

Installation of CakePHP


System Requirement

  • Http Server should be enabled
  • mod_rewrite should be enabled

Installation of cakephp

Follow the following step to install the cakephp:
  • Download the zip file from cakephp.org site
  • Create a new folder, which has same name as your site's name, in xampp/htdocs folder in your local drive
  • Extract the zip file in this folder


Database configuration in cakephp

Follow the following step to database configuration in cakephp
Create a new database in mysql or in database engine which you want to use.
Open the file xampp\htdocs\your_ site's_name\app\config\database.php
In this file there is two variable $default and $test are defined in class DATABASE_CONFIG
$default is used unless user does not specify another connection by $useDbConfig  property of a model.

Change the following code
'driver' => 'mysql',
  'persistent' => false,
  'host' => 'localhost',
  'login' => 'root',
  'password' => '',
  'database' => ' ',
  'prefix' => '',

driver: The name of database driver which is used to create database. You can use mysql, oracle, odbc etc. If you want to use datasource leave this field blank.

persistent : This is used to set database connection be persistent or not. If we set it true, the connection be persistent and if we set if false, the connection be non-persistent.

host: This is  host name of database's server.

login: This is login name of the database's server.

password : This is password of the database's server.

database: This is name of the database.

prefix: If the database tables has prefix, then set the prefix value here otherwise leave it blank

Wednesday, May 5, 2010

Content Management System

CMS, stands for content management system, is an application that makes content authoring and deploying easy. It allow multiple user to manage, deploy, edit, content on the base of their role.

CMS is based on the content. The content can be anything which is used to display data into application. For example, in a website, content can be text, menus, images, banner, block, etc which are used to display the site to end user. The content can be as per the requirement of the application. For example, a sports site contains different content rather than movie's web site. CMS is used for storing, managing, publishing, deploying of all type of content.

Using CMS, a person who does not have the knowledge of web developing, can work on the site. Basically, in cms the developer and content writer work differently. The developer develop the application and content writer modify, publish, edit the content of the application. Thus, the developer and content write work on the same application without interfering each other's work.

There are number of CMS available:

CMS in PHP
  • Joomla
  • Drupal
  • Wordperss
  • PHP-fusion
  • PHP-Nuke
  • Mambo

CMS in java
  • Dspace
  • Fedora
  • dotcms
  • japs
CMS in .net

  • dotnetnuke
  • umbraco
  • mojoportal

Tuesday, April 27, 2010

Introduction to CakePHP

CakePHP is open source web developing framework of PHP for creating web applications. It provides programmer a foundational structure to create a web applications.

CakePHP is based on the MVC architecture to create a web applications. It means that business logic(Model), user action(controller) and data presentation to user(View) are different from each other.

Controller: Controller contains the logic of user's application. The different functionality are contained by each controller. It used models to retrieve data from database or save data to database. It also set variable which is used to render data in view file.

Models: Models directly connected to database tables. It retrieve data from database and send it to controller, get data from controller and save it to database. Models behave like medium between controller and database tables. The models is interact with controller but not interact with view.

Views: view is used to present data to end user. It gets the variable from controller and display it to end user. View contains layout, element, for data presentation but no logic to retrieve data from database.

Since cakephp is open source so any body can download it from www.cakephp.org and install it and can work. There is no need of license fee to work in cakephp. You have to knowledge of PHP to start work in cakephp.


Folder Structure

When we download the cakephp from site, it is a zip file. After extracting it, the following files and folder you should see:

  1. app
  2. cake
  3. vendors
  4. .htaccess
  5. index.php
  6. README

All the applications file of the user are placed in app folder.
All the file of cakephp are placed in cake folder.
The third party files are placed in vendors folder.


App folder:

The app folder contains following files and folder:

config :
The config folder contains the following files and folder

database.php : It is used to database configuration.

routes.php : It is used to set up routes to user controllers and their actions. The routes is a mechanism which allow user to freely connect different urls to chosen controllers and their actions.

bootstrap.php: This file is automatically loaded by the app/webroot/index.php file after the core bootstrap.php. This file is used to include or require any files in user's application. This is application wide file that is used to load any function that is not used within a class define.

core.php : It is used to configure core behavior of cake.

controllers: It contains the controller of the user's application.

locale: It contains the files that is used for internationalization.

models: It contains models, behavior of the user's application

plugins: It contains plugin package of user's application.

tmp: It contains temporary file of user's application. This folder is used to store model descriptions,
log, caching, session information.

vendors: It contains the third party files to used in user's application. The file placed in this folder can be accessed in application using App::import('vendors','name');. The vendors folder is placed also at top level. The top level vendors folder contains third party file for user's all application but if user is creating multiple applications then he can placed third party files in this folder to use for specific application.

views: It contains view file, layout file, elements, error page of user's application.

webroot: This folder serve as document root for user's application. It contians css stylesheet, javascript file, image for user's application.

Monday, April 26, 2010

Validation in CakePHP

In a website, some time user need to insert data into database. User can insert inappropriate data to database, different from the database data type or requirement of the site. So, we need to use validate data before inserting it into database.
Suppose in user registration form, there is field like user name, password, confirm password, first name, last name, email id. User name require only alphanumeric character and not empty field, email should be valid email address and not empty field, password should be at least 8 character and not empty field, confirm password should match with the password field, first name and last name should be alpha character and not empty field.
If we will not validate data according to condition of certain field, then whatever user insert, it will store into database. This is not a good programming practice.

Validation is require to check user's data before storing in database. For validation, we check user's data according to condition specific to field.

As we know, cakephp is a framework of php which is a model-view-controller architecture. If you don't have basic knowledge of cakephp, first you have to learn about it.
In cakephp, we use validate variable to set the condition for validating user's data. We write this variable in our model. Suppose we want to validate user registration form, then there will be user model, users controller, registration view file in our cake php.


In user model

var $validate=arra('uname'=>array('notEmpty'=>array(
'rule' => 'notEmpty',
'required' => true,
'message'=>'could not be empty',
'last' => true
),
'alphaNumeric'=>array(
'rule' => 'alphaNumeric',
'required' => true,
'message'=>'only alpha and number are allowed',
'last' => true
),
),
'passwd'=>array('notEmpty' => array(
'rule' => 'notEmpty',
'required' => true,
'message'=>'could not be empty',
'last' => true
)),
'email'=>array('notEmpty' => array(
'rule' => 'notEmpty',
'required' => true,
'message'=>'could not be empty',
'last' => true
)),
'fname'=>array('notEmpty' => array(
'rule' => 'notEmpty',
'required' => true,
'message'=>'could not be empty',
'last' => true
)),
'lname'=>array('notEmpty' => array(
'rule' => 'notEmpty',
'required' => true,
'message'=>'could not be empty',
'last' => true
)),
);




In users controller, register function

function register() {

if(isset($this->data))
{
$this->User->set($this->data);

/*$this->User->validates() use to validate user's data according to validate variable in user model*/
if($this->User->validates())
{
$this->User->save($this->data);
$this->Session->setFlash('Data has been saved');
$this->autoRender=false;
$this->redirect('index');
}
else
{
$this->set('errorMessage','Please correct below error');

}
}
}


Register view

$form->create('User',array('action'=>'register'));
print ""; print $form->label('User Name'); print $form->text('uname',true).$form->error('uname'); print $form->label('Password'); print $form->password('passwd').$form->error('passwd'); print $form->label('Email'); print $form->text('email').$form->error('email'); print $form->label('First Name'); print $form->text('fname').$form->error('fname') print $form->label('Last Name'); print $form->text('lname').$form->error('lname'); print $form->end('Register'); ?>


$form->error('uname') is used to display error in the output. If we are using $form->input then we don't need to use this variable to show error. But if we are using $form->text, then we need to use $form->error to show the error in the output.
In $form->error('fieldname'), fieldname is your database field name as model is automatically connected to database table in cakephp.

Saturday, April 10, 2010

MVC(Model-View-Controller)

MVC(Model-View-Controller) is an architecture which separate data presentation(View), domain logic(Model) and user interaction and processing(Controller) with each other. The concept behind this is to changing the data presentation does not affect the business logic and processing, changing the business logic does not affect the user presentation and processing.

Now days, the software engineer is using MVC architecture to develop the program. MVC architecture allow the programmer to reuse object code.

Model:

In MVC, model means the domain logic of the data. It encapsulates data and functionality domain logic. While creating model, its no concern that how data be look and feel to the user. Its contains the functions which process on the data. These functions be public which accessed in view and controller.

View:

In MVC, view means data presentation to the user. View obtains data result set from model and render it to user. The output of any application be generated in view. View can access the model but can not change the state of the model.

Controller:

In MVC, controller receives the input from user, call responsible model. The controller is not act like bridge between the model and view. Its only responsible to calling responsible model to user input and informs the view that state of model has been changed.

Tuesday, April 6, 2010

Image Hosting Site

Since the popularity of the online auction, blogs, forums are increasing day by day in the internet, the demand of the image hosting service are increasing.

The web hosting service offer user to uploaded image and provide a url of the image. The user can use image in anywhere in the internet using this url of the image.

Now days, Image hosting business has been expanded well and attracted almost 85% of the audience market around the world.

The image hosting site offer free user to upload limited images while premium members to upload unlimited images. There are number of image hosting site which are providing the service to the user. 

The process of uploading image is very simple and easy.  User need to only browse image from his computer and upload the image into website server. The server provides the url of the image to user. The site allow user to upload image in many format like jpeg, png, gif.

The list of image hosting site:




Here is list of some image hosting site. Its very easy to search free image hosting site through Google. Anyone can find the site through the Google. Choose any image hosting site and plan as per your requirement. For limited image upload, choose free membership and for unlimited upload of image choose premium membership of the site

Wednesday, November 18, 2009

GO: Google's programming language

The Developer of World's most popular search engine, Google company, launch its own programming language, Known as go. go is open source development language. Google believes that Go will combine performance with speed, will reshape the development and software industries in its favor.

Go is based on the, one of most widely used programming language trees in the world, C programming family.

Web and computing have changed dramatically in the last ten years, but the language powering that computing have not. Google analysis it and developed,new programming language, Go. Google believes that Go is more efficient programming language to computing it and having one it designed being used in thousands web  and software apps.

Monday, November 9, 2009

Writing Bug Free C Code

The book is aimed from beginner to noivce programmer who want to write bug free C code. The book starts with why bug is exist, moves to class methodology and general tips for writing bug free C code.
Download

C Books

Pointer and Arrays in C
Download

Monday, October 26, 2009

Affiliate Program

Affiliate program is most popular and strong marketing tool which advertise product of the companies. AS Companies does not have so much resource that they can market their product, affiliate program play a major role to promote their business and market their product. In affiliate program, Affiliate direct traffic and potential customer to the company’s website and Affiliate rewarded by company by attractive commission.

There are number of third party affiliate program which play a role between company and affiliate. They contact to the company for their marketing and provide it to affiliate and on behalf of company offer commission to the affiliate.

 TOP 10 Affiliate Programs
  1.  Pepperjam Network
  2.  AffiliateBOT.com
  3.  FriendFinder 
  4.  Linkshare Affiliate
  5.  ThinkHost Hosting
  6.  MedStore Health
  7.  Market Health Health
  8.  MyRXCash Health
  9.  Lunarpages Hosting
  10. Axandra Software


Sunday, October 25, 2009

Nokia sues Apple

The largest handset maker in world, Nokia,has annoced that it is suing the the Apple, maker of one of the most popluar IiPhone for infringing of patents with the iPhone.


Nokia said in a statement that The patenets coverd wireless data, speech coding, security and encryption and are infringed by all Apple iPhone models shipped since the iPhone was introudced in 2007.

Ilkka Rahnasto, vice president, legal and intellectual property at Nokia, said "The basic principle in the mobile industry is that those companies who contribute in technology development to establish standards create intellectual property, which others then need to compensate for".

The phone company has lot of technology patents and does not want that other company use it without paying their dues. Accoring to Nokia press release that apple is refused to agree to “appropriate” license terems. The patents in question relate to GSM, UMTS and wireless LAN (WiFi) technologies that the iPhone uses to connect to wireless networks across the globe.

The phone company filed the complaint against Apple, which relates to 10 patents, with the Federal District Court in Delaware in the US.

Wednesday, October 21, 2009

Transcend Card Readers Compatible with Windows 7

The current range of USB card reader of Transcend Information have all passed windows 7 compatibility tesing. Transcend Information produly announces it and its current range of USB card readrer are fully qualified to bear the “Compatible with windows 7” logo. Windows 7 is newest version of operating system of microsoft.

Austin Huang, Regional Head – sales, SAARC & APAC, Transcand said, “We always strive to keep pace with technology. Our incessant R&D has made our products highly acceptable in the market. Now that Microsoft is launching its latest version of Windows operating system, Transcend users can freely use their card readers on Windows 7 computers without worrying about compatibility issues.”

According to ChangeWave Research, the current satisfaction rate for Windows 7 is four times higher than Windows Vista.

Now Transcend’s card reader, including RDP8, RDP6, RDP5, RDP3 and RDP2 have all been confirmed to meet Microsoft's strict standards for Windows 7. This ensure that user can freely use trancend card readre on windows 7 wihtout worrying about compatibilty isssue.

Transcend’r card reader have stylish designs, lightweight, sleek and easy to carry, plug and play installation and clearly labeled slots to avoid confusion and save time.

Saturday, October 17, 2009

Sony Corp plans to launch 3D TV

As per Financial Times Sony Corp plans to launch 3D TVs next year in a move to spur sales amid slowing growth in flat TV demand.


Howard Stringer, CEO of Sony, will announce the 3D TV launch as well as plans to make its Vaio PCs, Play Station 3 game machines and Blue– ray players compatible with the technology at the IFA electronics trade show in Berlin on Wednesday, the FT said.

Sony said the company plans to hold a news conference at the IFA at 1500 GMT and that it may update progress on its 3D TV development there, but declined to comment on the timing of any 3D TV launch.

State Bank of India's ambitious Project "25000 ATM"

State Bank of India has launched ambitious project “25000 ATM” in which the bank envisages to double its ATM based from 12,250 ATMs to 25,000 ATMs by March 2010. Approx 200 ATMs are to be intsalled by its Associate banks (AB).

For the success of this project, State Bank of India has done a five year contract with Huges Communications India Ltd to deploy State Bank of India’s (SBI’s) network of 2880 VSAT to connect its off site ATM across the country.

Huges Communications India Ltd. is the premier provider of broadband satellite and network services. Huges Communication deploy the turnkey network , which encompasses system integration, satellite bandwidth and network management.

This project is a part of State Bank of India's ambitious Project "25000 ATM" in which the bank envisages to double its ATM based from 12,250 ATMs to 25,000 ATMs by March 2010. By contracting with Huges Communications, now SBI’s associate bank can directly contact with Huges Communications to deploy their ATM. Huges will offer Secure VSAT-based connectivity to SBI with backhaul to the bank’s data center and diaster recovery locations.

Under this contract, Hughes will provide connectivity to Kiosk machines that would be co-located with the ATMs to provide customers the option to know their SBI account details and book railway tickets through the kiosk machines. Functionality and number of these machines may be enhanced in the coming future.

Vice president of Huges Communicatiosn India said that we were pleased to strengthen our longstanding relationships with the State Bank of India from providing connectivity for their CBS branches /kiosks to extend its ATM Network across the country.

As per Chatterjee “Satellite Broadband has been the backbone of connectivity for the Indian banking industry and Hughes is proud to have connected more than 6500 CBS branches and around 4500 ATMs/Kiosk for various banks in the country using this technology. After completion of this project, total banking sites of Hughes would be touching 15000,"

Sunday, September 20, 2009

Interview Book

JAVA Programming Interviews Exposed 2nd Edition
Download Now

Tuesday, September 8, 2009

FoIP - Fax over IP

FoIP is stands for Fax over Internet Protocol which is method of sending fax over Internet Protocol. Nowadays fax is sending through phone line. In this process first one has to dial a number. If the distance is long, then one has to pay according to distance. Through FoIP one need internet connection and only one times pay in month. There is no charge to send fax over IP.


FoIP changes the method of sending fax. Fax over phone line convert the data to analog voice data and send via the Public Switched Telephone Network (PSTN). While FoIP converts data into packet and tranmits through broadband line. This reduce the cost of transmission because if a company has already internet bandwidth then its cheapest and more efficient method to send a fax.

T.37 and T.38 protocols are two main FoIP protocol. T.38 is most preferred protocol as it is designed to send fax over IP. It provides facility to eliminate the effects of packet loss through data redundancy.

Saturday, September 5, 2009

Book


Microsoft Windows 7 Home Premium


Kaspersky Internet Security 2009