query stringlengths 11 3.13k | ru_query stringlengths 9 3.91k | document stringlengths 18 71k | metadata dict | negatives listlengths 0 100 | negative_scores listlengths 0 100 | document_score stringlengths 5 10 | document_rank stringclasses 2
values |
|---|---|---|---|---|---|---|---|
Gets the current MenuItem. | Получает текущий MenuItem. | public function getMenuItem()
{
return $this->menu_item;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMenuItem() {\n\t\treturn $this->navigationMenuItem;\n\t}",
"public function getMenu( ) {\n return $this->menu;\n }",
"protected function getMenu()\n {\n return $this->menu;\n }",
"public function getMenu()\n {\n return $this->menu;\n }",
"public functi... | [
"0.8112875",
"0.7636708",
"0.76228344",
"0.7590993",
"0.74630743",
"0.731208",
"0.71936935",
"0.6957345",
"0.6933408",
"0.689463",
"0.6760034",
"0.6755239",
"0.6735245",
"0.6717226",
"0.67065185",
"0.6691346",
"0.66837406",
"0.6638656",
"0.66296405",
"0.66162056",
"0.66127896... | 0.84761196 | 0 |
Return the next rank of this Scout. Uses the currentRank() method. Returns empty Rank model instance if nothing found. | Возвращает следующий ранг этого Скайта. Использует метод currentRank(). Возвращает пустой модельный экземпляр Rank, если ничего не найдено. | public function nextRank() {
$currentRank = self::currentRank();
$nextRank = Rank::where('rank_sort_sequence', '=', ($currentRank->rank_source_sequence + 1) )
->get()->first();
Log::debug('Scout::nextRank() query result: ' . print_r($nextRank, TRUE));
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function currentRank() {\n $result = DB::table('award_scout')\n ->where('scout_id', '=', $this->id)\n ->whereIn('award_status', array('Completed', 'Presented'))\n ->join('awards', 'award_id', '=', 'awards.id')\n ->where('awards.award_class_n... | [
"0.7110652",
"0.70404786",
"0.70270365",
"0.70270365",
"0.70270365",
"0.70270365",
"0.70270365",
"0.70270365",
"0.70270365",
"0.70270365",
"0.7020215",
"0.7004805",
"0.69927865",
"0.6992597",
"0.6951312",
"0.69325167",
"0.68180394",
"0.6627603",
"0.65186834",
"0.6514731",
"0.... | 0.8188525 | 0 |
request have content type json | запрос имеет содержимое типа json | function isRequestContentTypeJson(){
return (isset($_SERVER["CONTENT_TYPE"]) && $_SERVER["CONTENT_TYPE"] == 'application/json');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function JSON(){\n if(self::checkHeader()){\n header('Access-Control-Allow-Origin: *');//allow cross domain calls\n header('content-type: application/json');}}",
"final public function sendJsonContentType() {\n\t\theader('Content-type: application/json');\n\t}",
"publ... | [
"0.7018312",
"0.6955941",
"0.687138",
"0.67818344",
"0.66893464",
"0.65997183",
"0.6564102",
"0.65621924",
"0.65507555",
"0.6517",
"0.65069103",
"0.6500315",
"0.6493352",
"0.64304864",
"0.63668096",
"0.6351295",
"0.63508344",
"0.6335781",
"0.63337016",
"0.63224316",
"0.632071... | 0.7429987 | 0 |
Constructor initialises the options resolver | Конструктор инициализирует разрешитель опций | public function __construct()
{
$this->resolver = new OptionsResolver();
$this->setDefaultOptions($this->resolver);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n {\n $this->resolver = new OptionsResolver();\n }",
"public function __construct(array $options = []) {\n\t\t$resolver = new OptionsResolver();\n\t\t$this->configureOptions($resolver);\n\t\t$this->options = $resolver->resolve($options);\n\t}",
"private function __con... | [
"0.85665363",
"0.7824551",
"0.7668937",
"0.75391114",
"0.75229806",
"0.7490571",
"0.7435719",
"0.73678654",
"0.73678654",
"0.7365937",
"0.7329817",
"0.73278624",
"0.7280876",
"0.72598696",
"0.72430885",
"0.7239438",
"0.72358",
"0.723366",
"0.7206592",
"0.7205092",
"0.71787053... | 0.8422611 | 1 |
Generate a SendGridEmail object from an array of options | Создайте объект SendGridEmail из массива параметров | public function createFromParameters(array $options)
{
$options = $this->resolver->resolve($options);
$email = new Email();
$email->setFrom($options['from']);
$email->setFromName($options['from_name']);
$email->setSubject($options['subject']);
$email->setHtml($option... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMailServiceOptions();",
"public function createSendEmail(\n $options\n ) {\n //check that all required arguments are provided\n if (!isset($options['to'], $options['from'], $options['type'], $options['subject'], $options['message'], $options['responseType'])) {\n ... | [
"0.6129717",
"0.6108929",
"0.60071754",
"0.57978034",
"0.5708178",
"0.56827503",
"0.567643",
"0.56424075",
"0.562958",
"0.56240934",
"0.56120634",
"0.5580215",
"0.5547498",
"0.55316067",
"0.5489613",
"0.54218674",
"0.5390262",
"0.53348565",
"0.5318988",
"0.5293572",
"0.529334... | 0.7094067 | 0 |
Function is use to dislike the post comment. | Функция используется для негативного отношения к посту комментария. | public function postCommentDislike(Request $request)
{
try {
$validator = Validator::make($request->all(), [
'post_comment_like_id' => 'required',
'post_comment_id' => 'required',
'post_id' => 'required',
'customer_id' => 'required',
])... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function Dislike(int $userid, int $postid, $db)\n {\n if(isset($_GET['dislike']))\n {\n $data['userid'] = $_GET['userid'];\n $data['postid'] = $_GET['postid'];\n\n $likedUserIds = $db->getUserIdFromLikeTable();\n $dislikedUserIds = $db->g... | [
"0.72316206",
"0.69763225",
"0.69263333",
"0.6887831",
"0.6868419",
"0.6860249",
"0.67815554",
"0.67506486",
"0.66805345",
"0.66491896",
"0.66332805",
"0.65733176",
"0.6564818",
"0.65415066",
"0.6525465",
"0.6480541",
"0.6474598",
"0.6416967",
"0.6385624",
"0.6349217",
"0.634... | 0.7080998 | 1 |
Returns a fresh RealtyQuery | Возвращает свежий RealtyQuery | public function createRealtyQuery()
{
$mapper = new RealtyMapper();
return new RealtyQuery($this->getApi(), new RealtyWrapper($mapper), $mapper);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function query() {\n return (new static)->newQuery();\n }",
"public static function query()\n {\n return (new static)->newQuery();\n }",
"public function newQuery()\n {\n return new Query($this);\n }",
"public static function query() {\n\n $e = new sta... | [
"0.7759461",
"0.77088386",
"0.73736745",
"0.73173666",
"0.72718114",
"0.7267952",
"0.71108294",
"0.7087244",
"0.7041554",
"0.7030114",
"0.7011599",
"0.697664",
"0.6959965",
"0.6904421",
"0.6878776",
"0.684505",
"0.684505",
"0.684505",
"0.684505",
"0.682947",
"0.68195987",
"... | 0.8342233 | 0 |
Returns a fresh ProjectQuery | Возвращает свежий ProjectQuery | public function createProjectQuery()
{
$mapper = new ProjectMapper();
return new ProjectQuery($this->getApi(), new ProjectWrapper($mapper), $mapper);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function allProjects()\n {\n return (new static)->newQueryWithoutScope(new ProjectFilteringScope);\n }",
"public function query()\n {\n $query = Project::with(array('serviceProvider','sector'))->selectRaw(' projects.*');\n $query->where('is_accepted', false);\n ... | [
"0.7085447",
"0.69400233",
"0.6903961",
"0.68457985",
"0.6812744",
"0.67887145",
"0.6781724",
"0.67170674",
"0.6690357",
"0.6686449",
"0.6660915",
"0.6619639",
"0.6589161",
"0.65208215",
"0.65168446",
"0.649808",
"0.6450871",
"0.644819",
"0.64437824",
"0.6433627",
"0.6429451"... | 0.8323188 | 0 |
Returns a fresh EmployeeQuery | Возвращает свежий EmployeeQuery | public function createEmployeeQuery()
{
$mapper = new EmployeeMapper();
return new EmployeeQuery($this->getApi(), new EmployeeWrapper($mapper), $mapper);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function query(Employee $model)\n {\n return $model->newQuery();\n }",
"public function query(Employee $model)\n {\n\n return $model->newQuery();\n }",
"function getEmployees(){\n\t$sql=\"select * from employee\";\n\n\treturn $this->query($sql);\n}",
"public function query(Em... | [
"0.7179119",
"0.71152216",
"0.64607584",
"0.64387083",
"0.6424343",
"0.6343457",
"0.6334321",
"0.63070524",
"0.6293742",
"0.6293742",
"0.6293742",
"0.6293742",
"0.6284492",
"0.62428784",
"0.6241019",
"0.6167894",
"0.61655134",
"0.6128262",
"0.60528624",
"0.6046431",
"0.603836... | 0.8596169 | 0 |
Returns a fresh BasicDataQuery | Возвращает свежий BasicDataQuery | public function createBasicDataQuery()
{
return new BasicDataQuery($this->getApi(), new BasicDataWrapper(), new BasicDataMapper());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function query() {\n return (new static)->newQuery();\n }",
"public static function query()\n {\n return (new static)->newQuery();\n }",
"protected function query() {\n return $this->model->newQuery();\n }",
"public function newQuery()\n {\n return new stati... | [
"0.71606827",
"0.7149321",
"0.7006702",
"0.69297665",
"0.68840337",
"0.6778489",
"0.67730343",
"0.67396283",
"0.6734245",
"0.6678817",
"0.6672529",
"0.6669182",
"0.6667971",
"0.66479367",
"0.66247225",
"0.66247225",
"0.66247225",
"0.66247225",
"0.6605795",
"0.6574085",
"0.655... | 0.84452885 | 0 |
Get the value of numEmploye | Получить значение numEmploye | public function getNumEmploye()
{
return $this->numEmploye;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNumeroEmploye() {\n return $this->numeroEmploye;\n }",
"public function getNumeroEmploye() {\n return $this->numeroEmploye;\n }",
"public function getNumeroEmploye() {\n return $this->numeroEmploye;\n }",
"public function getNumeroEmploye(): ?string {\n ... | [
"0.8384202",
"0.8384202",
"0.8384202",
"0.75297713",
"0.75297713",
"0.75297713",
"0.75297713",
"0.7344259",
"0.71740776",
"0.7173",
"0.71713495",
"0.69213194",
"0.6783749",
"0.6659639",
"0.6555415",
"0.65381014",
"0.6524769",
"0.6453334",
"0.6446882",
"0.6400666",
"0.63123906... | 0.8696034 | 0 |
Set the value of numEmploye | Установите значение numEmploye | public function setNumEmploye($numEmploye)
{
$this->numEmploye = $numEmploye;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testSetNumeroEmploye() {\n\n $obj = new AttestationExtras();\n\n $obj->setNumeroEmploye(\"numeroEmploye\");\n $this->assertEquals(\"numeroEmploye\", $obj->getNumeroEmploye());\n }",
"public function testSetNumeroEmploye() {\n\n $obj = new AttestationAt();\n\n ... | [
"0.7587606",
"0.7513507",
"0.74530333",
"0.73639613",
"0.7213277",
"0.7213277",
"0.7213277",
"0.6916756",
"0.6916756",
"0.6916756",
"0.68404835",
"0.66499394",
"0.654637",
"0.64668906",
"0.64355326",
"0.6298493",
"0.62713003",
"0.6266477",
"0.6265729",
"0.6237316",
"0.6204484... | 0.7669635 | 0 |
Get the value of cni | Получить значение cni | public function getCni()
{
return $this->cni;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCnsc(){\n return $this->cnsc;\n }",
"function get_cci() {\n\t\t$this->ar_data['CCI'] = $this->_binarize(strlen($this->string), $this->ar_config['CCI'][$this->mode]);\n\t\t$this->log[] = 'CCI set: ' . $this->ar_data['CCI'];\n\t}",
"public function getCNPJ()\n {\n return $this-... | [
"0.6931732",
"0.6819912",
"0.6744592",
"0.6504901",
"0.64420325",
"0.64157665",
"0.6351027",
"0.63148284",
"0.63090193",
"0.63080025",
"0.6299866",
"0.6286908",
"0.62745744",
"0.62313926",
"0.6177778",
"0.6101922",
"0.60791916",
"0.60717034",
"0.6061735",
"0.60501605",
"0.602... | 0.8107737 | 0 |
Set the value of cni | Установите значение cni | public function setCni($cni)
{
$this->cni = $cni;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCni()\n {\n return $this->cni;\n }",
"function get_cci() {\n\t\t$this->ar_data['CCI'] = $this->_binarize(strlen($this->string), $this->ar_config['CCI'][$this->mode]);\n\t\t$this->log[] = 'CCI set: ' . $this->ar_data['CCI'];\n\t}",
"public function setIccid($value)\n {\n ... | [
"0.6586",
"0.63426703",
"0.60905516",
"0.6089377",
"0.60344875",
"0.59998614",
"0.59238017",
"0.5860853",
"0.5798715",
"0.578164",
"0.5745854",
"0.57416135",
"0.5702144",
"0.566852",
"0.5647285",
"0.5632115",
"0.55800074",
"0.55800074",
"0.5560046",
"0.5540334",
"0.54497784",... | 0.7308304 | 0 |
Get the value of dateNaiss | Получить значение dateNaiss | public function getDateNaiss()
{
return $this->dateNaiss;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDate_naissance()\n {\n return $this->date_naissance;\n }",
"public function getDateNaissance()\n {\n return $this->dateNaissance;\n }",
"private function getDate(){\n\n\t\treturn Date::get( $this->date );\n\n\t}",
"public function getDateNaissance()\n {\n ... | [
"0.74585813",
"0.7399836",
"0.73908347",
"0.7295801",
"0.726142",
"0.7188369",
"0.70391047",
"0.7007427",
"0.69506484",
"0.69430614",
"0.6890581",
"0.6890581",
"0.6890581",
"0.6890581",
"0.6890581",
"0.6890581",
"0.6890581",
"0.6890581",
"0.6890581",
"0.6872536",
"0.6864327",... | 0.7858266 | 0 |
TODO: Implement loadValidatorMetadata() method. | TODO: Реализовать метод loadValidatorMetadata(). | public static function loadValidatorMetadata(ClassMetadata $metadata): void
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function loadValidatorMetadata(ClassMetadata $metadata)\n {\n }",
"protected function _getValidator()\n {\n }",
"public function getValidator() {}",
"static public function loadValidatorMetadata(ClassMetadata $metadata)\n {\n //$metadata->addPropertyConstraint('notes', new Ass... | [
"0.78779817",
"0.7544964",
"0.7499558",
"0.73843294",
"0.72109044",
"0.68366146",
"0.68126565",
"0.6806218",
"0.676965",
"0.6689687",
"0.6642842",
"0.6630166",
"0.6624139",
"0.6624139",
"0.6505241",
"0.6505241",
"0.6505241",
"0.6412905",
"0.6404575",
"0.6364866",
"0.6364163",... | 0.78502965 | 1 |
TODO: Implement onPrePersist() method. | TODO: Реализовать метод onPrePersist(). | public function onPrePersist(): void
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function prePersist()\n {\n }",
"public function prePersist()\n {\n parent::prePersist();\n }",
"protected function prePersistEntity()\n {\n }",
"public function prePersistCallback()\n {\n $this->performPrePersistCallback();\n }",
"public function postPersist()\... | [
"0.8602758",
"0.8537973",
"0.8362231",
"0.7907677",
"0.7786416",
"0.7671035",
"0.76390535",
"0.75539756",
"0.75049657",
"0.75049657",
"0.75049657",
"0.75049657",
"0.75049657",
"0.75049657",
"0.75049657",
"0.75049657",
"0.7491535",
"0.7454001",
"0.7453462",
"0.74432",
"0.74424... | 0.8715576 | 0 |
TODO: Implement onPreUpdate() method. | TODO: Реализовать метод onPreUpdate(). | public function onPreUpdate(): void
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function preUpdate()\n {\n }",
"public function preUpdate()\n {\n }",
"protected function beforeUpdate() {}",
"protected function afterUpdate() {}",
"public function onUpdate();",
"public function onUpdate();",
"public function onUpdate();",
"public function onUpdate();",
"protec... | [
"0.83265877",
"0.83265877",
"0.7850124",
"0.7837283",
"0.7827729",
"0.7827729",
"0.7827729",
"0.7827729",
"0.76633674",
"0.7574917",
"0.7509341",
"0.74509805",
"0.74128515",
"0.73674",
"0.7359946",
"0.7351584",
"0.7351584",
"0.7351584",
"0.7351584",
"0.7351584",
"0.7351584",
... | 0.86132836 | 0 |
Normalize the given user agent by passing down the chain of normalizes | Нормализуйте заданный пользовательский агент, передавая его по цепочке нормализаций | public function normalize($userAgent) {
$normalizedUserAgent = $userAgent;
foreach ($this->_userAgentNormalizers as $normalizer) {
$normalizedUserAgent = $normalizer->normalize($normalizedUserAgent);
}
return $normalizedUserAgent;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function normalize($userAgent) {\n\t\treturn preg_replace ( self::PATTERN, \"$1 $2\", $userAgent );\n\t}",
"protected function normalize() {}",
"public function normalize();",
"public function setUserAgent($useragent)\n {\n $this->useragent = (string) $useragent;\n array_walk($this->f... | [
"0.6453431",
"0.5852001",
"0.56718874",
"0.56651753",
"0.5571716",
"0.5551593",
"0.55286765",
"0.5358201",
"0.5340611",
"0.5280682",
"0.5261302",
"0.52578986",
"0.52563196",
"0.5214148",
"0.5189716",
"0.512454",
"0.5080951",
"0.504649",
"0.5028761",
"0.5014943",
"0.49719226",... | 0.73509854 | 0 |
Calculate the blacklist by including dependents and resolving wild cards. | Вычислите черный список, включая зависимые и разрешая дикие карты. | protected function calculateBlacklist() {
foreach ($this->blacklistedModules as $module) {
$path = drupal_get_path('module', $module);
if ($path === NULL || $path === '') {
continue;
}
$files = file_scan_directory($path . '/config/install', '/.yml/');
$cleanFiles = [];
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function compileBlacklist(): array\n {\n return array_diff(\n $this->getBlacklist(),\n $this->getWhitelist()\n );\n }",
"protected function getBlackList()\n {\n return [\n 'kernel',\n 'web_profiler.controller.router',\n '... | [
"0.6917169",
"0.62736773",
"0.61326903",
"0.5943451",
"0.5921442",
"0.5915215",
"0.58701575",
"0.5869198",
"0.5860658",
"0.5817611",
"0.57732797",
"0.5656024",
"0.56300133",
"0.5596891",
"0.55869156",
"0.5413835",
"0.5407728",
"0.53392935",
"0.53028667",
"0.5257572",
"0.52340... | 0.7410041 | 0 |
Custom helper to function to check if it's in our custom blacklist or not. | Сustom helper для функции проверки, находится ли она в нашей пользовательской черной книге или нет. | private function checkIfInBlacklist($name) {
if (in_array($name, $this->FCFBlacklist, TRUE)) {
return TRUE;
}
return FALSE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function apply_blacklist($item){\n global $BLACKLIST;\n return !in_array($item, $BLACKLIST);\n}",
"public function hasBlacklist()\n {\n return $this->blacklist !== null;\n }",
"public function isBlacklisted()\n {\n $list = $this->form->config('checklist');\n if (!$list) {\n ... | [
"0.7999539",
"0.73191994",
"0.72379243",
"0.68976414",
"0.6841404",
"0.68186736",
"0.6800638",
"0.67964554",
"0.6786798",
"0.6733105",
"0.6718721",
"0.66956854",
"0.6694436",
"0.6667807",
"0.6658621",
"0.66215134",
"0.6616279",
"0.6615476",
"0.6589083",
"0.65327305",
"0.65013... | 0.7801822 | 1 |
Get the value of idCard | Получить значение idCard | public function getIdCard() {
return $this->idCard;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getCardId() {\n return $this->cardId;\n }",
"public function getCardId() {\n return $this->cardId;\n }",
"public function getIdcard()\n {\n return $this->idcard;\n }",
"public function getCardId()\n {\n return $this->cardId;\n }",
"public function getIdCard... | [
"0.76238817",
"0.76238817",
"0.7568238",
"0.75289947",
"0.7395459",
"0.73316693",
"0.7115557",
"0.70614",
"0.6921415",
"0.69197816",
"0.6884736",
"0.68623525",
"0.68551844",
"0.6778073",
"0.675047",
"0.6747652",
"0.67295605",
"0.67197967",
"0.671798",
"0.6676715",
"0.667313",... | 0.7945786 | 0 |
Set the value of idCard | Задайте значение idCard | public function setIdCard($idCard) {
$this->idCard = $idCard;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setCardNo(string $value) { return $this->set('cardNo', $value); }",
"public function setCardId($cardId) {\n $this->cardId = $cardId;\n }",
"public function setCardId($cardId) {\n $this->cardId = $cardId;\n }",
"protected function setCard($data)\t\r\n\t{\r\n\t\t$this->card = $data;\r\n... | [
"0.7269816",
"0.7106704",
"0.7106704",
"0.6993203",
"0.69801843",
"0.68389416",
"0.6786468",
"0.675966",
"0.6708256",
"0.6675145",
"0.6660163",
"0.6636203",
"0.6636203",
"0.6617428",
"0.6541458",
"0.6541014",
"0.6541014",
"0.65401894",
"0.6494819",
"0.64605063",
"0.64605063",... | 0.74354225 | 0 |
Get the value of strAddr | Получить значение strAddr | public function getStrAddr() {
return $this->strAddr;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAddress() {\n\t\treturn $this->strAddress;\n\t}",
"public function getAddress()\n {\n $value = $this->get(self::ADDRESS);\n return $value === null ? (string)$value : $value;\n }",
"public function getAddr()\n {\n return $this->addr;\n }",
"public function p... | [
"0.75259537",
"0.7277945",
"0.7224069",
"0.70241195",
"0.69700706",
"0.6894401",
"0.6754639",
"0.6741762",
"0.6664139",
"0.66419095",
"0.66419095",
"0.66419095",
"0.66419095",
"0.66419095",
"0.6626954",
"0.6613289",
"0.65742046",
"0.6571876",
"0.6521769",
"0.6503247",
"0.6503... | 0.8426783 | 0 |
Set the value of strAddr | Установите значение strAddr | public function setStrAddr($strAddr) {
$this->strAddr = $strAddr;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAddress($value)\n\t{\n\t\t$this->address = $value;\n\t}",
"public final function setAddress($address) {\n\t\t\t$this->address = (string)$address;\n\t\t}",
"public function setAddr($var)\n {\n GPBUtil::checkString($var, True);\n $this->addr = $var;\n\n return $this;\n ... | [
"0.67818826",
"0.674656",
"0.66623265",
"0.65071297",
"0.6407665",
"0.64059514",
"0.6362425",
"0.6360711",
"0.6356047",
"0.6355158",
"0.6354781",
"0.63512826",
"0.6333989",
"0.6251905",
"0.6251837",
"0.6174653",
"0.61179686",
"0.6054498",
"0.59683794",
"0.59679633",
"0.595661... | 0.73584753 | 0 |
Get the value of localityName | Получить значение localityName | public function getLocalityName() {
return $this->localityName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLocality()\r\n {\r\n return $this->locality;\r\n }",
"public function getLocality(): ?string\n {\n if (count($this->locality) == 0) {\n return null;\n }\n return $this->locality['value'];\n }",
"public function getSubLocality(): ?string;",
... | [
"0.78513175",
"0.7544332",
"0.74115014",
"0.7329306",
"0.7295878",
"0.7295878",
"0.6549021",
"0.6515736",
"0.64827335",
"0.64689404",
"0.64568084",
"0.6318896",
"0.6296798",
"0.6294966",
"0.62561566",
"0.62198",
"0.62170774",
"0.62030387",
"0.6192885",
"0.61872643",
"0.616823... | 0.8352635 | 0 |
Get the value of dataNascita | Получить значение dataNascita | public function getDataNascita()
{
return $this->dataNascita;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDataNascimento()\n {\n return $this->dataNascimento;\n }",
"public function getDataNaixement()\n {\n return $this->data_naixement;\n }",
"function cal_dataNascita($dataNascita, $sesso) \n{\n\t\t$data = explode('/', $data);\n\n \n\n // last two year num... | [
"0.77921414",
"0.72422785",
"0.7187562",
"0.6843183",
"0.6721735",
"0.6592107",
"0.64959455",
"0.64760077",
"0.64361835",
"0.64361835",
"0.64308274",
"0.64028287",
"0.6383791",
"0.6383249",
"0.6362661",
"0.63544613",
"0.6332166",
"0.63014716",
"0.6296502",
"0.62658846",
"0.62... | 0.86272335 | 0 |
Set the value of dataNascita | Установите значение dataNascita | public function setDataNascita($dataNascita)
{
$this->dataNascita = $dataNascita;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDataNascita()\n {\n return $this->dataNascita;\n }",
"public function setValoracion($n)\n {\n this->$v_valoracion=$n;\n \n }",
"function setNaam($n) {\n $this->naam = $n;\n }",
"public function setDataInicio($valor){\n\t\t\t$this->dataInicio = $valor;... | [
"0.69848895",
"0.68577844",
"0.6811694",
"0.67887825",
"0.6783022",
"0.6759003",
"0.67131406",
"0.6571227",
"0.6484632",
"0.64455724",
"0.6444213",
"0.64022166",
"0.6350526",
"0.6350526",
"0.63402987",
"0.6333087",
"0.6317138",
"0.62310505",
"0.62211716",
"0.6210974",
"0.6185... | 0.75305116 | 0 |
Sort by round and position | Сортировка по кругу и положению | function cmp($a, $b) {
if($a['round'] == $b['round']) {
return $a['pos'] - $b['pos'];
} else {
return $a['round'] - $b['round'];
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function asort() {}",
"protected function _sort() {}",
"public function sort();",
"public function sort();",
"function sort() { }",
"function sortByPoints($a, $b)\r\n\t{\r\n\t\t$a = $a['points'];\r\n\t\t$b = $b['points'];\r\n\r\n\t\tif ($a == $b) return 0;\r\n\t\treturn ($a < $b) ? -1 : 1;\r\n\t}"... | [
"0.6522117",
"0.6484627",
"0.64608675",
"0.64608675",
"0.6200661",
"0.6193714",
"0.6012969",
"0.5977214",
"0.590717",
"0.58487",
"0.5809691",
"0.58015347",
"0.57738745",
"0.56959516",
"0.5673848",
"0.5673848",
"0.5644816",
"0.5633581",
"0.5617493",
"0.55887043",
"0.55860204",... | 0.70949423 | 0 |
XSS detection/protection Filtreaza recursiv valorile din get,post,cookie pentru a oferi protectie xss | Обнаружение/защита от XSS Фильтрует рекурсивно значения из get, post, cookie для предоставления защиты от XSS | private function _XSS() {
array_walk_recursive($_GET,get_class($this)."::_callXSS");
array_walk_recursive($_POST,get_class($this)."::_callXSS");
array_walk_recursive($_COOKIE,get_class($this)."::_callXSS");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function XSS() {\n\n\t\tarray_walk_recursive($_GET,get_class($this).\"::_detectXSS\");\n\t\tarray_walk_recursive($_POST,get_class($this).\"::_detectXSS\");\n\t\tarray_walk_recursive($_COOKIE,get_class($this).\"::_detectXSS\");\n\n\t}",
"function remove_xss($val) {\n // this prevents some character... | [
"0.79703915",
"0.7051849",
"0.6962321",
"0.6959886",
"0.67886674",
"0.6788114",
"0.6696621",
"0.6683422",
"0.6659756",
"0.66558766",
"0.66396296",
"0.65883136",
"0.64399934",
"0.64186364",
"0.6418224",
"0.6416555",
"0.62624794",
"0.62479705",
"0.6230234",
"0.62296104",
"0.618... | 0.7986421 | 0 |
Generates HTML for stats in forum tab | Генерирует HTML для статистики в вкладке форума | function ShowStats( $template, $forum, $model ) {
$html = '<table width="50%" cellspacing="0" cellpadding="3" border="0">'
. '<tr class="sectiontableheader">'
. '<th colspan="2">' . CBTxt::T( 'Forum Statistics' ) . '</th>'
. '</tr>';
if ( $template->showStats ) {
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function displayStats()\n {\n global $template;\n\n $template->set_filename('body_page', dirname(__FILE__).\"/admin/gpc_infos.tpl\");\n\n $template_datas = array();\n\n $template_datas['modules']=GPCCore::getModulesInfos();\n $template_datas['plugins']=GPCCore::getRegistered();\n\n $temp... | [
"0.69577456",
"0.67376226",
"0.6729863",
"0.6648249",
"0.65548646",
"0.6480063",
"0.6463891",
"0.64550275",
"0.6420374",
"0.6379394",
"0.6362876",
"0.6349257",
"0.63462585",
"0.633806",
"0.6331798",
"0.6324414",
"0.62895066",
"0.6278605",
"0.6249369",
"0.62340665",
"0.6230738... | 0.7028338 | 0 |
Constructs the i18n object to use for translation, setting language Right now $engine is unused, but it's there to open for expansion for other translation methods that can be popped in or out. `Json` is just what is described above. | Создает объект i18n для использования в переводе, устанавливая язык. В настоящее время $engine не используется, но он есть для возможности расширения для других методов перевода, которые могут быть вставлены или удалены. `Json` — это просто то, что описано выше. | public function __construct( $engine = 'json' ) {
if ( ! file_exists( 'i18n' ) || ! is_dir( 'i18n' ) ) { return false; }
// This is internal, for testing. If the "ALPHRED_TESTING" flag is set,
// then we'll pretend that our language is French rather than the system
// default (for me: English). Consider this te... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function i18n()\n {\n $this->loadTranslations();\n\n $locale = lit()->getLocale();\n\n $translations = [$locale => []];\n if (array_key_exists($locale, $this->translations)) {\n $translations[$locale] = $this->translations[$locale];\n }\n\n $converted ... | [
"0.5938217",
"0.59024644",
"0.5801751",
"0.57929057",
"0.57836723",
"0.5776515",
"0.57233137",
"0.5716311",
"0.5708796",
"0.5704251",
"0.57013035",
"0.56962746",
"0.56836164",
"0.56836164",
"0.56828505",
"0.56828505",
"0.56825465",
"0.56825393",
"0.56825393",
"0.56825393",
"0... | 0.7039351 | 0 |
All avatars the user already has | Все аватары, которые пользователь уже имеет | public function avatars() {
$list = array();
$avatars = $this->user->avatars->find_all();
foreach($avatars as $avatar) {
$list[] = array(
'id' => $avatar->id,
'name' => ucfirst($avatar->title)
);
}
return $list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAvatars()\n {\n return $this->avatars;\n }",
"public function avatars()\n {\n return $this->morphMany(Image::class, 'imageable')->where('album_id', Image::AVATARS);\n }",
"public function processAvatars() {\n $uploadImage = new Gdn_UploadImage();\n $us... | [
"0.7602179",
"0.7544926",
"0.7533294",
"0.7527966",
"0.7222673",
"0.71063846",
"0.7056714",
"0.6973545",
"0.6845058",
"0.6829239",
"0.67744476",
"0.66335636",
"0.6633216",
"0.6502477",
"0.649935",
"0.6425403",
"0.64130217",
"0.63033974",
"0.6297493",
"0.6295379",
"0.6275262",... | 0.7578885 | 1 |
Conversion table from old to new option names. These all implicitly go in `options`, although they can come from different locations. | Таблица соответствия старых и новых имен параметров. Все они неявно находятся в `options`, хотя могут происходить из разных источников. | protected function remapOptionTable()
{
return [
'user' => 'remote-user',
'host' => 'remote-host',
'root' => 'root',
'uri' => 'uri',
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static function transformOldToNewOptionsParams(array $options = array()){\n $keys = [\n 'skipReportHeader' => 'isSkipReportHeader',\n 'skipColumnHeader' => 'isSkipColumnHeader',\n 'skipReportSummary' => 'isSkipReportSummary',\n 'useRawEnumValues' => 'isUseRawEnumV... | [
"0.6840141",
"0.6764644",
"0.6122061",
"0.59007376",
"0.5703155",
"0.56617594",
"0.55675924",
"0.55599755",
"0.55583245",
"0.55005074",
"0.5480602",
"0.54748064",
"0.5448875",
"0.54488117",
"0.54380864",
"0.54049426",
"0.53986967",
"0.5390069",
"0.5389918",
"0.537443",
"0.535... | 0.71658516 | 0 |
Devuelve listado de Jornadas | Возвращает список смен | function getJornadas($jornada_id = null); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getListeJoueurs(){\n return $this->joueurs;\n }",
"function getJornadas($jornada_id = null) {\n\t\t$where = null;\n\n\t\tif($jornada_id)\n\t\t\t//Si la jornada se filtra\n\t\t\t$where = 'id = ' . (int)$jornada_id;\n\n\t\t//Get query\n\t\t$query = $this->db->getQuery(true);\n\t\t$query->... | [
"0.7147868",
"0.7009639",
"0.6820202",
"0.678284",
"0.67683315",
"0.669191",
"0.6652855",
"0.6625079",
"0.66109157",
"0.65744334",
"0.6558887",
"0.6545842",
"0.64437264",
"0.6440161",
"0.6440161",
"0.6440161",
"0.6424496",
"0.6376822",
"0.6376724",
"0.6341311",
"0.63116944",
... | 0.7044766 | 1 |
/ 2. The Callback Function `get_resolved_header()` | / 2. Функция обратного вызова `get_resolved_header()` | function get_resolved_header($key, $resolve_arr) {
if (array_key_exists($key, $resolve_arr)) {
return $resolve_arr[$key];
} else {
return $key;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function wp_remote_retrieve_header($response, $header)\n{\n}",
"function get_header($name = \\null)\n{\n}",
"public function getHeader();",
"public function getHeader();",
"public function getHeader();",
"public function get_headers();",
"public function getFullHeader()\n {\n }",
"protected abs... | [
"0.74962443",
"0.7440941",
"0.71645576",
"0.71645576",
"0.71645576",
"0.71641266",
"0.70954454",
"0.7058411",
"0.6987778",
"0.6883229",
"0.6870798",
"0.6869691",
"0.6869691",
"0.68603665",
"0.68481046",
"0.68344015",
"0.681679",
"0.68058044",
"0.6753872",
"0.67443657",
"0.672... | 0.7478431 | 1 |
/ $this>hasOne('App\Model name','column in this model',' reffrences column'); this function return the row in users table where id =user_id | $this>hasOne('App\Model name','column in this model',' reffrences column'); эта функция возвращает строку в таблице users, где id = user_id | public function user_id()
{
return $this->hasOne('App\User','id','user_id');//return one object
// also can be return $this->belongsTo('App\User','user_id','id'); but opposite column place
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function user(){\n return $this->hasOne(User::class,'id','user_id');\n }",
"public function user()\n {\n return $this->hasOne('App\\User','id','user_id');//return one object\n }",
"public function getUser(){\n\t\treturn $this->hasOne(User::className(), ['id' => 'user_id']);\n\t}",
... | [
"0.7764505",
"0.7706557",
"0.76728266",
"0.762064",
"0.7580517",
"0.7568909",
"0.7567176",
"0.7557881",
"0.74833184",
"0.7464374",
"0.74536604",
"0.74403787",
"0.73073405",
"0.7297396",
"0.7291247",
"0.7276115",
"0.72758794",
"0.72673315",
"0.7264443",
"0.72443116",
"0.723313... | 0.7984638 | 0 |
Get real path model. | Получить реальный путь модели. | protected function getRealPathModel()
{
return realpath($this->getModelPath());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createPath() {\n\t\treturn $this->objectManager->get('Tx_Sfsvgapi_Domain_Model_Path');\n\t}",
"public function getRealPath();",
"public function getRealPath() {}",
"public function getInternalPath() : Path;",
"public function getRealPath(){ }",
"public function getPath() {}",
"public fu... | [
"0.731073",
"0.6958814",
"0.6899277",
"0.6875219",
"0.68711257",
"0.6752831",
"0.67525876",
"0.6751584",
"0.6751584",
"0.6751584",
"0.6716549",
"0.6709315",
"0.6709315",
"0.6709315",
"0.6709315",
"0.6709315",
"0.6709315",
"0.6709315",
"0.6709315",
"0.6709315",
"0.6709315",
... | 0.8472345 | 0 |
Get new model name with full path. | Получить новое имя модели с полным путем. | protected function getNewModel()
{
return $this->getRealPathModel() . "/{$this->modelName}.php";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getModelName()\n {\n $controller = explode('\\\\', get_class($this))[2];\n $modelName = str_replace('Controller', '', $controller);\n\n return 'Application\\\\Model\\\\'.$modelName;\n }",
"protected function generateModelName () {\n\t\t\t$shortName = $this->controller-... | [
"0.7082924",
"0.69944745",
"0.69792986",
"0.69774604",
"0.69774604",
"0.6947894",
"0.6945771",
"0.6868033",
"0.68628997",
"0.68450403",
"0.68386894",
"0.6830526",
"0.6828683",
"0.6810948",
"0.6801332",
"0.6801332",
"0.6795159",
"0.67454594",
"0.67382985",
"0.6736829",
"0.6731... | 0.79764915 | 0 |
/================================================ 57. Insert Intervals Medium Given a set of nonoverlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times. Example 1: Input: intervals = [[1,3],[6,9]], newIn... | /================================================ 57. Вставка интервалов Средняя Дано множество непересекающихся интервалов, вставьте новый интервал в интервалы (слияние при необходимости). Вы можете предположить, что интервалы были изначально отсортированы по их начальным временам. Пример 1: Вход: intervals = [[1,3],[... | function insert($intervals, $newInterval) {
$n1 = $newInterval[0];
$n2 = $newInterval[1];
$len = count($intervals);
$start = false;
$end = false;
for($i=0; $i<$len; $i++) {
$i1=$intervals[$i][0];
$i2=$intervals[$i][1];
if ($start===false) {
if ($n2 <= $i2) {
if ($n2<$i1) {
array_splice($interval... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function merge_range($ol_ranges, $start, $end, $count = 0) {\n\n\tforeach ($ol_ranges as $loop_range_key => $loop_range) {\n\t\t\n\t\tif ($start < $end) {\n\t\t\t// handle ranges between $start and $loop_range['start']\n\t\t\tif ($start < $loop_range['start']) {\n\t\t\t\t$new_ol_ranges[] = array('count' => $count,... | [
"0.6105904",
"0.60305524",
"0.597226",
"0.59677935",
"0.5619563",
"0.54603857",
"0.5458549",
"0.51141286",
"0.5104613",
"0.50894636",
"0.5067112",
"0.50622267",
"0.49676076",
"0.49658954",
"0.49528307",
"0.48575857",
"0.48445886",
"0.48157838",
"0.4811838",
"0.47938535",
"0.4... | 0.82469755 | 0 |
generate code for renewal of organization | сгенерировать код для обновления организации | private function generate_code_for_renewal() : String
{
return (new Tokenizer(5))->create()->check(['members' => 'R_code', 'renewal'=>'RCode']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function new_renewal($org_url = null,$isQue = false) : String\n {\n\n if(!$this->org_url && !$org_url) return false;\n\n\n if(!$org_url) $org_url = $this->org_url;\n\n\n $database = new database();\n\n $renewal_code = $this->generate_code_for_renewal();\n\n $member_... | [
"0.6436208",
"0.63764304",
"0.61582863",
"0.60460424",
"0.6019643",
"0.6014373",
"0.58403957",
"0.58350307",
"0.5732429",
"0.56384414",
"0.5625571",
"0.5616585",
"0.5596947",
"0.5566934",
"0.5566829",
"0.5546184",
"0.55260533",
"0.55207574",
"0.5518676",
"0.55157804",
"0.5491... | 0.7192274 | 0 |
get the array of renewable,updated and approved organization | получить массив обновленных и одобренных организаций | public function renewable_org_list() : Array
{
return $this->updated_renewal_org_list(['renewal.IsApprove' => Renewal::APPROVED]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function updated_renewal_org_list(Array $filter = []) : Array\n {\n\n return $this->organizations(array_merge([\n\n \"renewal.RCode[!]\" => null,\n\n \"renewal.id\" => \\Medoo\\Medoo::raw(\"(\n select id \n from dbscoa.renewal \n where org... | [
"0.66138947",
"0.65859294",
"0.6499085",
"0.63993204",
"0.6340472",
"0.6215215",
"0.6171528",
"0.6122969",
"0.6118294",
"0.6026086",
"0.6012406",
"0.5928802",
"0.59287274",
"0.5901549",
"0.58662343",
"0.5850328",
"0.58252156",
"0.58141124",
"0.57828635",
"0.5778494",
"0.57659... | 0.8079592 | 0 |
Safe use to get current cover photo of a specified renewal code | Безопасное использование для получения текущего фото обложки по указанному коду обновления | public function get_cover_photo(String $renewal_code)
{
$details = $this->organizations(['renewal.RCode' => $renewal_code]);
if(!$details)
return;
$cover_photo = $details[0]['cover'];
$not_valid = !(!empty($cover_photo) and FILE::isExist($cover_photo,"cover"));
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function associated_cover_image() {\n return Upload::find_by_attribute('game_cover_id', $this->id);\n }",
"protected function get_image_by_cover($cover)\n\t{}",
"public function getCover()\n {\n // Missing Some Cover Arts\n $covers = Cover::where('id', $this['cover'])->get();\n\n ... | [
"0.67980945",
"0.6564125",
"0.65254945",
"0.64922833",
"0.63121974",
"0.6285817",
"0.62125564",
"0.61929303",
"0.6178947",
"0.6153487",
"0.6133213",
"0.6080063",
"0.60662633",
"0.59960806",
"0.59747267",
"0.5959857",
"0.5926749",
"0.5888669",
"0.5886571",
"0.5883525",
"0.5859... | 0.8176194 | 0 |
change temporary path of a organization | изменение временного пути организации | public function change_tempath()
{
if(!$this->is_orgURL_exist())
return false;
$database = new database();
$new_tempath = $this->generate_temporaryPath();
return $database->update('org' ,['tempath' => $new_tempath],
['url' => $this->org_url]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function generateTmpLocation()\n {\n $CloneDirectoryName = preg_replace(\"/[^0-9a-zA-Z]/m\", \"\", $this->config->getRepository()) . time();\n $this->tmpLocation = $this->tmpDirectory . '/' . $CloneDirectoryName;\n }",
"public function replaceWorkDirectory()\n {\n\n }",
... | [
"0.6470967",
"0.5900486",
"0.5807813",
"0.56341106",
"0.56174964",
"0.55504596",
"0.5515382",
"0.54248476",
"0.53975946",
"0.5378985",
"0.53167",
"0.52943224",
"0.52935624",
"0.52895117",
"0.527903",
"0.5275566",
"0.5268164",
"0.52271974",
"0.5214634",
"0.52006805",
"0.519745... | 0.7906598 | 0 |
Get Item By Id Ajax dung cho viec lay data | Ajax Get Item By Id используется для получения данных | public function getItemByIdAjax($id){
return HoaDonNhap::findOrFail($id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ajax_get($id = null)\n { // Permet d'afficher le contenu du modal avant l'achat (ajax)\n $this->response->type('json');\n $this->autoRender = false;\n if (!isset($id)) {\n throw new NotFoundException();\n }\n if ($this->isConnected AND $this->Permissions->c... | [
"0.7484379",
"0.6982208",
"0.69490194",
"0.69071126",
"0.6901635",
"0.6895723",
"0.6857815",
"0.68494254",
"0.68110424",
"0.68073326",
"0.67679805",
"0.67667305",
"0.6755783",
"0.6755783",
"0.675037",
"0.67232007",
"0.6714281",
"0.6672391",
"0.6654145",
"0.6617953",
"0.661536... | 0.798301 | 0 |
Returns the active theme code. | Возвращает код активной темы. | public static function getActiveThemeCode()
{
return 'headstart';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function active_theme()\n {\n return ThemeManager::instance()->getActiveThemeCode();\n }",
"public function getActiveTheme()\n {\n return $this->activeTheme;\n }",
"public function getActiveTheme()\n\t{\n\t\treturn $this->activeTheme;\n\t}",
"public function oeThemeSwitcherGetActive... | [
"0.86115897",
"0.73974276",
"0.7394492",
"0.72738945",
"0.72672874",
"0.7064969",
"0.7038106",
"0.7033504",
"0.7027985",
"0.695249",
"0.69398874",
"0.68046916",
"0.6734926",
"0.6733184",
"0.66747755",
"0.6662913",
"0.66232383",
"0.66231203",
"0.6523912",
"0.647989",
"0.645407... | 0.780796 | 1 |
Returns the statistics object | Возвращает объект статистики | function getStatistics()
{
return $this->statistics;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_stats() {\n\t\treturn $this->statistics;\n\t}",
"public function getStatistics ()\n\t{\n\t\treturn $this->statistics;\n\t}",
"public function getStats();",
"public function getStatistics()\n {\n return $this->_statistics;\n }",
"public function get_stats()\n\t{\n\t\treturn ... | [
"0.8218789",
"0.8010554",
"0.80016947",
"0.7983411",
"0.7977609",
"0.7921276",
"0.7921276",
"0.7863312",
"0.78313303",
"0.78313303",
"0.78313303",
"0.78313303",
"0.7751707",
"0.7721254",
"0.7691383",
"0.7616862",
"0.7614057",
"0.75053483",
"0.7495097",
"0.7494698",
"0.7440283... | 0.808648 | 1 |
Generate help for compression | Создать справку по сжатию | protected function getCompressionHelp()
{
$messages = [];
$messages[] = '';
$messages[] = '<comment>Compression option</comment>';
$messages[] = ' Supported compression: gzip';
$messages[] = ' The gzip cli tool has to be installed.';
$messages[] = ' Additionally, for ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function help() {\n\n\t\t\t$help = PHP_EOL .'Generator Help'. PHP_EOL;\n\t\t\t$help .= '-----------------------------------'. PHP_EOL;\n\t\t\t\n\t\t\t$help .= 'Methods:'. PHP_EOL;\n\t\t\t$help .= ' - Controller'. PHP_EOL .' - Model'. PHP_EOL .' - Table'. PHP_EOL;\n\n\t\t\t$help .= PHP_EOL .'Arguments:'. PH... | [
"0.6638934",
"0.6618637",
"0.65669376",
"0.64811224",
"0.6451689",
"0.64130855",
"0.64084",
"0.63710344",
"0.6329776",
"0.62645596",
"0.6183051",
"0.6161944",
"0.6161595",
"0.61559224",
"0.61494845",
"0.61264664",
"0.6103072",
"0.6095095",
"0.6077133",
"0.60770154",
"0.607660... | 0.73729867 | 0 |
$rangRow .= $this>buildDropDown('daily_dates', $rowid, $assignStartEndDate, $assignStartDate, $script='', $key='', $val=''); | $rangRow .= $this->buildDropDown('daily_dates', $rowid, $assignStartEndDate, $assignStartDate, $script='', $key='', $val=''); | function buildDropDown($name, $rowid, $data, $selected='', $script='', $key='', $val='', $weeklyrange)
{
if($name == 'daily_dates')
{
$rowid1 = 0;
}
else
{
$rowid1 = $rowid;
}
$options = array();
if( ($name!='weekly_dates') && ($name!='daily_dates') )
{
$options[] = '<option ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getDropDown() ;",
"function DateCombo($strLabel, $strField, $strDate = \"\")\n\t{\n\t\techo \"<tr>\";\n\t\techo \"\t<td valign=middle>\";\n\t\techo\t\t$strLabel;\n\t\techo \"\t</td>\";\n\t\techo \"\t<td>\";\t\t\n\n\t\tif(empty($strDate))\n\t\t\t$strDate = date(\"Y-m-d\");\n\t\t\t\n\t\t$strDate = strtok(... | [
"0.62338746",
"0.6176547",
"0.6167082",
"0.6120257",
"0.6077304",
"0.6058111",
"0.59359866",
"0.5923035",
"0.58938587",
"0.58067846",
"0.5780332",
"0.5773591",
"0.5764645",
"0.5710079",
"0.5694867",
"0.5661086",
"0.56554717",
"0.56272477",
"0.5626745",
"0.5577019",
"0.5563088... | 0.78830546 | 0 |
Function for getting the tooltip of repective rate types | Функция для получения подсказки соответствующих типов ставок | function getTooltip($rateid){
$tooltip ='';
switch($rateid){
case 'UOM_DAY':
$tooltip = 'Day';
break;
case 'UOM_MILE':
$tooltip = 'Miles';
break;
case 'UOM_UNIT':
$tooltip = 'Units';
break;
default:
$tooltip = 'Hours';
}
return $tooltip;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_currency_tooltip()\n {\n }",
"public function getShowTaxString();",
"function showType ($type) {\n if ($type == 0){\n return 'All';\n }\n else if ($type == 1) {\n return 'Attractions';\n }\n else if ($type == 2) {... | [
"0.645522",
"0.63094693",
"0.62068194",
"0.61534536",
"0.6140832",
"0.6058544",
"0.60434926",
"0.6015916",
"0.586415",
"0.5857972",
"0.5827406",
"0.5765168",
"0.57171685",
"0.5671329",
"0.56553686",
"0.5655314",
"0.5649839",
"0.56442606",
"0.56424713",
"0.5633182",
"0.5630399... | 0.75656796 | 0 |
function to insert into payment table | функция для вставки в таблицу платежей | function intoPayment()
{
$price = $_SESSION['itemPrice'];
$customerid = $_SESSION['id'];
$productid = $_SESSION['itemID'];
$currency = "GHS";
$date = date('y/m/d');
$sql = "INSERT INTO payment(amt,customer_id,product_id,currency,payment_date) VALUES('$price','$customerid','$productid','$currency','$date')"... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function insert() {\n\t\t\tglobal $dbh;\n\t\t\t\t\t\t\n\t\t$sql_query = \"INSERT INTO\n\t\t\t\t\t\t\".$this->tbl_nme.\"\n\t\t\t\t\t (\n\t\t\t\t\t\tdiscount_amount,\n\t\t\t\t\t\tcost,\n\t\t\t\t\t\tmin_spend_amts,\n\t\t\t\t\t\tcrtamt_sort\n\t\t\t\t\t )\n\t\t\t\t\t VALUES\n\t\t\t\t\t (\n\t\t\t\t\t\t?,\n\t\t\t\... | [
"0.7535851",
"0.71963984",
"0.70904607",
"0.70854855",
"0.70470285",
"0.6964517",
"0.69175506",
"0.6898311",
"0.6880397",
"0.6871236",
"0.68336886",
"0.6810059",
"0.6796819",
"0.6769893",
"0.67640203",
"0.67384225",
"0.66996074",
"0.6668081",
"0.6660076",
"0.6649246",
"0.6640... | 0.765018 | 0 |
Resolve soundcloud URL to its trackID | Разрешить URL SoundCloud до его trackID | function resolve_link($link)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.soundcloud.com/resolve?url=".$link."&_status_format=json&client_id=b45b1aa10f1ac2941910a7f0d10f8e28&app_version=5367f3cb");
curl_setopt($ch, CURLOPT_HTTPGET, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_seto... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function resolveUrl()\n\t{\n // Initialise variables.\n\t\t$http = JHttpFactory::getHttp();\n $resolverUrl = 'https://api.soundcloud.com/resolve.json?url='.$this->params->get('url').'&client_id=' . $this->client_id;\n\n $response = $http->get($resolverUrl);\n\n ... | [
"0.69343716",
"0.68081445",
"0.6082364",
"0.60154754",
"0.60132116",
"0.58620846",
"0.58455837",
"0.5825439",
"0.5797253",
"0.5789288",
"0.57795995",
"0.577728",
"0.57630974",
"0.57039225",
"0.5669723",
"0.566197",
"0.56619376",
"0.56328857",
"0.56316596",
"0.56314915",
"0.56... | 0.7524287 | 0 |
Returns the MSI bunch processor instance. | Возвращает экземпляр процессора набора MSI. | protected function getMsiBunchProcessor()
{
return $this->msiBunchProcessor;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getProcessor();",
"public function getProcessor();",
"public function getProcessor();",
"public static function theProcessor() {\n if (!isset(self::$theProcessor)) {\n self::$theProcessor = new self(Samurai::$processorToken);\n }\n return self::$theProcessor;\n }",
"protected... | [
"0.5842134",
"0.5842134",
"0.5842134",
"0.5753404",
"0.56314796",
"0.56314796",
"0.5593724",
"0.5584537",
"0.5584537",
"0.54771364",
"0.546528",
"0.546528",
"0.5435285",
"0.54193425",
"0.54090977",
"0.54090977",
"0.54027003",
"0.5349129",
"0.5297687",
"0.5238081",
"0.5220041"... | 0.71147203 | 0 |
Return's the ID of the source item that has been created recently. | Возвращает ID источника, который был создан недавно. | public function getLastSourceItemId()
{
return $this->lastSourceItemId;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function SourceID() {\n\treturn $this->SourceRecord()->GetKeyValue();\n }",
"function sourceID() {\n\t\tif (isset($this->sourceID) && $this->sourceID !== null && is_numeric($this->sourceID)) {\n\t\t\treturn $this->sourceID;\n\t\t}\n\t\treturn parent::sourceID();\n\t}",
"public function getSourceId... | [
"0.6808102",
"0.6477817",
"0.63986427",
"0.63986427",
"0.63925034",
"0.63925034",
"0.63925034",
"0.6344866",
"0.6334052",
"0.62403035",
"0.6203674",
"0.61055124",
"0.60983413",
"0.59791696",
"0.5874469",
"0.58684176",
"0.58603716",
"0.58241653",
"0.58241653",
"0.58241653",
"0... | 0.7421869 | 0 |
Add the passed SKU/source code => source item ID mapping. | Добавьте сопоставление переданного SKU/исходного кода => идентификатора исходного элемента. | public function addSkuSourceItemIdMapping($sku, $sourceCode)
{
$this->skuSourceItemIdMapping[$sku][$sourceCode] = $this->getLastSourceItemId();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function add(string $clientId, string $sourceId);",
"public function add_product_source($source)\n {\n }",
"public function updateProductsInventorySource(string $sku, int $qty, string $sourceCode, string $status);",
"public function translate($productId, $sourceId);",
"final public function a... | [
"0.5876878",
"0.58751386",
"0.5873837",
"0.57157224",
"0.5606564",
"0.54225445",
"0.5347461",
"0.5290573",
"0.5272632",
"0.5243101",
"0.5241068",
"0.5163315",
"0.51190424",
"0.5096431",
"0.50891757",
"0.50891757",
"0.5088967",
"0.5081562",
"0.5081562",
"0.5081562",
"0.5081562... | 0.7781758 | 0 |
Queries whether or not the inventory source with the passed code is available. | Проверяет, доступен ли источник инвентаря с переданным кодом. | public function hasInventorySource($sourceCode)
{
return isset($this->inventorySources[$sourceCode]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getInventorySourceBySourceCode($sourceCode)\n {\n\n // query whether or not the inventory source is available\n if (isset($this->inventorySources[$sourceCode])) {\n return $this->inventorySources[$sourceCode];\n }\n\n // throw a new exception\n throw... | [
"0.6589278",
"0.62145346",
"0.6150385",
"0.59577227",
"0.59310853",
"0.58571666",
"0.5819614",
"0.5775717",
"0.57140416",
"0.57036144",
"0.5609504",
"0.55833435",
"0.5564088",
"0.55615216",
"0.5552303",
"0.5545339",
"0.5501547",
"0.5469557",
"0.5420127",
"0.54166687",
"0.5414... | 0.75220394 | 0 |
Returns the inventory source with the passed code. | Возвращает источник инвентаризации с переданным кодом. | public function getInventorySourceBySourceCode($sourceCode)
{
// query whether or not the inventory source is available
if (isset($this->inventorySources[$sourceCode])) {
return $this->inventorySources[$sourceCode];
}
// throw a new exception
throw new \Exceptio... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getSourceByCode($code)\n\t{\n\t\treturn self::getSourceByField('CODE', $code);\n\t}",
"public function getInventorySource($websiteCode)\n {\n $source = null;\n $connection = $this->resourceConnection->getConnection();\n $tableName = $this->resourceConnection->getTab... | [
"0.70310116",
"0.67851734",
"0.6130744",
"0.6109187",
"0.6080237",
"0.60151833",
"0.60151833",
"0.60151833",
"0.60151833",
"0.60151833",
"0.60151833",
"0.60151833",
"0.5994136",
"0.5954679",
"0.5944166",
"0.5935869",
"0.59096193",
"0.5895335",
"0.5879448",
"0.5871485",
"0.584... | 0.74849874 | 0 |
Return Wysiwyg config as Varien_Object Config options description: enabled: Enabled Visual Editor or not hidden: Show Visual Editor on page load or not use_container: Wrap Editor contents into div or not no_display: Hide Editor container or not (related to use_container) translator: Helper to translate phrases in lib f... | Вернуть конфиг Wysiwyg в виде объекта Varien_Object Описание параметров конфига: enabled: Включить или отключить визуальный редактор hidden: Показывать визуальный редактор при загрузке страницы или нет use_container: Обернуть содержимое редактора в div или нет no_display: Скрыть контейнер редактора или нет (связано с u... | public function getConfig($data = array())
{
$config = new Varien_Object();
$config->setData($this->newWysiwygSettings());
$config->setData('directives_url_quoted', preg_quote($config->getData('directives_url')));
if (Mage::getSingleton('admin/session')->isAllowed('cms/med... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function insert_wysiwyg($config){\r\n\t\t\r\n\t\t\r\n\t\t$CI = & get_instance();\r\n\t\t\r\n\t\t// set some basic defaults\r\n\t\tif(!isset($config['content'])) $config['content'] = \"\";\r\n\t\tif(!isset($config['width'])) $config['width'] = 800;\r\n\t\tif(!isset($config['height'])) $config['height'] = 400... | [
"0.6660528",
"0.65340656",
"0.64559126",
"0.6170468",
"0.6141466",
"0.61047137",
"0.6090576",
"0.6068089",
"0.6065441",
"0.6061546",
"0.60598934",
"0.6046436",
"0.60348046",
"0.6016526",
"0.5998879",
"0.5985278",
"0.5976883",
"0.5965658",
"0.59463054",
"0.5904408",
"0.5855508... | 0.7064229 | 0 |
Returns the lower cased domain name of the email address | Возвращает нижний регистр доменного имени адреса электронной почты | public function getDomain() : string
{
$explosion = explode('@', $this->emailAddress);
return strtolower(end($explosion));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDomain()\n {\n $mail = $this->getMail();\n $idx = strpos($mail, '@');\n if ($idx !== false) {\n return substr($mail, $idx + 1);\n } else {\n return '';\n }\n }",
"public function getEmailDomain() {\n $sitename = strtolower($... | [
"0.7654987",
"0.74826133",
"0.74580675",
"0.74453616",
"0.7231127",
"0.70868295",
"0.6898518",
"0.684333",
"0.68236995",
"0.6815147",
"0.6787357",
"0.67864877",
"0.67184865",
"0.6659547",
"0.6574744",
"0.65524",
"0.6538205",
"0.64837825",
"0.6469519",
"0.6468317",
"0.6462453"... | 0.8493879 | 0 |
Open an archive for writing The reason we don't tell it the extention is the writer will choose .tar or .tar.gz depending on the modes available. When we close the file we will get that filename or we can request it directly | Откройте архив для записи. Причина в том, что мы не указываем расширение — выбор между .tar или .tar.gz сделает писатель в зависимости от доступных режимов. Когда мы закроем файл, мы получим этот файл или можем запросить его напрямую. | function open_file_writer($basename, $gzip=true)
{
$gzip = $gzip && $this->can_gzip();
if ($this->file_handle !== false) {
// Close old file first
$this->close_file();
}
if ($gzip) {
$this->full_filename = $basename . '.tar.gz';
$this->file_handle = gzopen($this->full_filename, 'wb9');
} el... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function openArchive()\n {\n $config = [\n 'path' => Yii::getAlias($this->backupDir) . DIRECTORY_SEPARATOR,\n 'name' => sprintf(self::FILE_NAME_FORMAT, date('Y-m-d', $this->_backupTime), date('HisO', $this->_backupTime), $this->fileName),\n 'skipFiles' => $this-... | [
"0.6298469",
"0.5702947",
"0.5698995",
"0.55452716",
"0.55031615",
"0.55021185",
"0.5462144",
"0.54377407",
"0.53914714",
"0.53876626",
"0.5368626",
"0.53677225",
"0.53000563",
"0.52588004",
"0.52432364",
"0.52432364",
"0.5193724",
"0.5167809",
"0.51588535",
"0.514818",
"0.51... | 0.7154293 | 0 |
Read the header for the next file in our open archive | Прочтите заголовок следующего файла в нашем открытом архиве | function next_file()
{
if ($this->file_writing) return false;
if ($this->file_handle === false) return false;
if ($this->seek_length > 0) $this->_read($this->seek_length);
$this->seek_length = 0;
$rawHeader = $this->_read(512);
if (strlen($rawHeader)<512 || $rawHeader == pack('a512', ''))
retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function next() {\n\t\tif ( $this->seekToEnd > 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//Skip the data and the footer if they haven't been uncompressed\n\t\tif ( $this->header !== null && $this->data === null ) {\n\t\t\t$toSkip = $this->header['CLen'];\n\t\t\t$error = $this->source->skip( $toSkip );\n\t\t... | [
"0.7127533",
"0.6730127",
"0.67236847",
"0.66054296",
"0.64637774",
"0.64343715",
"0.6382728",
"0.6347739",
"0.62863207",
"0.6100293",
"0.60411537",
"0.58212626",
"0.57966197",
"0.57716715",
"0.5760473",
"0.5729601",
"0.5704537",
"0.5701088",
"0.5677771",
"0.5643338",
"0.5610... | 0.7198527 | 0 |
Skip to the next file | Перейти к следующему файлу | function skip_file()
{
if ($this->file_writing) return;
if ($this->file_handle === false) return;
$this->read_file();
return $this->next_file();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function skipToNextLoop()\n {\n $this->resetLoop();\n }",
"public function skip()\n\t{\n\t\treturn false;\n\t}",
"final protected function skip () {\n\t\treturn true;\n\t}",
"final protected function skip () {\n\t\treturn true;\n\t}",
"public function next() {\n $this->setPathname($t... | [
"0.7069908",
"0.65676767",
"0.6567247",
"0.6567247",
"0.65364504",
"0.63581836",
"0.6339831",
"0.633236",
"0.6301258",
"0.6286279",
"0.62293327",
"0.6224104",
"0.61117303",
"0.60912526",
"0.6083414",
"0.60624135",
"0.59730035",
"0.5947935",
"0.5947935",
"0.5933872",
"0.589249... | 0.76239955 | 0 |
Check if we can gunzip files | Проверьте, можно ли разархивировать файлы gzip | function can_gunzip()
{
return function_exists('gzread') && function_exists('gzopen');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function can_gzip()\n\t{\n\t\treturn function_exists('gzwrite') && function_exists('gzopen');\n\t}",
"protected function _canGzipCompress()\n {\n return function_exists('gzencode');\n }",
"private function isZipeable(): bool {\n\t\treturn $this->files->count();\n\t}",
"public static function isG... | [
"0.69025695",
"0.6730979",
"0.63313895",
"0.6324358",
"0.61379504",
"0.6040313",
"0.5941101",
"0.5879566",
"0.58398527",
"0.5832052",
"0.58282536",
"0.57754564",
"0.5765481",
"0.57492036",
"0.56936884",
"0.56896365",
"0.5658337",
"0.5656336",
"0.5644696",
"0.56444097",
"0.561... | 0.7615576 | 0 |
Check if we can gzip files | Проверьте, можно ли сжать файлы gzip | function can_gzip()
{
return function_exists('gzwrite') && function_exists('gzopen');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _canGzipCompress()\n {\n return function_exists('gzencode');\n }",
"function can_gunzip()\n\t{\n\t\treturn function_exists('gzread') && function_exists('gzopen');\n\t}",
"public static function isGzipped(string $filepath): bool;",
"function check_gzip() {\n if (headers_sent... | [
"0.81792206",
"0.78262395",
"0.756285",
"0.73369396",
"0.72320825",
"0.700857",
"0.70020795",
"0.68906003",
"0.6834095",
"0.68154603",
"0.6805809",
"0.6789758",
"0.6778161",
"0.6684239",
"0.6681565",
"0.66589123",
"0.66240793",
"0.66100156",
"0.6587144",
"0.63733244",
"0.6320... | 0.8394621 | 0 |
Returns the standard path Changes \ to / Removes the .. and . from the URL | Возвращает стандартный путь, заменяет \ на /, удаляет .. и . из URL | function getStandardURL($path)
{
if ($path == '.') {
return '';
}
$std = str_replace("\\", "/", $path);
while ($std != ($std = preg_replace("/[^\/:?]+\/\.\.\//", "", $std))) ;
$std = str_replace("/./", "", $std);
if (strncmp($std, "./", 2) == 0) {
return substr($std, 2);
} else {
return... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _fixPath($path) {\r\n if (substr($path, 0, 1) != '/') {\r\n $path = '/' . $path;\r\n }\r\n if (substr($path, -1, 1) != '/') {\r\n $path .= '/';\r\n }\r\n return $path;\r\n }",
"private function get_path() {\n\t\t... | [
"0.7379175",
"0.72575015",
"0.72200155",
"0.71822363",
"0.7153898",
"0.7153316",
"0.6982587",
"0.6977744",
"0.6935991",
"0.6846884",
"0.6840864",
"0.68358976",
"0.6825595",
"0.68179274",
"0.68112123",
"0.6797087",
"0.67912465",
"0.67679214",
"0.6766075",
"0.6758608",
"0.67533... | 0.748771 | 0 |
Sets up the main menu and adds it to the view navigation container. | Настройка основного меню и добавление его в контейнер навигации представления. | protected function _initMenu()
{
$menu = new Zend_Config_Xml(APPLICATION_PATH . '/configs/navigation.xml', 'nav');
$this->_view->navigation(new Zend_Navigation($menu));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function mainMenu() \r\n\t\t{\r\n\t\t\t$this->set('title_for_layout', 'Fondos por rendir :: Menu Principal');\r\n\t\t}",
"public function init()\r\n\t{\r\n\t\t$this -> view -> navigation = $navigation = Engine_Api::_() -> getApi('menus', 'core') -> getNavigation('advmenusystem_admin_main', array(), 'advmenusyste... | [
"0.72422194",
"0.7141427",
"0.7107251",
"0.7007519",
"0.69877416",
"0.69326764",
"0.67953604",
"0.67936635",
"0.6780764",
"0.6745761",
"0.67343605",
"0.66977954",
"0.6675144",
"0.6662499",
"0.66442823",
"0.6573504",
"0.65701264",
"0.65663964",
"0.6558713",
"0.65409416",
"0.65... | 0.73238575 | 0 |
/ is_authorized() Checks if the password stored in /storage/private/passwd is valid for the user name | / is_authorized() Проверяет, является ли пароль, хранящийся в /storage/private/passwd, допустимым для имени пользователя | function is_authorized($hycms_user_name, $hycms_password)
{
$passwd = file_get_contents("../storage/private/passwd");
$passwd = json_decode($passwd);
$passwd = get_object_vars( $passwd );
if($passwd[$hycms_user_name]==$hycms_password){
return true;
}
else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function isAuthorized()\n {\n $authorized_users = $GLOBALS['authorized_users'];\n return (\n $_SERVER['PHP_AUTH_USER'] != '' &&\n $_SERVER['PHP_AUTH_PW'] != '' &&\n $authorized_users[$_SERVER['PHP_AUTH_USER']] === $_SERVER['PHP_AUTH_PW']);\n }",
"function isAuthorizedUser($username, $passw... | [
"0.7333152",
"0.6737243",
"0.66298693",
"0.6555445",
"0.6544213",
"0.6529069",
"0.64528817",
"0.64461553",
"0.6438594",
"0.6364825",
"0.6359005",
"0.6356926",
"0.6294071",
"0.6293664",
"0.6236097",
"0.61651284",
"0.6165027",
"0.6139046",
"0.6127175",
"0.6108327",
"0.6073417",... | 0.7943208 | 0 |
Returns the given expiryMonth as a 2character length string with a zero padded left. | Возвращает заданный expiryMonth в виде строки длиной 2 символа с нулевым заполнением слева. | public static function formatExpiryMonth($expiryMonth)
{
return str_pad($expiryMonth, 2, '0', STR_PAD_LEFT);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTwoDigitMonth(): string\n {\n return str_pad($this->month, 2, '0', STR_PAD_LEFT);\n }",
"public function getTwoDigitMonth()\n {\n return str_pad($this->month, 2, '0', STR_PAD_LEFT);\n }",
"protected static function month()\n {\n return str_pad(Carbon::toda... | [
"0.7540863",
"0.71226066",
"0.67296964",
"0.6572461",
"0.6320869",
"0.6269134",
"0.6170696",
"0.61423427",
"0.6096741",
"0.6058436",
"0.5796953",
"0.5783867",
"0.57454985",
"0.57194275",
"0.57179534",
"0.57171786",
"0.5706455",
"0.5706065",
"0.5643514",
"0.56266373",
"0.56195... | 0.83379596 | 0 |
Setters and Getters Get the filter mode | Setters и Getters получают режим фильтра | function getFilterMode() {
return $this->_filterMode;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFilter();",
"public function getFilter();",
"public function getFilter();",
"public function getFilter();",
"public function getFilter ();",
"public function getShowFilter()\n {\n }",
"function getFilter()\n\t{\n\t\treturn $this->_filter;\n\t}",
"private function get_filter() {\n... | [
"0.7397411",
"0.7397411",
"0.7397411",
"0.7397411",
"0.7390414",
"0.697367",
"0.69417584",
"0.6869601",
"0.6860007",
"0.6743466",
"0.66459376",
"0.6645664",
"0.6645664",
"0.6645664",
"0.6645664",
"0.6645664",
"0.6645664",
"0.6645664",
"0.6645664",
"0.6645664",
"0.6645664",
... | 0.80088896 | 0 |
/ returns array of file classes to priority | возвращает массив классов файлов по приоритету | public function fileClasses() {
return array(
'VimeoTextFile' => 9,
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getClasses() {\r\n\t\t$classes = $this->conf['classes.'];\r\n\t\t$a = array();\r\n\t\tif (is_array($classes)) {\r\n\t\t\tforeach ($classes as $class) \r\n\t\t\t\tarray_push($a, $class);\r\n\t\t}\r\n\t\treturn $a;\r\n\t}",
"public function getListFromFilesystem()\n {\n $result = array... | [
"0.6970735",
"0.6920334",
"0.6899358",
"0.6843914",
"0.68046314",
"0.6748441",
"0.67359185",
"0.6719321",
"0.66423136",
"0.65906817",
"0.65742487",
"0.6545407",
"0.65399456",
"0.65021133",
"0.64924014",
"0.6447028",
"0.6445017",
"0.6433966",
"0.6418293",
"0.6403458",
"0.64010... | 0.71639895 | 0 |
/ loads the source location for the thumbnail | Загружает источник расположения для миниатюры | public function loadThumbSourceLocation() {
$profile = 'small';
if ($this->initThumb($profile)) {
return $this->getThumbLocation($profile);
}
return '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ThumbSRC()\n\t{\treturn $this->imagelocation . \"thumbs/\" . (int)$this->id . \".jpg\";\n\t}",
"public function getThumbnail();",
"abstract public function getThumbnail();",
"function getThumbnail(){\n\t\treturn $GLOBALS[\"SiteRoot\"]. $this->thumbnail;\n\t}",
"function loadDetails(){\n\t\t$path =... | [
"0.7313205",
"0.69411725",
"0.690745",
"0.6841712",
"0.6651982",
"0.65492356",
"0.65023494",
"0.647198",
"0.6442052",
"0.643286",
"0.64016813",
"0.64013517",
"0.6393087",
"0.63847685",
"0.63680816",
"0.6291802",
"0.6220469",
"0.61895335",
"0.61800027",
"0.6158475",
"0.6150011... | 0.71193016 | 1 |
/ returns the HTML code for the preview | возвращает HTML-код для предварительного просмотра | public function getPreviewHTML() {
return "<div class=\"vimeomodule-preview preview-controls-sideways\">".$this->getVideoCode(700, 394)."</div>";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPreviewHtml()\n {\n return $this->_previewHtml;\n }",
"public function preview()\n {\n Requirements::clear();\n // Should contain text styles of the page by Silverstripe theme conventions.\n Requirements::css('themes/' . Config::inst()->get('SSViewer', 'the... | [
"0.80286664",
"0.79440886",
"0.7867849",
"0.78463745",
"0.76150256",
"0.7476881",
"0.7380765",
"0.7379155",
"0.7377637",
"0.7377637",
"0.7377637",
"0.7377637",
"0.7373036",
"0.7373036",
"0.7337611",
"0.72431517",
"0.7213244",
"0.7201273",
"0.7181131",
"0.71566516",
"0.7035146... | 0.80102414 | 1 |
/ bbPress change avatar size to 40px | / Изменение размера аватара bbPress на 40px | function td_bbp_change_avatar_size($author_avatar, $topic_id, $size) {
$author_avatar = '';
if ($size == 14) {
$size = 40;
}
$topic_id = bbp_get_topic_id( $topic_id );
if ( !empty( $topic_id ) ) {
if ( !bbp_is_topic_anonymous( $topic_id ) ) {
$author_avatar = get_avatar( bbp_get_topic_author_id( $to... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function twentynineteen_get_avatar_size() {\n\treturn 60;\n}",
"function setup_author_box_gravatar_size( $size ) {\n\n\treturn 90;\n\n}",
"function ll_author_box_gravatar_size( $size ) {\n\treturn 96;\n}",
"function deft_custom_thumb_size( $get_image_options ) {\n $get_image_options['avatar_size'] = 6... | [
"0.76988375",
"0.7536453",
"0.7471573",
"0.7294008",
"0.72703856",
"0.7249833",
"0.7181947",
"0.7116438",
"0.70927197",
"0.6990342",
"0.6935966",
"0.6916073",
"0.68011016",
"0.68011016",
"0.68011016",
"0.6789991",
"0.6756173",
"0.67558324",
"0.67297435",
"0.6700357",
"0.66490... | 0.7613996 | 1 |
Get Opening Time (hh:ii:ss) | Получить время открытия (чч:мм:сс) | public function getOpeningTime(): ?string
{
$time = $this->getParameter('opening_time');
return !is_null($time) ? $time->format("H:i:s") : null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLastOpenedTime()\n {\n return $this->lastOpenedTime;\n }",
"function OPENING_START_TIME_CONSTANT(){\n\n\t\treturn '10:00';\n\t}",
"function getTime() {\n\t\treturn $this->format('H:i:s');\n\t}",
"protected function openHour()\n {\n return substr($this->time, 0, strpo... | [
"0.73535043",
"0.7092638",
"0.7018737",
"0.69548255",
"0.6945946",
"0.6870183",
"0.68116707",
"0.68074036",
"0.6794884",
"0.66743636",
"0.6640172",
"0.6640172",
"0.6631258",
"0.66299176",
"0.66216636",
"0.6620561",
"0.6620561",
"0.6620561",
"0.6610711",
"0.6605496",
"0.660549... | 0.7146503 | 1 |
Get the particular class name from the fully distinguished name | Получить конкретное имя класса из полного различимого имени | public function getClassName()
{
$full_class_name = $this->getClass();
$pos = strrpos($full_class_name, '\\');
return substr($full_class_name, $pos + 1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected static function getClassName() {\n return strtolower(preg_replace('#([a-zA-Z]+\\\\\\\\)+([a-zA-Z]+)#i', '$2', get_called_class()));\n }",
"public function getClassName() {\n\t\t$path = $this->getClass();\n\t\treturn Path::basename($path);\n\t}",
"protected function getClass(): string\n {... | [
"0.7904954",
"0.76692516",
"0.7652894",
"0.7646525",
"0.7646525",
"0.7646525",
"0.7646525",
"0.7646525",
"0.7646525",
"0.7646525",
"0.7646525",
"0.76218575",
"0.76218575",
"0.7620998",
"0.7592355",
"0.7554305",
"0.7539261",
"0.7538992",
"0.75193375",
"0.74882066",
"0.7478836"... | 0.7678151 | 1 |
/ FUNCTION CREATED BY: Gavin Sao PURPOSE: To make querying the database easier and quicker without having to monotonously display the code to query every single time. RETURNS: If using SELECT: A comma separated list with trailing comma If using INSERT: Nothing If using UPDATE: Nothing If using DELETE: Nothing If using ... | / ФУНКЦИЯ СОЗДАНА: Gavin Sao НАЗНАЧЕНИЕ: Для упрощения и ускорения запросов к базе данных без необходимости каждый раз повторно отображать код для запроса. ВОЗВРАЩАЕТ: Если используется SELECT: Список, разделённый запятыми с последующей запятой Если используется INSERT: Ничего Если используется UPDATE: Ничего Если испо... | function query_db($TYPE,$DB_TABLE,$DB_WHERECLAUSE,$DB_WHERECLAUSEEQUALTO,$TO_BE_FETCHED,$DB_ORDERBY,$DB_GROUPBY = NULL,$INSERT_ITEMS = NULL,$INSERT_VALUES = NULL,$DB_ORDERBY_ORDER = NULL)
{
global $dba;
$return="";
$FETCHED="";
switch($TYPE){
case 'INSERT':
$sql = "INSERT INTO ".$DB_TABLE." (".$INSERT_ITEMS.")... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function query_builder($db_table,$where = false, $query_data = false, $flag = false, $primary_key = 0, $order_by = '', $limit = 0, $offset = 0){\n $buffer = '';\n if($flag == 'C'){ // Create query\n $cnt = 0;\n $buffer = \"INSERT INTO {$db_table}(\";\n foreach( $query_d... | [
"0.6955789",
"0.6892082",
"0.65730315",
"0.63979155",
"0.6309406",
"0.63013685",
"0.62998694",
"0.6289503",
"0.6254101",
"0.62314755",
"0.6209638",
"0.61920345",
"0.6175241",
"0.6169894",
"0.6166093",
"0.6163183",
"0.6130996",
"0.6104649",
"0.6061304",
"0.60377574",
"0.602549... | 0.80479395 | 0 |
/ move the database cursor to row $row on the SELECT query with the identifier $qid | Переместите курсор базы данных на строку $row в запросе SELECT с идентификатором $qid | function com_db_data_seek($qid, $row) {
if (com_db_num_rows($qid)) { return mysql_data_seek($qid, $row); }
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function data_seek($query, $row);",
"function mysql_data_seek($result, $row_number) {\n $mysqli_result = Resource::fetch($result);\n return mysqli_data_seek($mysqli_result, $row_number);\n}",
"function mysql_data_seek($result, $row_number)\n {\n return mysqli_data_seek($result, $row_number);\n ... | [
"0.62427884",
"0.60878885",
"0.6028661",
"0.6015599",
"0.6003541",
"0.5984923",
"0.596913",
"0.5965392",
"0.5893938",
"0.585612",
"0.57664615",
"0.5729812",
"0.56814",
"0.5622436",
"0.5615517",
"0.56097025",
"0.5607199",
"0.559894",
"0.5597148",
"0.55843264",
"0.55828106",
... | 0.7038781 | 0 |
Build the anchor string \param $pagename url file location for the href \param $label text displayed for the a tag \param $params array of pairs value that will be concatened to the $pagename parameter \sa http_build_query | Постройте анкерную строку \param $pagename url файловое расположение для href \param $label текст, отображаемый для тега a \param $params массив пар значений, которые будут склеены с параметром $pagename \sa http_build_query | public function __construct($pagename, $label, $params = array())
{
$this->anchor = "<a href=\"$pagename" . "?" . http_build_query($params) . "\">$label</a>";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function buildURL_base($atag,$queryargs,$label = \"\"){\n $qa = array();\n if( is_array($queryargs)){\n foreach($queryargs as $qk => $qv){\n $qa[] = \"$qk=$qv\";\n }\n $qstr = implode(\"&\",$qa);\n }\n else $qstr=$queryargs;\n\n $u ... | [
"0.6543507",
"0.6513861",
"0.6492937",
"0.63672745",
"0.62277263",
"0.6224266",
"0.61736",
"0.5924618",
"0.58397233",
"0.5760656",
"0.5690238",
"0.56810534",
"0.5652822",
"0.5612808",
"0.5593496",
"0.55833125",
"0.5576996",
"0.557387",
"0.5561292",
"0.5546264",
"0.554279",
... | 0.76685303 | 0 |
Fetches the first field from the result array | Извлекает первый элемент из массива результатов | public function fetchFirstField($result)
{
$array = $result->fetch_row();
if (!isset($array[0]))
return null;
else
return $array[0];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function first(){\n return $this->_results[0]; #Can update to use results function\n }",
"public function first(){\n return $this ->results()[0];\n }",
"public function first(){\n return $this->_results[0];\n }",
"public function first(){\n return $this->results()[... | [
"0.7930134",
"0.7705981",
"0.76965773",
"0.7675657",
"0.7663587",
"0.75762033",
"0.75529295",
"0.74510247",
"0.7420895",
"0.7420895",
"0.7393634",
"0.7388824",
"0.7369222",
"0.73663175",
"0.73579085",
"0.73536265",
"0.7341187",
"0.73060334",
"0.73060215",
"0.7291177",
"0.7274... | 0.7754615 | 1 |
create server socket bound to given address (and start listening for streaming clients to connect to this stream socket) | создать серверный сокет, связанный с заданным адресом (и начать прослушивание соединений от клиентов, использующих потоковый сокет) | public function createServer($address)
{
$socket = $this->createFromString($address, $scheme);
try {
$socket->bind($address);
if ($socket->getType() === SOCK_STREAM) {
$socket->listen();
}
}
catch (Exception $e) {
$socke... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function new_server_socket($port, $addr = '0.0.0.0') {\n // ::0 to allow IPv4 and IPv6.\n $family = detect_family($addr);\n if (($sock = socket_create($family,SOCK_STREAM,SOL_TCP)) === FALSE) {\n throw new Exception('Failed to create socket : '.socket_strerror(socket_last_error()).PHP_EOL);\n return FALSE... | [
"0.7429688",
"0.72120124",
"0.7116781",
"0.6628476",
"0.65791583",
"0.65749806",
"0.65748143",
"0.65539205",
"0.64774233",
"0.63416743",
"0.63220143",
"0.6132675",
"0.61192703",
"0.6106546",
"0.60345334",
"0.60210866",
"0.60110366",
"0.59777206",
"0.59561205",
"0.59377587",
"... | 0.7326846 | 1 |
create TCP/IPv4 stream socket | создать сокет потока TCP/IPv4 | public function createTcp4()
{
return $this->create(AF_INET, SOCK_STREAM, SOL_TCP);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createServer()\n {\n if ($this->localSocket) {\n // Parse socket name like `tcp://0.0.0.0:8090`.\n // TODO: Support Unix domain\n $list = explode(':', $this->localSocket);\n $this->protocol = $list[0] ?? null;\n $this->address = $... | [
"0.65698105",
"0.6376397",
"0.6219561",
"0.61490065",
"0.6119963",
"0.6093572",
"0.60802096",
"0.60799456",
"0.6078904",
"0.605984",
"0.59925216",
"0.5934362",
"0.5929481",
"0.5870376",
"0.58513933",
"0.5841226",
"0.58036685",
"0.577556",
"0.57428503",
"0.57428503",
"0.574107... | 0.7735275 | 0 |
create TCP/IPv6 stream socket | создать сокет потока TCP/IPv6 | public function createTcp6()
{
return $this->create(AF_INET6, SOCK_STREAM, SOL_TCP);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createIcmp6()\n {\n return $this->create(AF_INET6, SOCK_RAW, 58 /*getprotobyname('icmp')*/);\n }",
"function addTcpSocket() {}",
"public function createUdp6()\n {\n return $this->create(AF_INET6, SOCK_DGRAM, SOL_UDP);\n }",
"abstract protected function createSocketIn... | [
"0.6262266",
"0.6148294",
"0.60434765",
"0.6004001",
"0.5993433",
"0.5886214",
"0.5840793",
"0.5785878",
"0.57807237",
"0.57071406",
"0.57053447",
"0.57007074",
"0.56954867",
"0.5689786",
"0.5587263",
"0.5455047",
"0.54530877",
"0.54489505",
"0.54242307",
"0.53944457",
"0.537... | 0.79529655 | 0 |
create UDP/IPv4 datagram socket | создать сокет датаграммы UDP/IPv4 | public function createUdp4()
{
return $this->create(AF_INET, SOCK_DGRAM, SOL_UDP);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addUdpSocket() {}",
"public function createTcp4()\n {\n return $this->create(AF_INET, SOCK_STREAM, SOL_TCP);\n }",
"public function createUdp6()\n {\n return $this->create(AF_INET6, SOCK_DGRAM, SOL_UDP);\n }",
"public function createUdg()\n {\n return $this->creat... | [
"0.6570783",
"0.62863",
"0.6206496",
"0.61234653",
"0.609241",
"0.5925836",
"0.58514446",
"0.57153785",
"0.56466496",
"0.558999",
"0.5582922",
"0.5532557",
"0.53744537",
"0.5169425",
"0.516602",
"0.5165857",
"0.51615745",
"0.5071516",
"0.50472397",
"0.5038436",
"0.5022172",
... | 0.8051138 | 0 |
create UDP/IPv6 datagram socket | создать сокет датаграммы UDP/IPv6 | public function createUdp6()
{
return $this->create(AF_INET6, SOCK_DGRAM, SOL_UDP);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createTcp6()\n {\n return $this->create(AF_INET6, SOCK_STREAM, SOL_TCP);\n }",
"public function createUdp4()\n {\n return $this->create(AF_INET, SOCK_DGRAM, SOL_UDP);\n }",
"function addUdpSocket() {}",
"public function createIcmp6()\n {\n return $this->cre... | [
"0.6821681",
"0.6690347",
"0.66554683",
"0.63641685",
"0.63437426",
"0.5673639",
"0.5636856",
"0.5615894",
"0.5588027",
"0.54590505",
"0.53615236",
"0.53069735",
"0.52806544",
"0.523308",
"0.522581",
"0.5212246",
"0.51925886",
"0.5178606",
"0.51410145",
"0.51302946",
"0.51124... | 0.8120577 | 0 |
create local UNIX datagram socket (UDG) | создать локальный UNIX-сокет датаграммы (UDG) | public function createUdg()
{
return $this->create(AF_UNIX, SOCK_DGRAM, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addUdpSocket() {}",
"function api_masterSend($payload) {\r\n //UDP setup\r\n $server_ip = '127.0.0.1';\r\n $server_port = 11211;\r\n\r\n $socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);\r\n socket_sendto($socket, $payload, strlen($payload), 0, $server_ip, $server_port);\r\n socke... | [
"0.67050797",
"0.61618507",
"0.5966772",
"0.5945697",
"0.5933389",
"0.5839901",
"0.5767129",
"0.57357526",
"0.55169624",
"0.54824036",
"0.5417779",
"0.54123914",
"0.5398884",
"0.53912157",
"0.53524953",
"0.53455746",
"0.53445077",
"0.5296616",
"0.52791196",
"0.52732027",
"0.5... | 0.76981235 | 0 |
create raw ICMPv6 (IPv6) datagram socket (requires root!) | создать сырой сокет ICMPv6 (IPv6) (требуется root!) | public function createIcmp6()
{
return $this->create(AF_INET6, SOCK_RAW, 58 /*getprotobyname('icmp')*/);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createUdp6()\n {\n return $this->create(AF_INET6, SOCK_DGRAM, SOL_UDP);\n }",
"public function createTcp6()\n {\n return $this->create(AF_INET6, SOCK_STREAM, SOL_TCP);\n }",
"public function testSupportsIpv6()\n {\n if (!defined('AF_INET6')) {\n $t... | [
"0.6786723",
"0.65444934",
"0.59179354",
"0.56617576",
"0.5647159",
"0.5620565",
"0.55954415",
"0.5424421",
"0.5346128",
"0.53157",
"0.5299254",
"0.5255789",
"0.52500004",
"0.5234698",
"0.52135193",
"0.51542264",
"0.5105184",
"0.510475",
"0.5104598",
"0.5098491",
"0.50910664"... | 0.78328973 | 0 |
Get the zip file path for the dataset. | Получите путь к zip-файлу для набора данных. | private function getZipFilePath(DatasetSubmission $datasetSubmission): string
{
$fileset = $datasetSubmission->getFileset();
$zipFilePath = '';
if ($fileset instanceof Fileset and $fileset->isDone() and $fileset->doesZipFileExist()) {
$zipFilePath = $fileset->getZipFilePath();
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getZipCachePath();",
"private function _getZipfilename() {\n // if it was defined in config then return it\n if (isset($this->aCfg['tmpzip'])){\n return $this->aCfg['tmpzip'];\n }\n // ... otherwise generate somethin in system temp\n $sZipfile=(getenv... | [
"0.7091594",
"0.7042792",
"0.7013829",
"0.6973818",
"0.6758013",
"0.67197883",
"0.67147774",
"0.67147774",
"0.67147774",
"0.67147774",
"0.6685959",
"0.6663496",
"0.66563094",
"0.6653604",
"0.6653604",
"0.6652336",
"0.66395533",
"0.6581516",
"0.6556895",
"0.655176",
"0.6549254... | 0.7302621 | 0 |
Finds the Roles model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown. | Находит модель Roles по значению первичного ключа. Если модель не найдена, будет выброшено исключение HTTP 404. | protected function findModel($id)
{
if (($model = Roles::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function loadModel($id)\n\t{\n\t\t$model=Roles::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(Globals::DEFAULT_VAL_404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"protected function findModel($id) {\n if (($model = Role::findOne($id)) !== null... | [
"0.6788173",
"0.673779",
"0.67066145",
"0.66826355",
"0.66788805",
"0.66718876",
"0.65065265",
"0.6436425",
"0.6241977",
"0.62392133",
"0.6226144",
"0.6212028",
"0.6197977",
"0.6181964",
"0.6181964",
"0.6007395",
"0.59627205",
"0.5948443",
"0.59406567",
"0.5930042",
"0.588678... | 0.70104957 | 0 |
recuperation des routes dans le fichier json routes.json | восстановление маршрутов из файла json routes.json | private static function getRoutes(){
$json=file_get_contents("config/routes.json");
return json_decode($json);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function loadRoutes()\n\t{\t\t\t\t\n\t\t$altoroutes = array();\n\t\t\n\t\tif ($handle = opendir($this->routesDir)) {\n\t\t\t\n\t\t\twhile (false !== ($entry = readdir($handle))) {\n\t\t\t\t\n\t\t\t\tif ($entry != \".\" && $entry != \"..\" && is_file($this->routesDir.'/'.$entry)) {\n\t\t\t\t\t\n\t\t\t\t\t... | [
"0.68100566",
"0.66729796",
"0.66726834",
"0.65299326",
"0.6495984",
"0.6486162",
"0.64675653",
"0.6462186",
"0.64429146",
"0.6415024",
"0.63882977",
"0.63406867",
"0.6322961",
"0.63172984",
"0.6310893",
"0.6310527",
"0.6310527",
"0.62733614",
"0.6257935",
"0.6247465",
"0.623... | 0.7644731 | 0 |
Get the cheapest $mins minutes in the schedule | Получить самые дешевые $mins минуты в расписании | public function cheapest($mins) {
$values = array_values(array_unique($this->toArray()));
sort($values);
$out = $this->factory();
if($mins == 0) {
return $out;
}
$totalmins = 0;
foreach($values as $v) { // Iterate through values, cheapest first
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function get_default_min()\n\t{\n\t\treturn self::get_value('00:00');\n\t}",
"public function getMinute()\n {\n return floor(($this->intValue / Phpr_DateTime::intInMinute) % 60);\n }",
"function getmins(float $mins): float {\n return ($mins * 60);\n}",
"public function getSortie... | [
"0.6387802",
"0.62380797",
"0.6191778",
"0.61696726",
"0.61648124",
"0.6131282",
"0.61295736",
"0.60981745",
"0.6067661",
"0.6053263",
"0.6010315",
"0.5975184",
"0.5971938",
"0.59028625",
"0.590233",
"0.5902287",
"0.5902287",
"0.5898373",
"0.5898181",
"0.58948976",
"0.5885331... | 0.70632225 | 0 |
Convert the schedule into an on/off schedule | Преобразуйте расписание в режим включения/выключения | public function getOnSchedule() {
$os = new OnSchedule();
$this->translate(function($v) {
return $v === false ? 'OFF' : 'ON';
}, $os);
return $os;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function customSchedule() {\n\t\t$normalizedSchedule = array_fill(0, 7, array_fill(0, 24, 0));\n\t\t$storedSchedule = wfConfig::get_ser('scanSched', array());\n\t\tif (is_array($storedSchedule) && !empty($storedSchedule) && is_array($storedSchedule[0])) {\n\t\t\tforeach ($storedSchedule as $dayNumber => $da... | [
"0.5867291",
"0.55098194",
"0.5509092",
"0.5472391",
"0.5335721",
"0.5281804",
"0.5175529",
"0.51432395",
"0.51126206",
"0.5080215",
"0.50621396",
"0.50617635",
"0.50397277",
"0.50283575",
"0.4984963",
"0.496185",
"0.4943766",
"0.49380904",
"0.49269795",
"0.49066406",
"0.4904... | 0.7549252 | 0 |
Resets the current time interval and set the time of the last action to now | Сбрасывает текущий временной интервал и устанавливает время последнего действия в настоящее время | public function restart()
{
$this->lastActionTime = $this->timeProvider->getTime();
$this->currentInterval = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function reset()\n {\n $this->lastActionTime = null;\n $this->currentInterval = null;\n }",
"private function resetTime(): void {\r\n\r\n $this -> timings = [\r\n\r\n 'activation' => [],\r\n 'times' => [],\r\n ];\r\n }",
"public function re... | [
"0.76205677",
"0.6922382",
"0.65243655",
"0.63496363",
"0.6310791",
"0.6277852",
"0.61573017",
"0.6109288",
"0.60488206",
"0.60006934",
"0.59475416",
"0.59071803",
"0.58488417",
"0.5829043",
"0.58228815",
"0.5816266",
"0.5806528",
"0.577687",
"0.57470906",
"0.57082117",
"0.57... | 0.7542657 | 1 |
Resets the current time interval and set the time of the last action to null. This means that isReady will return true and getWaitingTime will return 0 until $this>restart is called the next time. | Сбрасывает текущий временной интервал и устанавливает время последнего действия в null. Это означает, что isReady будет возвращать true, а getWaitingTime будет возвращать 0 до тех пор, пока $this>restart не будет вызван следующим образом. | public function reset()
{
$this->lastActionTime = null;
$this->currentInterval = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function restart()\n {\n $this->lastActionTime = $this->timeProvider->getTime();\n $this->currentInterval = null;\n }",
"public function resetSleepTime( )\n {\n $this->_sleepTime = self::DELAY_DEFAULT;\n }",
"public function reset() {\n\t\t$this->_current = 0;\n\t\t$this... | [
"0.7261025",
"0.65968734",
"0.64831024",
"0.63896513",
"0.62962633",
"0.60543793",
"0.5877513",
"0.5816221",
"0.5745139",
"0.5742273",
"0.56397754",
"0.5619867",
"0.560577",
"0.5605235",
"0.5605235",
"0.5605235",
"0.5605235",
"0.5605235",
"0.5604555",
"0.5595891",
"0.55347914... | 0.7321497 | 0 |
Convert total in rupiah. | Преобразовать общую сумму в рупиях. | public function totalInRupiah()
{
return MoneyHelper::convertToRupiah($this->total);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toRupiah($value)\n {\n\n return \"Rp\" . number_format($value, 0, ',', '.');\n }",
"function calcular_total(){\r\n\t\t//$this->total = round($this->total, 2);\r\n\t}",
"function asRupiah($value) {\n return 'Rp. ' . str_replace(',','.',number_format($value));\n }",
"publ... | [
"0.6293634",
"0.6224556",
"0.6182804",
"0.61669815",
"0.60749066",
"0.60749066",
"0.60749066",
"0.60749066",
"0.60749066",
"0.60749066",
"0.60749066",
"0.59855205",
"0.59292793",
"0.5785003",
"0.5776169",
"0.5774664",
"0.57393676",
"0.57158077",
"0.57047814",
"0.57007885",
"0... | 0.78664625 | 0 |
Redirect to home page. | Перенаправление на главную страницу. | protected function redirect_home_page() {
redirect('/statement', 'refresh');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function redirectHome() {\n header(\"Location: ../\");\n }",
"public function home(){\n header(\"Location:\" . URL . HOME);\n }",
"public function index() \n\t{\n\t\tredirect('home');\n\t}",
"public function index() \n\t{\n\t\tredirect('home');\n\t}",
"public function redirectToH... | [
"0.8497235",
"0.8225102",
"0.7989287",
"0.7989287",
"0.7822607",
"0.7741715",
"0.7741043",
"0.7687251",
"0.76734126",
"0.7655785",
"0.7601663",
"0.75811404",
"0.7517082",
"0.75114435",
"0.7422904",
"0.74074334",
"0.73924106",
"0.73276585",
"0.7301107",
"0.7283528",
"0.7263372... | 0.8457554 | 1 |
Redirect to login page. | Перенаправление на страницу входа. | protected function redirect_login_page() {
redirect($this->get_login_action(), 'refresh');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function redirectToLogin() {\n\t\t$data['location'] = 'login/';\n\t\t\t\t\t\t\n\t\t// redirect and die\n\t\t$this->_view->render('redirect', $data);\n\t}",
"public function redirectToLogin() {\n\t\tHttpResponse::redirect($this->loginURL, array('returnURL' => $_SERVER['REQUEST_URI']));\n\t}",
"functio... | [
"0.853265",
"0.8489757",
"0.8464392",
"0.8436212",
"0.8385299",
"0.8201821",
"0.81497395",
"0.8148472",
"0.8130434",
"0.8090206",
"0.79338366",
"0.786641",
"0.7840512",
"0.78287727",
"0.7801916",
"0.7704875",
"0.76836216",
"0.7640659",
"0.76388276",
"0.7591973",
"0.759005",
... | 0.85998476 | 0 |
Normalize a given http uri. | Нормализовать заданный http uri. | public static function normalize(Http $uri): string; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function normaliseUri();",
"protected function normalizeUri($uri)\r\n {\r\n $uri = parse_url($uri, PHP_URL_PATH);\r\n $uri = ($uri !== '/') ? rtrim($uri, '/') : $uri;\r\n return $uri;\r\n }",
"public function normalizeURL($uri) {\n $parts = array (\n 'scheme' => '',\... | [
"0.7771911",
"0.74702764",
"0.7359141",
"0.7227659",
"0.6912604",
"0.6893094",
"0.68397963",
"0.6799435",
"0.67881346",
"0.67086405",
"0.6668597",
"0.65752536",
"0.647781",
"0.64137787",
"0.6397434",
"0.63853174",
"0.63522804",
"0.6291689",
"0.62376285",
"0.61922485",
"0.6191... | 0.7994864 | 0 |
The base path functions which makes it easy to include files. | Основные функции пути, которые облегчают включение файлов. | function base_path($path = '')
{
return __DIR__ .'/../' . ltrim($path, '/');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function include_includeFile($path){\n return dirname($_SERVER[\"DOCUMENT_ROOT\"]).\"/App/Views/Includes\".$path; \n}",
"function file_includes() {\n include_once dirname( __FILE__ ) . '/includes/functions.php';\n include_once dirname( __FILE__ ) . '/includes/class-walker-docs.php';\n inclu... | [
"0.74221605",
"0.7088421",
"0.68846935",
"0.6867329",
"0.68146086",
"0.6803753",
"0.68019205",
"0.6801167",
"0.67809343",
"0.6762192",
"0.67564094",
"0.67248434",
"0.67245466",
"0.67050385",
"0.6701196",
"0.66934395",
"0.6690717",
"0.66785645",
"0.66580427",
"0.66561157",
"0.... | 0.7280993 | 1 |
Show the form for creating a new Referencement. | Показать форму для создания нового Referencement. | public function create()
{
return view('referencements.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return view('admin.reference.create');\n\n }",
"public function actionCreate()\n {\n $model = new ReferenceType();\n $model->loadDefaultValues();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->re... | [
"0.7621622",
"0.7499674",
"0.7452769",
"0.7286786",
"0.7134326",
"0.6972192",
"0.6864915",
"0.68443877",
"0.68040043",
"0.678801",
"0.67599994",
"0.6726345",
"0.6712641",
"0.6706723",
"0.6642809",
"0.6578394",
"0.65660685",
"0.6504292",
"0.64958507",
"0.6494988",
"0.649026",
... | 0.77982515 | 0 |
This function tests the directory creation in the test folder. | Эта функция проверяет создание директории в папке тестирования. | public function testDirectoryCreation()
{
$this->assertDirectoryExists($this->directory);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createRealTestdir() {}",
"public function testCreateDirectoriesCreatesDirectories()\n {\n FilesystemUtil::createDirectories($this->properties->getProperty('directory'), $this->properties->getProperty('namespace'));\n $this->assertTrue(file_exists($this->properties->getProperty... | [
"0.81705356",
"0.78783613",
"0.7617598",
"0.761462",
"0.76134133",
"0.7567928",
"0.74788517",
"0.7470395",
"0.73964626",
"0.7341535",
"0.7326738",
"0.73202986",
"0.7253148",
"0.7133372",
"0.7121878",
"0.70031714",
"0.6994293",
"0.69176364",
"0.6897959",
"0.6853075",
"0.684677... | 0.85549235 | 0 |