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
server { | |
listen 80; | |
server_name localhost; | |
root /home/website/web; | |
rewrite ^/app\.php/?(.*)$ /$1 permanent; | |
try_files $uri @rewriteapp; | |
location @rewriteapp { |
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
public function paymentAction(Request $request) | |
{ | |
$paymentType = $this->createPaymentForm($request); | |
$paymentType->handleRequest($request); | |
if (!$paymentType->isValid()) { | |
return $this->renderErrors($paymentType); | |
} | |
//NEED REMOVE IT AS SOON AS POSSIBLE | |
$contractId = $request->get('contract_id'); | |
$contract = $this->getDoctrine() |
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
<pre> | |
Geocoder\Result\Geocoded Object([latitude:protected] => 33.2729683 [longitude:protected] => -111.6850526 [bounds:protected] => Array([south] => 33.271331 [west] => -111.6850526 [north] => 33.2729683 [east] => -111.683556 ) [streetNumber:protected] => [streetName:protected] => East Ryan Road [cityDistrict:protected] => [city:protected] => Queen Creek [zipcode:protected] => 85242 [county:protected] => Maricopa County [countyCode:protected] => MARICOPA COUNTY [region:protected] => Arizona [regionCode:protected] => AZ [country:protected] => United States [countryCode:protected] => US [timezone:protected] => ) | |
</pre> | |
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
{ | |
"results" : [ | |
{ | |
"address_components" : [ | |
{ | |
"long_name" : "ST 28", | |
"short_name" : "ST 28", | |
"types" : [ "street_number" ] | |
}, |
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 | |
function draw($n) | |
{ | |
for ($i = 1; $i < $n; $i++) { | |
$spaces = $n - $i; | |
for ($j = 0; $j < $spaces; $j++) { | |
echo ' '; | |
} |
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 | |
function revertWord($word) | |
{ | |
$length = strlen($word); | |
for ($i = 0, $j = $length - 1; $i < ($length / 2); $i++, $j--) { | |
$t = $word[$i]; | |
$word[$i] = $word[$j]; | |
$word[$j] = $t; |
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
/** | |
* @TODO find out yii 1 way to split extion per request method | |
* | |
* @throws CException | |
*/ | |
public function actionIndex() | |
{ | |
$request = $this->getRequest(); | |
if ($request->getIsPostRequest()) { | |
$this->update(); |
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
//It works only with + and - operation | |
//If need to use operations like * or / and so on: need to add prioriry of operations | |
//Also exist algoritm with "stack" and "recursion". | |
//Current algoritm is most simple way for equialent operations. | |
var str = "1-(2-3-(4-5))+6-(8-10)+(3+4)"; | |
function _calculate(a, op, b) { | |
a = a * 1; | |
b = b * 1; |
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
data: [ | |
{ | |
fixture_id: 123 | |
markets: [ | |
{ | |
market_id: 1, | |
market_name: '1X2', | |
providers: [ | |
{ | |
provider_id: 4, |
OlderNewer