Use github

1.Signup with github
2.Click on Create new repository to create repository
   For example: “MyKillingApplication”
3.Create clone of your repository.Here clone means a copy of repository folder on a personal     machine.

 #git clone link given in address bar

For example: git clone https://github.com/username/repositoryname

4.To add file in github.
a.Place the files in clone folder which you want in your repository
b.Change directory to clone folder

#git add "file_name"
#git commit -m "file_name"
#git push

It ask for username and password of github

5.To remove file in github
a. If clone folder already exist from which you want to delete the file then no need to clone again.
If it is not then use following command to pull all present files from github, to copy file in clone folder.

#git pull

b.Change directory to clone folder

#rm filename
#git rm filename
#git commit -m "message for delete file"
#git push

6. To check status that file is pushed or not

#git status

zend coding standards

There are two types of cases in php to write compound words.
Writing compound words in which the words are joined without spaces or delimiters.

1. Camelcase: The first letter of a word may or may not be capitalized but inner join words is always start with capital letter follow by
small letters.
Camelcase example : camelCase

2. Pacalcase: Pascal case words always start with a capital letter and inner join words is always start with capital letter follow by small letters.
Pascalcase example : PascalCase , it is also called UpperCamelCase.

PHP Guidelines

Classes – PascalCase (UpperCamelCase)
Interfaces – PascalCase (UpperCamelCase)
Functions and Methods – camelCase
Variables – camelCase
Constants – ALL_CAPS

I follow zend coding standards
Coding standards are important in any development project, but they are particularly important when many developers are working on the same project. Coding standards help ensure that the code is high quality, has fewer bugs, and can be easily maintained.

Indentation
Indentation should consist of 4 spaces. Tabs are not allowed.

Maximum Line Length
The maximum length of any line of PHP code is 120 characters.

Classes
class name is comprised of more than one word, the first letter of each new word must be capitalized. Successive capitalized letters are not allowed, e.g. a class “Zend_PDF” is not allowed while “Zend_Pdf” is acceptable.

Functions
Function names may only contain alphanumeric characters. Underscores are not permitted.Function names must always start with a lowercase letter. When a function name consists of more than one word, the first letter of each new word must be capitalized. This is commonly called “camelCase” formatting.

For Example :getElementById()

Variables
variable names must always start with a lowercase letter and follow the “camelCaps” capitalization convention.

Constants
All letters used in a constant name must be capitalized, while all words in a constant name must be separated by underscore characters.

ex :EMBED_SUPPRESS_EMBED_EXCEPTION

Coding Standard
PHP code must always be delimited by the full-form, standard PHP tags:

<?php

?>

String Literals

$a = 'Example String';

String Literals Containing Apostrophes

$sql = "SELECT `id`, `name` from `people` "
 . "WHERE `name`='Fred' OR `name`='Susan'";

String Concatenation

$company = 'Zend' . ' ' . 'Technologies';

Class Declaration
Class name follow camelcase
The brace should always be written on the line underneath the class name.
Every class must have a documentation block that conforms to the PHPDocumentor standard.
All code in a class must be indented with four spaces.
Only one class is permitted in each PHP file.

Control Statements
If/Else/Elseif
Control statements based on the if and elseif constructs must have a single space before the opening parenthesis of the conditional and a single space after the closing parenthesis.
Within the conditional statements between the parentheses, operators must be separated by spaces for readability. Inner parentheses are encouraged to improve logical grouping for larger conditional expressions.
The opening brace is written on the same line as the conditional statement. The closing brace is always written on its own line. Any content within the braces must be indented using four spaces.

For Ex : if (($a == $b)
 && ($b == $c)
 || (Foo::CONST == $d)
 ) {
 $a = $d;
 }

File Description
Every file that contains PHP code must have a docblock at the top of the file that contains these phpDocumentor tags at a minimum:

/**
* Short description for file
*
* Long description for file (if any)...
*
* LICENSE: Some license information
*
* @category Zend
* @package Zend_Magic
* @subpackage Wand
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license BSD License
* @version $Id:$
* @link http://framework.zend.com/package/PackageName
* @since File available since Release 1.5.0
*/

Class description
Every class must have a docblock that contains these phpDocumentor tags at a minimum:

/**
* Short description for class
*
* Long description for class (if any)...
*
* @category Zend
* @package Zend_Magic
* @subpackage Wand
* @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license BSD License
* @version Release: @package_version@
* @link http://framework.zend.com/package/PackageName
* @since Class available since Release 1.5.0
* @deprecated Class deprecated in Release 2.0.0
*/

