This file contains hidden or 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 ?> |
This file contains hidden or 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
<select name="state"> | |
<option value="AL">AL</option> | |
<option value="AK">AK</option> | |
<option value="AZ">AZ</option> | |
<option value="AR">AR</option> | |
<option value="CA">CA</option> | |
<option value="CO">CO</option> | |
<option value="CT">CT</option> | |
<option value="DE">DE</option> | |
<option value="DC">DC</option> |
This file contains hidden or 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
will select all strings between tart_tag & end_tag | |
(?<=start_tag)(.*)(?=end_tag) |
This file contains hidden or 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
#HTACCESS Secure PHP Setting# | |
############################# | |
# Disable register globals | |
php_flag register_globals 0 | |
# Disable magic quotes | |
php_flag magic_quotes_gpc 0 | |
php_flag magic_quotes_runtime 0 |
This file contains hidden or 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
\n(?!\n) |
This file contains hidden or 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
<script type="text/javascript" charset="utf-8"> | |
//Capitalize first letter while typing in side of input field | |
jQuery(document).ready(function($) { | |
$('#selector').keyup(function(event) { | |
var textBox = event.target; | |
var start = textBox.selectionStart; | |
var end = textBox.selectionEnd; | |
textBox.value = textBox.value.charAt(0).toUpperCase() + textBox.value.slice(1); | |
textBox.setSelectionRange(start, end); | |
}); |
This file contains hidden or 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
function isValidDate(date) { | |
var matches = /^(\d{2})[-\/](\d{2})[-\/](\d{4})$/.exec(date); | |
if (matches == null) return false; | |
var d = matches[1]; | |
var m = matches[2] - 1; | |
var y = matches[3]; | |
var composedDate = new Date(y, m, d); | |
return composedDate.getDate() == d && composedDate.getMonth() == m && composedDate.getFullYear() == y; | |
} |
This file contains hidden or 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
//Extend Date to have a few extra fatures | |
Date.dayNames = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]; | |
Date.monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; | |
Date.prototype.dayNames = Date.dayNames; | |
Date.prototype.monthNames = Date.monthNames; | |
Date.prototype.getDayName = function() { | |
return this.dayNames[this.getDay()]; | |
}; | |
Date.prototype.getDayNameAbbr = function() { |
This file contains hidden or 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
/** | |
* Date#strftime(format) -> String | |
* | |
* - format (String): the format string | |
* | |
* Formats the *date* according to the directives given in the *format* | |
* string. Requires a String#interpolate() extension. | |
* | |
* ## Format Components | |
* |
This file contains hidden or 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 lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>HTML5 boilerplate—all you really need…</title> | |
<link rel="stylesheet" type="text/css" href="css/style.css" /> | |
<!--[if IE]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> | |
<![endif]--> | |
</head> |
NewerOlder