Skip to content

Instantly share code, notes, and snippets.

View Tim-Machine's full-sized avatar

Tim Smith Tim-Machine

  • Cohezion.ai
  • Cary,NC
  • 10:25 (UTC -04:00)
View GitHub Profile
<div class="row two-right <?php echo $color; ?>">
<a class="block-2" href="<?php echo $link; ?>">
<div >
<h1><?php echo $heading; ?></h1>
<h4><?php echo $subheading; ?> <span>&#8227;</span></h4>
</div>
</a>
<div class="block-1">
<?php foreach($Products as $product): ?>
<?php
class utilities {
public function buildUriName($sku,$cat ,$url = false){
$cat_seg = explode(",", $cat);
if(count($cat_seg) <= 1){
setMessage = function(selector , message){
$(selector).html("");//clear html
$(selector).html(message);// insert message
}
makerequest = function(url , data , callback, type){
$.ajax({
url: url,
data: data,
// declaration
function foo()
{
// function body
}
// conditional declaration is *not* a side effect
if (! function_exists('bar')) {
function bar()
{
<?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";
/**
* 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);
}
$CI =& get_instance();
$CI->load->database();
$host = $CI->db->hostname;
$pass = $CI->db->password;
$user = $CI->db->username;
$db = $CI->db->database;
<?php
$data = new stdClass();
$data->page_title = "Create News Entry";
$data->entry = [
'slug' => "",
'title' => "",
'body' => "",
'user_id' => ""
];
#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
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"},