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
<div class="container"> | |
<form> | |
<div class="custom-control custom-switch"> | |
<input type="checkbox" class="custom-control-input" id="customSwitch1"> | |
<label class="custom-control-label" for="customSwitch1">Toggle this switch element</label> | |
</div> | |
<div class="custom-control custom-switch"> | |
<input type="checkbox" class="custom-control-input" disabled id="customSwitch2"> | |
<label class="custom-control-label" for="customSwitch2">Disabled switch element</label> | |
</div> |
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
$.ajax({ | |
url: formUrl, | |
success: function (data) { | |
console.log(data); | |
if (data.success) { | |
$deleteButton.parent().parent().parent().remove(); | |
} else { | |
alert('Could not delete Material'); | |
} | |
} |
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 | |
$entities = $this->Servers->find() | |
->contain('Defines', function($q) use ($service) { | |
return $q | |
->contain(['Environments', 'Services']) | |
->where(['Environments.name' => $this->envName]) | |
->where(['Services.name' => $service]); | |
}); | |
$entities = $this->Servers->find() |
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
<p>{MAIN_COMPANY_LOGO}</p> | |
<p>{MAIN_COMPANY_BILLING_ADDRESS}</p> | |
<p>{MAIN_COMPANY_PHONE}</p> | |
<p>{MAIN_COMPANY_FAX}</p> | |
<p>{MAIN_COMPANY_WEBSITE}</p> |
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 | |
class SomeTable extends Table | |
{ | |
public function implementedEvents() | |
{ | |
return [ | |
'Model.afterSave' => [ | |
'callable' => 'afterSave', | |
'priority' => 3 |
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 | |
$staringArray = [ | |
'Hercules' => [ | |
(int) 0 => [ | |
(int) 10 => 'Slaykings' | |
], | |
(int) 1 => [ | |
(int) 4 => 'Welp' | |
] | |
] |
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\Model\Entity; | |
use Cake\I18n\Time; | |
use Cake\ORM\Entity; | |
/** | |
* Expense Entity. | |
* | |
* @property int $id |
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
(fn thenth [collection x] | |
(loop [ collection collection | |
x x | |
idx 0 | |
] | |
(if (first collection) | |
(if (= idx x) | |
(first collection) | |
) | |
(recur thenth [(rest collection) |
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
(ns clojure-noob.core | |
(:gen-class)) | |
(defn happening | |
[& args] | |
(if (and true false) | |
do (println "print me") | |
do (println "no print me!"))) |
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
(defn whataheck | |
(and true false) | |
(println "okay") | |
(println "wow") | |
) |
NewerOlder