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
// Stardate script © Phillip L. Sublett | |
// [email protected] | |
// http://TrekGuide.com | |
var now = new Date(); | |
var then = new Date("July 15, 1987"); | |
var stardate = now.getTime() - then.getTime(); | |
stardate = stardate / (1000 * 60 * 60 * 24 * 0.036525); | |
stardate = Math.floor(stardate + 410000); | |
stardate = stardate / 10 |
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
$(document).ready(function() { | |
var formExpenditure = $( '#formExpenditure' ).on( 'submit', function() { | |
//..... | |
//show some spinner etc to indicate operation in progress | |
//..... | |
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
<html> | |
<head> | |
<title>Delayed Autosave</title> | |
</head> | |
<body> | |
<h2>Type Your Thoughts</h2> | |
<textarea rows="10" cols="60" id="important"></textarea> | |
<div id="message"></div> |
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> | |
<head> | |
<title>User Interaction for JS</title> | |
</head> | |
<body> | |
<p> | |
<script> |
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 | |
$nothing = 0xFF; | |
$something = ''; | |
$array = array(1,2,3); | |
//Before the first conditional, unset($nothing). What happens? PHP Notices | |
unset($nothing); | |
//Create a funciton that checks if a variable is set or empty, and display "$variable_name is SET|EMPTY" | |
function set_or_empty($checkvar) { |
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
$array = array(1,2,3,4,5,6,7,8,9,0); | |
$serialized = serialize($array); | |
echo $serialized . PHP_EOL; | |
$deser = unserialize($serialized); | |
echo $deser . PHP_EOL; |