This file contains hidden or 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
module Main exposing (..) | |
{- This file re-implements the Elm Counter example (1 counter) with elm-mdl | |
buttons. Use this as a starting point for using elm-mdl components in your own | |
app. | |
-} | |
import Html.App as App | |
import Html exposing (..) | |
import Html.Attributes exposing (href, class, style) |
This file contains hidden or 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 | |
//call `php gen_docs.php` in the forlder where docs.json is | |
// The markdown will be spit out to stdout | |
$sections = json_decode(file_get_contents("docs.json"), true); | |
$output = ""; | |
function replaceDocs($comment, $section) { | |
return preg_replace_callback('/@docs\s+(.+)/mu', function ($matches) use ($section) { |
This file contains hidden or 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 | |
$sections = json_decode(file_get_contents("docs.json"), true); | |
$output = ""; | |
function replaceDocs($comment, $section) { | |
return preg_replace_callback('/@docs\s+(.+)/mu', function ($matches) use ($section) { | |
$tokens = array_map('trim', explode(',', $matches[1])); |
This file contains hidden or 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
actions : List Step | |
actions = | |
[ visit "https://google.com" | |
, title <| Expect.equal "this will fail!" | |
, elementCount "input" <| Expect.atLeast 1 | |
, setValue "input[name='q']" "Elm lang" | |
, elementText "#rso > div:nth-child(1) > div:nth-child(1) > div > h3 > a" <| Expect.equal "Elm is the best" | |
, click "#rso > div:nth-child(1) > div:nth-child(1) > div > h3 > a" | |
, pause 2000 | |
, title <| Expect.equal "home" |
This file contains hidden or 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 | |
if (!empty($this->request->data('applications.companies_ids'))) { | |
// Recupero gli ids delle aziende a cui l'agente si è candidato | |
$companiesIds = array_diff( | |
$this->request->data('applications.companies_ids'), | |
(new Collection($agent->applications))->extract('company_id')->toArray() | |
); | |
This file contains hidden or 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
var webdriverio = require('webdriverio'); | |
var elm = require('./main.js'); | |
var options = { | |
desiredCapabilities: { | |
browserName: 'firefox' | |
} | |
}; | |
var sessions = new WeakMap; |
This file contains hidden or 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 | |
$q->where(function ($exp, $q) use ($userVal) { | |
return $exp->gte($q->newExpr('foo * bar'), $userVal, 'integer'); | |
}) |
This file contains hidden or 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\Controller\Component; | |
use Cake\Controller\Component\PaginatorComponent; | |
use Cake\Datasource\RepositoryInterface; | |
use Cake\Network\Exception\NotFoundException; | |
use Cake\ElasticSearch\Query; | |
class ElasticPaginatorComponent extends PaginatorComponent |
This file contains hidden or 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\Routing\Filter; | |
use Cake\Event\Event; | |
use Cake\Routing\Dispatcherfilter; | |
class TrustProxyFilter extends DispatcherFilter | |
{ | |
/** | |
* {inheritDoc} |
This file contains hidden or 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\Routing\Filter; | |
use Cake\Event\Event; | |
use Cake\Routing\DispatcherFilter; | |
class JsonInputFilter extends DispatcherFilter | |
{ | |
public function beforeDispatch(Event $e) |