Functions description
Every function, including object methods, must have a docblock that contains at a minimum:
A description of the function
All of the arguments
All of the possible return values

Dreamful Night

Hello Everyone

I want to share my night dream.
Friday night when I shutdown my laptop, with one problem. Then full night I was dreaming of different solutions related to the problem. When I wake up, brushing ,bathing, my mind kept thinking for the solutions.
When I go for Training and apply the solution to that problem, the problem
was solved:)

But not in efficient manner:(

Somebody said “Bad programming is easy. Idiots can learn it in 21 days, even if they are dummies.”

Then again I was looking for the solution to do in efficient manner.
On saturday night, I turn off my laptop with frustation due to no idea to solve it.
Again I saw dream that code characters come out of screen in the form of mosquitoes and biting me that you’ve insulted the code then, I said sorry, I will soon change the code.please leave me.

Then saturday I wrote code in efficient manner and only one mini problem was remaining.
from Yesterday 5’0 clock I was trying to solve it and today problem got solved.

Problem is solved by writing one word DISTINCT in the (SQL query) code. It solves my problem and I am very happy and danced too. Now I comment my code very soon and put it on bitbucket so that everyone view/improve my code.

Indian Geotechnical Society: Ludhiana Chapter

Today is the Inaugural function of IGS:Ludhiana Chapter.I do work on this project by taking leadership of this project. Today is the most happiest day of my life. Because I am attending Inauguration function first time. It was very systematic and with in time limit. It is big achievement for our college too.

The chapter was inaugurated by the President of the IGS, Professor K S Rao in the campus of Guru Nanak Dev Engineering College. The inaugural function was followed by a seminar and panel discussion. Members of IGS community, engineers from Govt Departments, private consultants, members of Institution of Engineers from the state of Punjab, Chandigarh attended the function and participated in the panel discussion.

APACHE WEB PAGE LOGIN AUTHENTICATION

Apache authentication can be configured to require web site visitors to login with a user id and password. This is different than adding a login form on a web page and creating your own authentication.

Create the directory you want to password protect.
Create a file /home/domain/public_html/dirname/.htaccess in that director that looks something like this:

 AuthName "Add your login message here."
 AuthType Basic
 AuthUserFile /home/domain/public_html/membersonly/.htpasswd
 AuthGroupFile /dev/null
 require user name-of-user

In this case the “name-of-user” is the login name you wish to use for accessing the web

Create the password file /home/domain/public_html/membersonly/.htpasswd using the program htpasswd:
htpasswd -c .htpasswd name-of-user

File privileges: chmod ug+rw .htpasswd

Rajgarh Trip

It was 3’0 clock in the morning when my alarm woke me up and My friend Vigas and Sukhdeep have called me again and again so that I track with time.The best thing is that I was going to wear new dress which I got last night from boutique with very difficulty . After sometime I was ready with new shoes and dress, Then I kick my Brother to woke him up and asked him to drop me at college. I reached last in all my friends at college. I was excited and looking beautiful. Their was dark night when we started our journey to Rajgarh near 4:30. We went Pinjore Garden for breakfast and I was very haapy by seeing poha made by madam. After collecting memories we moved to Rajgarh. when we came closer to rajgarh, warm winds turns to cold breeze. When we saw the camping area river was flowing side by, all were excited to go in it and we took various snaps over there and get chance of mountain trekking. It is the best experience I ever had. Mango is my favourite fruit and I happy to saw its availablity. While we were eating mangoes we splashed water, sung songs. I felt like that I seen movie. After enjoying Valley, We moved for baru sahib gurudwara. There we saw small childrens singing shabads and making langar. When enjoyed the nature of Himalyas we decided to go back home and it tooks 7 hours. After reaching ludhiana took dinner in jimidar’s dhaba. My dad waited upto 2:30. I reached home with cheerful smile.

How to install kannel

Kannel
Kannel is a compact and very powerful open source WAP and SMS gateway,WAP is used for Push service indications and mobile Internet connectivity.

WAP
Wireless Application Protocol is a technical standard for accessing information over a mobile wireless network. WAP means a protocol that are used to connect wireless GPRS OR GSM with web browser by sending encoded message to mobile. By this web browser get the information of mobile device and start sending messages or emails through network.

Install kannel with sqlbox

1. Basic system requirements to install kannel.

sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install bison
sudo apt-get install libmysqld-dev
sudo apt-get install libxml2-dev

Install lamp 

2. Download gateway stable release version 1.4.3.

 gateway-1.4.3.tar.gz

3. Extract gateway folder in any directory of your system. In my case I choose home directory.

$ tar xfvz gateway-1.5.0.tar.bz2

4. Navigate to gateway folder.

$ cd gateway-1.5.0/

5. Configure
The below command makes the shell run the script named ‘ configure ‘ which exists in the current directory. The configure script basically consists of many lines which are used to check some details about the machine on which the software is going to be installed. This script checks for lots of dependencies on your system.

$ ./configure --with-mysql

6.make
make command used to perform all necessary recompilations.you can use make with any programming language whose compiler can be run with a shell command. make command is used when we want to run any project which needs compilation of files.

$ make

7.make install
The install section happens to be only a part where the executables and other required files created during the last step (i.e. make) are copied into the required final directories on your machine. 

Before run the following command make directory in your system. Replace path to directory with path of directory you made. After run this command you can see gw-config, mtbatch and other files contain in your directory.

Warning : run command with sudo user

$ make bindir=/path/to/directory install

8. Download sqlbox.

$ svn co https://svn.kannel.org/sqlbox/trunk sqlbox

9. Extract sqlbox folder in gateway folder which was downloaded before. Run below mentioned commands to install sqlbox.

$ ./configure
$ make
$ make install (run command with sudo user)

Kannel is successfully installed.

Sharing Internet through wifi

Requirement: You must have internet connection for sharing to others.

1.goto Edit Connections
2.goto wireless tab and click on add button.
3.Connection name:name of the connection which you want to share.
4.In wireless tab following changes are made
SSID :namewifi
Mode :ad-hoc
Band :Automatic
MTU  :Automatic
5.In IPV4 Settings tab following changes are made
Method :shared to other computer
6.In IPV6 Settings tab following changes are made
Method :Automatic
7.In Wireless Security tab following changes are made
Security :WEP 40/128-bit key
Key      :Password
8.Reconnect internet services.

Option Page in WordPress

WordPress is web software you can use to create a beautiful website or blog.WordPress is a free and open source blogging tool and a dynamic content management system (CMS) based on PHP and MySQL. It has many features including a plug-in architecture and a template system.
In this tutorial, make Customize theme by adding option page to Change a theme color scheme.
In order to provide User Ease,We design a Theme option page. Which do not require user  interface direct to template theme .They can easily modify from dashboard of WordPress.

Procedure:

1.Navigate to your wordpress theme folder
2.Open function.php file. Add the following lines in order to create blank option page

function themeoptions_admin_menu()
 {
 // here's where we add our theme options page link to the dashboard sidebar
 add_theme_page("Theme Options", "Theme Options", 'edit_themes', basename(__FILE__), 'themeoptions_page');
 }

The parameters for the add_theme_page() function are as follows:
Page Title – Theme Options
Menu Title – Theme Options
Capability – edit_themes
Handle – The current file
Function – themeoptions_page()

3.Adding Options and Fields in option page

function themeoptions_page()
 {
 // here's the main function that will generate our options page
 ?>
 <div>
 <div id="icon-themes"><br /></div>
 <h2>Theme Options</h2>
<form method="POST" action="">
 <input type="hidden" name="update_themeoptions" value="true" />
<h4>Colour Stylesheet To Use</h4>
 <select name ="colour">
 <option value="red">Red Stylesheet</option>
 <option value="green">Green Stylesheet</option>
 <option value="blue">Blue Stylesheet</option>
 </select>
 <p><input type="submit" name="search" value="Update Options" /></p>
 </form>
</div>
 <?php
 }

4.The next step is to create the update function.This function will be called by  themeoptions_page(); so add this code to the very top of themeoptions_page();

if ( $_POST['update_themeoptions'] == 'true' ) { themeoptions_update(); }

5.Write code of themeoptions_update() function anywhere in the functions.php file, add this block of code:

function themeoptions_update()
 {
 // this is where validation would go
 update_option('mytheme_colour',     $_POST['colour']);
 }
 add_action('admin_menu', 'themeoptions_admin_menu');

6.Close your function.php file and open header.php file to add stylesheet.Place the code in head section.

<head>
 <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/default.css" type="text/css">
 <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/<?php echo get_option('mytheme_colour'); ?>.css" type="text/css">
 </head>

7.The color Which you are given in select tag in third point.Create Stylesheet for that and name should be same if you give red then red.css should be the name and place in theme folder.

That’s it
Thanking you.