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 *, | |
str_to_date(concat(yearweek(created_at), ' friday'), '%X%V %W') as end_of_week_date | |
from install_completed | |
order by end_of_week_date |
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
//preload images for canvas on tag design | |
function preloadImages(srcs) { | |
if (!preloadImages.cache) { | |
preloadImages.cache = []; | |
} | |
var img; | |
for (var i = 0; i < srcs.length; i++) { | |
img = new Image(); | |
img.src = srcs[i]; | |
preloadImages.cache.push(img); |
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 | |
namespace App\Http\Repositories; | |
ini_set('max_execution_time', 0); | |
use App\Http\Interfaces\GenerateInterface; | |
use App\Muhimbi\PdfConverterService; | |
use PHPExcel_IOFactory; |
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
echo 'data goes here'; | |
ob_flush(); | |
flush(); |
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
header('Content-Type: application/vnd.ms-excel'); | |
header('Content-Disposition: attachment;filename="filename.xls"'); | |
header('Cache-Control: max-age=0'); | |
$objWriter = PHPExcel_IOFactory::createWriter($excel_obj, 'Excel2007'); | |
$objWriter->save('php://output'); |
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
$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); | |
dd($trace); |
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 | |
function recursive_copy($src,$dst) { | |
$dir = opendir($src); | |
@mkdir($dst); | |
while(false !== ( $file = readdir($dir)) ) { | |
if (( $file != '.' ) && ( $file != '..' )) { | |
if ( is_dir($src . '/' . $file) ) { | |
recursive_copy($src . '/' . $file,$dst . '/' . $file); | |
} | |
else { |
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> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Datatables</title> | |
<script type="text/javascript" src="http://www.codecaven.co.uk/js/jquery.js"></script> | |
<script type="text/javascript" src="http://www.codecaven.co.uk/js/jquery.snippet.min.js"></script> | |
<style type="text/css" title="currentStyle"> | |
@import "http://www.codecaven.co.uk/media/css/demo_page.css"; | |
@import "http://www.codecaven.co.uk/media/css/demo_table.css"; |
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> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<title>Google Maps Postcode To Destination Working Example</title> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<link href="http://code.google.com/apis/maps/documentation/javascript/examples/standard.css" rel="stylesheet" type="text/css" /> | |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<script type="text/javascript"> |