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
/** | |
* Returns the Response object associated to the acl action. | |
* | |
* @param int|string|null $id | |
* @param Request $request | |
* | |
* @return Response|RedirectResponse | |
* | |
* @throws AccessDeniedException If access is not granted. | |
* @throws NotFoundHttpException If the object does not exist or the ACL is not enabled |
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
user_firewall: | |
pattern: ^/ | |
anonymous: ~ | |
switch_user: true | |
provider: user | |
oauth: | |
resource_owners: | |
facebook: "/login/check-facebook" | |
login_path: login | |
use_forward: false |
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
{ | |
"error": { | |
"root_cause": [ | |
{ | |
"type": "script_exception", | |
"reason": "Error evaluating pricing", | |
"script_stack": [], | |
"script": "", | |
"lang": "groovy" | |
} |
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
double perHourWeekday = 0; | |
double perMileWeekday= 0; | |
double perHourWeekend = 0; | |
double perMileWeekdend= 0; | |
double feeRunningMile = 0; | |
int freeRunningMiles = 0; | |
int minHours = 0; | |
int diff = 100; |
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
/** | |
* @var Vehicle $vehicle | |
*/ | |
$vehicle = false; | |
foreach ($user->getVehicles() as $userVehicle) | |
{ | |
if ($userVehicle->getType() == $selectedVehicleType) | |
{ | |
$vehicle = $userVehicle; | |
break; |
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
{ | |
"error": { | |
"root_cause": [{ | |
"type": "script_exception", | |
"reason": "Error evaluating pricing", | |
"script_stack": [], | |
"script": "", | |
"lang": "groovy" | |
}], | |
"type": "search_phase_execution_exception", |
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
{ | |
"search" : { | |
"mappings" : { | |
"delivery" : { | |
"_meta" : { | |
"model" : "AppBundle\\Entity\\Delivery" | |
}, | |
"dynamic_date_formats" : [ ], | |
"properties" : { | |
"categories" : { |
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
# current json | |
"_embedded": { | |
"items": [ | |
{ | |
"0": { | |
"id": 5, | |
... | |
}, | |
"isFeedbackAdded": "0" |
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
$regions = array(); | |
$regions[65] = array('id' => 65, 'parent_id' => 44, 'name' => "Shoreditch"); | |
$regions[77] = array('id' => 77, 'parent_id' => 5, 'name' => "England"); | |
$regions[100] = array('id' => 100, 'parent_id' => 0, 'name' => "Europe"); | |
$regions[5] = array('id' => 5, 'parent_id' => 100, 'name' => "United Kingdom"); | |
$regions[44] = array('id' => 44, 'parent_id' => 77, 'name' => "London"); | |
function getChild ($parent_id = 0) | |
{ |