Showing posts with label Project. Show all posts
Showing posts with label Project. Show all posts

Thursday, February 26, 2015

Git-Specific Commands

Some mostly used commands for Github. They all begin the same way, with the word “git.”
git init: Initializes a new Git repository. Until you run this command inside a repository or directory, it’s just a regular folder. Only after you input this does it accept further Git commands.
git help: Forgot a command? Type this into the command line to bring up the 21 most common git commands. You can also be more specific and type “git help init” or another term to figure out how to use and configure a specific git command.
git status: Check the status of your repository. See which files are inside it, which changes still need to be committed, and which branch of the repository you’re currently working on.
git add: This does not add new files to your repository. Instead, it brings new files to Git’s attention. After you add files, they’re included in Git’s “snapshots” of the repository.
git commit: Git’s most important command. After you make any sort of change, you input this in order to take a “snapshot” of the repository. Usually it goes git commit -m “Message here.”The -mindicates that the following section of the command should be read as a message.
git branch: Working with multiple collaborators and want to make changes on your own? This command will let you build a new branch, or timeline of commits, of changes and file additions that are completely your own. Your title goes after the command. If you wanted a new branch called “cats,” you’d type git branch cats
git checkout: Literally allows you to “check out” a repository that you are not currently inside. This is a navigational command that lets you move to the repository you want to check. You can use this command as git checkout masterto look at the master branch, or git checkout catsto look at another branch.
git merge: When you’re done working on a branch, you can merge your changes back to the master branch, which is visible to all collaborators. git merge catswould take all the changes you made to the “cats” branch and add them to the master.
git push: If you’re working on your local computer, and want your commits to be visible online on GitHub as well, you “push” the changes up to GitHub with this command.
git pull: If you’re working on your local computer and want the most up-to-date version of your repository to work with, you “pull” the changes down from GitHub with this command.

Pushing Up to Github Repo from Ubuntu [Linux]

To be a proficient programmer its mandatory to work with the projects of Github for development (both Project ans self) purpose. For windows, Github provide the application for easier access. But for Linux OS, we need to configure the Git at our pc. We will have to follow some steps for this purpose. We can check he following steps:

Installing Git for Linux

sudo apt-get install git

Configuring GitHub

 git config --global user.name "pronabananda"
 git config --global user.name "paul.pronabananda@gmail.com"

Creating a local repository

Local repository is which project folder we want to connect with the github project folder. For my case, i have created a folder named testproject. And through terminal i am now in the project folder.

Creating a repository on GitHub

Then i have created a repository in GitHub by click and typing. And after confirmation, i have ogt the code which will have be run in the already opened terminal.



- -Generated Code --
echo "# testproject" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/pronabananda/testproject.git
git push -u origin master
- -


Pushing Up local to Github repo:

Following the above code i have run the below code in my terminals to up my local repo. to Github repo:
--
echo "Its a intial testproject" >> README.md
git init
git add .        [ I have added all the files and folder. For this reason I have used . instead of any specific file name]
git commit -m "Initial commit"
git remote add origin https://github.com/pronabananda/testproject.git
git push -u origin master [For the case of first time, it will ask user id and password of Github Account]
--

For adding already existing repo:
git remote add origin https://github.com/pronabananda/testproject.git
git push -u origin master

--------------------------------------------------
If we want to omit some specific type of files and folder for pushing up to Github Repo from the local. For that case we will have to add a file named .gitignore containing the list of files and folder to be skipped. After pushing up the files, if we run the

git log  

it return the full id of the commit. In future for to download the specific state of the project we will have to use this.
----
root@PaulsofTech-WorkStation:/home/paul/workspace/testproject# git log
commit 8b59ac34c30d00a7c4975fadadf6fea52a98515c
Author: pronabananda
Date:   Thu Feb 26 00:51:15 2015 +0600

    Initial commit
---

Friday, June 17, 2011

Naming Convention

What Is a Naming Convention?

A naming convention is a rule to follow as you decide what to name your identifiers (e.g. class, package, variable, method, etc..).

Why Use Naming Conventions?

Different Java programmers can have different styles and approaches to the way they program. By using standard Java naming conventions they make their code easier to read for themselves and for other programmers. Readability of Java code is important because it means less time is spent trying to figure out what the code does, leaving more time to fix or modify it.

To illustrate the point it's worth mentioning that most software companies will have a document that outlines the naming conventions they want their programmers to follow. A new programmer who becomes familiar with those rules will be able to understand code written by a programmer who might have left the company many years before hand.

Picking a Name for Your Identifier


When choosing a name for an identifier make sure it's meaningful. For instance, if your program deals with customer accounts then choose names that make sense to dealing with customers and their accounts (e.g., customerName, accountDetails). Don't worry about the length of the name. A longer name that sums up the identifier perfectly is preferable to a shorter name that might be quick to type but ambiguous.
A Few Words About Cases

Using the right letter case is the key to following a naming convention:


*Lowercase is where all the letters in a word are written without any capitalization (e.g., while, if, mypackage).

*Uppercase is where all the letters in a word are written in capitals. When there are more than two words in the name use underscores to separate them (e.g., MAX_HOURS, FIRST_DAY_OF_WEEK).

*CamelCase (also known as Upper CamelCase) is where each new word begins with a capital letter (e.g., CamelCase, CustomerAccount, PlayingCard).


*Mixed case (also known as Lower CamelCase) is the same as CamelCase except the first letter of the name is in lowercase (e.g., hasChildren, customerFirstName, customerLastName).

Standard Java Naming Conventions


The below list outlines the standard Java naming conventions for each identifier type:

* Packages: Names should be in lowercase. With small projects that only have a few packages it's okay to just give them simple (but meaningful!) names:

package pokeranalyzer
package mycalculator

In software companies and large projects where the packages might be imported into other classes, the names will normally be subdivided. Typically this will start with the company domain before being split into layers or features:

package com.mycompany.utilities
package org.bobscompany.application.userinterface

* Classes: Names should be in CamelCase. Try to use nouns because a class is normally representing something in the real world:

class Customer
class Account

* Interfaces: Names should be in CamelCase. They tend to have a name that describes an operation that a class can do:

interface Comparable
interface Enumerable

Note that some programmers like to distinguish interfaces by beginning the name with an "I":

interface IComparable
interface IEnumerable

* Methods: Names should be in mixed case. Use verbs to describe what the method does:

void calculateTax()
string getSurname()

* Variables: Names should be in mixed case. The names should represent what the value of the variable represents:

string firstName
int orderNumber

Only use very short names when the variables are short lived, such as in for loops:

for (int i=0; i<20;i++)
{
//i only lives in here
}

* Constants: Names should be in uppercase.

static final int DEFAULT_WIDTH
static final int MAX_HEIGHT



colleted from website

Friday, August 21, 2009

HuFa: Human Face Recognition



On the basis of artificial neural network, if we try to build a system for human face recognition system, we can take the following input vector. On the Project based on PredictDemo, I used the above input vectors.