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
| userAgentLocale: Ember.computed(function() { | |
| return new Ember.RSVP.Promise((resolve, reject) => { | |
| Ember.$.getJSON([ENV.APP.baseUrlApi, 'util/user-agent-info'].join('/'), (data) => { | |
| resolve(data['accept-language']); | |
| }).fail(() => reject('...')); | |
| } | |
| ) | |
| })), | |
| {{userAgentLocale}} shows [Object] |
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
| /** | |
| * Handle command | |
| * | |
| * @param ChangeCustomerProducts $command | |
| */ | |
| public function __invoke(ChangeCustomerProducts $command) | |
| { | |
| $customerId = $command->customerId(); | |
| /** @var Customer $customer */ |
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
| SQL> DB.DBA.SPARQL_SELECT_KNOWN_GRAPHS(); | |
| GRAPH_IRI | |
| VARCHAR | |
| _______________________________________________________________________________ | |
| http://www.openlinksw.com/schemas/virtrdf# | |
| http://www.w3.org/ns/ldp# | |
| http://dbpedia.org/sparql | |
| http://dbpedia.org/DAV/ | |
| http://dbpedia.org/schema/property_rules# |
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
| import Ember from "ember"; | |
| export default Ember.Route.extend({ | |
| store: Ember.inject.service(), | |
| account: Ember.inject.service(), | |
| model: Ember.computed('account.selectedCustomer', 'account.selectedCustomerPractice', function () { | |
| return { | |
| selectedCustomer: this.get('account.selectedCustomer'), | |
| selectedCustomerPractice: this.get('account.selectedCustomerPractice'), | |
| availableCustomers: this.store.query('customer/customer', { |
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
| #!/usr/bin/env php | |
| <?php | |
| use Interop\Container\ContainerInterface; | |
| $autoloadFiles = [ | |
| __DIR__ . '/../../../vendor/autoload.php', | |
| __DIR__ . '/../../vendor/autoload.php', | |
| __DIR__ . '/../vendor/autoload.php', | |
| __DIR__ . '/vendor/autoload.php', |
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
| offset bad? | |
| https://developer.wordpress.com/2014/02/14/an-efficient-alternative-to-paging-with-sql-offsets/ | |
| SELECT * FROM my_table OFFSET 8000000 LIMIT 100; | |
| But on a performance level, this means you’re asking your DB engine to figure out where to start from | |
| all on its own, every time. Which then means it must be aware of every record before the queried offset, | |
| because they could be different between queries (deletes, etc). So the higher your offset number, the longer | |
| the overall query will take. |
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
| #!/usr/bin/env php | |
| <?php | |
| $pdo = new PDO("mysql:host=127.0.0.1;dbname=plhw_application_api_development", 'plhwapi_dev', 'xxxxxxxxxxx'); | |
| $pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); | |
| print memory_get_usage() . PHP_EOL; | |
| $uresult = $pdo->query("SELECT * FROM event_stream event_stream ORDER BY created_at ASC, version ASC"); | |
| print memory_get_usage() . PHP_EOL; | |
| //outputs |
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
| #!/bin/bash | |
| echo "authentication " `curl -I --silent https://github.com/zendframework/zend-authentication/blob/master/composer.lock | grep 'HTTP/1.1'` | |
| echo "barcode " `curl -I --silent https://github.com/zendframework/zend-barcode/blob/master/composer.lock | grep 'HTTP/1.1'` | |
| echo "cache " `curl -I --silent https://github.com/zendframework/zend-cache/blob/master/composer.lock | grep 'HTTP/1.1'` | |
| echo "captcha " `curl -I --silent https://github.com/zendframework/zend-captcha/blob/master/composer.lock | grep 'HTTP/1.1'` | |
| echo "code " `curl -I --silent https://github.com/zendframework/zend-code/blob/master/composer.lock | grep 'HTTP/1.1'` | |
| echo "config " `curl -I --silent https://github.com/zendframework/zend-config/blob/master/composer.lock | grep 'HTTP/1.1'` | |
| echo "console " `curl -I --silent https://github.com/zendframework/zend-console/blob/master/composer.lock | grep 'HTTP/1.1'` | |
| echo "crypt " `curl -I --silent https://github.com/zen |
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
| Either file is uploaded or comes from legacy import, file has a current location (also a virtual FS) | |
| dispatch AddUploadedFileToDossierCommand | |
| payload path (or servicemanager name of source and target filesystems) | |
| AddFileToDossierCommandHandler::invoke | |
| persist file file with a filesystem service. wraps around multiple filesystems | |
| generate $fileId | |
| find $dossierAR in repository | |
| $dossierAR->addFile($fileId) |
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 | |
| declare(strict_types = 1); | |
| /** | |
| * @copyright Copyright (c) 2010 - 2016 bushbaby multimedia. (http://bushbaby.nl) | |
| * @author Bas Kamer <xxxx@xxxxxx> | |
| * @license Proprietary License | |
| */ |