- version 3.6
Check those constraints:
$this->anything()
<?php | |
/* | |
Working with XML. Usage: | |
$xml=xml2ary(file_get_contents('1.xml')); | |
$link=&$xml['ddd']['_c']; | |
$link['twomore']=$link['onemore']; | |
// ins2ary(); // dot not insert a link, and arrays with links inside! | |
echo ary2xml($xml); | |
*/ |
<?php | |
function recursiveChmod ($path, $filePerm=0644, $dirPerm=0755) { | |
// Check if the path exists | |
if (!file_exists($path)) { | |
return(false); | |
} | |
// See whether this is a file | |
if (is_file($path)) { | |
// Chmod the file with our given filepermissions |
<?php | |
//Place the following line above the class: | |
//App::import('Vendor', 'OAuth/OAuthClient'); | |
//OAuth component found here: http://code.42dh.com/oauth/ | |
public function index() { | |
$data = array( | |
'AccessToken' => $this->Session->read('access_token'), | |
'Usernames' => array('alairock'), |
/** | |
* Main JS file for Casper behaviours | |
*/ | |
$(document).ready(function(){ | |
var lastScrollTop = 0; | |
$(window).scroll(function(event){ | |
var st = $(this).scrollTop(); | |
var scrolli = st/1.5; | |
scrollicious = $(".cover-image > img").css({"top": scrolli + "px"}); | |
if (st > lastScrollTop){ |
/* | |
* Your Stylesheet | |
* | |
* This stylesheet is loaded when Atom starts up and is reloaded automatically | |
* when it is changed. | |
* | |
* If you are unfamiliar with LESS, you can read more about it here: | |
* http://www.lesscss.org | |
*/ |
// this is the background code... | |
// listen for our browerAction to be clicked | |
chrome.browserAction.onClicked.addListener(function (tab) { | |
// for the current tab, inject the "inject.js" file & execute it | |
chrome.tabs.executeScript(tab.ib, { | |
file: 'inject.js' | |
}); | |
}); |
<?php | |
Route::get('/stripetoken', function() | |
{ | |
$client = new \GuzzleHttp\Client(); | |
$pubKey = 'pk_test_xxxxxxxxxxxxx'; | |
$cardNumber = "4242424242424242"; | |
$cvc = "123"; | |
$expMonth = "11"; | |
$expYear = "2018"; |
<?php | |
$usersQuery = \App\User::query(); | |
$usersQuery->where('type', '=', 'client'); | |
foreach(generate($usersQuery) as $user) { | |
// Do something with that user | |
} |
I hereby claim:
To claim this, I am signing this object: