Compare Two Passwords

With a little JQuery and JavaScript you can make an easy password-validator. You can find plenty of good examples on the Web.

Capture

file : check_pass.php

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

 <meta name="apple-mobile-web-app-capable" content="yes" />
 <meta name="apple-mobile-web-app-status-bar-style" content="white" />
 <meta name="googlebot" content="index,archive,follow,noodp" />
 <meta name="robots" content="all,index,follow" />
 <meta name="msnbot" content="all,index,follow" />

 <!--[if lt IE 9]>
 <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script>
 <script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.1.0/respond.min.js"></script>
 <![endif]-->

<!-- JQuery -->
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <script type = "text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>

<!-- CSS -->
 <link href="mystyle.css" rel="stylesheet" type="text/css" />

<script>

 $(document).ready(function(){

 //Store the password field objects into variables ...
 var pass1 = document.getElementById('pass1');
 var pass2 = document.getElementById('pass2');
 //Store the Confimation Message Object ...
 var message = document.getElementById('confirmMessage');
 //Set the colors we will be using ...
 var normal = "#000";
 var goodColor = "#99CC00";
 var badColor = "#FF9900";

// add a class on focus
$('input').focus(function() {
 $(this).addClass("change");
 message.style.color = normal;
 message.innerHTML = "";
});
// remove a class on blur
$('input').blur(function() {
 $(this).removeClass("change");
 message.style.color = normal;
 message.innerHTML = "";
});

$('#reset').on("click",function() {
 message.style.color = normal;
 message.innerHTML = "";
});

$('#submit').on("click",function() {

 //Compare the values in the password field
 //and the confirmation field
 if(pass1.value == "" & pass2.value == "")
 {
 message.style.color = badColor;
 message.innerHTML = "Both Input Fields Empty!"
 }
 else

 if(pass1.value == "" | pass2.value == "")
 {
 message.style.color = badColor;
 message.innerHTML = "One Input Field Empty!"
 }
 else

 if(pass1.value == pass2.value){

 //The passwords match.
 //Set the color to the good color and inform
 //the user that they have entered the correct password 

 message.style.color = goodColor;
 message.innerHTML = "Passwords Match!"
 }else

 {

 //The passwords do not match.
 //Set the color to the bad color and
 //notify the user.

 message.style.color = badColor;
 message.innerHTML = "Passwords do not match!"
 }

 return false;

}); 

});

</script>

</head>
<body>
<div class="tutorialWrapper">

 <form class="user-form">
 <h1>Compare Passwords</h1><br />
 <fieldset>
 <div class="field">
 <label for="pass1">Password:</label>
 <input name="pass1" id="pass1" type="password">
 </div>
 <div class="field">
 <label for="pass2">Confirm Password:</label>
 <input name="pass2" id="pass2" type="password"><br /><br /><br />
 <input type="submit" class="button" id="submit">
 <input type="reset" class="button" id="reset">
 <span class="confirmMessage" id="confirmMessage"></span>
 </div>
 </fieldset>
 </form>
</div>

</body>
</html>

file : mystyle.css

body {
 font: 11px Verdana, Arial, Helvetica, sans-serif;
 margin: 0px;
 padding: 20px 10px 0px;
}

h1 {
 color: #FF0000;
 padding: 0px 0px 3px;
 font: bold 18px Verdana, Arial, Helvetica, sans-serif;
 display: block;
 margin: 1.0em auto;
 text-align: center;
 border-bottom:3px solid black;
}

.confirmMessage{

padding: 0px 0px 3px;
font: normal 18px Verdana, Arial, Helvetica, sans-serif;
display: block;
margin: 1.0em auto;
text-align: center;
}

fieldset{
 border: 3px solid gold;
 width: 300px;
 margin:auto;
}

.change{
 background-color: lightyellow; 

 }

.button{
margin-left:15px;
 width:120px;
 -webkit-border-radius: 3px; -moz-border-radius: 3px;border-radius: 3px;font-size:12px;font-family:arial, helvetica, sans-serif; padding: 6px 6px 6px 6px; text-decoration:none; display:inline-block;text-shadow: -1px -1px 0 rgba(0,0,0,0.3);font-weight:bold;
 background-color: orange; background-image: -webkit-gradient(linear, left top, left bottom, from(orange), to(red));
 background-image: -webkit-linear-gradient(top, orange, red);
 background-image: -moz-linear-gradient(top, orange, red);
 background-image: -ms-linear-gradient(top, orange, red);
 background-image: -o-linear-gradient(top, orange, red);
 background-image: linear-gradient(to bottom, orange, red);filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=orange, endColorstr=red);

}

.button:hover{
 color:gold;
 border:2px solid black;

}

.user-form { padding:10px; }

.user-form .field { padding: 4px; margin:2px; }

.user-form .field label { display:inline-block; font-weight: bold; width:65px;margin-bottom:10px;}

.user-form .field input { display:inline-block; }

