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 | |
//absolute path to wp-load.php, or relative to this script | |
//e.g., ../wp-core/wp-load.php | |
include( 'trunk/wp-load.php' ); | |
//grab the WPDB database object, using WP's database | |
//more info: http://codex.wordpress.org/Class_Reference/wpdb | |
global $wpdb; |
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
Imports System.Data | |
Imports System.Data.SqlClient ' Reference to the ADO.NET namespace(interact with the database) | |
Public Class Form1 | |
'Create ADO.NET objects. | |
Private myConn As SqlConnection = New SqlConnection("Data Source=GOLDSOFTX;Initial Catalog=TheBox;Integrated Security=True") | |
Private myCmd As SqlCommand | |
Private myReader As SqlDataReader | |
Private results As String |
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
var storage = multer.diskStorage({ | |
destination: (req, file, cb) => { | |
cb(null, 'public/images/uploads') | |
}, | |
filename: (req, file, cb) => { | |
cb(null, file.fieldname + '-' + Date.now()) | |
} | |
}); | |
var upload = multer({storage: storage}); |
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 timeAgo(time){ | |
var units = [ | |
{ name: "second", limit: 60, in_seconds: 1 }, | |
{ name: "minute", limit: 3600, in_seconds: 60 }, | |
{ name: "hour", limit: 86400, in_seconds: 3600 }, | |
{ name: "day", limit: 604800, in_seconds: 86400 }, | |
{ name: "week", limit: 2629743, in_seconds: 604800 }, | |
{ name: "month", limit: 31556926, in_seconds: 2629743 }, | |
{ name: "year", limit: null, in_seconds: 31556926 } | |
]; |