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\components; | |
class Helpers | |
{ | |
public static function getDays($month,$year) | |
{ | |
if ($month==date("m")){ | |
$num=(int)date("d"); | |
} |
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
## Hotels API [/agent/v1/hotel] | |
### Get hotels availability [GET /agent/v1/hotel/availability{?regions,hotels,from,to,limit,offset,adults,children}] | |
Pagination available. | |
| field | required | type | example | description | | |
|------------|:-:|-------------|----------------------------------------|-------------| | |
| regions | * | string,int | `399,189` | Comma separeted string of region id's or single id. | | |
| hotels | | string,int | `1844` | Comma separeted string of hotel ids or single 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
<?php | |
class ArrayToXml | |
{ | |
/** | |
* @var string the XML version | |
*/ | |
public $version = '1.0'; | |
/** | |
* @var string the XML encoding. If not set, it will use the value of [[Response::charset]]. |
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
# | |
# Simple python client example | |
# Using Python 2.7 and urrlib2 library | |
# | |
import time, hashlib | |
import urllib2 | |
import time | |
# Your API Key and secret |
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 | |
use yii\db\Schema; | |
use yii\db\Migration; | |
use yii\db\Query; | |
use yii\helpers\Console; | |
class m150326_081532_combining_users extends Migration | |
{ | |
private $affiliatesTable = 'affiliate_users'; |
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 isPrimeNumber($i) | |
{ | |
if($i == 1) | |
return false; | |
if($i == 2) | |
return true; | |
$n = 2; |
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 Ican | |
* | |
* Api for 3rd party service | |
* | |
*/ | |
class Ican | |
{ |
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\modules\guides\controllers; | |
use app\modules\guides\components\Parser; | |
use yii\filters\AccessControl; | |
use yii\helpers\Markdown; | |
use yii\helpers\Url; | |
use yii\web\Controller; |
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 currKeypadField; | |
var keypad; | |
var checkbox_group_ids = []; | |
window.onload = function(event) { | |
keypad = document.getElementById('virtual-keypad'); | |
setBodySize(); | |
var inputs = document.getElementsByTagName("input"); |
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 TrafficTest; | |
class Traffic | |
{ | |
private $db; | |
private $table = 'traffic'; | |
public $code; | |
public $period; |