This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//For connecting the database--> | |
$link = mysqli_connect("localhost","root","", "practise"); | |
if (!$link) { | |
die("Connection failed: " . mysql_error()); | |
}else{ | |
mysqli_select_db ($link, 'practise') or die ("Could not select database."); | |
} | |
//Start session |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A utility class to convert date type from java.util.Date to Long and vice versa. This needs to be | |
* done to store/read the date into/from SQLite database. | |
*/ | |
public class DateTypeConverter { | |
public static Date toDate(Long timestamp) { | |
return timestamp == null ? null : new Date(timestamp); | |
} | |
public static Long toTimestamp(Date date) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//For connecting the database--> | |
$link = mysqli_connect("localhost","root","", "practise"); | |
if (!$link) { | |
die("Connection failed: " . mysql_error()); | |
}else{ | |
mysqli_select_db ($link, 'practise') or die ("Could not select database."); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"> | |
<link rel="stylesheet" type="text/css" href="css/bootstap-theme.css"> | |
<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css"> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//For connecting the database | |
$link = mysqli_connect("localhost","root","", "practise"); | |
if (!$link) { | |
echo "Error: Unable to connect to MySQL." . PHP_EOL; | |
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL; | |
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL; | |
exit; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//For connecting the database | |
$link = mysqli_connect("localhost","root","", "practise"); | |
if (!$link) { | |
echo "Error: Unable to connect to MySQL." . PHP_EOL; | |
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL; | |
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL; | |
exit; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Sign up form</title> | |
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"> | |
<link rel="stylesheet" type="text/css" href="css/bootstap-theme.css"> | |
<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css"> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--from scratch coding, here. --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Password Salting</title> | |
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"> | |
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"> | |
<link rel="stylesheet" type="text/css" href="css/bootstap-theme.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* @param timeString A string value of time in 12 hr format | |
* @return A string value of time in 24 hr format | |
*/ | |
private String getTimeIn24hrFormat(String timeString) { | |
DateFormat inFormat = new SimpleDateFormat( "hh:mm a"); | |
/* This is a 24 hour date time format that we are using to convert all | |
* input date and time formats to this format. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomFontLoader { | |
public static final int FONT_NAME_1 = 0; | |
public static final int FONT_NAME_2 = 1; | |
private static final int NUM_OF_CUSTOM_FONTS = 2; | |
private static boolean fontsLoaded = false; | |
private static Typeface[] fonts = new Typeface[2]; |