Wednesday, May 14, 2014

HTML 5 number validation

HTML 5 number digit validator



<input type="number" id="r" size="20" name="r"  placeholder="Input value" pattern="[0-9]+([.][0-9]+)?" step="0.01" title="Enter Numeric Digit" />

pattern  =
step       =
title       =

validation of two Password Match

 

 Validation of two Password Match

 

I make a project and i want to match both password .

if password same then carry on ...

else abort . ...............................

 


example:


--------------

 

 

 
 
 
 
 
<script type="text/javascript">
function validate()
     {
        var pw1 = document.getElementById("password1").value;
        var pw2 = document.getElementById("password2").value;

        //Check values are present in both fields
        if(pw1 ==='' || pw2 === '')
        {
            alert("Please enter your password twice.");
            return false;
        }
        //Check there no spaces
        else if(document.getElementById("password1").value.indexOf(" ") > - 1) 
        {
            alert("Spaces are not allowed in passwords!");
            return false;
        }
        //Check passwords are the same
        else
        {
            if(pw1 !== pw2) 
            {
                alert("The passwords you entered were not the same. Please try again!");
                return false;
            }
            else
            {
                alert("Password accepted!");
                return true;
            }
        }

    }
 </script>
</head>

<body>
<form id="register">
    <label for="username">Username</label>
    <input type="text" class="input_text" name="username" id="name" placeholder="username" />
    <br />
    <label for="password">Password</label> 
    <input type="text" class="input_text" name="password1" id="password1" placeholder="123456" />
    <br />
    <label for="re-enterpassword">Re-enter password</label>
    <input type="text" class="input_text" name="password2" id="password2" placeholder="123456" />

    <input type="submit" class="button" onclick="validate()" value="Register" />
    </form>
</body>
</html>

Friday, May 2, 2014

bit bucket

Explore GIT


There is main problem in uploading the project on GIT.
 Many Technical student face problem to

how to upload 
how to create repository
how to push
how to pull

  1. Log into Bitbucket under your individual account.
  2. Click Repositories > Create repository or the Create new repository link.
  3. Choose a repository Owner.
    This only appears if you are creating under an account with membership in one or more teams. 
  4. Enter a Name and Description for your repository.
  5. Tick Private if you want to hide your repository from the general public, so that only selected people can see it.
  6. Select the Repository type.
  7. Click Create repository.
step1 :

Download GIT

Step 2:

create Account on GIT
bitbucket
github

step 3:

use these commands on CMD of Git


$ cd /C/ PATH TO FOLDER
$ git init
$ git add --all
$ git commit -m "adding repo instructions"
  


 commands >.>

mkdir /path/to/your/project 

cd /path/to/your/project 

git init 

git remote add origin ssh://git@bitbucket.org/username/bbreponame.git


Create a project with some code:

$ mkdir my_project
$ cd my_project
$ echo "foobar" > some_file

Then, while inside the project's folder, do an initial commit:
 
$ git init
$ git add some_file
$ git commit -m "Initial commit"

then for using bitbucket or such you add a remote and push up
 
$ git remote add some_name user@host:repo
$ git push some_name

you also might then want to configure tracking branches etc. see git remote set-branches and related commands for that.


GitHub repository using Git Bash command

  To add a project to a GitHub repository using Git Bash command line, you can follow these steps: Create a new repository on GitHub by logg...