input[type=password]{
 -webkit-appearance: none; -moz-appearance: none;
 display: block;
 margin: 0;
 width: 100%; height: 30px;
 line-height: 30px; font-size: 17px;

}

Preakness was a little sloppy

Finishing Order

1 American Pharoah Victor Espinoza
5 Tale of Verve Brian Hernandez, Jr.
7 Divining Rod Javier Castellano
2 Dortmund Martin Garcia
3 Mr. Z Ramon A. Vazquez
4 Danzig Moon Julien Leparoux
8 Firing Line Gary L. Stevens
6 Bodhisattva Trevor McCarthy

Here’s my grade and projected time before race. My top four horses were 1,2,8,7.

Post Position Odds Horse Name Best Grade Last (3) Grade Avg. (3) Projected Time Avg. (3)
1 2-3 American Pharoah 101.89 100.34 1:56.37
2 9-2 Dortmund 102.92 101.43 1:55.22
3 40-1 Mr. Z 100.27 98.07 1:59.20
4 14-1 Danzing Moon 100.26 99.30 1:57.50
5 50-1 Tale of Verve 97.64 97.36 2:00.10
6 50-1 Bodhisattva 99.49 98.65 1:58.36
7 14-1 Divining Rod 101.25 100.52 1:56.24
8 4-1 Firing Line 102.99 101.21 1:55.03

Here is chart which I used the best times in the last three races. As you can see the top four were 1,2,7,8. I can’t figure Verve had a good race and Firing Line didn’t run at all. I had three of the top four horses and thought Divining Rod number 7 was a good pick.

Preakness

Kentucky Derby was Good to Me

Another good win under my belt using my App. My top three took the lead in race and the other horses could not catch up. My only regret was Firing Line did not win race. He was my favorite and was going off at 9-1. Since day one I knew American Pharaoh was the class of the race but speed wise Firing Line on paper and at 9-1 looked good to me. I told everyone to buy as many $1 exactor boxes as possible because my top three were going to be hard to beat.

IMG_71331

 

My friend who stands by me doesn’t not doubt me.

IMG_31411

Triple Crown Calculator

tcc

I am releasing my Triple Crown Calculator on the Android Market.

Fill in winning time, length loss by, race analyzing distance and pick one of the Triple Crown races the Kentucky Derby, Preakness Stakes or Belmont Stakes to get estimated time and grade.

My grading system uses the winning time and grades it against track records. A better time will reflect a greater grade performance. The closest you get to the track record the better the grade. In theory a horse could get better then 100% if estimated time is going to break track record.

Convert any distance race from 5 furlongs to 12 furlongs in 1/2 furlong increments to an estimated time and grade especially designed for any of the Triple Crown races.

For best results when analyzing race, use closest actual distance of race as possible. For example look at 1 1/4 mile race on every horse, which is the distance for Kentucky Derby.

 

Watch video :

 

 

One note leave Length Loss By, empty if horse has winning time. Do not put a zero in field it will produce an error.

Almost ready to release Horse App

My Horse Grade App to almost ready to release. Click Here

You only have to fill out 4 items. The Winning Time, Length Loss By, Race your grading and race distance. This is only a tool but you can jump from knowing what a horse will get at 7 furlongs with only 6 furlong data. You still have to know that using a 5 furlong for a mile that estimated time will be off because App doesn’t not calculate the time that he will loss running longer races. As a handicapper time is everything this gives you estimated time plus my grading number. With this grading number if a horse goes up a whole grade it’s a big differences. So a horse that grades 99 is big difference then a horse that grades at 98. I am releasing to the Android Market in two weeks and will cost a dollar. My App will not have any advertisements.

My Android Password Generator

passgen

 

Here’s my Android password generator. I haven’t released to Android market yet but the beta is on my Ftp server. Feel free to leave comments. I would appreciate feedback. Please install apk file as a unknown source and it should work fine. One note the capital (i) and small (L) looks the same so I would suggest putting  them both in Exclude. I notice a lot of font look that way that’s why I have a Include/Exclude field. The Exclude when used will exclude anything that is selected in Choose. Example if you put Capital A in field and have UpperCase selected in Choose. The Capital A in the will never be outputted in the generated password.  The Include is opposite of Exclude it adds at the end  of generated password. So if you want to add the dollar symbol ($) , it will add at end of generated password the $ , where you can use Shuffle to shuffle the password. Shuffle is as called it keeps all character generated the same but shuffles them.  Let’s say your joining a new website and your creating a new password. The rules state it must be 8 characters in length , must include at least one Capital, one number and a special character. This is how I would generate the fastest password. First set length to 8, then put ll Exclude( that is capital ( i )  and small ( L )) and I would put an $A8 in Include.  Here’s a screenshot

Screenshot_2014-12-21-11-32-44

It puts $A8 at end of generated password and I shuffle to produce what on screen. I am working on changing font to try to avoid that visual problem with ( i ) and ( l ) . Meanwhile enjoy App!