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 |
|---|---|---|---|---|---|---|---|
Check if a model has certain attribute | Проверьте, имеет ли модель определенный атрибут | public function hasAttribute($model, $attribute); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasAttribute(ModelInterface $model, $attribute) {}",
"public function hasAttribute(string $attribute): bool;",
"public function hasAttribute(string $attribute): bool;",
"public function hasAttribute($name);",
"public function hasAttribute($name);",
"private function has_attribute($attribu... | [
"0.7828763",
"0.7566195",
"0.7566195",
"0.7548338",
"0.7548338",
"0.7447044",
"0.72434443",
"0.7232302",
"0.7178329",
"0.70955044",
"0.70955044",
"0.7070142",
"0.70467365",
"0.7040123",
"0.70222634",
"0.69998336",
"0.698147",
"0.6980342",
"0.6973076",
"0.697229",
"0.69551903"... | 0.81221384 | 0 |
Marks all objects for deletion | Отмечает все объекты для удаления | function markAllForDeletion() {
if ( $this->getCount() > 0 ) {
foreach ( $this as $oObject ) {
$oObject->setMarkForDeletion(true);
}
$this->setModified();
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function markDeleted()\n {\n Local_Domain_ObjectWatcher::addDelete($this);\n }",
"public function deleteAll()\n\t{\n\t\tforeach ($this->object_keys as $key) {\n\t\t\t$this->objects[$key]->delete();\n\t\t}\n\t}",
"public function markForDeletion() {\n\t\tparent::markForDeletion();\n\t}",
"public ... | [
"0.7322326",
"0.72926754",
"0.725572",
"0.7004913",
"0.6957199",
"0.693495",
"0.6924096",
"0.6811721",
"0.6811721",
"0.6811721",
"0.6811721",
"0.6811721",
"0.6811721",
"0.6811721",
"0.6811721",
"0.6803872",
"0.6790454",
"0.6731857",
"0.67297214",
"0.6683851",
"0.66804117",
... | 0.75610095 | 0 |
Returns true if the object or subobjects have been modified | Возвращает true, если объект или подобъекты были изменены | function isModified() {
$modified = $this->_Modified;
if ( !$modified && $this->getCount() > 0 ) {
foreach ( $this as $oObject ) {
$modified = $modified || $oObject->isModified();
}
}
return $modified;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasBeenModified();",
"public function isModified(): bool;",
"public function isModified() {\n\t\treturn $this->data !== $this->old_data;\n\t}",
"public function hasPendingChanges()\n {\n if (count($this->itemsAdd) || count($this->nodesMove) || count($this->itemsRemove)) {\n ... | [
"0.7428596",
"0.733283",
"0.72379434",
"0.7222371",
"0.72124517",
"0.7187654",
"0.70636547",
"0.70340395",
"0.7032297",
"0.7032297",
"0.7032297",
"0.7032297",
"0.7032297",
"0.7032297",
"0.6943793",
"0.69280475",
"0.69116074",
"0.6902822",
"0.6902822",
"0.68671757",
"0.6843616... | 0.7741334 | 0 |
Returns the object by movieID, returns null if not found | Возвращает объект по movieID, возвращает null, если не найден | function getObjectByMovieID($inObjectID) {
if ( $this->getCount() > 0 ) {
foreach ( $this as $oObject ) {
if ( $oObject->getMovieID() == $inObjectID ) {
return $oObject;
}
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getMovie($movie_id) {\n $sql = \"SELECT * FROM movie WHERE id='$movie_id'\";\n $stmt = $this->db->query($sql);\n $movie = NULL;\n if ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $movie = new Movie();\n $movie->id = $row['id'];\n $movie->ti... | [
"0.77095044",
"0.7515564",
"0.7424184",
"0.7231837",
"0.7207701",
"0.71478605",
"0.7139176",
"0.6974441",
"0.6942828",
"0.6851126",
"0.6817874",
"0.68048507",
"0.6797949",
"0.67697495",
"0.6718983",
"0.6683948",
"0.6630039",
"0.65976346",
"0.65167284",
"0.6512286",
"0.6483263... | 0.7733764 | 0 |
Returns the object by the position, returns null if not found | Возвращает объект по позиции, возвращает null, если не найден | function getObjectByPosition($inPosition) {
if ( $this->getCount() > 0 ) {
foreach ( $this as $oObject ) {
if ( $oObject->getPosition() == $inPosition ) {
return $oObject;
}
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function get(int $position);",
"public function getItem($pos)\n {\n if ($this->hasItem($pos) === true) {\n return $this->items[$pos];\n }\n\n return null;\n }",
"public function first()\n\t{\n\t\tif (count($this->object_keys) === 0) {\n\t\t\treturn null;\n\... | [
"0.70058626",
"0.67804396",
"0.66587603",
"0.6615721",
"0.6608877",
"0.65205747",
"0.6491449",
"0.6464793",
"0.6457948",
"0.6457511",
"0.6447687",
"0.6400775",
"0.63621294",
"0.6357544",
"0.6348387",
"0.6347663",
"0.63470525",
"0.6321212",
"0.6319507",
"0.6319507",
"0.6319507... | 0.7870168 | 0 |
Returns true if $inMovieID is in the profile already | Возвращает истину, если $inMovieID уже есть в профиле | function isMovieInProfile($inMovieID) {
if ( $this->getCount() > 0 ) {
foreach ( $this as $oObject ) {
if ( $oObject->getMovieID() == $inMovieID ) {
return true;
}
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasProfile() : bool\n {\n return $this->profile()->exists();\n }",
"public function hasProfile() : bool\n {\n return isset($this->profile);\n }",
"function in() {\n\treturn ( get_screen_id() === get_current_screen()->id );\n}",
"function is_take_over_profile($profile... | [
"0.6130293",
"0.6065055",
"0.5769951",
"0.5766463",
"0.5694491",
"0.5671085",
"0.565384",
"0.5635618",
"0.55561215",
"0.5543275",
"0.55278504",
"0.55268884",
"0.55055416",
"0.550342",
"0.54954773",
"0.5471754",
"0.5466558",
"0.5463263",
"0.5457135",
"0.5445607",
"0.54194903",... | 0.8554409 | 0 |
Returns the object at $inIndex, the array offset position | Возвращает объект по $inIndex, позицию массива | function getObjectByIndex($inIndex) {
return $this->_getItem($inIndex);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function offsetGet($index) {}",
"public function offsetGet($idx)\t\t\t//\teg. var_dump($obj['two']);\r\n\t{\r\n\t\treturn $this->members[$idx];\r\n\t}",
"public function offsetGet($idx)\t\t\t//\teg. var_dump($obj['two']);\r\n\t{\r\n\t\treturn $this->members[$idx];\r\n\t}",
"public function get( $iInde... | [
"0.702453",
"0.6869951",
"0.6869951",
"0.6620466",
"0.6564685",
"0.64975816",
"0.64273655",
"0.6378235",
"0.63593864",
"0.62173355",
"0.6215932",
"0.6182818",
"0.61322784",
"0.6123698",
"0.61216295",
"0.6121344",
"0.611679",
"0.610958",
"0.6108486",
"0.6108486",
"0.6078208",
... | 0.7757837 | 0 |
Marks the profile movie by $inID for deletion | Помечает профиль фильма с $inID для удаления | function removeObjectByID($inID) {
if ( $this->getCount() > 0 ) {
if ( false ) $oObject = new mofilmUserProfileMovie();
foreach ( $this as $oObject ) {
if ( $oObject->getID() == $inID ) {
$oObject->setMarkForDeletion(true);
}
}
}
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function removeObjectByID($inID) {\n\t\tif ( $this->getCount() > 0 ) {\n\t\t\tif ( false ) $oObject = new mofilmMovieMessageHistory();\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\tif ( $oObject->getID() == $inID ) {\n\t\t\t\t\t$oObject->setMarkForDeletion(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t... | [
"0.6023472",
"0.5926815",
"0.5732089",
"0.5688741",
"0.565003",
"0.5635832",
"0.5623771",
"0.5567435",
"0.55521727",
"0.5533207",
"0.5522168",
"0.55067277",
"0.54939276",
"0.54939276",
"0.5484495",
"0.5481685",
"0.54798716",
"0.5479389",
"0.544488",
"0.5441795",
"0.5438679",
... | 0.74546736 | 0 |
Process the webhook data and manage the partnermapping API calls. | Обработайте данные вебхука и управляйте вызовами API partnermapping. | public function process()
{
parent::process();
// Get the data from the AllPlayers webhook.
$data = $this->getData();
// Make/get a location resource.
$location = $this->getLocationResource(
$data['group']['uuid'],
isset($data['event']['location']) ? $data['event']['location'] : null
);
// Build the webhook payload.
$send = array(
'eventname' => $data['event']['title'],
'division_id' => $this->webhook->subscriber['division_id'],
'event_date_start' => $data['event']['start'],
'event_date_end' => $data['event']['end'],
'location_id' => $location,
);
// Add additional information to the payload.
if (isset($data['event']['description']) && !empty($data['event']['description'])) {
$send['notes'] = $data['event']['description'];
}
// Determine if this is a game or an event.
if (isset($data['event']['competitor']) && !empty($data['event']['competitor'])) {
$original_domain = $this->domain;
$original_send = $send;
foreach ($data['event']['competitor'] as $group) {
// Get TeamID from the partner-mapping API.
$team = $this->partner_mapping->readPartnerMap(
PartnerMap::PARTNER_MAP_GROUP,
$group['uuid'],
$group['uuid']
);
$team = $team['external_resource_id'];
// Get OpponentID from the partner-mapping API.
$opponent = $this->getOpponentResource(
$group['uuid'],
$team,
$data['event']['competitor']
);
// Get the score data from webhook.
$score = $this->getGameScores(
$group['uuid'],
$data['event']['competitor']
);
// Add additional information to the payload.
$send['opponent_id'] = $opponent;
if (isset($score['score_for']) && !empty($score['score_for'])) {
$send['score_for'] = $score['score_for'];
}
if (isset($score['score_against']) && !empty($score['score_against'])) {
$send['score_against'] = $score['score_against'];
}
if (isset($score['home_or_away']) && !empty($score['home_or_away'])) {
$send['home_or_away'] = $score['home_or_away'];
}
// Update the payload and process the response.
$this->domain = $original_domain . '/teams/' . $team
. '/as_roster/'
. $this->webhook->subscriber['commissioner_id']
. '/games';
$this->setData(array('game' => $send));
parent::post();
$response = $this->send();
$response = $this->helper->processJsonResponse($response);
// Manually create an event partner-mapping.
$this->partner_mapping->createPartnerMap(
$response['game']['id'],
PartnerMap::PARTNER_MAP_EVENT,
$data['event']['uuid'],
$group['uuid']
);
// Reset the temp variables for the next iteration.
$this->domain = $original_domain;
$send = $original_send;
}
// Cancel the webhook for game events (manually processed).
parent::setSend(parent::WEBHOOK_CANCEL);
} else {
// Get TeamID from the partner-mapping API.
$team = $this->partner_mapping->readPartnerMap(
PartnerMap::PARTNER_MAP_GROUP,
$data['group']['uuid'],
$data['group']['uuid']
);
$team = $team['external_resource_id'];
$this->domain .= '/teams/' . $team . '/as_roster/'
. $this->webhook->subscriber['commissioner_id']
. '/practices';
}
// Update the request and let PostWebhooks complete.
$this->setData(array('practice' => $send));
parent::post();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function process()\n {\n parent::process();\n\n // Get the data from the AllPlayers webhook.\n $data = $this->getData();\n\n // Get RosterID from the partner-mapping API.\n $roster = $method = '';\n $roster = $this->partner_mapping->readPartnerMap(\n P... | [
"0.7463918",
"0.7165667",
"0.6778501",
"0.6770956",
"0.6708181",
"0.6656401",
"0.66491383",
"0.658437",
"0.6385671",
"0.6367923",
"0.6340718",
"0.61601037",
"0.6099964",
"0.60165626",
"0.60074824",
"0.59958786",
"0.5987403",
"0.5985021",
"0.593866",
"0.590194",
"0.586915",
... | 0.7506859 | 0 |
Todo: deprecate Turn on http request header output | Todo: устареть Включить вывод заголовка HTTP-запроса | public function requestHeaderOn()
{
$this->setOpt(CURLINFO_HEADER_OUT, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function header() {}",
"public function outputHeaders()\n {\n // set the http_response_code\n \\http_response_code($this->http_response_code);\n }",
"final protected function _sendHeader() {}",
"function printHeader() {\n $this->setHeader(\"Content-Type\",$this->contentType)... | [
"0.6990201",
"0.68750244",
"0.6830526",
"0.68234056",
"0.68203366",
"0.6745489",
"0.67446095",
"0.6591086",
"0.6580366",
"0.6571638",
"0.6557983",
"0.65379226",
"0.65219796",
"0.6513884",
"0.6511443",
"0.648026",
"0.6439847",
"0.64292616",
"0.64167917",
"0.6397338",
"0.639400... | 0.76758003 | 0 |
Turn off request header | Отключить заголовок запроса | public function requestHeaderOff()
{
$this->setOpt(CURLINFO_HEADER_OUT, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function initHeader()\n {\n parent::initHeader();\n\n // To avoid document expired warning.\n session_cache_limiter('private_no_expire');\n\n header(\"Cache-Control: no-store, no-cache, must-revalidate\");\n header(\"Cache-Control: post-check=0, pre-check=0\", false);\n... | [
"0.6824961",
"0.6764258",
"0.6699501",
"0.66023993",
"0.6496006",
"0.6409683",
"0.63573575",
"0.63573575",
"0.6302905",
"0.6271138",
"0.6238494",
"0.62075037",
"0.61641574",
"0.6078256",
"0.60733706",
"0.60700697",
"0.60678244",
"0.6056843",
"0.6049946",
"0.6042029",
"0.60055... | 0.81499434 | 0 |
Turn off SSL verify | Отключить проверку SSL | public function sslVerifyOff()
{
$this->sslVerifyHostOff();
$this->sslVerifyPeerOff();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function doNotVerifySsl()\n {\n $this->setCurlOptions(CURLOPT_SSL_VERIFYPEER, false);\n }",
"public function disableCheckSSLCert() {\n\t\t$this->checkCert = false;\n\t}",
"public function sslVerifyPeerOff()\n {\n $this->setOpt(CURLOPT_SSL_VERIFYPEER, false);\n }",
"public fun... | [
"0.8452543",
"0.8344761",
"0.7998089",
"0.7640842",
"0.73884237",
"0.7073861",
"0.70259017",
"0.69150376",
"0.6914574",
"0.68960893",
"0.67878777",
"0.6775839",
"0.6753281",
"0.6602745",
"0.65995055",
"0.6540342",
"0.65159374",
"0.6496395",
"0.6456245",
"0.64451176",
"0.64242... | 0.8574227 | 0 |
Turn off host SSL verify | Выключить проверку SSL хоста | public function sslVerifyHostOff()
{
$this->setOpt(CURLOPT_SSL_VERIFYHOST, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function sslVerifyOff()\n {\n $this->sslVerifyHostOff();\n $this->sslVerifyPeerOff();\n }",
"public function doNotVerifySsl()\n {\n $this->setCurlOptions(CURLOPT_SSL_VERIFYPEER, false);\n }",
"public function disableCheckSSLCert() {\n\t\t$this->checkCert = false;\n\t}",
... | [
"0.8230602",
"0.77293557",
"0.7508708",
"0.74911195",
"0.73381644",
"0.6838387",
"0.6802683",
"0.67192215",
"0.6506346",
"0.6422131",
"0.6230372",
"0.6221611",
"0.6187799",
"0.6177164",
"0.6150761",
"0.61465544",
"0.6143098",
"0.6124563",
"0.61089694",
"0.6105184",
"0.6102822... | 0.8605712 | 0 |
Turn off peer SSL verify | Отключить проверку SSL у сверстника | public function sslVerifyPeerOff()
{
$this->setOpt(CURLOPT_SSL_VERIFYPEER, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function sslVerifyOff()\n {\n $this->sslVerifyHostOff();\n $this->sslVerifyPeerOff();\n }",
"public function doNotVerifySsl()\n {\n $this->setCurlOptions(CURLOPT_SSL_VERIFYPEER, false);\n }",
"public function disableCheckSSLCert() {\n\t\t$this->checkCert = false;\n\t}",
... | [
"0.8579227",
"0.8233266",
"0.77210325",
"0.76454",
"0.76245594",
"0.73782456",
"0.7119061",
"0.69588774",
"0.6832634",
"0.68008876",
"0.6690258",
"0.668629",
"0.65841943",
"0.6547463",
"0.6495226",
"0.6396285",
"0.63929397",
"0.6380964",
"0.6370039",
"0.6285691",
"0.6237713",... | 0.86022544 | 0 |
Turn on curl follow location (http header redirect) | Включить следование curl (http-перенаправление) | public function followLocationOon()
{
$this->setOpt(CURLOPT_FOLLOWLOCATION, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function followLocationOoff()\n {\n $this->setOpt(CURLOPT_FOLLOWLOCATION, false);\n }",
"private function _curl_redirection($ch, $curlopt_header = false) {\n curl_setopt($ch, CURLOPT_HEADER, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $data = curl_exec($c... | [
"0.7196258",
"0.699072",
"0.6807108",
"0.6731769",
"0.6694646",
"0.66897607",
"0.6588853",
"0.6475132",
"0.63431484",
"0.6336882",
"0.63363343",
"0.63275105",
"0.63049203",
"0.625813",
"0.6250297",
"0.618257",
"0.61774033",
"0.61067075",
"0.6105665",
"0.60899895",
"0.6089229"... | 0.73154837 | 0 |
Turn off curl follow location (http header redirect) | Отключить curl follow location (http header redirect) | public function followLocationOoff()
{
$this->setOpt(CURLOPT_FOLLOWLOCATION, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setDefaultCurlOptions() {\n\t\tcurl_setopt($this->curlHandle, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($this->curlHandle, CURLOPT_RETURNTRANSFER, true);\n }",
"public function followLocationOon()\n {\n $this->setOpt(CURLOPT_FOLLOWLOCATION, true);\n }",
"public function re... | [
"0.69542277",
"0.6852789",
"0.66334444",
"0.654652",
"0.652782",
"0.6479233",
"0.64421165",
"0.62979996",
"0.6290671",
"0.6205759",
"0.6201984",
"0.61696166",
"0.6135531",
"0.609038",
"0.6082543",
"0.60394615",
"0.599948",
"0.5995525",
"0.59826815",
"0.5907397",
"0.58986515",... | 0.74426275 | 0 |
Default constructor Initialize the size of the cache and zero out all cache lines | Конструктор по умолчанию инициализирует размер кэша и обнуляет все строки кэша | public function __construct() {
$this->clear_cache();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n\t{\n\t\t// Set cache class\n\t\t$this->cacheClass = static::$defaultCacheClass;\n\t}",
"public function initializeCache();",
"protected function initializeCache() {}",
"protected function initializeCache() {}",
"public function __construct() {\n\t\tphpFastCache::setup(\"stor... | [
"0.6882181",
"0.68335676",
"0.6822197",
"0.6820019",
"0.66756064",
"0.6643325",
"0.65725404",
"0.65513325",
"0.65228164",
"0.650265",
"0.64628714",
"0.6437486",
"0.6433918",
"0.64002824",
"0.6390656",
"0.6385057",
"0.6373366",
"0.6373287",
"0.6278233",
"0.6275908",
"0.6266777... | 0.70484656 | 0 |
Clear all cache lines effectively initializing the cache | Очистить все строки кэша, эффективно инициализируя кэш | public function clear_cache() {
unset($this->cache_lines);
$this->cache_lines = array();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function clear() {\n\t\t$this->_currCache = array();\n\t}",
"public function clearCache()\n {\n $this->loaded = false;\n $this->all = array();\n }",
"public function clearCaches();",
"public function clearCaches();",
"public function ClearCache()\r\n {\r\n\t\t$this->_cache = A... | [
"0.78539604",
"0.7731298",
"0.77060497",
"0.77060497",
"0.7639071",
"0.7577264",
"0.7575836",
"0.7575836",
"0.75659204",
"0.75338125",
"0.75084203",
"0.75084203",
"0.74356073",
"0.7433213",
"0.74313635",
"0.74252456",
"0.74252456",
"0.74252456",
"0.74252456",
"0.74147314",
"0... | 0.88625914 | 0 |
Return the number of clean cache hits | Верните количество чистых попаданий в кэш | public function get_clean_cache_hits() { return $this->clean_cache_hits; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function count(): int {\n return count($this->cache());\n }",
"public function size() { return count($this->cache); }",
"public function get_dirty_cache_hits() { return $this->dirty_cache_hits; }",
"function _cache_file_count()\n\t{\n\t\treturn $this->cache->cache_info();\n\t}",
"public... | [
"0.7127003",
"0.7083693",
"0.6975372",
"0.68197924",
"0.68176",
"0.6702966",
"0.6653731",
"0.6571029",
"0.64661044",
"0.64091486",
"0.6380047",
"0.6372309",
"0.6367584",
"0.6352532",
"0.63216424",
"0.6271605",
"0.6247929",
"0.62093186",
"0.61822534",
"0.6169353",
"0.6162675",... | 0.8033199 | 0 |
Return the number of dirty cache hits | Вернуть количество загрязненных попаданий в кэш | public function get_dirty_cache_hits() { return $this->dirty_cache_hits; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function size() { return count($this->cache); }",
"function _cache_file_count()\n\t{\n\t\treturn $this->cache->cache_info();\n\t}",
"protected function count(): int {\n return count($this->cache());\n }",
"public function get_clean_cache_hits() { return $this->clean_cache_hits; }",
"public... | [
"0.70950234",
"0.7045824",
"0.70229197",
"0.699139",
"0.69786674",
"0.6722853",
"0.666685",
"0.6657836",
"0.6603731",
"0.6382216",
"0.63625973",
"0.626493",
"0.62181014",
"0.6210168",
"0.6155381",
"0.61542284",
"0.6118957",
"0.6116242",
"0.6061181",
"0.5983676",
"0.59421134",... | 0.8102475 | 0 |
Return the number of cache misses | Верните количество промахов в кэше | public function get_cache_misses() { return $this->cache_misses; } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function count(): int {\n return count($this->cache());\n }",
"public function getCacheHits()\n {\n return $this->cacheHits;\n }",
"public function size() { return count($this->cache); }",
"function _cache_file_count()\n\t{\n\t\treturn $this->cache->cache_info();\n\t}",
"pu... | [
"0.7160209",
"0.6948313",
"0.6842709",
"0.6781275",
"0.67630786",
"0.6638236",
"0.65963733",
"0.6589534",
"0.65762454",
"0.6553562",
"0.6414732",
"0.6394974",
"0.62409174",
"0.6228329",
"0.6133907",
"0.6120485",
"0.6065026",
"0.6055356",
"0.6024014",
"0.60183394",
"0.60156107... | 0.7373783 | 0 |
Reset the internal counts for clean and dirty cache hits to zero | Сбросьте внутренние счетчики для чистых и грязных попаданий в кэш до нуля | public function reset_counters() {
$this->clean_cache_hits = 0;
$this->dirty_cache_hits = 0;
$this->cache_misses = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function reset_count() {\n\t\t$this->valid_count ( 0 );\n\t\t$this->valid_count ( 0, TRUE );\n\t}",
"protected function _resetTotalValues()\n {\n $this->_iTotalCnn = 0;\n $this->_iTotalCrapIndex = 0;\n $this->_iTotalNPath = 0;\n $this->_iTotalLLOC = 0;\n $this->_a... | [
"0.70708686",
"0.6992643",
"0.69232357",
"0.69078",
"0.6902071",
"0.68718344",
"0.6844036",
"0.6841339",
"0.6797031",
"0.67566127",
"0.6744143",
"0.6742123",
"0.6734225",
"0.6704479",
"0.66996145",
"0.66996145",
"0.6676529",
"0.66487867",
"0.66437256",
"0.6641557",
"0.6632254... | 0.8626095 | 0 |
Print contents of cache | Вывод содержимого кэша | public function print_cache() {
print_r($this->cache_lines);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function printCache()\n\t{\n\t\tLogger(\"Print the OSM cache\", LogTypes::Info);\n\t\tob_start();\n\t\techo \"<h1>OSM Cache Print</h1>\";\n\t\tvar_dump($this->Items);\n\t\tforeach($this->Items as $name)\n\t\t{\n\t\t\techo \"<h2>$name</h2>\";\n\t\t\tvar_dump($this->get($name));\n\t\t}\n\t\t\n\t\t$HTML = ob_g... | [
"0.7889939",
"0.7326419",
"0.7264496",
"0.70076257",
"0.68603086",
"0.68414044",
"0.6701971",
"0.66795427",
"0.650324",
"0.64428276",
"0.6408151",
"0.6328708",
"0.6325567",
"0.63175505",
"0.62402123",
"0.6161388",
"0.6150888",
"0.61143804",
"0.60991424",
"0.60991424",
"0.6048... | 0.85545653 | 0 |
Get the failure strategy for the given queue | Получить стратегию отказа для заданной очереди | public function getFailureStrategy($queue)
{
$strategyName = $this->config->getFailureStrategyName($queue);
if ( ! empty($this->failureStrategies[$strategyName])) {
return $this->failureStrategies[$strategyName];
}
if ( ! empty($this->failureStrategies[Config::FAILURE_STRATEGY_DEFAULT])) {
return $this->failureStrategies[Config::FAILURE_STRATEGY_DEFAULT];
}
if (0 < count($this->failureStrategies)) {
return current($this->failureStrategies);
}
// If we get here, we have a problem - no failure strategy is defined.
// This is an unrecoverable error, something is wrong in the configuration.
// We need the process to crash loudly and quickly.
throw new LogicException('No failure strategy found');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getQueue($queue): string;",
"private function getQueueURL($queue)\n {\n $queues = $this->queue->listQueues(['QueueNamePrefix' => ''])->get('QueueUrls');\n foreach ($queues as $queueURL) {\n $tokens = explode('/', $queueURL);\n if (strtolower($queue) == strto... | [
"0.5880926",
"0.5855868",
"0.57001734",
"0.55984265",
"0.55891186",
"0.55003697",
"0.54997045",
"0.54430336",
"0.54250014",
"0.5403251",
"0.5372429",
"0.5337389",
"0.52944785",
"0.52515507",
"0.5224728",
"0.51674485",
"0.5156909",
"0.5143228",
"0.514065",
"0.5130807",
"0.5035... | 0.8422249 | 0 |
Test GET a RDFSource | Тест GET RDFSource | public function testGetRDFSource()
{
$expected_links = [
"<" . Resource::LDP_NS . "Resource>; rel=\"type\"",
"<" . Resource::LDP_NS . "RDFSource>; rel=\"type\""
];
$expected_vary = "Accept";
$request_mime = "text/turtle";
$this->client->request('GET', "/nobel_914.ttl", [], [], ['HTTP_ACCEPT' => $request_mime]);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode(), "GET should be allowed.");
$response = $this->client->getResponse();
$response->sendContent();
$charset = $response->getCharset();
$expected_mime = "{$request_mime}; charset={$charset}";
$this->assertTrue($response->headers->has('Link'), "Missing Link header");
$this->assertEquals($expected_links, $response->headers->get("Link", null, false), "Link headers incorrect.");
$this->assertTrue($response->headers->has('Vary'), "Missing Vary header");
$this->assertEquals($expected_vary, $response->headers->get('Vary'), "Vary headers incorrect.");
$this->assertTrue($response->headers->has("Content-Type"), "Missing Content-Type header");
$this->assertEquals($expected_mime, $response->headers->get('Content-Type'), "Content-Type header incorrect");
$this->assertTrue($response->headers->has("etag"), "Missing Etag header.");
$etag = $response->headers->get('etag');
$size = filesize("./test/resources/test_directory/nobel_914.ttl");
$this->assertTrue($response->headers->has("Content-Length"), "Missing Content-Length header");
$this->assertEquals($size, $response->headers->get('Content-Length'), "Content-Length header incorrect");
$this->client->request('GET', "/nobel_914.ttl", [], [], ['HTTP_ACCEPT' => $expected_mime]);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode(), "GET should be allowed a second time.");
$this->assertTrue($this->client->getResponse()->headers->has("etag"), "Missing Etag header.");
$this->assertEquals($etag, $this->client->getResponse()->headers->get('etag'), "Etags don't match.");
$headers = [
'HTTP_ACCEPT' => $expected_mime,
'HTTP_IF_NONE_MATCH' => "{$etag}"
];
$this->client->request('GET', "/nobel_914.ttl", [], [], $headers);
$this->assertEquals(304, $this->client->getResponse()->getStatusCode(), "Conditional GET should return a 304");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testRetrieveSource()\n {\n }",
"public function testGetRDFSourceJSON()\n {\n $expected_links = [\n \"<\" . Resource::LDP_NS . \"Resource>; rel=\\\"type\\\"\",\n \"<\" . Resource::LDP_NS . \"RDFSource>; rel=\\\"type\\\"\"\n ];\n $expected_vary =... | [
"0.72575635",
"0.71269906",
"0.6643857",
"0.63518345",
"0.6161872",
"0.6154654",
"0.61231405",
"0.602451",
"0.5973112",
"0.5928599",
"0.58662236",
"0.5802648",
"0.569992",
"0.5684889",
"0.5678482",
"0.55449885",
"0.5499384",
"0.5464236",
"0.5429283",
"0.5429283",
"0.5417098",... | 0.7357346 | 0 |
Test GET a RDFSource as JSONLD | Тест GET RDFSource как JSONLD | public function testGetRDFSourceJSON()
{
$expected_links = [
"<" . Resource::LDP_NS . "Resource>; rel=\"type\"",
"<" . Resource::LDP_NS . "RDFSource>; rel=\"type\""
];
$expected_vary = "Accept";
$request_mime = "application/ld+json";
$this->client->request('GET', "/nobel_914.ttl", [], [], ['HTTP_ACCEPT' => $request_mime]);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode(), "GET should be allowed.");
$response = $this->client->getResponse();
$content = $response->getContent();
$this->assertTrue($response->headers->has('Link'), "Missing Link header");
$this->assertEquals($expected_links, $response->headers->get("Link", null, false), "Link headers incorrect.");
$this->assertTrue($response->headers->has('Vary'), "Missing Vary header");
$this->assertEquals($expected_vary, $response->headers->get('Vary'), "Vary headers incorrect.");
$this->assertTrue($response->headers->has("Content-Type"), "Missing Content-Type header");
$this->assertEquals($request_mime, $response->headers->get('Content-Type'), "Content-Type header incorrect");
$this->assertTrue($response->headers->has("etag"), "Missing Etag header.");
$etag = $response->headers->get('etag');
$this->client->request('GET', "/nobel_914.ttl", [], [], ['HTTP_ACCEPT' => $request_mime]);
$this->assertEquals(200, $this->client->getResponse()->getStatusCode(), "GET should be allowed a second time.");
$this->assertTrue($this->client->getResponse()->headers->has("etag"), "Missing Etag header.");
$this->assertEquals($etag, $this->client->getResponse()->headers->get('etag'), "Etags don't match.");
$headers = [
'HTTP_ACCEPT' => $request_mime,
'HTTP_IF_NONE_MATCH' => "{$etag}"
];
$this->client->request('GET', "/nobel_914.ttl", [], [], $headers);
$this->assertEquals(304, $this->client->getResponse()->getStatusCode(), "Conditional GET should return a 304");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testGetJsonLD()\n {\n $expected_links = [\n \"<\" . Resource::LDP_NS . \"Resource>; rel=\\\"type\\\"\",\n \"<\" . Resource::LDP_NS . \"BasicContainer>; rel=\\\"type\\\"\"\n ];\n $expected_vary = \"Accept\";\n $expected_mime = \"application/ld+jso... | [
"0.711103",
"0.6544315",
"0.5847305",
"0.5818058",
"0.5818058",
"0.5613756",
"0.54919016",
"0.54455304",
"0.54228264",
"0.54090273",
"0.54070234",
"0.54062444",
"0.53132993",
"0.5305078",
"0.5295212",
"0.5232097",
"0.5204193",
"0.51891387",
"0.517483",
"0.51167613",
"0.510175... | 0.743728 | 0 |
Recursive factory method to add assembly with sub assemblies to task. Inserts row into taskToAssembly and also appends materials to taskToMaterials | Рекурсивный фабричный метод для добавления сборки с подсборками в задачу. Вставляет строку в taskToAssembly и также добавляет материалы в taskToMaterials | static function addAssembly($task_id, $assembly_id, $quantity, $parent_id = NULL, $sub_assembly_id = NULL, &$models=array(), &$taskToAssembly=NULL)
{
// initialise the saved variable to show no errors
$saved = true;
// insert assembly into taskToAssembly table
if($taskToAssembly === NULL)
{
$taskToAssembly = new TaskToAssembly();
}
$taskToAssembly->task_id = $task_id;
$taskToAssembly->assembly_id = $assembly_id;
$taskToAssembly->parent_id = $parent_id;
$taskToAssembly->sub_assembly_id = $sub_assembly_id;
$taskToAssembly->quantity = $quantity;
// dummy for validation
if(!$taskToAssembly->standard_id) {
$taskToAssembly->standard_id = 0;
}
// NB: can't call createSave due to recursion so this is internals
$saved = $taskToAssembly->dbCallback('save');
$models[] = $taskToAssembly;
// insert materials into taskToMaterial table
// AssemblyToMaterial
foreach(AssemblyToMaterial::model()->findAllByAttributes(array('assembly_id'=>$assembly_id)) as $assemblyToMaterial)
{
$taskToMaterial = new TaskToMaterial();
$taskToMaterial->task_id = $task_id;
$taskToMaterial->material_id = $assemblyToMaterial->material_id;
$taskToMaterial->task_to_assembly_id = $taskToAssembly->id;
$taskToMaterial->standard_id = $taskToAssembly->assembly->standard_id;
$taskToMaterial->quantity = $taskToMaterial->getDefault($assemblyToMaterial);
if($saved &= $taskToMaterial->createSave($models))
{
// add a row into pivot table so can join to get quantity comment and stage etc
$taskToMaterialToAssemblyToMaterial = new TaskToMaterialToAssemblyToMaterial();
$taskToMaterialToAssemblyToMaterial->task_to_material_id = $taskToMaterial->id;
$taskToMaterialToAssemblyToMaterial->assembly_to_material_id = $assemblyToMaterial->id;
$saved &= $taskToMaterialToAssemblyToMaterial->createSave($models);
}
}
// AssemblyToMaterialGroup
foreach(AssemblyToMaterialGroup::model()->findAllByAttributes(array('assembly_id'=>$assembly_id)) as $assemblyToMaterialGroup)
{
$taskToMaterialToAssemblyToMaterialGroup = new TaskToMaterialToAssemblyToMaterialGroup;
$taskToMaterialToAssemblyToMaterialGroup->quantity = 0; // Dummy to pass validation designed for form update
$taskToMaterialToAssemblyToMaterialGroup->task_id = $task_id;
$taskToMaterialToAssemblyToMaterialGroup->task_to_assembly_id = $taskToAssembly->id;
$taskToMaterialToAssemblyToMaterialGroup->material_group_id = $assemblyToMaterialGroup->material_group_id;
$taskToMaterialToAssemblyToMaterialGroup->assembly_to_material_group_id = $assemblyToMaterialGroup->id;
$saved &= $taskToMaterialToAssemblyToMaterialGroup->createSave($models);
}
// AssemblyToAssemblyGroup
foreach(AssemblyToAssemblyGroup::model()->findAllByAttributes(array('assembly_id'=>$assembly_id)) as $assemblyToAssemblyGroup)
{
$taskToAssemblyToAssemblyToAssemblyGroup = new TaskToAssemblyToAssemblyToAssemblyGroup;
$taskToAssemblyToAssemblyToAssemblyGroup->quantity = 0; // Dummy to pass validation designed for form update
$taskToAssemblyToAssemblyToAssemblyGroup->task_id = $task_id;
$taskToAssemblyToAssemblyToAssemblyGroup->task_to_assembly_parent_id = $taskToAssembly->id;
$taskToAssemblyToAssemblyToAssemblyGroup->assembly_group_id = $assemblyToAssemblyGroup->assembly_group_id;
$taskToAssemblyToAssemblyToAssemblyGroup->assembly_to_assembly_group_id = $assemblyToAssemblyGroup->id;
$saved &= $taskToAssemblyToAssemblyToAssemblyGroup->createSave($models);
}
// recurse thru sub assemblies
foreach(SubAssembly::model()->findAllByAttributes(array('parent_assembly_id'=>$assembly_id)) as $subAssembly)
{
$saved &= static::addAssembly($task_id, $subAssembly->child_assembly_id, TaskToAssembly::getDefault($subAssembly), $taskToAssembly->id, $subAssembly->id, $models);
}
return $saved;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function build(TaskInterface $task) {\n /* @var \\Drupal\\file\\Plugin\\Field\\FieldType\\FileFieldItemList $field */\n $field = $task->get('sar_export');\n /* @var \\Drupal\\Core\\Field\\FieldDefinitionInterface $field_definition */\n $field_definition = $field->getFieldDefinition();\n $sett... | [
"0.5325231",
"0.5283146",
"0.51695806",
"0.5081225",
"0.4972432",
"0.4952348",
"0.4804323",
"0.4772278",
"0.47391978",
"0.4638765",
"0.4601547",
"0.45873052",
"0.45820534",
"0.457339",
"0.45633662",
"0.4553848",
"0.4548025",
"0.44892642",
"0.44809172",
"0.4479453",
"0.4449639... | 0.71131736 | 0 |
Gets all user ranks. | Получает все ранги пользователей. | public function getAllUserRanks(){
return $this->db->get("user_ranks")->result();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_user_ranks()\n\t{\n\t\t$sql = 'SELECT r.rank_id, r.rank_name\n\t\t\t\tFROM ' . SQL_PREFIX . 'groups_users gu\n\t\t\t\tINNER JOIN ' . SQL_PREFIX . 'groups g\n\t\t\t\t\tON gu.g_id = g.g_id\n\t\t\t\tINNER JOIN ' . SQL_PREFIX . 'ranks r\n\t\t\t\t\tON r.rank_id = g.g_rank\n\t\t\t\tWHERE gu.u_id = ' ... | [
"0.7827452",
"0.66261303",
"0.6470351",
"0.64495444",
"0.64389825",
"0.6268275",
"0.6250206",
"0.6170123",
"0.61258274",
"0.6115316",
"0.5964917",
"0.5919013",
"0.58756644",
"0.5854129",
"0.5799819",
"0.5777244",
"0.5740182",
"0.56969637",
"0.56841886",
"0.5660163",
"0.562254... | 0.792253 | 0 |
Gets the users rank with specified id. | Получает ранг пользователя с указанным идентификатором. | public function getUserRankHavingId($id){
$this->db->from("user_ranks");
$this->db->where("rank_id", $id);
return $this->db->get()->result();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_rank($conn,$id) {\n\n\t\t// Pull rank by id from db.\n\n\t\ttry {\n \n\t $PDO = $conn->prepare('SELECT rank FROM roster WHERE cid = :cid');\n\t $PDO->bindParam(':cid', $id, PDO::PARAM_STR);\n\t $PDO->execute();\n\t \n\t $PDO->setFetchMode(PDO::FETCH_OBJ);\n\n\... | [
"0.6747309",
"0.67149264",
"0.6560443",
"0.6550597",
"0.6509174",
"0.6328714",
"0.6113076",
"0.60522926",
"0.60513955",
"0.59745663",
"0.5968463",
"0.5946858",
"0.58967036",
"0.58951956",
"0.58869046",
"0.58837646",
"0.5858399",
"0.5858399",
"0.5848005",
"0.5806872",
"0.58023... | 0.79497993 | 0 |
Creates a new user rank. | Создает новый ранг пользователя. | public function createNewUserRank($data){
$this->db->insert("users", $data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store(CreateUserRankRequest $request)\n {\n $input = $request->all();\n\n $userRank = $this->userRankRepository->create($input);\n\n Flash::success('User Rank saved successfully.');\n\n return redirect(route('userRanks.index'));\n }",
"public function create()\n ... | [
"0.76818514",
"0.7117826",
"0.663709",
"0.63777304",
"0.63593",
"0.62417287",
"0.6240504",
"0.61806864",
"0.61121464",
"0.60069484",
"0.59373194",
"0.58549774",
"0.5854579",
"0.5800118",
"0.5799119",
"0.57622653",
"0.57500726",
"0.5744229",
"0.57298845",
"0.57298416",
"0.5713... | 0.7657921 | 1 |
add the premigration code here | Добавьте код предмиграции здесь | public function preUp()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static protected function onBeforeMigrate(){}",
"protected function before_migrate_object() {}",
"protected function _migration()\n {\n global $wpdb;\n\n $charset_collate = '';\n\n if ( ! empty ( $wpdb->charset ) )\n $charset_collate = \"DEFAULT CHARACTER SET $wpdb->charset\"... | [
"0.7779396",
"0.7108441",
"0.68853",
"0.68537563",
"0.67287457",
"0.67287457",
"0.67287457",
"0.67287457",
"0.67287457",
"0.670798",
"0.6646267",
"0.66291",
"0.66235346",
"0.65900475",
"0.6551515",
"0.65290123",
"0.64715874",
"0.6463066",
"0.64616436",
"0.6448299",
"0.6424905... | 0.71614987 | 1 |
Get the SQL statements for the Down migration | Получить SQL-запросы для миграции вниз | public function getDownSQL()
{
return array(
'propel' => '
SET FOREIGN_KEY_CHECKS = 0;
ALTER TABLE `collector_identifier` DROP `provider`;
ALTER TABLE `collector_identifier_archive` DROP `provider`;
SET FOREIGN_KEY_CHECKS = 1;
',
'blog' => '
SET FOREIGN_KEY_CHECKS = 0;
SET FOREIGN_KEY_CHECKS = 1;
'
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDownSQL()\n {\n return array (\n 'propel' => '\n SET FOREIGN_KEY_CHECKS = 0;\n SET FOREIGN_KEY_CHECKS = 1;\n ',\n 'blog' => '\n SET FOREIGN_KEY_CHECKS = 0;\n SET FOREIGN_KEY_CHECKS = 1;\n ',\n );\n }",
"public function getDownSQL()\n {\n... | [
"0.7789444",
"0.7789444",
"0.77415276",
"0.7727106",
"0.76495093",
"0.75859135",
"0.75534886",
"0.7517848",
"0.7517848",
"0.7486083",
"0.7467711",
"0.74233246",
"0.7409134",
"0.72872955",
"0.7277026",
"0.7226599",
"0.71947724",
"0.7181066",
"0.71712285",
"0.715226",
"0.713781... | 0.7863016 | 0 |
Returns the size of the picture based on a wished size. | Возвращает размер изображения на основе желаемого размера. | function getSmartSize($size){
$imagedata = getImageSize($this->getPath());
if ($imagedata[0] >= $imagedata[1]){
$width = $size;
}else{
$height = $size;
}
if ($width){
$w = $width;
$h = round($imagedata[1] / ($imagedata[0] / $width));
}
if ($height){
$w = round($imagedata[0] / ($imagedata[1] / $height));
$h = $height;
}
return array(
"width" => $w,
"height" => $h
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getImageSize();",
"function zuhaus_mikado_get_image_size( $size ) {\n\t$sizes = zuhaus_mikado_get_image_sizes();\n\t\n\tif ( isset( $sizes[ $size ] ) ) {\n\t\treturn $sizes[ $size ];\n\t}\n\t\n\treturn false;\n}",
"function get_image_size( $size ) {\n \t$sizes = elit_get_image_sizes();\n ... | [
"0.746767",
"0.71814954",
"0.7156106",
"0.70708084",
"0.6900504",
"0.6836014",
"0.6749037",
"0.6740717",
"0.67308223",
"0.67308223",
"0.6720888",
"0.6707343",
"0.6695584",
"0.6682726",
"0.6658",
"0.6655283",
"0.6653942",
"0.6628905",
"0.66282564",
"0.66211295",
"0.6615797",
... | 0.7303936 | 1 |
Returns an array of persons who are registered on the picture. | Возвращает массив людей, зарегистрированных на изображении. | function getPersons(){
$return = array();
$f_gp = $this->dbconn->query("
SELECT
persons.*,
pictures_personlinks.x_cord,
pictures_personlinks.y_cord,
pictures_personlinks.id AS link_id
FROM
pictures_personlinks,
persons
WHERE
pictures_personlinks.picture_id = '" . sql($this->get("id")) . "' AND
persons.id = pictures_personlinks.person_id
");
while($d_gp = $f_gp->fetch()){
$x_cord = $d_gp["x_cord"];
$y_cord = $d_gp["y_cord"];
$link_id = $d_gp["link_id"];
unset($d_gp["x_cord"], $d_gp["y_cord"], $d_gp["link_id"]);
$person = $this->knj_gallery->getPerson($d_gp["id"], $d_gp);
$return[] = array(
"id" => $link_id,
"person" => $person,
"x_cord" => $x_cord,
"y_cord" => $y_cord
);
}
return $return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getPeople() {\n\t\t$conn=parent::connect();\n\t\t$sql = \"SELECT * FROM \" . TBL_PERSON;\n\t\ttry {\n\t\t\t$st = $conn->prepare($sql);\n\t\t\t$st->execute();\n\t\t\tforeach ($st->fetchAll() as $row) {\n\t\t\t\t$people[] = new Person($row);\n\t\t\t}\n\t\t\tparent::disconnect($conn);\n\t\t\tre... | [
"0.65748274",
"0.6544429",
"0.6473019",
"0.64465827",
"0.6397621",
"0.6392956",
"0.63617635",
"0.6303511",
"0.6242949",
"0.6238587",
"0.6178518",
"0.60984755",
"0.6083951",
"0.60132426",
"0.59982264",
"0.59753025",
"0.5970794",
"0.59626",
"0.5942922",
"0.5924887",
"0.5910506"... | 0.70317113 | 0 |
Gets an array containing all message parts, which hold header data. | Получает массив, содержащий все части сообщения, которые содержат данные заголовка. | public function getHeaderParts()
{
return array_filter($this->getParts(), array($this, 'isHeaderPart'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getHeaders()\n {\n if ($this->_headers === null) {\n if (!$this->_mail) {\n $this->_headers = [];\n } else {\n $part = $this->_mail->getRawHeader($this->_messageNum);\n Zend_Mime_Decode::splitMessage($part, $this->_headers... | [
"0.7719771",
"0.74451375",
"0.72161406",
"0.70618325",
"0.7006675",
"0.69998395",
"0.6946317",
"0.6936959",
"0.6886739",
"0.68796057",
"0.68598783",
"0.68598783",
"0.68598783",
"0.68598783",
"0.6803368",
"0.678998",
"0.6777134",
"0.67766625",
"0.6743051",
"0.67247784",
"0.671... | 0.79142654 | 0 |
Checks wether the given message part holds header data. | Проверяет, содержит ли заданный часть сообщения данные заголовка. | private function isHeaderPart(ckWsdlPart $input)
{
return $input->isHeader();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function isHeaderAllowed(\\Google_Service_Gmail_MessagePartHeader $header)\n {\n return empty($this->allowedHeaders) || in_array($header->getName(), $this->allowedHeaders);\n }",
"public function hasHeader(): bool;",
"public function hasHeader()\n {\n return true;\n }",
"fun... | [
"0.737762",
"0.70644474",
"0.69422394",
"0.69356555",
"0.6921625",
"0.68207276",
"0.6804366",
"0.673364",
"0.67188895",
"0.67160094",
"0.6687876",
"0.66861844",
"0.6671939",
"0.66595477",
"0.66445374",
"0.6580676",
"0.6564783",
"0.6548265",
"0.65443283",
"0.64744514",
"0.6438... | 0.7719918 | 0 |
Test case for attributeCategoryCreateSecurityEntry Create a security entry owned by the attribute category.. | Тест-кейс для attributeCategoryCreateSecurityEntry Создать запись безопасности, принадлежащую категории атрибутов. | public function testAttributeCategoryCreateSecurityEntry()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAttributeCategoryGetSecurityEntryByName()\r\n {\r\n\r\n }",
"public function testAttributeCategoryUpdateSecurityEntry()\r\n {\r\n\r\n }",
"public function testAttributeCategoryGetSecurityEntries()\r\n {\r\n\r\n }",
"public function testAttributeCategoryDeleteSecurityEntr... | [
"0.7841072",
"0.77024496",
"0.75895065",
"0.7283024",
"0.68634206",
"0.5944981",
"0.57842493",
"0.5557223",
"0.5542626",
"0.5538981",
"0.55290395",
"0.55022466",
"0.5493629",
"0.54924357",
"0.54363793",
"0.5414451",
"0.5413181",
"0.5377638",
"0.5364632",
"0.535783",
"0.533253... | 0.8667176 | 0 |
Test case for attributeCategoryDelete Delete an attribute category.. | Тестовый случай для удаления категории атрибута. Удаление категории атрибута. | public function testAttributeCategoryDelete()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAttributeCategoryDeleteSecurityEntry()\r\n {\r\n\r\n }",
"public function testInventoryCategoryDELETERequestCategoriesCategoryIDDelete()\n {\n }",
"public function deleteCategory()\n {\n }",
"public function testInventoryCategoriesABANDONRequestCategoriesAbandonDelete()\... | [
"0.81175095",
"0.7501616",
"0.7291333",
"0.70150346",
"0.69912696",
"0.6914677",
"0.6874729",
"0.68484515",
"0.6784662",
"0.6768784",
"0.67488015",
"0.67333275",
"0.67087036",
"0.6688839",
"0.66589695",
"0.66357815",
"0.66150486",
"0.6589103",
"0.65844715",
"0.6573692",
"0.64... | 0.8674506 | 0 |
Test case for attributeCategoryDeleteSecurityEntry Delete a security entry owned by the attribute category.. | Тестовый случай для удаления записи безопасности категории атрибута. Удаление записи безопасности, принадлежащей категории атрибута. | public function testAttributeCategoryDeleteSecurityEntry()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAttributeCategoryDelete()\r\n {\r\n\r\n }",
"public function testAttributeCategoryUpdateSecurityEntry()\r\n {\r\n\r\n }",
"public function testAttributeCategoryCreateSecurityEntry()\r\n {\r\n\r\n }",
"public function testAttributeCategoryGetSecurityEntryByName()\r\n {... | [
"0.7216221",
"0.71790797",
"0.71073496",
"0.6797385",
"0.67956793",
"0.6495481",
"0.6347281",
"0.6307591",
"0.6232562",
"0.61799043",
"0.61660236",
"0.6142867",
"0.6142813",
"0.61335135",
"0.6048229",
"0.6047547",
"0.6045864",
"0.60203195",
"0.6014116",
"0.6006552",
"0.600189... | 0.8823099 | 0 |
Test case for attributeCategoryGet Retrieve an attribute category.. | Тест-кейс для получения категории атрибута. Получить категорию атрибута. | public function testAttributeCategoryGet()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAttributeCategoryGetByPath()\r\n {\r\n\r\n }",
"abstract public function getCategory();",
"abstract public function getCategory();",
"public function testAttributeCategoryGetSecurity()\r\n {\r\n\r\n }",
"public function getCategory() {}",
"public function testAttributeCate... | [
"0.7559168",
"0.7256131",
"0.7256131",
"0.7102037",
"0.70873344",
"0.7032377",
"0.6894292",
"0.6799119",
"0.6799119",
"0.6799119",
"0.6799119",
"0.6740789",
"0.66198796",
"0.6551342",
"0.65392363",
"0.64514583",
"0.6443432",
"0.64213675",
"0.6420082",
"0.64076525",
"0.6380411... | 0.78501284 | 0 |
Test case for attributeCategoryGetByPath Retrieve an attribute category by path.. | Тест-кейс для attributeCategoryGetByPath Получение категории атрибута по пути. | public function testAttributeCategoryGetByPath()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAttributeCategoryGet()\r\n {\r\n\r\n }",
"function tep_parse_category_path($cPath) {\n// make sure the category IDs are integers\n $cPath_array = array_map('tep_string_to_int', explode('_', $cPath));\n\n// make sure no duplicate category IDs exist which could lock the server in a loo... | [
"0.65985405",
"0.62018675",
"0.60490924",
"0.60486573",
"0.59582025",
"0.59340537",
"0.592061",
"0.58844835",
"0.58844835",
"0.5851584",
"0.58423334",
"0.57839864",
"0.57738197",
"0.5741505",
"0.5725284",
"0.572169",
"0.5705892",
"0.56920636",
"0.5644288",
"0.55437803",
"0.55... | 0.84199786 | 0 |
Test case for attributeCategoryGetSecurityEntryByName Retrieve the security entry associated with the attribute category with the specified name.. | Тестовый случай для attributeCategoryGetSecurityEntryByName Получение записи безопасности, связанной с атрибутом категории, указанного именем. | public function testAttributeCategoryGetSecurityEntryByName()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAttributeCategoryGetSecurityEntries()\r\n {\r\n\r\n }",
"public function testAttributeCategoryCreateSecurityEntry()\r\n {\r\n\r\n }",
"public function testAttributeCategoryUpdateSecurityEntry()\r\n {\r\n\r\n }",
"public function testAttributeCategoryGetSecurity()\r\n ... | [
"0.6411679",
"0.6165755",
"0.56913656",
"0.56323457",
"0.54588723",
"0.5456892",
"0.5426133",
"0.5276849",
"0.5268909",
"0.5182613",
"0.5182162",
"0.51386386",
"0.5126141",
"0.51117486",
"0.5103074",
"0.5096915",
"0.50948447",
"0.5060751",
"0.50590825",
"0.5052654",
"0.505088... | 0.78024834 | 0 |
Test case for attributeCategoryUpdate Update an attribute category by replacing items in its definition.. | Тест-кейс для обновления атрибутной категории. Обновление атрибутной категории путем замены элементов в её определении. | public function testAttributeCategoryUpdate()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAttributeCategoryUpdateSecurityEntry()\r\n {\r\n\r\n }",
"public function testInventoryCategoryPATCHRequestCategoriesCategoryIDUpdate()\n {\n }",
"function updateCategory($id, $category, $new_category){\n }",
"public function update_cat_att()\n\t{\n\t\t\t$this->load->view('... | [
"0.71482724",
"0.6998655",
"0.6510055",
"0.6301183",
"0.6295863",
"0.62557834",
"0.6254269",
"0.62395495",
"0.62106246",
"0.6204222",
"0.62035114",
"0.61520433",
"0.61248595",
"0.61200607",
"0.6118493",
"0.6084384",
"0.60602903",
"0.60284233",
"0.6024526",
"0.5978833",
"0.596... | 0.7936505 | 0 |
Test case for attributeCategoryUpdateSecurityEntry Update a security entry owned by the attribute category.. | Тест-кейс для attributeCategoryUpdateSecurityEntry Обновление записи безопасности, принадлежащей категории атрибута. | public function testAttributeCategoryUpdateSecurityEntry()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAttributeCategoryCreateSecurityEntry()\r\n {\r\n\r\n }",
"public function testAttributeCategoryDeleteSecurityEntry()\r\n {\r\n\r\n }",
"public function testAttributeCategoryGetSecurityEntryByName()\r\n {\r\n\r\n }",
"public function testAttributeCategoryUpdate()\r\n {... | [
"0.72282743",
"0.7120452",
"0.7007816",
"0.6939924",
"0.690976",
"0.63601744",
"0.6181092",
"0.6153493",
"0.59515214",
"0.5867462",
"0.5805076",
"0.5770254",
"0.5704204",
"0.5652211",
"0.56354326",
"0.5624488",
"0.5603692",
"0.5557204",
"0.555646",
"0.5548573",
"0.5545482",
... | 0.861297 | 0 |
Throws PropertyRequiredException if $condition is false | Выбрасывает PropertyRequiredException, если $condition ложно | public static function throwIf($propertyName, $condition, $customMessage = null)
{
if (!$condition) {
throw new PropertyRequiredException($propertyName, $customMessage);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function checkRequirements() {\n $required_properties = array('configFile', 'files', 'standard');\n foreach ($required_properties as $required_property) {\n if (empty($this->$required_property)) {\n throw new \\BuildException(\"Missing required property '$required_property'.\");\n ... | [
"0.62845254",
"0.6242324",
"0.6212722",
"0.6038843",
"0.59175164",
"0.58635175",
"0.57835174",
"0.57701087",
"0.5767229",
"0.5739526",
"0.5732248",
"0.57262063",
"0.5699656",
"0.56840366",
"0.5682553",
"0.5673348",
"0.5670847",
"0.5647078",
"0.56096065",
"0.5592968",
"0.55751... | 0.7030923 | 0 |
/ Returns associated season. | Возвращает связанную сезон. | public function getSeason() {
return $this->season;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getSeason(){\n $query=Connection::getInstance()->connect()->prepare(\"SELECT season FROM season WHERE endseason > '\" . date('Y-m-d') . \"' LIMIT 1\");\n $query->execute();\n $query->setFetchMode(PDO::FETCH_OBJ);\n $data=$query->fetch();\n return $data->season;\n }",
"publi... | [
"0.83102036",
"0.8070125",
"0.7970378",
"0.7948334",
"0.7755369",
"0.7628527",
"0.7519018",
"0.7332923",
"0.7327698",
"0.7322773",
"0.72974235",
"0.72028637",
"0.71704525",
"0.7156858",
"0.7101407",
"0.7068377",
"0.70054567",
"0.7005132",
"0.69996613",
"0.6992114",
"0.6937573... | 0.8089079 | 1 |
Return the OEmbed content of a url | Вернуть содержимое OEmbed для URL | public function getOEmbed($url)
{
$this->setClient(new Curl());
$response = $this->get($url);
$content = $response->getContent();
$oEmbed = json_decode($content, true);
return $oEmbed;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getUrlContent($url);",
"public function getUrlContent($url) {\n\t\treturn \\OC_Util::getUrlContent($url);\n\t}",
"public static function get_embed( $url )\n\t{\n\t\t/**\n\t\t * Set arguments for getting embeded HTML.\n\t\t * Without arguments, default width will be taken from global $content_wi... | [
"0.73148763",
"0.700002",
"0.6991881",
"0.6864188",
"0.67508304",
"0.67316294",
"0.6709846",
"0.66845214",
"0.66572213",
"0.66485107",
"0.6645826",
"0.6618577",
"0.6618577",
"0.66106224",
"0.65962553",
"0.6551925",
"0.65489143",
"0.6454098",
"0.6441618",
"0.64362836",
"0.6421... | 0.7521336 | 0 |
/Returns String Stored facebook api key from the configuration | Возвращает строку, хранящую facebook api key из конфигурации | public function getApiKey(){
return Mage::getStoreConfig('techinflosocialmedia/facebook/fbapikey');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getApiKey() {\n $api_key = sfConfig::get('app_facebook_api_key', \"xxx\");\n if ( \"xxx\" == $api_key ) {\n throw new Exception('{m14tFacebookConnect} No API Key set!');\n }\n return $api_key;\n }",
"public function getFBAppId()\n {\n return $this->hlp->getConfi... | [
"0.7699343",
"0.76646364",
"0.75479275",
"0.73992765",
"0.7087557",
"0.70285565",
"0.6998675",
"0.6943933",
"0.6937475",
"0.6937475",
"0.680342",
"0.67799246",
"0.6772434",
"0.6733813",
"0.67197967",
"0.6678083",
"0.6658832",
"0.66471595",
"0.6646477",
"0.66312253",
"0.661753... | 0.80672824 | 0 |
/Returns String Stored facebook secret key from the configuration | Возвращает строку, хранящую секретный ключ Facebook из конфигурации | public function getSecretKey(){
return Mage::getStoreConfig('techinflosocialmedia/facebook/fbsecretkey');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getAppSecret()\n {\n $app_secret = sfConfig::get('app_facebook_app_secret', \"xxx\");\n if ( \"xxx\" == $app_secret ) {\n throw new Exception('{m14tFacebookConnect} No App Secret set!');\n }\n return $app_secret;\n }",
"public function getFBAppSecret()\n {\n re... | [
"0.7863262",
"0.782835",
"0.780215",
"0.7541367",
"0.75346386",
"0.7466283",
"0.74275494",
"0.72767806",
"0.7270981",
"0.7257642",
"0.7216305",
"0.7181134",
"0.71648276",
"0.7147453",
"0.7092769",
"0.70894945",
"0.70788866",
"0.7024183",
"0.7024033",
"0.70069724",
"0.69930595... | 0.8212772 | 0 |
/Returns String Stored facebook configuration status from the configuration | Возвращает строку, содержащую состояние конфигурации Facebook, сохраненную в конфигурации | public function getFbStatus(){
return Mage::getStoreConfig('techinflosocialmedia/facebook/fbenabled');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_status()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (!$this->is_loaded)\n $this->_load_config();\n\n return $this->config['status'];\n }",
"function get_instant_status()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (!$this->is_lo... | [
"0.70208776",
"0.6575256",
"0.6315395",
"0.6259985",
"0.6256308",
"0.6180063",
"0.61729556",
"0.61591583",
"0.6145036",
"0.6145036",
"0.6127525",
"0.61179435",
"0.6061563",
"0.60591084",
"0.6047496",
"0.6043101",
"0.60311496",
"0.6024073",
"0.59991807",
"0.59991807",
"0.59991... | 0.7133558 | 0 |
END OF FACEBOOK API FUNCTIONS START OF TWITTER API FUNCTIONS /Returns String Stored twitter api key from the configuration | КОНЕЦ ФУНКЦИЙ API FACEBOOK НАЧАЛО ФУНКЦИЙ API TWITTER /Возвращает строку, хранящую ключ API Twitter из конфигурации | public function getTwApiKey(){
return Mage::getStoreConfig('techinflosocialmedia/twitter/twapikey');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTwOauthKey(){\n\t\n\t return Mage::getStoreConfig('techinflosocialmedia/twitter/twoauth');\n\t}",
"public function getTwOauthSecretKey(){\n\t\n\t return Mage::getStoreConfig('techinflosocialmedia/twitter/twoauthsecretkey');\n\t}",
"public function getTwSecretKey(){\n\t\n\t return Mage::getSt... | [
"0.79604155",
"0.7765978",
"0.7540864",
"0.7160095",
"0.6917399",
"0.6790449",
"0.65108395",
"0.6503446",
"0.64776635",
"0.6437893",
"0.64316875",
"0.63685143",
"0.63497174",
"0.63497174",
"0.6339251",
"0.63038284",
"0.6301021",
"0.6294518",
"0.6289628",
"0.6258208",
"0.62365... | 0.8055116 | 0 |
/Returns String Stored twitter secret key from the configuration | Возвращает строку, хранящую секретный ключ Twitter из конфигурации | public function getTwSecretKey(){
return Mage::getStoreConfig('techinflosocialmedia/twitter/twsecretkey');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTwOauthSecretKey(){\n\t\n\t return Mage::getStoreConfig('techinflosocialmedia/twitter/twoauthsecretkey');\n\t}",
"public function getConsumerSecret() {\n\t\treturn Symphony::Configuration()->get('consumer-secret', 'twitter-notifier');\n\t}",
"public function getSecretKey()\n {\n re... | [
"0.8099779",
"0.7972227",
"0.777382",
"0.7726588",
"0.75838786",
"0.7518162",
"0.7462428",
"0.7457427",
"0.7439525",
"0.74353904",
"0.7419736",
"0.74119127",
"0.7393886",
"0.7321626",
"0.72898644",
"0.7273105",
"0.7264232",
"0.7248424",
"0.72400147",
"0.72117656",
"0.72117656... | 0.8167237 | 0 |
/Returns String Stored twitter oauth key from the configuration | Возвращает строку, хранящую ключ OAuth Twitter из конфигурации | public function getTwOauthKey(){
return Mage::getStoreConfig('techinflosocialmedia/twitter/twoauth');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTwOauthSecretKey(){\n\t\n\t return Mage::getStoreConfig('techinflosocialmedia/twitter/twoauthsecretkey');\n\t}",
"public function getConsumerKey() {\n\t\treturn Symphony::Configuration()->get('consumer-key', 'twitter-notifier');\n\t}",
"public function getTwSecretKey(){\n\t\n\t return Mage::... | [
"0.8025888",
"0.7685223",
"0.7542876",
"0.73455876",
"0.7163854",
"0.7119389",
"0.68759966",
"0.67348284",
"0.6680479",
"0.664113",
"0.6580068",
"0.6561829",
"0.6538567",
"0.65363914",
"0.6534389",
"0.6526199",
"0.6525567",
"0.650089",
"0.64970833",
"0.6492808",
"0.6487613",
... | 0.8216676 | 0 |
/Returns String Stored twitter oauth secret key from the configuration | Возвращает строку, хранящую твиттер oauth секретный ключ из конфигурации | public function getTwOauthSecretKey(){
return Mage::getStoreConfig('techinflosocialmedia/twitter/twoauthsecretkey');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getConsumerSecret() {\n\t\treturn Symphony::Configuration()->get('consumer-secret', 'twitter-notifier');\n\t}",
"public function getTwSecretKey(){\n\t\n\t return Mage::getStoreConfig('techinflosocialmedia/twitter/twsecretkey');\n\t}",
"public function getTwOauthKey(){\n\t\n\t return Mage::getSt... | [
"0.8014465",
"0.7929345",
"0.78011733",
"0.76215535",
"0.7571503",
"0.7426782",
"0.7404569",
"0.73446727",
"0.73275214",
"0.72945774",
"0.729151",
"0.7279136",
"0.7252461",
"0.72522044",
"0.7189675",
"0.7154622",
"0.7132546",
"0.7132546",
"0.71275973",
"0.71217203",
"0.711458... | 0.827743 | 0 |
/Returns String Stored twitter configuration status from the configuration | Возвращает строку, содержащую статус конфигурации Twitter, сохраненный в конфигурации | public function getTwStatus(){
return Mage::getStoreConfig('techinflosocialmedia/twitter/twenabled');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_status()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (!$this->is_loaded)\n $this->_load_config();\n\n return $this->config['status'];\n }",
"function get_instant_status()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n if (!$this->is_lo... | [
"0.7182217",
"0.6805655",
"0.65952605",
"0.6506152",
"0.6506152",
"0.6351152",
"0.6351152",
"0.6351152",
"0.6351152",
"0.6337605",
"0.63304245",
"0.6320977",
"0.63162875",
"0.6313692",
"0.63123685",
"0.63123685",
"0.62841785",
"0.62818074",
"0.6244687",
"0.62443095",
"0.62246... | 0.72878027 | 0 |
Utility function: Write to JS console.log. NOTE: Does not work in the BART situation, because this php is only a feed. | Помощьная функция: запись в JS console.log. Заметка: не работает в ситуации BART, потому что этот PHP является только кормлением. | function console_log( $data ){
echo '<script>';
echo 'console.log('. json_encode( $data ) .')';
echo '</script>';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function console_log( $data ){\n\techo '<script>';\n\techo 'console.log(\"'. $data .'\")';\n\techo '</script>';\n}",
"function console_log( $data ){\n echo '<script>';\n echo 'console.log('. json_encode( $data ) .');';\n echo '</script>';\n}",
"function console_log( $data ){\n echo '<script... | [
"0.7695085",
"0.7684324",
"0.76729786",
"0.7617322",
"0.7563072",
"0.7521147",
"0.7413441",
"0.73560005",
"0.73340076",
"0.73340076",
"0.7333318",
"0.7332786",
"0.73005605",
"0.7287002",
"0.7256479",
"0.71113205",
"0.70844525",
"0.7012071",
"0.69964474",
"0.69392675",
"0.6897... | 0.771212 | 0 |
Initializes Dbus class, and sets up proxy for notifications | Инициализирует класс Dbus и настраивает прокси для уведомлений | public function __construct()
{
if (!class_exists("Dbus", false)) {
throw new Exception("Derick Rethans PHP D-BUS extension is required for this class to work");
}
$this->dbus = new \Dbus(\Dbus::BUS_SESSION);
$this->proxy = $this->dbus->createProxy(
"org.freedesktop.Notifications",
"/org/freedesktop/Notifications",
"org.freedesktop.Notifications"
);
$this->dbus->addWatch("org.freedesktop.Notifications", "ActionInvoked");
$this->dbus->addWatch("org.freedesktop.Notifications", "NotificationClosed");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n {\n $this->bus = app(CommandBusInterface::class);\n\n foreach ($this->handlers as $command => $handler) {\n $this->bus->addHandler($command, $handler);\n }\n }",
"protected function __construct()\n {\n // Attach subscribers\n ... | [
"0.65044415",
"0.64948565",
"0.6425829",
"0.6250419",
"0.62106156",
"0.6174392",
"0.612679",
"0.61155653",
"0.6083114",
"0.6083114",
"0.60518396",
"0.60506135",
"0.60428643",
"0.60357505",
"0.6031549",
"0.60275817",
"0.5997995",
"0.59307706",
"0.592707",
"0.5923531",
"0.59062... | 0.7598559 | 0 |
Gets args for which constructor does not exist | Получает аргументы для которых не существует конструктора | public function getArgsForConstructorDoesNotExist()
{
$a = new A();
$b = new B();
$d = new D();
$int = 0;
$null = null;
return array(
array(array($a, $d)),
array(array($b, $int)),
array(array($null, $null)),
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getConstructorArguments() {}",
"public function __constructor_args() : array {\n\t\t\treturn array(null);\n\t\t}",
"public function __constructor_args() : array {\n\t\t\treturn array(null);\n\t\t}",
"abstract protected function getDefaultConstructorArguments();",
"abstract protected functio... | [
"0.7175773",
"0.7141319",
"0.7141319",
"0.7034783",
"0.68455195",
"0.6800003",
"0.6536718",
"0.64960146",
"0.6389384",
"0.6312416",
"0.6181096",
"0.6180635",
"0.6169604",
"0.61497545",
"0.61417156",
"0.6099603",
"0.60929304",
"0.609152",
"0.60814524",
"0.60814524",
"0.6058894... | 0.795483 | 0 |
Tests the resolve of arguments for which a constructor does not exist | Проверяет разрешение аргументов, для которых не существует конструктора | public function testResolveWithArgsForWhichConstructorDoesNotExist(array $args) {
$resolver = $this->getResolver();
$overloadedConstructorExampleClass = new OverloadedConstructorExampleClass();
$resolver->resolve(get_class($overloadedConstructorExampleClass), $args);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getArgsForConstructorDoesNotExist()\n {\n $a = new A();\n $b = new B();\n $d = new D();\n $int = 0;\n $null = null;\n return array(\n array(array($a, $d)),\n array(array($b, $int)),\n array(array($null, $null)),\n ... | [
"0.675904",
"0.63956344",
"0.63663703",
"0.63540936",
"0.6151027",
"0.60359055",
"0.60358655",
"0.59954685",
"0.594759",
"0.59040767",
"0.58578724",
"0.58462363",
"0.5837964",
"0.5825786",
"0.57868224",
"0.57770413",
"0.5744109",
"0.57401025",
"0.57381207",
"0.56717086",
"0.5... | 0.7535701 | 0 |
Creates the HTML for displaying a project's meta information (title/date). | Создаёт HTML для отображения метаинформации проекта (название/дата). | function render_project_meta($project) {
$p = '<h3 class="title">';
!$project['link'] ?: $p .= '<a href="' . $project['link'] . '">';
$p .= $project['title'];
!$project['link'] ?: $p .= '</a>';
$p .= '</h3><span class="date">';
$p .= date('F Y', strtotime($project['date']));
$p .= '</span>';
return $p;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function project_metadata_render () {\n\tglobal $post;\n\n\t// Only apply to Project type\n\tif ($post->post_type === \"project\") {\n\n\t\t// Get data\n\t\t$postID = $post->ID;\n\t\t$pairs = [\n\t\t\t\"Link:\" => project_metadata_get_external_link($postID),\n\t\t\t\"Tech:\" => project_metadata_get_tech_li... | [
"0.7653819",
"0.7078516",
"0.686476",
"0.6739277",
"0.6522361",
"0.6429428",
"0.6319647",
"0.624838",
"0.62330776",
"0.62078565",
"0.61423457",
"0.6060692",
"0.6001452",
"0.59947526",
"0.5990556",
"0.5980782",
"0.59795535",
"0.5972222",
"0.59287816",
"0.5911805",
"0.5888626",... | 0.78092873 | 0 |
Creates the HTML for displaying a project's tags. | Создает HTML для отображения тегов проекта. | function render_project_tags($project) {
$p = '';
foreach(explode(',', $project['tags']) as $tag) {
$p .= '<li class="tag">' . $tag . '</li>';
}
return $p;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function generateHTML() {\n $html = \"<div class=\\\"col-xs-12 gap\\\" id=\\\"projects\\\"></div><div class=\\\"col-lg-6 col-lg-offset-3 col-xs-12 col-xs-offset-0 panel\\\"><h1>Projects</h1>\";\n foreach ($this->experiences as $experience) {\n $html .= $experience->gener... | [
"0.62784714",
"0.604986",
"0.6043825",
"0.6000422",
"0.59706223",
"0.5943816",
"0.59128416",
"0.59073085",
"0.5883134",
"0.58721495",
"0.58568656",
"0.5838293",
"0.58362365",
"0.58346015",
"0.5833878",
"0.58280736",
"0.58218396",
"0.5818744",
"0.581695",
"0.5776559",
"0.57695... | 0.7296439 | 0 |
Define the routes for our monitor plugin extending the default API | Определите маршруты для нашего плагина монитора, расширяя стандартный API | public function register_routes() {
register_rest_route( 'wp-monitor-api/v1', '/server/info', array(
'methods' => 'GET',
'callback' => array( $this, 'get_server_info' ),
'permission_callback' => array( $this, 'permission_check' )
) );
register_rest_route( 'wp-monitor-api/v1', '/site/info', array(
'methods' => 'GET',
'callback' => array( $this, 'get_site_info' ),
'permission_callback' => array( $this, 'permission_check' )
) );
register_rest_route( 'wp-monitor-api/v1', '/site/themes', array(
'methods' => 'GET',
'callback' => array( $this, 'get_site_themes' ),
'permission_callback' => array( $this, 'permission_check' )
) );
register_rest_route( 'wp-monitor-api/v1', '/site/plugins', array(
'methods' => 'GET',
'callback' => array( $this, 'get_site_plugins' ),
'permission_callback' => array( $this, 'permission_check' )
) );
register_rest_route( 'wp-monitor-api/v1', '/site/users', array(
'methods' => 'GET',
'callback' => array( $this, 'get_site_users' ),
'permission_callback' => array( $this, 'permission_check' )
) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function routes() {\n\t\t\tregister_rest_route( static::$endpoint, '/spaceapi', array(\n\t\t\t\t'methods' => 'GET',\n\t\t\t\t'callback' => array( $this, 'spaceapi' ),\n\t\t\t) );\n\t\t}",
"function register_routes() {\n\t\tregister_rest_route( $this->namespace, $this->rest_base, array(\n\t\t\t'methods' ... | [
"0.7575502",
"0.7404092",
"0.7398836",
"0.7395488",
"0.7339797",
"0.73316395",
"0.7293375",
"0.72493094",
"0.7224423",
"0.71246827",
"0.7120302",
"0.7120178",
"0.7105793",
"0.7095954",
"0.70922714",
"0.7081176",
"0.70646137",
"0.7045128",
"0.70315397",
"0.702698",
"0.7025871"... | 0.80224013 | 0 |
Returns the ExpressionLanguage class if it is available. | Возвращает класс ExpressionLanguage, если он доступен. | protected function getExpressionLanguage()
{
if (null === $this->expressionLanguage) {
$this->expressionLanguage = new ExpressionLanguage();
$this->expressionLanguage->registerProvider(new DI\ExpressionLanguageProvider());
}
return $this->expressionLanguage;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getSecurity_ExpressionLanguageService()\n {\n $this->privates['security.expression_language'] = $instance = new \\Symfony\\Component\\Security\\Core\\Authorization\\ExpressionLanguage(($this->privates['cache.security_expression_language'] ?? $this->getCache_SecurityExpressionLanguageSe... | [
"0.6728704",
"0.63287944",
"0.6325299",
"0.6294066",
"0.6107579",
"0.59818983",
"0.59156966",
"0.5912474",
"0.5857566",
"0.5833174",
"0.58077973",
"0.5778217",
"0.5778217",
"0.5776996",
"0.5776718",
"0.5773323",
"0.5769653",
"0.57607335",
"0.57607335",
"0.57607335",
"0.576073... | 0.8009451 | 0 |
Store a newly created resource in storage. POST /organisationtypes | Хранение только что созданного ресурса в хранилище. POST /organisationtypes | public function store()
{
if($this->orgTypes->store()) {
return Redirect::route('organisations.index');
} else {
return Redirect::back()->withErrors($this->orgTypes->get_errors());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store(Request $request)\n {\n Organisation::query()->create([\n 'id' => Str::uuid(),\n 'slug' => $request->slug,\n 'name' => $request->name,\n 'email' => $request->email,\n 'tel' => $request->tel,\n 'address' => $request->a... | [
"0.710082",
"0.7004829",
"0.68765527",
"0.678752",
"0.677896",
"0.6660577",
"0.6655524",
"0.6649523",
"0.6641756",
"0.6637194",
"0.6603866",
"0.6599321",
"0.6581114",
"0.654551",
"0.6529252",
"0.65184087",
"0.6513292",
"0.65045327",
"0.64845806",
"0.6468028",
"0.6467365",
"... | 0.71496105 | 0 |
/ This method will be used to friend requests from several different sources ( forms, other URLs, etc ) When being sent from another URL, it will pass the $request parameter here, so check for that first. Note that $request passed to toolbox helper below can be either a single member id or an array of member id's | // Этот метод будет использоваться для обработки запросов на дружбу из нескольких различных источников (форм, других URL и т.д.). При отправке из другого URL он передаёт параметр $request здесь, поэтому сначала проверьте его. Примечание: $request, передаваемый вспомогательной функции toolbox ниже, может быть либо одним идентификатором члена, либо массивом идентификаторов членов | public function request($request = NULL)
{
if (!is_null($request))
{
$data['friends'] = $request;
$this->toolbox('friends')->send_request($request);
$this->request_sent($data['friends']);
}
elseif ($_POST)
{
$data['friends'] = $_POST;
$this->toolbox('friends')->send_request($_POST);
$this->request_sent($data['friends']);
}
elseif (isset($this->route->param1) && !empty($this->route->param1))
{
$data['friends'] = $this->route->param1;
$userid = $this->model('Member')->get_member_id($this->route->param1);
$this->toolbox('friends')->send_request($userid);
$this->request_sent($data['friends']);
}
else
{
$this->index();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function sendFriendRequestAction() {\n\t\t/* @var $user User */\n\t\t/* @var $targetFriend User */\n\t\t/* @var $sentRequest FriendRequest */\n\n\t\t$response = 'Invalid XmlHttpRequest.';\n\t\tif ($this->getRequest()->isXmlHttpRequest()) {\n\t\t\t$em = $this->getEntityManager();\n\n\t\t\t$userId = $this->zf... | [
"0.6378294",
"0.63318855",
"0.62945056",
"0.61871606",
"0.61634314",
"0.6159824",
"0.6117339",
"0.60938424",
"0.607688",
"0.60200155",
"0.5972212",
"0.59410894",
"0.5905369",
"0.58546454",
"0.58525205",
"0.5840054",
"0.5838752",
"0.583439",
"0.58238554",
"0.5807351",
"0.58057... | 0.75148004 | 0 |
/ In this little assignment you are given a string of space separated numbers, and have to return the highest and lowest number. | В этом небольшом задании вы получаете строку чисел, разделенных пробелами, и должны вернуть наибольшее и наименьшее число. | function highAndLow($numbers)
{
$numbers = explode(' ', $numbers);
$high = $numbers[0];
$low = $numbers[0];
foreach ($numbers as $num) {
if ($high < $num) {
$high = $num;
}
if ($low > $num) {
$low = $num;
}
}
return $high . ' ' . $low."\n";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function find_min_max($mas)\n{\n sort($mas);\n print_r('max: ' . end($mas) . ', min: ' . $mas[0]);\n}",
"function high($x){\r\n $highest = 0;\r\n $word;\r\n $x = explode(\" \",$x);\r\n $alpha = \"abcdefghijklmnopqrstuvwxyz\";\r\n $alpha = str_split($alpha);\r\n foreach ($x as $item){\r\n ... | [
"0.7024866",
"0.62246126",
"0.6110646",
"0.6028224",
"0.59571874",
"0.5802386",
"0.575116",
"0.5745352",
"0.56577235",
"0.5584622",
"0.55303377",
"0.5526402",
"0.55255896",
"0.552484",
"0.5481416",
"0.5463061",
"0.5446235",
"0.5416802",
"0.5391124",
"0.5385535",
"0.53616077",... | 0.70999056 | 0 |
Construct This function preloads the CodeIgniter framework, and loads the bitcoin library, providing access to the bitcoin daemon JSON interface. | Этот метод загружает фреймворк CodeIgniter, а также загружает библиотеку bitcoin, предоставляя доступ к JSON-интерфейсу деймона bitcoin. | public function __construct() {
$this->CI = &get_instance();
$this->CI->load->library('bw_bitcoin');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('cart_model');\n\t\t$this->load->model('products_model');\n\t\t$this->load->model('users_model');\n\t\t$this->load->model('order_model');\n\t\t$paypal_details = array(\n\t\t\t'API_username' => 'poxos.poxosyan01-facilitator_api1.gmail.com',... | [
"0.60905474",
"0.60828924",
"0.60741925",
"0.6068315",
"0.60607177",
"0.6047917",
"0.6004242",
"0.60019004",
"0.59825295",
"0.5969729",
"0.5960394",
"0.5955187",
"0.5953518",
"0.5946974",
"0.5905184",
"0.59002715",
"0.5895472",
"0.5885379",
"0.58793676",
"0.58745354",
"0.5874... | 0.75105673 | 0 |
Add Input This function takes a $transaction_id, and the specified $vout to create an input for a transaction. Extra parameters, like the redeemScript can be supplied in the $extras array. The function will attempt to get the scriptPubKey from the previous transaction. The total amount of BTC specified in inputs is recorded in the objects $input_count variable. | Добавить вход. Эта функция принимает $transaction_id и указанный $vout для создания входа для транзакции. Дополнительные параметры, такие как redeemScript, могут быть переданы в массив $extras. Функция попытается получить scriptPubKey из предыдущей транзакции. Общая сумма BTC, указанная в входах, записывается в переменную $input_count объекта. | public function add_input($transaction_id, $vout, $extras = array()) {
// Get the raw transaction from the network
$transaction = $this->CI->bw_bitcoin->getrawtransaction($transaction_id);
$decode = $this->CI->bw_bitcoin->decoderawtransaction($transaction);
// Scan for the specified $vout and get the scriptPubKey and value.
foreach($decode['vout'] as $output_v => $output) {
if($output_v == $vout){
$scriptPubKey = $output['scriptPubKey']['hex'];
$value = $output['value'];
break;
}
}
// Add the value of the input to $input_count.
$this->input_count += $value;
$tmp = array( 'txid' => $transaction_id,
'vout' => (int)$vout,
'scriptPubKey' => $scriptPubKey);
// Add extra parameters.
foreach($extras as $key => $extra){
$tmp[$key] = $extra;
}
// Add the transaction to the inputs array.
$this->inputs[] = $tmp;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createRawTransaction($input)\n {\n return $this->getBlockChainSdkObj()->createRawTransaction($input);\n }",
"function addInput($name, $input) {\r\n\t\tarray_push($this->inputs, ['n' => $name, 'i' => $input]);\r\n\t}",
"function slAddTransaction($invid, $chartid, $amount, $date, ... | [
"0.49824896",
"0.49787664",
"0.48923358",
"0.47479492",
"0.4682532",
"0.45029622",
"0.4476755",
"0.4448868",
"0.4410104",
"0.4409107",
"0.43994552",
"0.43838423",
"0.437285",
"0.4332489",
"0.42695352",
"0.42286265",
"0.42143384",
"0.41937834",
"0.4191417",
"0.41771874",
"0.41... | 0.83207476 | 0 |
Add Output This function takes the $address and $value of the output, and records the value in $output_count, and the transaction output in $outputs. | Добавить выходную запись. Эта функция принимает $address и $value выходной записи, записывает значение в $output_count и транзакционную выходную запись в $outputs. | public function add_output($address, $value) {
$this->outputs[$address] = (float)$value;
$this->output_count += $value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addOutputs(\\google\\genomics\\v1alpha2\\RunPipelineArgs\\OutputsEntry $value){\n return $this->_add(3, $value);\n }",
"function addOutput(Output\\iOutput $output) {\n $this->_outputs->attach($output);\n }",
"public function add(string $output): void\n {\n $this->stdO... | [
"0.6406878",
"0.58108807",
"0.5695056",
"0.5112511",
"0.49316478",
"0.49304086",
"0.48581415",
"0.4846987",
"0.48314473",
"0.47714683",
"0.47249654",
"0.47246104",
"0.47006062",
"0.46806225",
"0.46781087",
"0.46572918",
"0.4641597",
"0.4639671",
"0.46031076",
"0.4591081",
"0.... | 0.8044032 | 0 |
Remaining Fee Subtract the $output_count from the $input_count to obtain the fee to be paid for this transaction. | Оставшаяся плата Вычтите $output_count из $input_count, чтобы определить плату, которую нужно уплатить за эту транзакцию. | public function remaining_fee() {
return $this->input_count-$this->output_count;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRemainingTotal();",
"public function get_remaining_refund_amount()\n {\n }",
"public function deductCash()\n\t{\n\t\t$check_bal = \"SELECT * FROM users WHERE\";\n\t\t$check_bal .= \"(code = '\".$this->code.\"')\";\n\t\t$check_bal_query = mysqli_query($this->plug, $check_bal);\n... | [
"0.58671796",
"0.57076675",
"0.5554236",
"0.5458176",
"0.5432087",
"0.5388052",
"0.53790885",
"0.52883303",
"0.5261652",
"0.5219623",
"0.5205422",
"0.5195919",
"0.51935726",
"0.5159297",
"0.5135841",
"0.51299304",
"0.5126278",
"0.50840944",
"0.50788057",
"0.50576544",
"0.5045... | 0.7927157 | 0 |
Generate This function returns the inputs and outputs for the transaction as an array. This is suitable for use with the jsonRPCclient to create the transaction using the bitcoin daemon. | Эта функция возвращает входы и выходы транзакции в виде массива. Это удобно для использования с jsonRPCclient для создания транзакции с помощью биткойн-демона. | public function generate() {
$output = array('inputs' => $this->inputs,
'outputs' =>$this->outputs);
$this->inputs = array();
$this->outputs = array();
$this->input_count = 0.00000000;
$this->output_count = 0.00000000;
return $output;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function generate(): array;",
"public function createBatch()\n {\n $dom = new \\DOMDocument('1.0', 'utf-8');\n $dom->formatOutput = true;\n\n $trans_request_element = $dom->createElement(self::TRANS_REQUEST);\n $trans_request_node = $dom->appendChild($trans_request_element);... | [
"0.59086597",
"0.5857279",
"0.5844452",
"0.5827155",
"0.5790866",
"0.5787204",
"0.57118046",
"0.5636668",
"0.5626737",
"0.56180525",
"0.560739",
"0.5571848",
"0.55699533",
"0.55545104",
"0.55545104",
"0.55545104",
"0.55545104",
"0.55545104",
"0.55545104",
"0.55545104",
"0.555... | 0.7010442 | 0 |
float shoulder_mode_scale = 5; | float shoulder_mode_scale = 5; | public function getShoulderModeScale()
{
return $this->shoulder_mode_scale;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setShoulderModeScale($var)\n {\n GPBUtil::checkFloat($var);\n $this->shoulder_mode_scale = $var;\n }",
"public function hasShoulderModeScale()\n {\n return $this->shoulder_mode_scale !== null;\n }",
"function change_scale($factor = 2)\n {\n }",
"function... | [
"0.67824674",
"0.65198386",
"0.5774242",
"0.5721195",
"0.56105644",
"0.5454176",
"0.54485875",
"0.540493",
"0.5247891",
"0.52439696",
"0.51980203",
"0.51649314",
"0.5150087",
"0.50944847",
"0.50642884",
"0.5060614",
"0.4983244",
"0.49644008",
"0.49630672",
"0.49627912",
"0.49... | 0.7526219 | 0 |
Used to count retries. | Используется для подсчета повторных попыток. | public function getRetryCount(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function incrementRetryCount(): void\n {\n $this->retryCount++;\n }",
"public function getRetryCount(): int\n {\n return $this->retryCount;\n }",
"public function getRetries(): int\n {\n return $this->retries;\n }",
"public function getRetryCount()\n {\n ... | [
"0.7977657",
"0.7918821",
"0.7737129",
"0.77072006",
"0.7391992",
"0.7291698",
"0.7243651",
"0.7243651",
"0.72139525",
"0.7146933",
"0.713276",
"0.70447487",
"0.7032173",
"0.69683105",
"0.6894708",
"0.6881442",
"0.675095",
"0.6744396",
"0.6732204",
"0.6715948",
"0.6701734",
... | 0.8542855 | 0 |
Object To Array Transforme un objet en tableau multidimensionnel | Объект в массив Преобразует объект в многомерный массив | function object_to_array($data){
if(is_array($data) || is_object($data)){
$result = array();
foreach($data as $key => $value) {
$result[$key] = $this->object_to_array($value);
}
return $result;
}
return $data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function to_array(){\n\t\t\t$datos=get_object_vars($this);\n\t\t\treturn $datos;\n\t\t}",
"function object_to_array($obj)\r\n {\r\n $_arr = is_object($obj) ? get_object_vars($obj) : $obj;\r\n foreach ($_arr as $key => $val)\r\n {\r\n $val = (is_array($val) || is_object($... | [
"0.74113727",
"0.7249905",
"0.71675295",
"0.7098321",
"0.7070412",
"0.70436305",
"0.69854754",
"0.69854754",
"0.69854754",
"0.69854754",
"0.6976874",
"0.6975768",
"0.69503623",
"0.69417524",
"0.69333005",
"0.6904827",
"0.68989706",
"0.68576205",
"0.6853244",
"0.6834223",
"0.6... | 0.7358551 | 1 |
Fix fontawesome enqueuing in Legenda | Исправить подключение fontawesome в Legenda | function adelman_font_awesome() {
wp_dequeue_style('et-font-awesome');
wp_deregister_style('et-font-awesome');
wp_enqueue_style('et-font-awesome', get_template_directory_uri().'/css/font-awesome.css', array());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function redux_queue_font_awesome() {\n wp_register_style( 'fontawesome', get_template_directory_uri() . '/assets/css/fontawesome.css', array(), time(), 'all' );\n wp_enqueue_style( 'fontawesome' );\n}",
"public function admin_enqueue_fontawesomeBlock(){\n\t\t}",
"function add_font_awesome() {\n\twp_enqu... | [
"0.68827754",
"0.66817015",
"0.6627739",
"0.6536918",
"0.6505071",
"0.64945185",
"0.6429789",
"0.6412869",
"0.63269",
"0.6278109",
"0.62102866",
"0.6143529",
"0.6093494",
"0.6072825",
"0.60266995",
"0.59729517",
"0.5942943",
"0.59390295",
"0.5906922",
"0.5888634",
"0.5869663"... | 0.70618933 | 0 |
// ! Product Labels // | // ! Метки продуктов // | function etheme_wc_product_labels( $product_id = '' ) {
echo etheme_wc_get_product_labels($product_id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function default_template_product_label()\r\n{\r\n$template = '\n{if $label.html}\n<span class=\"label html\">{$label.html}</span>\r\n{else}\n<span class=\"label {$label.alias}\">{lang}{$label.name}{/lang}</span>\n{/if}\r\n';\t\t\r\n\r\nreturn $template;\r\n}",
"function wc_attribute_label($name, $product = '')\... | [
"0.732753",
"0.72541",
"0.69028217",
"0.69013864",
"0.68912846",
"0.68912846",
"0.68912846",
"0.68912846",
"0.68912846",
"0.68912846",
"0.68912846",
"0.68912846",
"0.68912846",
"0.68912846",
"0.68912846",
"0.68912846",
"0.68912846",
"0.68912846",
"0.68912846",
"0.68912846",
"... | 0.7473159 | 0 |
Hide the add to cart button if an item is reserved | Скрыть кнопку "Добавить в корзину", если товар зарезервирован | function adelman_hide_add_to_cart_for_reserved($product) {
global $product;
$reserved = get_field('reserved', $product->get_id());
$is_in_stock = $product->is_in_stock();
if($reserved && $is_in_stock):
?>
<style>
button.etheme-simple-product.single_add_to_cart_button.button {
display: none;
}
</style>
<h4>This item is reserved</h4>
<?php
endif;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function so_cart_empty() {\n $this->to_show_offer_on_cart();\n }",
"public function disable_auto_add_to_cart()\n {\n add_filter('rp_wcdpd_add_free_product_to_cart', '__return_false', 999999);\n }",
"public function check_cart_items()\n {\n }",
"public function che... | [
"0.67039967",
"0.6479592",
"0.6413851",
"0.64127207",
"0.6387687",
"0.6363041",
"0.62291485",
"0.6221984",
"0.61732703",
"0.61706203",
"0.6165134",
"0.6119119",
"0.6095821",
"0.60654056",
"0.60498405",
"0.6047219",
"0.60327315",
"0.6005002",
"0.59522223",
"0.5945449",
"0.5897... | 0.8402927 | 0 |
Queries and paginates the users and loads the related loop template. | Запрашивает пользователей и выполняет их пагинацию, загружая связанный шаблон цикла. | function _hrb_loop_users() {
global $hrb_options;
if ( ! $hrb_options->users_frontpage ) {
return;
}
$params = array(
'number' => (int) $hrb_options->users_frontpage ,
'hrb_orderby' => 'rate',
);
$template_vars = array(
'users' => hrb_get_freelancers( $params ),
);
appthemes_load_template( 'parts/loop-' . HRB_FREELANCER_UTYPE . '.php', $template_vars );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function loadUsers()\n\t{\n\t\t$tpl = &singleton('template');\n\t\t$db = &singleton('database');\n\t\t\n\t\t$result = $db->query('SELECT COUNT(*) AS count FROM '.DB_PREFIX.'users');\n\t\t$row = $db->fetch($result);\n\t\t$count = $row['count'];\n\t\t$pageUrl = $this->genUrl($this->getUniqueName($this->page)... | [
"0.7050449",
"0.7045226",
"0.68338233",
"0.67888385",
"0.6764348",
"0.66742814",
"0.6656712",
"0.66178244",
"0.6587367",
"0.65534425",
"0.65215224",
"0.6499974",
"0.6491777",
"0.64916056",
"0.6482302",
"0.6470552",
"0.6470029",
"0.6439417",
"0.64242256",
"0.64202327",
"0.6403... | 0.718763 | 0 |
Return a list of text transformers. | Верните список преобразователей текста. | public function getTextTransformers() {
$text_transformers = [];
$definitions = $this->getDefinitions();
foreach ($definitions as $id => $definition) {
$text_transformers[$id] = $definition['name']->render();
}
return $text_transformers;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function transformers(): array\n {\n return [\n 'tags.*' => 'trim',\n 'title' => 'trim',\n 'due-date' => 'trim',\n 'status' => 'trim',\n 'description' => 'trim',\n ];\n }",
"public function transformers(): array\n {\n ret... | [
"0.6855882",
"0.64816666",
"0.6305814",
"0.59775674",
"0.5878703",
"0.5767942",
"0.5685453",
"0.5621716",
"0.5608434",
"0.5525477",
"0.5482041",
"0.5465555",
"0.5396529",
"0.5393715",
"0.53555393",
"0.53529996",
"0.53073984",
"0.5295085",
"0.5217052",
"0.5209584",
"0.51962477... | 0.81738484 | 0 |
Retrieve attachmentruleidx model with attachmentruleidx data | Получить модель attachmentruleidx с данными attachmentruleidx | public function getDataModel()
{
$attachmentruleidxData = $this->getData();
$attachmentruleidxDataObject = $this->attachmentruleidxDataFactory->create();
$this->dataObjectHelper->populateWithArray(
$attachmentruleidxDataObject,
$attachmentruleidxData,
AttachmentRuleIdxInterface::class
);
return $attachmentruleidxDataObject;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function readMetaDataIndex($model, $index);",
"public function getIndex()\n {\n return $this->recordModel->index;\n }",
"public final function readMetaDataIndex(ModelInterface $model, $index) {}",
"public function record(){\n\t\treturn NActiveRecord::model($this->model)->findByPk($this->m... | [
"0.54912645",
"0.5254092",
"0.5232064",
"0.51143813",
"0.5065795",
"0.50235105",
"0.4972372",
"0.49717912",
"0.49717912",
"0.49717912",
"0.49702945",
"0.49702945",
"0.49702945",
"0.49702945",
"0.49702945",
"0.49702945",
"0.48960832",
"0.48960832",
"0.48960832",
"0.48960832",
... | 0.7043911 | 0 |
Sends the RPC call to the elements RPC host. | Отправляет RPC-запрос на RPC-хост элементов. | public function send() {
// check if all data there
if (empty($this->payload['method'])) {
throw new \Exception('No elements RPC method called, aborting.');
}
// Prepare data structure, merge payload to args.
$this->args['body'] = json_encode($this->payload);
$response = wp_remote_post( $this->host, $this->args );
if (is_wp_error( $response )) {
throw new \Exception($response->get_error_message());
}
$response_code = wp_remote_retrieve_response_code( $response );
if ( $response_code !== 200) {
$response_data = json_decode(wp_remote_retrieve_body( $response ));
$error = '';
if (!empty($response_data->error)) {
$error = "({$response_data->error->code}) {$response_data->error->message}";
}
if (empty($error) && !empty($response['response']['message'])) {
$error = "({$response_code}) {$response['response']['message']}";
}
throw new \Exception('RPC error: ' . $error, $response_code);
}
return json_decode(wp_remote_retrieve_body( $response ));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function SendRPC() {\n $this->SendDebug(\"SENDRPC\", $this->ReadPropertyString(\"MyInstanceID\"), 0);\n try {\n // ttp://user:password@127.0.0.1:3777/api/\n $user = $this->ReadPropertyString(\"RPCUser\");\n $pass = $this->ReadPropertyString(\"RPCPass\");\n $host_port = $this->Read... | [
"0.6457096",
"0.59503204",
"0.5784254",
"0.5724112",
"0.5383193",
"0.53722745",
"0.53467685",
"0.53320795",
"0.5327375",
"0.53148043",
"0.5295616",
"0.5291001",
"0.52813876",
"0.52813876",
"0.52813876",
"0.52644634",
"0.52618825",
"0.5244586",
"0.52372336",
"0.52342004",
"0.5... | 0.7601657 | 0 |
get the provider name and the real id from parameter | получить имя провайдера и реальный идентификатор из параметра | private function get_provider_name_and_id( $param ) {
$param_parts = explode( ':',$param,2 );
return array(
'provider_name' => $param_parts[0],
'id' => $param_parts[1],
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getProviderId();",
"public function getProviderId()\n {\n return $this->getParameter('providerId');\n }",
"public function getProviderId(): ?string;",
"public function getProviderId(): ?string;",
"abstract public function getProviderName();",
"public function getProviderId()\... | [
"0.7834233",
"0.7507867",
"0.7381502",
"0.7381502",
"0.7166095",
"0.70909303",
"0.70599777",
"0.70599777",
"0.70599777",
"0.70599777",
"0.7042517",
"0.6966499",
"0.69608283",
"0.6958289",
"0.6942478",
"0.6903997",
"0.6816803",
"0.67711747",
"0.6604393",
"0.6595067",
"0.656929... | 0.77458006 | 1 |
metodo para poder cerrar la sesion del usuario | метод для возможности завершить сессию пользователя | function user_cerrar_sesion(){
global $generico;
//matamos la sesion del usuario
session_destroy();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function terminaSessioneUser() \n {\n $sessione = USingleton::getInstance('USession');\n $sessione->eliminaVariabileSessione('usernameLogIn');\n $sessione->eliminaVariabileSessione('loggedIn');\n $sessione->eliminaVariabileSessione('tipoUser');\n $sessione->eliminaVaria... | [
"0.7895492",
"0.76897967",
"0.75817615",
"0.75452536",
"0.74812984",
"0.74689674",
"0.7394569",
"0.7387934",
"0.73745304",
"0.7340767",
"0.7291028",
"0.7262124",
"0.72584474",
"0.7236983",
"0.7209097",
"0.7202385",
"0.71925086",
"0.7182635",
"0.7168453",
"0.71510226",
"0.7138... | 0.79233795 | 0 |
Asserts that none of the `$needles` can be found within the string `$haystack`. | Утверждает, что ни один из `$needles` не может быть найден в строке `$haystack`. | private static function assertContainsNone(array $needles, string $haystack): void
{
foreach ($needles as $needle) {
self::assertStringNotContainsString($needle, $haystack);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _no_bad_words($haystack){\n \n $needle = array(\n 'anus', 'arse', 'ass', 'bag', 'bait', 'bimbo', 'bitch', 'bite', 'blow', 'bollo', 'boner', 'boob', 'butt', 'chinc', 'chink', 'chode', 'clit', 'cock', 'coon', 'cum', 'cunt', 'damn', 'dick', 'dike', 'dildo', 'dooch', 'douche', 'dumb',... | [
"0.71033204",
"0.69510406",
"0.6755697",
"0.66995114",
"0.65704316",
"0.6502197",
"0.64873457",
"0.63595843",
"0.63415366",
"0.6321845",
"0.6184932",
"0.6183304",
"0.6172903",
"0.6117909",
"0.6098148",
"0.6068715",
"0.60626334",
"0.6046898",
"0.6007707",
"0.5984623",
"0.59482... | 0.8098748 | 0 |
Asserts that all of the `$needles` can be found within the string `$haystack`. | Проверяет, что все `$needles` можно найти внутри строки `$haystack`. | private static function assertContainsAll(array $needles, string $haystack): void
{
foreach ($needles as $needle) {
self::assertStringContainsString($needle, $haystack);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function needles_in_haystack($haystack, $needles) {\n $count = 0;\n $pos = false;\n\n foreach ($needles as $needle) {\n # Case insensitive match\n $pos = stripos($haystack, $needle);\n #$pos = mb_stripos($haystack, $needle);\n // Note the spec... | [
"0.71329576",
"0.7059548",
"0.6926887",
"0.6922383",
"0.68562716",
"0.6846881",
"0.6846173",
"0.67596567",
"0.6689736",
"0.6666685",
"0.6650168",
"0.66433066",
"0.66415316",
"0.6640213",
"0.6628974",
"0.66213113",
"0.66213113",
"0.66011906",
"0.65958625",
"0.6567556",
"0.6566... | 0.8256978 | 0 |
Asserts that the number of occurrences of `$needle` within the string `$haystack` is as expected. | Проверяет, что количество вхождений `$needle` в строку `$haystack` соответствует ожидаемому. | private static function assertSubstringCount(int $expectedCount, string $haystack, string $needle): void
{
self::assertSame(
$expectedCount,
\substr_count($haystack, $needle),
'asserting \'' . $haystack . '\' contains ' . (string)$expectedCount . ' instance(s) of "' . $needle . '"'
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function coutOccurences($haystack, $needle)\n {\n return substr_count($haystack, $needle);\n }",
"protected function assertStringContains(string $needle, string $haystack, string $message = '')\n {\n $this->assertTrue(strpos($haystack, $needle) !== false, $message);\n }",
... | [
"0.70552534",
"0.6517936",
"0.6304949",
"0.62822837",
"0.61590165",
"0.6002815",
"0.59930927",
"0.5912848",
"0.59009635",
"0.58279884",
"0.57372797",
"0.57321054",
"0.57316285",
"0.56997824",
"0.5642642",
"0.55701774",
"0.5534355",
"0.55338275",
"0.55076426",
"0.5483171",
"0.... | 0.79461056 | 0 |
Checks whether a given name is a LDAP uid or not. This depends on the thesis specific assumption that the name begins with ITM_COURSES_LDAP_PREFIX (which is defaulty set to 'ldap:'). | Проверяет, является ли заданное имя LDAP uid или нет. Это зависит от специфической гипотезы, согласно которой имя начинается с ITM_COURSES_LDAP_PREFIX (по умолчанию установлено в 'ldap:'). | public function isLdapName($name)
{
return strpos($name, ITM_COURSES_LDAP_PREFIX) === 0 || $name == '';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkfor_accname($un, $accname = '')\n {\n list ($exists) = mysql_fetch_row($this->query('SELECT accid FROM '.$this->DB['tbl_profiles'].' WHERE accname=\"'.mysql_escape_string($accname).'\"'));\n return ($exists) ? $exists : false;\n }",
"function is_dyndns_username($uname) {\... | [
"0.6322466",
"0.59351075",
"0.5880264",
"0.5827903",
"0.57957774",
"0.5773008",
"0.572733",
"0.56916237",
"0.56711257",
"0.5648512",
"0.5609817",
"0.55989236",
"0.5594122",
"0.5576204",
"0.55421424",
"0.5495381",
"0.54766864",
"0.5467871",
"0.54628074",
"0.54615283",
"0.54601... | 0.70717734 | 0 |
Returns true if connection has default return function. | Возвращает true, если соединение имеет функцию возврата по умолчанию. | public function hasDefaultReturnFunction()
{
return $this->defaultReturnFunction;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final public function isDefault(): bool {}",
"public function hasDefault(): bool\n {\n }",
"public function hasDefault(): bool;",
"public function isDefault();",
"public function isDefault();",
"public function isDefault();",
"public function hasDefault()\n {\n return false;\n }",
... | [
"0.6979718",
"0.6944992",
"0.6900033",
"0.66995436",
"0.66995436",
"0.66995436",
"0.6692036",
"0.6479975",
"0.6476295",
"0.6471895",
"0.6429019",
"0.6338606",
"0.63344926",
"0.63141114",
"0.631298",
"0.6305626",
"0.62775594",
"0.6255594",
"0.6247984",
"0.6247984",
"0.6247984"... | 0.8191638 | 0 |
Crea los GrupoPeriodos del TemaPeriodo | Создайте GrupoPeriodos из TemaPeriodo | public function crearGrupos(){
$cuantosGrupos = $this->getTema()->getNumeroGrupos();
$disponibles = $this->getTema()->getGrupos()->count();
if($cuantosGrupos == $disponibles){
for($numero = 0; $numero<=$disponibles-1; $numero++){
$grupo = $this->getTema()->getGrupos()->get($numero);
$ge = new GrupoPeriodo();
$ge->setTema($this);
$ge->setGrupo($grupo);
$this->addGrupoPeriodo($ge);
$ge->crearPreguntas();
}
}
else{
$posiciones = Utilerias::selecionarAleatorio($cuantosGrupos, $disponibles);
for($numero = 0; $numero<=$disponibles-1; $numero++){
if( $posiciones[$numero] == 1 ){
$grupo = $this->getTema()->getGrupos()->get($numero);
$ge = new GrupoPeriodo();
$ge->setTema($this);
$ge->setGrupo($grupo);
$this->addGrupoPeriodo($ge);
$ge->crearPreguntas();
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function crearNotasDivision(){\n $notasPeriodo=NotaPeriodo::join('periodo','nota_periodo.fk_periodo','=','periodo.pk_periodo')->where('periodo.ano',date('Y'))->get();\n foreach ($notasPeriodo as $i) {\n NotaDivision::create(['fk_division'=>$this->pk_division,'fk_nota_periodo'=>$i->pk_nota_p... | [
"0.6434106",
"0.6125171",
"0.59721357",
"0.58708876",
"0.5826065",
"0.5795041",
"0.57296765",
"0.57201755",
"0.5696676",
"0.5666703",
"0.566196",
"0.5661508",
"0.5636314",
"0.56002635",
"0.5569682",
"0.55645394",
"0.5558027",
"0.55340886",
"0.5481283",
"0.54709625",
"0.544929... | 0.7675006 | 0 |
Pdfcrowd PHP API download callback. | Pdfcrowd PHP API обратный вызов загрузки. | function pdfcrowd_drush_download() {
$library = libraries_load('pdfcrowd');
$path = 'sites/all/libraries/pdfcrowd';
$url = $library['download url'];
// Download and extract library.
if (($tmp = drush_download_file($url)) && drush_tarball_extract($tmp, $path)) {
drush_log(dt('Pdfcrowd PHP API has been downloaded to @path', array('@path' => $path)), 'success');
}
else {
drush_log(dt('Drush was unable to download Pdfcrowd PHP API to @path', array('@path' => $path)), 'error');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function downloadPdf(){\n }",
"function download_pdf() {\n\t$result = get_mcpdf_nid();\n\t$node_load = node_load($result);\n\t\n\t$path = $node_load->field_generated_pdf['und'][0]['uri'];\n\t$file_name = $node_load->field_generated_pdf['und'][0]['filename'];\n\t$url = file_create_url($path);\n\t//$... | [
"0.7484169",
"0.69301456",
"0.6859059",
"0.67668295",
"0.65761536",
"0.65261805",
"0.6391454",
"0.6322819",
"0.62876385",
"0.6240012",
"0.62097776",
"0.6135869",
"0.61195606",
"0.60968214",
"0.6094805",
"0.6070283",
"0.6036344",
"0.603415",
"0.6027426",
"0.60259485",
"0.60093... | 0.70808053 | 1 |
Get all virtual controllers. | Получить все виртуальные контроллеры. | protected function getVirtualControllers() {
return DataObjectCoach_Container::get()->filter('Controller', TRUE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getControllers()\n {\n return $this->controllers;\n }",
"public static function get_controllers()\n\t{\n\t\treturn Api_Utils::get_handlers('classes/controller');\n\t}",
"protected function listControllers()\n {\n $arr = array();\n foreach (self::$controllerPaths as $path) {\... | [
"0.7147156",
"0.70539856",
"0.69268715",
"0.69226754",
"0.6921563",
"0.68692327",
"0.68060255",
"0.671547",
"0.6611082",
"0.646335",
"0.6459313",
"0.6275349",
"0.6264942",
"0.6233987",
"0.6216185",
"0.6206749",
"0.6206749",
"0.6189939",
"0.61640704",
"0.613104",
"0.6068219",
... | 0.8504501 | 0 |
Generate all the Virtual classes. | Сгенерировать все виртуальные классы. | protected function createVirtualClasses() {
// Go through all of the virtual classes.
foreach ($this->getVirtualClasses() as $class) {
// Prepare variables.
$name = $class->RawClassName;
$parent = $class->RawParent;
if (!$parent) {
$parent = 'DataObject';
}
// Make it.
if (!class_exists($name)) {
$this->createClass($name, $parent);
}
// ...add to the class list.
$this->updateManifestList($name, $parent);
}
// Go through all the virtual controllers.
foreach ($this->getVirtualControllers() as $control) {
// Prepare variables.
$name = sprintf('%s_Controller', $control->RawClassName);
$parent = sprintf('%s_Controller', $control->RawParent);
if (!class_exists($parent)) {
$parent = 'ContentController';
}
// If it doesn't already exist...
if (!class_exists($name)) {
$this->createClass($name, $parent);
}
// ...add to the class list.
$this->updateManifestList($name, $parent);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function generate()\n\t{\n\t\t// overwrite in parent classes\n\t}",
"public function getVirtualTypes();",
"function get_all_virtual_classes()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('virtual_classes')->result_array();\n }",
"public static function generateS... | [
"0.64373976",
"0.61628646",
"0.60857517",
"0.605147",
"0.60257995",
"0.5907839",
"0.5898814",
"0.5783797",
"0.5485168",
"0.54673004",
"0.5378512",
"0.52756137",
"0.52578294",
"0.52368593",
"0.52233845",
"0.52142125",
"0.52078825",
"0.5165777",
"0.51508266",
"0.5140807",
"0.51... | 0.78508043 | 0 |
Generic config for has_one field. | Общая конфигурация для поля has_one. | protected function createHasOneField($config, $name, $field) {
// Prepare variables.
$hasone = $config->get($name, 'has_one');
$fieldname = $field->RawName;
$fieldclass = $field->RawClassName;
// Add it to the list, or update.
if ($fieldname && $fieldclass) {
$hasone[$fieldname] = $fieldclass;
}
// Update configuration.
$config->update($name, 'has_one', $hasone);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function relationshipHasOne(): HasOne\n {\n return $this->hasOne(Model::class, 'xxx_id');\n }",
"public function testHasOneCanBeSetAsOptiona()\n {\n $this->assertFalse((new HasOneAssociation('book'))->required(false)->isRequired());\n }",
"public function hasOne(Model|string $r... | [
"0.6045367",
"0.58381295",
"0.57980144",
"0.56915694",
"0.56675696",
"0.56379706",
"0.56343096",
"0.55947405",
"0.5571763",
"0.55701905",
"0.55217767",
"0.5437321",
"0.54178405",
"0.5414804",
"0.5399163",
"0.53542",
"0.5302629",
"0.52615166",
"0.52547485",
"0.5246509",
"0.520... | 0.7040762 | 0 |
Generate config for a many_many field. | Создать конфиг для поля many_many. | protected function createManyManyField($config, $name, $field) {
// Prepare variables.
$manymany = $config->get($name, 'many_many');
$manymanyextra = $config->get($name, 'many_many_extraFields');
$fieldname = $field->RawName;
$fieldclass = $field->RawClassName;
$extraname = $field->ExtraFieldName;
$extratype = $field->ExtraFieldType;
// Add it to the list, or update.
if ($fieldname && $fieldclass) {
$manymany[$fieldname] = $fieldclass;
}
if ($extraname && $extratype) {
$manymanyextra[$extraname] = $extratype;
}
// Update configuration.
$config->update($name, 'many_many', $manymany);
$config->update($name, 'many_many_extraFields', $manymanyextra);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createHasManyField($config, $name, $field) {\n\t\t// Prepare variables.\n\t\t$hasmany = $config->get($name, 'has_many');\n\t\t$fieldname = $field->RawName;\n\t\t$fieldclass = $field->RawClassName;\n\n\t\t// Add it to the list, or update.\n\t\tif ($fieldname && $fieldclass) {\n\t\t\t$hasmany[$fi... | [
"0.64666426",
"0.5831825",
"0.56673795",
"0.5438258",
"0.5438258",
"0.53919464",
"0.53919464",
"0.53297454",
"0.5327541",
"0.5271993",
"0.52311015",
"0.5155666",
"0.5129612",
"0.5122503",
"0.5003906",
"0.49988905",
"0.4973701",
"0.49518427",
"0.49478084",
"0.49180716",
"0.488... | 0.7208018 | 0 |
Checks if a "stop" file exists for this queue. If a stop files exists, then processing of further jobs is suspended and a "stopped" file is created | Проверяет, существует ли файл "stop" для этой очереди. Если файл stop существует, то обработка дальнейших заданий приостановлена и создается файл "stopped" | protected function checkRun($queue)
{
$baseFileName = $queue ? $queue : "default";
$stopFilePath = Yii::getPathOfAlias("application.runtime")."/jobs/{$baseFileName}_stop";
$stoppedFilePath = Yii::getPathOfAlias("application.runtime")."/jobs/{$baseFileName}_stopped";
if (file_exists($stopFilePath))
{
touch($stoppedFilePath);
throw new Exception("Stop file exists");
}
else
{
if (file_exists($stoppedFilePath))
{
unlink($stoppedFilePath);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function shouldStop()\n {\n if (file_exists($this->config->getSoftStopFilePath())) {\n $rawPid = file_get_contents($this->config->getSoftStopFilePath());\n if (false !== $rawPid && is_numeric($rawPid)) {\n if (intval($rawPid) === $this->getPid()) {\n ... | [
"0.64362645",
"0.60052747",
"0.5970596",
"0.5970596",
"0.5970596",
"0.58682144",
"0.5652621",
"0.5638293",
"0.55366355",
"0.551135",
"0.5431657",
"0.54135656",
"0.5402177",
"0.53942883",
"0.5391488",
"0.53829813",
"0.5366755",
"0.5334736",
"0.5334736",
"0.5334736",
"0.5317004... | 0.716198 | 0 |
Returns whether the caption will be rendered | Возвращает, будет ли надпись отображаться | public function renderCaption()
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function has_caption() {\n\t\tif ( isset( $this->data['caption'] ) && $this->data['caption'] !== '' ) {\n\t\t\treturn true;\n\t\t} \n\n\t\treturn false;\n\t}",
"public function getCaptionShown()\n {\n return ($this->Caption && !$this->HideCaption);\n }",
"public function getTitleShownAft... | [
"0.8140201",
"0.78301865",
"0.7391077",
"0.73707974",
"0.7306785",
"0.7051687",
"0.6894051",
"0.6612527",
"0.66034305",
"0.65515363",
"0.6527297",
"0.6516663",
"0.6497626",
"0.6403337",
"0.6388014",
"0.63149476",
"0.62594163",
"0.62200475",
"0.6217426",
"0.61821324",
"0.61716... | 0.8343521 | 0 |
method to fetch Election levels on table `comelec_election_level` | метод для получения уровней выборов из таблицы `comelec_election_level` | function fetchElectionLevels(){
$sql = "SELECT cel.election_level_id,
cel.election_level_name
FROM comelec_election_level cel
/* WHERE cel.election_level_id !=3 */
ORDER BY cel.election_level_order";
$res = $this->conn->Execute($sql);
$retVal = array();
while(!$res->EOF){
$retVal[] = $res->fields;
$res->MoveNext();
}
return $retVal;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getConnectedLevels()\n {\n $tableName = \"levels,competitions,judges_levels\";\n $options = array(\"levels.id\" => \"level_id\", \"competitions.id\" => \"competition_id\");\n\n $result = $this->select($tableName, $options);\n\n return $result->fetchAll(PDO::FETCH_ASSOC);\n ... | [
"0.6735227",
"0.6565979",
"0.6524678",
"0.6427916",
"0.6365371",
"0.63515097",
"0.62263817",
"0.6179454",
"0.61452687",
"0.6135717",
"0.61330485",
"0.6129979",
"0.6066275",
"0.6037676",
"0.6004207",
"0.59578013",
"0.5951578",
"0.59490997",
"0.58788276",
"0.5876376",
"0.585361... | 0.80177265 | 0 |
Returns the value of field link_title | Возвращает значение поля link_title | public function getLinkTitle()
{
return $this->link_title;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getTitlelink() {\n\t\treturn $this->get(\"titlelink\");\n\t}",
"function getTitle($link, $att_title){\n if($this->html_content==''){\n $html = file_get_html($link);\n $this->html_content = $html;\n }else{\n $html = $this->html_content;\n }\n\n ... | [
"0.78954107",
"0.70744246",
"0.70052195",
"0.6892375",
"0.68894666",
"0.6850353",
"0.6786007",
"0.674985",
"0.67188245",
"0.67021674",
"0.6699252",
"0.6699252",
"0.6699252",
"0.6693483",
"0.6686984",
"0.66832536",
"0.6666806",
"0.66571337",
"0.66571337",
"0.6654217",
"0.66473... | 0.82526875 | 0 |
Returns the value of field link_url | Возвращает значение поля link_url | public function getLinkUrl()
{
return $this->link_url;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getlinkUrl() {\n\t\treturn($this->linkUrl);\n\t}",
"protected function _get_link() {\n return ($this->__link);\n }",
"public function getLinkUrl()\n {\n return $this->linkUrl;\n }",
"public function getLink()\r\r\n {\r\r\n return $this->getProperty('link');\r\r\n }",
"... | [
"0.77001196",
"0.7657115",
"0.7654955",
"0.7651608",
"0.7559403",
"0.75576234",
"0.7528787",
"0.75240463",
"0.7508822",
"0.7508822",
"0.74996704",
"0.74996704",
"0.74996704",
"0.74996704",
"0.74996704",
"0.74996704",
"0.74996704",
"0.74996704",
"0.74996704",
"0.74996704",
"0.... | 0.790987 | 0 |
Returns the value of field link_pic | Возвращает значение поля link_pic | public function getLinkPic()
{
return $this->link_pic;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getImageLink()\n {\n return $this->imageLink;\n }",
"function getImage(){\n\t\treturn $this->imageLink;\n\t}",
"public function getPicUrl()\r\n {\r\n return $this->getAttr('PicUrl');\r\n }",
"public function get_image_link()\n {\n }",
"public function getImageLink()\... | [
"0.73299974",
"0.72875494",
"0.7078636",
"0.68465644",
"0.67659354",
"0.674623",
"0.6720801",
"0.6720801",
"0.6682943",
"0.6635507",
"0.6634607",
"0.65967923",
"0.6589286",
"0.6583071",
"0.65762126",
"0.6482506",
"0.64661014",
"0.6435394",
"0.6413841",
"0.63883865",
"0.634597... | 0.83306557 | 0 |