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
<script> | |
jQuery.noConflict(); | |
jQuery(document).ready(function() { | |
jQuery("#btnSave").click(function() { | |
// Create a list of valid ranges for the fields. | |
var fields = { | |
age: { | |
id: "#txtAge", | |
val: parseInt(jQuery("#txtAge").val()), | |
low: 18, |
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
# Prereqs: | |
# * Ruby | |
# * gem install watchr | |
# * growlnotify (http://growl.info/ = Extras folder from growl download.) | |
# Usage: | |
# put all your tests in a tests folder and call them anythingTest.php | |
# run watchr watchr.rb | |
watch('tests/.*Test\.php') do |md| |
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 | |
private function _array_search($needle, $haystack) { | |
if (empty($needle) || empty($haystack)) { | |
return false; | |
} | |
foreach ($haystack as $key => $value) { | |
foreach ($needle as $nkey => $nvalue) { | |
if (!empty($value[$nkey]) && $value[$nkey] == $nvalue) { | |
if($haystack[$key]['empid'] == $needle['empid'] && $haystack[$key]['bdate'] == $needle['bdate']) { | |
return $key; |
NewerOlder