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 | |
// This is a simple way to cache queries to your local filesystem while maintaining control over their freshness. | |
// Great for those nasty archival queries that data changes don't happen to. | |
// Free to all, forever - John Vilsack 2014 | |
$file = './cache/**FILENAME**.cache'; // Path and name of .cache file | |
$expire = 900; // # of seconds before cache is stale | |
// Function to create the cached file. |
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
// Use the package, HTTP. | |
var http = require('http'); | |
// In the package HTTP, execute createServer | |
http.createServer(function (req, res) { | |
// When createServer sees a request, shoot a header with a status 200 (this means OK) and tell it the next bit is text/plain | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
// This is the bits that go to the browser |
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
SELECT | |
dbo.SYSOENT.ORDER_STATUS, | |
dbo.SHIPTO.SHIPTO_ID, | |
dbo.SHIPTO.ORDER_NO, | |
RTRIM(dbo.SHIPTO.SHIPMETH_CODE) AS SHIPMETH_CODE, | |
RTRIM(dbo.SHIPTO.COMPANY_NAME) AS SHIPTO_COMPANY_NAME, | |
RTRIM(dbo.SHIPTO.LAST_NAME) AS SHIPTO_LAST_NAME, | |
RTRIM(dbo.SHIPTO.FIRST_NAME) AS SHIPTO_FIRST_NAME, | |
RTRIM(dbo.SHIPTO.ADDRESS_LINE1) AS SHIPTO_ADDRESS_LINE1, | |
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
SELECT | |
RTRIM(ITEM_ID) AS ITEM_ID | |
FROM INVENTOR | |
WHERE | |
( | |
ENTRY_DATE >= '2015-01-01' | |
OR | |
(AVAILABLE > 0 OR ON_ORDER_QTY > 0 OR COMMITTED_QTY > 0) | |
) | |
AND |
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
function onDeviceConnected(data) { | |
alert("onDeviceConnected: " + data); | |
} | |
function onSuccessScanPaymentCard(data) { | |
alert("onSuccessScanPaymentCard: " + data); | |
} | |
function onBarcodeScanned(data) { | |
alert("onBarcodeScanned: " + data.rawCodesArr); |
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
function onConnectivityChange(state) { | |
console.log("Connection is: " + state); | |
} | |
function onBarcodeScanned(data) { | |
console.log(data.barcode); | |
} | |
var app = { | |
initialize: function() { |
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
SELECT | |
SYSOENT.ORDER_STATUS, | |
SYSOENT.PO_NUMBER, | |
SYSOENT.ORDER_NO, | |
SYSOENT.ORDER_SOURCE, | |
SYSOENT.AUTH_CODE, | |
SYSOENT.AUTH_DATE, | |
SYSOENT.CREATED_BY, | |
SYSOENT.ORDER_DATE, | |
SYSOENT.CUSTOMER_ID, |
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 | |
class CRUD { | |
private $DB; | |
public function __set($name, $v) { | |
switch ($name) { | |
case 'username': | |
$this->username = $v; |
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 | |
include('db.class.php'); | |
// Instantiate | |
$CRUD = new CRUD(); | |
// Set Connection Vars | |
$CRUD->database = "mysql:dbname=sessions;host=localhost"; | |
$CRUD->username = 'test'; |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="author" content=""> | |
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]--> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> |