Skip to content

Instantly share code, notes, and snippets.

View Tim-Machine's full-sized avatar

Tim Smith Tim-Machine

  • Cohezion.ai
  • Cary,NC
  • 06:47 (UTC -04:00)
View GitHub Profile
Dear Y'all (or 'you all' depending on the geographic origin of your email),
I'm on vacation. If things are going well, my feet are likely kicked up near a pool while my kids are quietly behaving.
I do apologize for being out of pocket, but given that my last auto-reply email was written when my Daughter, Blahdita, was born (### months ago), I feel fairly justified to take this week off.
If you need immediate attention, please stop, take a deep breath, and consider whether you REALLY need immediate attention or not. If you do, please consider it a third time. I'm confident you'll realize that it can wait.
IF you do need immediate attention beyond these three checks, you can email Blah McBlah ([email protected]) and he'll do his best to reply as quickly as possible.
about_Command_Precedence" for more details.
S E:\erlang_starting\hello> .\rebar compile
=> hello (pre_compile)
RROR: pre_compile failed while processing E:/erlang_starting/hello: {'EXIT',
{undef,
[{boss_rebar,all_ebin_dirs,
[[{boss,
[{path,"../ChicagoBoss-0.8"},
{applications,[hello]},
{assume_locale,"en"},
#config.master.php
#line 239
require $_SERVER['DOCUMENT_ROOT'] . '/../config/config.' . ENV . '.php'; // your copy
require $_SERVER['DOCUMENT_ROOT'] . '/config/config.' . ENV . '.php'; // what it should be
<?php
$data = new stdClass();
$data->page_title = "Create News Entry";
$data->entry = [
'slug' => "",
'title' => "",
'body' => "",
'user_id' => ""
];
$CI =& get_instance();
$CI->load->database();
$host = $CI->db->hostname;
$pass = $CI->db->password;
$user = $CI->db->username;
$db = $CI->db->database;
/**
* validates phone numbers, will return true or false
* formats 9999999999 , 999.999.999 , 999-999-9999
* @param {string} phone phonenumber to be validated
* @return {bool} phone validity
*/
function validatePhone(phone){
var re = /^[(]{0,1}[0-9]{3}[)]{0,1}[-\s\.]{0,1}[0-9]{3}[-\s\.]{0,1}[0-9]{4}$/;
return re.test(phone);
}
<?php
// side effect: change ini settings
ini_set('error_reporting', E_ALL);
// side effect: loads a file
include "file.php";
// side effect: generates output
echo "<html>\n";
// declaration
function foo()
{
// function body
}
// conditional declaration is *not* a side effect
if (! function_exists('bar')) {
function bar()
{
setMessage = function(selector , message){
$(selector).html("");//clear html
$(selector).html(message);// insert message
}
makerequest = function(url , data , callback, type){
$.ajax({
url: url,
data: data,
<?php
class utilities {
public function buildUriName($sku,$cat ,$url = false){
$cat_seg = explode(",", $cat);
if(count($cat_seg) <= 1){