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
Returns an array with the index as the ID and the description and abbreviate as an array value, for all the units in the database
Возвращает массив с индексом как идентификатором и описанием и сокращением в качестве массива значений для всех единиц измерения в базе данных
function getUnits() { global $DB_LINK, $db_table_units; $units = array(); $sql = "SELECT unit_id, unit_desc, unit_abbr FROM $db_table_units"; $rc = $DB_LINK->Execute($sql); DBUtils::checkResult($rc, NULL, NULL, $sql); while (!$rc->EOF) { $id = $rc->fields['unit_id']; $units[$id] = array( $rc->fields['unit_desc'], $rc->fields['unit_abbr'] ); $rc->MoveNext(); } return $units; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUnitValues()\n {\n /*$measures = ArrayHelper::map(Measurement::find()->all(), 'short_name',\n function(Measurement $data) use (&$results){\n $results[$data->type][$data->short_name] = $data->name;\n return $data->name;\n ...
[ "0.72249514", "0.6745829", "0.6559449", "0.6483706", "0.64606225", "0.6385383", "0.63387585", "0.63038754", "0.6272056", "0.61960435", "0.6069544", "0.6053916", "0.6050392", "0.6037654", "0.5963065", "0.5933104", "0.5814375", "0.5811728", "0.577398", "0.5728041", "0.5724692",...
0.7259804
0
/ Function that inserts the entries for school questionaires (not yet implemented)
Функция, которая вставляет записи для анкет школьных вопросов (не реализована)
function school_question_insert() { global $wpdb; parse_str($_POST['cont'], $newarray); $uid = get_current_user_id(); $cookieVal = $_COOKIE['company-identification']; foreach ( $newarray as $key => $val ) { $namenumber = explode('_', $key); if ( $namenumber[0] == 'sqans' ) { $schoolans = $val; } else { // Checks whether there already is a database entry, if it does exist it is only updated, if it doesnt it is created if ( $wpdb->get_row("SELECT * FROM wp_School_answer WHERE school_id = $uid AND question_id = $namenumber[1] AND company_id = $cookieVal") == null ) { $wpdb->query( "INSERT INTO wp_School_answer VALUES (NULL, $uid, $namenumber[1], $cookieVal, $schoolans, '$val') "); } else { $wpdb->update('wp_School_answer', array( 'answer_val' => $schoolans, 'comment' => $val, ), array( 'school_id' => $uid, 'question_id' => $namenumber[1], 'company_id' => $cookieVal, )); } } } pkfg_advance(); die(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _insert($questions)\n\t{\n\t\t$db = database();\n\n\t\t$db->insert('',\n\t\t\t'{db_prefix}antispam_questions',\n\t\t\tarray('question' => 'string-65535', 'answer' => 'string-65535', 'language' => 'string-50'),\n\t\t\t$questions,\n\t\t\tarray('id_question')\n\t\t);\n\t}", "function insertQuestion...
[ "0.662483", "0.65072054", "0.6482861", "0.64428157", "0.63270444", "0.6264622", "0.6230627", "0.61850756", "0.6076119", "0.6013738", "0.60034156", "0.59916925", "0.59878176", "0.5978745", "0.59663236", "0.5965428", "0.5963377", "0.59627706", "0.5960128", "0.5900424", "0.58662...
0.73148865
0
/ Function that inserts the entries for company questionaires
Функция, которая вставляет записи для анкет компаний
function company_question_insert() { global $wpdb; parse_str($_POST['cont'], $newarray); $uid = get_current_user_id(); foreach ( $newarray as $key => $val ) { $namenumber = explode('_', $key); if ( $namenumber[0] == 'cqans' ) { $minmax = explode(',', $val); } else { // Checks whether there already is a database entry, if it does exist it is only updated, if it doesnt it is created if ( $wpdb->get_row("SELECT * FROM wp_Company_answer WHERE company_id = $uid AND question_id = $namenumber[1]") == null ) { $wpdb->query( "INSERT INTO wp_Company_answer VALUES (NULL, $uid, $namenumber[1], $minmax[1], $minmax[0], $val) "); } else { $wpdb->update('wp_Company_answer', array( 'answer_max' => $minmax[1], 'answer_min' => $minmax[0], 'answer_priority' => $val, ), array( 'company_id' => $uid, 'question_id' => $namenumber[1], )); } } } pkfg_advance(); die(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function school_question_insert() {\n\tglobal $wpdb;\n\n\tparse_str($_POST['cont'], $newarray);\n\t$uid = get_current_user_id();\n\t$cookieVal = $_COOKIE['company-identification'];\n\n foreach ( $newarray as $key => $val ) {\n $namenumber = explode('_', $key);\n\n if ( $namenumber[0] == 'sqans' ) {\n ...
[ "0.7077722", "0.691215", "0.6764074", "0.6539621", "0.631316", "0.6308986", "0.61922705", "0.61814266", "0.61763155", "0.6159535", "0.61530066", "0.6151108", "0.6108651", "0.6105908", "0.60773844", "0.60741913", "0.6050815", "0.6045538", "0.60369223", "0.60158", "0.60051537",...
0.74973845
0
Event handler eventEmailOpen This is a listener for "IEM_STATSAPI_RECORDOPEN" event. It allows trigger email to capture "Newsletter Opened" and "Link Clicked"
Обработчик событий eventEmailOpen Это слушатель события "IEM_STATSAPI_RECORDOPEN". Он позволяет запускать электронную почту для захвата "Новости открыты" и "Ссылка нажата"
static public function eventEmailOpen(EventData_IEM_STATSAPI_RECORDOPEN $eventData) { // Only intrested if it is a newsletter if ($eventData->statstype != 'newsletter') { return; } // If this open has been recorded previously, ignore it if ($eventData->have_been_recorded) { return; } $api = new TriggerEmails_API(); $statid = intval($eventData->open_details['statid']); $triggerrecords = $api->GetRecordByAssociatedNewsletterStatisticID($statid, 'n'); // If no trigger records are found, return from function if (!$triggerrecords || !is_array($triggerrecords) || !isset($triggerrecords['triggeremails']) || empty($triggerrecords['triggeremails'])) { return; } $recipients = $api->_getSubscriberIDSFromList($eventData->open_details['subscriberid'], array_keys($triggerrecords['lists'])); foreach ($triggerrecords['triggeremails'] as $trigger) { // If recipients have been added to the send queue or have been sent an email for this particular trigger, do not re-add the subscriber again if (!$api->CanAddToQueue($trigger['triggeremailsid'], $eventData->open_details['subscriberid'], $trigger['queueid'])) { continue; } $schedule = time() + ($trigger['triggerhours'] * 3600); IEM::userLogin($trigger['ownerid'], false); $api->AddToQueue($trigger['queueid'], 'triggeremail', $recipients, $schedule); IEM::userLogout(); } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function eventLinkClicked(EventData_IEM_STATSAPI_RECORDLINKCLICK $eventData)\n\t\t{\n\t\t\t// Only intrested if it is a newsletter\n\t\t\tif ($eventData->statstype != 'newsletter') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If this click has been recorded previously, ignore it\n\t\t\tif ($eventData->hav...
[ "0.6135716", "0.59015226", "0.55850506", "0.5540328", "0.54701763", "0.5172903", "0.4951523", "0.4768473", "0.4725993", "0.46813267", "0.46661732", "0.465293", "0.46471143", "0.46466434", "0.46373147", "0.46255276", "0.46077776", "0.4595088", "0.45925304", "0.45547906", "0.45...
0.77249295
0
eventLinkClicked This is a listener for "IEM_STATSAPI_RECORDLINKCLICK" event. It allows trigger email to capture "Newsletter Opened" and "Link Clicked"
eventLinkClicked Это слушатель события "IEM_STATSAPI_RECORDLINKCLICK". Он позволяет запускать email для захвата "Newsletter Opened" и "Link Clicked"
static public function eventLinkClicked(EventData_IEM_STATSAPI_RECORDLINKCLICK $eventData) { // Only intrested if it is a newsletter if ($eventData->statstype != 'newsletter') { return; } // If this click has been recorded previously, ignore it if ($eventData->have_been_recorded) { return; } $api = new TriggerEmails_API(); $linkid = intval($eventData->click_details['linkid']); $statid = intval($eventData->click_details['statid']); $triggerrecords = $api->GetRecordByAssociatedLinkIDStatID($linkid, $statid); // If no trigger records are found, return from function if (!$triggerrecords || !is_array($triggerrecords) || !isset($triggerrecords['triggeremails']) || empty($triggerrecords['triggeremails'])) { return; } $recipients = $api->_getSubscriberIDSFromList($eventData->click_details['subscriberid'], array_keys($triggerrecords['lists'])); foreach ($triggerrecords['triggeremails'] as $trigger) { // If receipients has been added to the send queue or have been sent an email for this particular trigger, do not re-add the subscriber again if (!$api->CanAddToQueue($trigger['triggeremailsid'], $eventData->click_details['subscriberid'], $trigger['queueid'])) { continue; } $schedule = time() + ($trigger['triggerhours'] * 3600); IEM::userLogin($trigger['ownerid'], false); $api->AddToQueue($trigger['queueid'], 'triggeremail', $recipients, $schedule); IEM::userLogout(); } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function add_click_event_listener() {\n\n if ( is_admin() ) {\n return;\n }\n\n if ( !isset($_GET['lead_id']) || !isset($_GET['email_id']) ) {\n return;\n }\n\n global $post;\n\n /* setup args */\n $args['page_id'] = (isset($post)...
[ "0.64723605", "0.6269672", "0.5840151", "0.5517963", "0.5492784", "0.54166937", "0.5414935", "0.53066283", "0.52798945", "0.5252634", "0.52440476", "0.52143526", "0.51797396", "0.5164132", "0.51584", "0.5145262", "0.5136264", "0.51097846", "0.5084259", "0.50391376", "0.503341...
0.816885
0
Create Create a new record. This is an alias of Save(). It also provides a way for XML API to create trigger record.
Создать Создать новый запись. Это алиас Save(). Он также предоставляет способ для XML API создать триггер запись.
public function Create($record = array()) { return $this->Save($record); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create(Record $record): Record;", "public function createEventRecord() {\n//\t\t$event = new Events();\n//\t\t$event->type = 'record_create';\n//\t\t$event->subtype = 'quote';\n//\t\t$event->associationId = $this->id;\n//\t\t$event->associationType = 'Quote';\n//\t\t$event->timestamp = time();\n/...
[ "0.71345586", "0.6948728", "0.67192686", "0.6698277", "0.6624006", "0.66030216", "0.66030216", "0.66030216", "0.66030216", "0.65952045", "0.6587715", "0.6587715", "0.6587715", "0.65750504", "0.65472454", "0.6546464", "0.65341526", "0.65341526", "0.65341526", "0.652707", "0.65...
0.72811395
0
GetActions Get actions for specified trigger emails Returned records are organized as follow: An associative array having trigger ID as the key and contains an array of actions The actions are an associative array with "action name" as the key. An action will contains an array of data The data are an associative array with "data key" as the key, and data value as the value
Получить действия Получить действия для заданных триггерных электронных почт Возвращенные записи организованы следующим образом: ассоциативный массив, в котором ключом является идентификатор триггера, а значение — массив действий Действия — это ассоциативный массив с именем действия в качестве ключа. Действие содержит массив данных Данные — это ассоциативный массив с ключом "ключ данных" и значением "значение данных"
public function GetActions($triggerids) { if (!is_array($triggerids)) { $triggerids = array($triggerids); } $triggerids = array_unique(array_map('intval', $triggerids)); if (empty($triggerids)) { return array(); } $query = " SELECT a.triggeremailsid AS triggeremailsid, a.action AS action, d.datakey AS datakey, d.datavaluestring AS datavaluestring, d.datavalueinteger AS datavalueinteger FROM [|PREFIX|]triggeremails_actions AS a JOIN [|PREFIX|]triggeremails_actions_data AS d ON a.triggeremailsactionid = d.triggeremailsactionid WHERE a.triggeremailsid IN (" . implode(',', $triggerids) . ") "; $result = $this->Db->Query($query); if ($result == false) { list($msg, $errno) = $this->Db->GetError(); trigger_error($msg, $errno); return false; } $actions = array(); while ($row = $this->Db->Fetch($result)) { if (!array_key_exists($row['triggeremailsid'], $actions)) { $actions[$row['triggeremailsid']] = array(); } if (!array_key_exists($row['action'], $actions[$row['triggeremailsid']])) { $actions[$row['triggeremailsid']][$row['action']] = array(); } if (array_key_exists($row['datakey'], $actions[$row['triggeremailsid']][$row['action']])) { if (!is_array($actions[$row['triggeremailsid']][$row['action']][$row['datakey']])) { $actions[$row['triggeremailsid']][$row['action']][$row['datakey']] = array($actions[$row['triggeremailsid']][$row['action']][$row['datakey']]); } $actions[$row['triggeremailsid']][$row['action']][$row['datakey']][] = empty($row['datavalueinteger']) ? $row['datavaluestring'] : $row['datavalueinteger']; } else { $actions[$row['triggeremailsid']][$row['action']][$row['datakey']] = empty($row['datavalueinteger']) ? $row['datavaluestring'] : $row['datavalueinteger']; } } $this->Db->FreeResult($result); return $actions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActions();", "public function getActions();", "public function getActions(IftTrigger $trigger) {\n\n\t\t$actions = array();\n\n\t\tforeach($trigger->actions as $moduleName) {\n\n\t\t\t$action = $this->runner->actions->getNew();\n\t\t\t$action->moduleName = $moduleName; \n\t\t\t$action->trigg...
[ "0.66534495", "0.66534495", "0.66108024", "0.6308708", "0.62649435", "0.6246754", "0.6220134", "0.6111184", "0.610286", "0.5954252", "0.5946383", "0.5933999", "0.59312105", "0.5922995", "0.59145683", "0.5912171", "0.5903908", "0.58982223", "0.58978987", "0.58972996", "0.58972...
0.73059404
0
GetData Get data for specified trigger emails Returned records are organized as follow: An associative array having trigger ID as the key and contains an array of data The data are an associative array with "data key" as the key, and data value as the value
GetData Получает данные для указанного триггерного электронного адреса Возвращенные записи организованы следующим образом: ассоциативный массив, в котором ключом является идентификатор триггера, а значение — массив данных Данные представляют собой ассоциативный массив, в котором ключом является "ключ данных", а значением — значение данных
public function GetData($triggerids) { if (!is_array($triggerids)) { $triggerids = array($triggerids); } $triggerids = array_unique(array_map('intval', $triggerids)); if (empty($triggerids)) { return array(); } $query = " SELECT * FROM [|PREFIX|]triggeremails_data WHERE triggeremailsid IN (" . implode(',', $triggerids) . ") "; $result = $this->Db->Query($query); if ($result == false) { list($msg, $errno) = $this->Db->GetError(); trigger_error($msg, $errno); return false; } $data = array(); while ($row = $this->Db->Fetch($result)) { if (!array_key_exists($row['triggeremailsid'], $data)) { $data[$row['triggeremailsid']] = array(); } if (array_key_exists($row['datakey'], $data[$row['triggeremailsid']])) { if (!is_array($data[$row['triggeremailsid']][$row['datakey']])) { $data[$row['triggeremailsid']][$row['datakey']] = array($data[$row['triggeremailsid']][$row['datakey']]); } $data[$row['triggeremailsid']][$row['datakey']][] = empty($row['datavalueinteger']) ? $row['datavaluestring'] : $row['datavalueinteger']; } else { $data[$row['triggeremailsid']][$row['datakey']] = empty($row['datavalueinteger']) ? $row['datavaluestring'] : $row['datavalueinteger']; } } $this->Db->FreeResult($result); return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_data()\n\t{\n\t\t$data = [];\n\n\t\t// List of people to email\n\t\t$accounts = self::get_accounts_from_orders();\n\t\tforeach ( $accounts as $account ) {\n\t\t\t$events = [];\n\t\t\tif ( $account['event_100_holes'] && !$account['event_100_holes_paid'] ) {\n\t\t\t\t$order = $account['event_100...
[ "0.61533314", "0.6076892", "0.5935769", "0.5896234", "0.5893369", "0.58401793", "0.5817721", "0.57778233", "0.5737205", "0.5722106", "0.56868327", "0.56856745", "0.5629412", "0.5617594", "0.56118935", "0.5597552", "0.5586249", "0.55352354", "0.55340433", "0.5509412", "0.54958...
0.72584575
0
_recordSetStatus This function will process anything that needs to be done to activate/deactivate a record
_recordSetStatus Эта функция будет обрабатывать все действия, необходимые для активации/деактивации записи
private function _recordSetStatus($recordID, $status) { if (is_null($recordID) && $this->triggeremailsid == 0) { trigger_error('ID must be specified, or load the API with a record', E_USER_NOTICE); return false; } $status = intval($status); if ($status != 0) { $status = 1; } // ----- If recordID is specified, use that instead if (!is_null($recordID)) { $recordID = intval($recordID); if ($recordID == 0) { trigger_error('Invalid ID passed through', E_USER_NOTICE); return false; } return $this->_recordSetMultipleStatus(array($recordID), $status); } // ----- $this->active = $status; if ($this->Save() === false) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_status()\n\t{\n\t}", "function inactivate($record_id){\r\n\t\t$this->conn->Execute(\"UPDATE `\".$this->table.\"` SET `active` = '0' WHERE `\".$this->pkey.\"`='\".$record_id.\"'\");\r\n\t}", "function set_statusActiveInActive($id, $primary_key, $table, $statusFieldName='status'){\n\t\t\t// query ...
[ "0.6251851", "0.6216919", "0.61809987", "0.61483866", "0.60799015", "0.60734355", "0.60173064", "0.5936703", "0.59216744", "0.589351", "0.5796753", "0.5758637", "0.57513994", "0.5717872", "0.5698617", "0.56915855", "0.5688149", "0.5673447", "0.56222343", "0.5608411", "0.55996...
0.71210366
0
Load's all header types before load files by going through all folders that are placed directly in header types folder. Functions from this files beforeload are used to set all hooks and variables before global options map are init
Загрузите все типы заголовков перед загрузкой файлов, пройдя по всем папкам, которые находятся напрямую в папке с типами заголовков. Функции из этих файлов beforeload используются для установки всех хуков и переменных перед инициализацией глобального отображения параметров
function zuhaus_mikado_include_search_types_before_load() { foreach ( glob( MIKADO_FRAMEWORK_SEARCH_ROOT_DIR . '/types/*/before-load.php' ) as $module_load ) { include_once $module_load; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pxlz_edgtf_include_search_types_before_load() {\n foreach (glob(EDGE_FRAMEWORK_SEARCH_ROOT_DIR . '/types/*/before-load.php') as $module_load) {\n include_once $module_load;\n }\n }", "protected function LoadHeaders()\n\t{\n\t}", "protected function init(){\n //Carga ...
[ "0.73260415", "0.65816855", "0.637413", "0.6317011", "0.62395567", "0.6165365", "0.61497223", "0.6149557", "0.6145161", "0.61193645", "0.6116812", "0.61090475", "0.61007106", "0.6099265", "0.6085152", "0.60813826", "0.60517603", "0.60145897", "0.60019225", "0.59756577", "0.59...
0.7568913
0
/ manage_city is used to perform all functionality related to city
/ manage_city используется для выполнения всех функциональных возможностей, связанных с городом
public function manage_city($operation = "", $id = "", $cityId = "") { $this->load->model('City_model'); if ($operation == "getAll") { return $this->City_model->getAll(); } else if ($operation == "getByStateId") { $str = ""; foreach ($this->City_model->getCityByStateId($id) as $value) { $selected = ""; if ($value['id'] == $cityId) { $selected = 'selected="selected"'; } $str .= "<option value='" . $value['name'] . "' " . $selected . ">" . $value['name'] . "</option>"; } echo $str; return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCity($city) { $this->city = $city ; }", "function CitiesDAO() {\n \n }", "public function edit(City $city)\n {\n \n }", "public function listCities() {\n // Remove all comments\n unset($_SESSION['flash']);\n // restrict access to this page to use...
[ "0.6918491", "0.67901117", "0.6775484", "0.67456", "0.6711592", "0.6700436", "0.66971856", "0.66727483", "0.6605485", "0.6584341", "0.65773165", "0.6568668", "0.65468144", "0.65250266", "0.6505867", "0.64872617", "0.6432052", "0.6425404", "0.64137334", "0.6412782", "0.6407353...
0.71119213
0
Get a signed URL, which will work for private files
Получите подписанную URL-адрес, которая будет работать для приватных файлов
public function getSignedURL($validFor = "15 minutes"): string { return (string)$this->s3->createPresignedRequest( $this->s3->getCommand("GetObject", [ "Bucket" => $this->space_name, "Key" => $this->_filename, ]), $validFor )->getUri(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_signed_url($asset_path, $private_key_filename, $key_pair_id, $expires){\n\t// Build the policy.\n\t$canned_policy = '{\"Statement\":[{\"Resource\":\"' . $asset_path . '\",\"Condition\":{\"DateLessThan\":{\"AWS:EpochTime\":'. $expires . '}}}]}';\n\n\t/*$canned_policy = '\n\t{\n\t\t\"Id\": \"Policy14...
[ "0.69417524", "0.68289334", "0.6752868", "0.67355454", "0.66858715", "0.6639793", "0.66251814", "0.65136266", "0.63596004", "0.6340294", "0.6337676", "0.6272513", "0.6198301", "0.61652297", "0.60861295", "0.6075759", "0.6075759", "0.6057167", "0.6014547", "0.60050446", "0.600...
0.71472234
0
Tests if the GroupRepository constructor can create the missing group directory in the cache directory.
Проверяет, может ли конструктор GroupRepository создать отсутствующую группу каталог в каталоге кэша.
public function testCreateGroupCacheDirectory() { $directory = realpath(config('app.cache_directory') . '/group'); $files = scandir($directory, SCANDIR_SORT_NONE); foreach ($files as $file) { $file = $directory . '/' . $file; if (is_file($file)) { unlink($file); } } rmdir($directory); new GroupRepository(config('app.webling_api_key')); $this->assertFileExists($directory); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _initDirectory()\n\t{\n\t\tif(!@file_exists($this->group_path))\n\t\t{\n\t\t\tilUtil::makeDir($this->group_path);\n\t\t}\n\t\treturn true;\n\t}", "public function test_creates_if_cache_folder_not_exist()\n {\n\n if(is_dir($this->cacheFolder))\n $this->deltree($this->cacheFolder);\n\...
[ "0.71137595", "0.6734502", "0.6655626", "0.65227616", "0.6470096", "0.6437524", "0.64287186", "0.63300806", "0.61838055", "0.61616355", "0.60969555", "0.6083847", "0.6025902", "0.5957143", "0.5941512", "0.5920107", "0.5858714", "0.58404243", "0.58085006", "0.5787824", "0.5715...
0.75701326
0
/ Function sets the MySQL server to nonstrict mode as SQLyog is designed to work in nonstrict mode
Функция устанавливает сервер MySQL в ненестрогое режим, так как SQLyog разработан для работы в ненестрогое режим
function SetNonStrictMode ( $mysql ) { WriteLog ( "Enter SetNonStrictMode" ); /* like SQLyog app we dont check the MySQL version. We just execute the statement and ignore the error if any */ $query = "set sql_mode=''"; $result = yog_mysql_query ( $query, $mysql ); WriteLog ( "Exit SetNonStrictMode" ); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setStrictMode(): void\n {\n $this->pdo->exec(\"set session sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'\");\n }", "private function getCorrectSqlMode()\n {\n $sql = sprintf(\"...
[ "0.7557948", "0.68314403", "0.67191863", "0.63099736", "0.6207003", "0.60717833", "0.5993119", "0.5927334", "0.5902335", "0.5891566", "0.58846325", "0.5850761", "0.58480066", "0.5808735", "0.5685885", "0.5662338", "0.56158864", "0.5605521", "0.560429", "0.56006604", "0.557904...
0.8304261
0
/ End element handler for the XML parser
Обработчик конечного элемента для парсера XML
function endElement ( $parser, $name ) { WriteLog ( "Enter endElement" ); global $xml_state; $xml_state = XML_NOSTATE; WriteLog ( "Exit endElement" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function endElementHandler ($parser,$name){\n}", "function end_element($parser,$name) //end element always have end tag ..no attribute\n{\n}", "function endElement($parser, $tagName)\n{\n}", "function _endElement($parser, $name)\n\t{\n\t\t// not used here\n\t\treturn;\n\t}", "function element_end($parser...
[ "0.83561456", "0.7670288", "0.76414096", "0.7604334", "0.74878085", "0.7460465", "0.7441957", "0.71886593", "0.7175661", "0.71200114", "0.7078828", "0.7044258", "0.7002735", "0.69977117", "0.6996385", "0.6980762", "0.69242316", "0.68758607", "0.6871178", "0.67819077", "0.6771...
0.798957
1
checks if the XML stream is base 64 encoded
проверяет, является ли поток XML кодированным в base 64
function LibXml2IsBase64Encoded() { global $libxml2_is_base64; if ($libxml2_is_base64 == 0){ return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_Base64($s='')\n\n{\n\n if (!preg_match('/^[a-zA-Z0-9\\/\\r\\n+]*={0,2}$/', $s)) return false;\n\n\n\n // Decode the string in strict mode and check the results\n\n $decoded = base64_decode($s, true);\n\n if(false === $decoded) return false;\n\n\n\n // Encode the string again\n\n i...
[ "0.69491524", "0.68865746", "0.68172336", "0.6684648", "0.6623864", "0.65025544", "0.6497734", "0.6494751", "0.6492883", "0.6469107", "0.64433604", "0.64419097", "0.6403573", "0.6391307", "0.6391307", "0.638478", "0.63665307", "0.63653755", "0.63572395", "0.63491136", "0.6324...
0.7729522
0
Detect if the user's PHP/LibXML is affected by the following bug:
Определите, повлияла ли у пользователя PHP/LibXML от следующей ошибки:
function LibXml2IsBuggy() { global $libxml2_test_query; $libxml2_test_query = ''; $testxml = '<xml><libxml2_test_query>select &apos;a&apos;</libxml2_test_query></xml>'; GetDetailsFromPostedXML ($testxml); if(strcasecmp($libxml2_test_query, 'select a') == 0) { //This PHP/LibXML is buggy! return true; } //Not buggy! return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkLibXmlBug() {}", "protected function checkXmlLib(){\n if(in_array(\"libxml\", get_loaded_extensions())){\n return true;\n } else {\n return false;\n }\n }", "function is_valid_xml ( $xml ) {\r\n libxml_use_internal_errors( true );\r\n ...
[ "0.84839654", "0.7479662", "0.6710283", "0.65859914", "0.6328896", "0.62854075", "0.62496054", "0.62227714", "0.61882406", "0.6038649", "0.60239214", "0.60239214", "0.6023157", "0.5983472", "0.59461874", "0.5911918", "0.5890433", "0.5837887", "0.58276", "0.58254856", "0.58205...
0.7666326
1
Set whether to access as rest request.
Установить, каким образом осуществлять доступ в виде запроса REST.
public function isRestAccess($isRest) { $this->_isRestAccess = $isRest; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setShowInRest( bool $showInRest ) {\n\t\t$this->arguments['show_in_rest'] = $showInRest;\n\t}", "protected function is_request_to_rest_api()\n {\n }", "public function is_rest_request() {\n\t\treturn defined( 'REST_REQUEST' ) && REST_REQUEST === true;\n\t}", "public function is_...
[ "0.6970825", "0.6864438", "0.66415536", "0.6578839", "0.64775", "0.64530003", "0.6195806", "0.61313105", "0.60321414", "0.59069884", "0.5899164", "0.57751685", "0.56782794", "0.5671175", "0.5483332", "0.54721916", "0.54593873", "0.5456446", "0.53918904", "0.5376385", "0.52686...
0.75435966
0
Stop when job count is exceeded
Остановите при превышении количества задач
protected function stopWhenJobCountIsExceeded(): void { if ($this->maximumNumberOfJobs <= 0 || $this->isShuttingDown()) { return; } if (++$this->numberExecutedJobs >= $this->maximumNumberOfJobs) { $this->getLogger()->info( 'Worker stopped due to maximum count of {count} exceeded', [ 'count' => $this->maximumNumberOfJobs ] ); $this->shutdown(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countErroneousJobs();", "protected function batch_limit_exceeded()\n {\n }", "protected function batch_limit_exceeded()\n {\n }", "private function maintainWorkerCount(){\n if(!$off = (count($this->workers) - $this->workerProcesses)){return;}\n if($of...
[ "0.6854115", "0.68162394", "0.68155295", "0.61523294", "0.6099078", "0.60966855", "0.6073624", "0.59680545", "0.59625036", "0.59167314", "0.5908342", "0.58995503", "0.5897668", "0.58678466", "0.5866969", "0.5859359", "0.5834012", "0.58222574", "0.5820255", "0.58191067", "0.57...
0.7882974
0
Stop when time limit is reached
Остановить при достижении времени ограничения
protected function stopWhenTimeLimitIsReached(): void { if ($this->timeLimitInSeconds === null || $this->isShuttingDown()) { return; } if ($this->endTime < \time()) { $this->getLogger()->info( 'Worker stopped due to time limit of {timeLimit}s reached', [ 'timeLimit' => $this->timeLimitInSeconds ] ); $this->shutdown(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function setTimeLimit(): void\n {\n if ( !self::$time_done ){\n set_time_limit(0);\n self::$time_done = true;\n }\n }", "protected function time_exceeded()\n {\n }", "protected function time_exceeded()\n {\n }", "protected function time_exceeded() ...
[ "0.7257206", "0.6901493", "0.6901053", "0.6814247", "0.67299336", "0.6634418", "0.6524237", "0.6516617", "0.6496465", "0.649152", "0.64184767", "0.6400179", "0.6353908", "0.63520336", "0.6351009", "0.6327572", "0.63208234", "0.6310394", "0.629197", "0.6236162", "0.619829", ...
0.78325576
0
Saturate this colour by a certain amount.
Насытите этот цвет на определённую величину.
abstract public function saturate($amount);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saturate(int $value) : float\n {\n return $value == 0 ? self::ALPHA_P : 0.0;\n }", "abstract public function desaturate($amount);", "public function saturate($value, $color = null)\n {\n // prevent negative value\n $value = abs($value);\n\n $this->color_inpu...
[ "0.6149022", "0.5935169", "0.57482505", "0.57031584", "0.55596155", "0.55503684", "0.53451496", "0.53072774", "0.52431464", "0.52399063", "0.5219309", "0.519376", "0.5174706", "0.5170405", "0.51569575", "0.5085754", "0.5058351", "0.5041306", "0.5039856", "0.50164765", "0.5008...
0.7500411
0
Desaturate this colour by a certain amount.
Десатурируйте этот цвет на определённую величину.
abstract public function desaturate($amount);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function desaturate() {\n\t\t$vysledek=$this->luminosity();\n\t\t$this->r=$vysledek;\n\t\t$this->g=$vysledek;\n\t\t$this->b=$vysledek;\n\t\treturn $this;\n\t}", "abstract public function saturate($amount);", "public function desaturate($value, $color = null)\n {\n // prevent negative value\n $...
[ "0.6656506", "0.65310925", "0.6381968", "0.61483157", "0.6047397", "0.5793695", "0.5781391", "0.5543993", "0.55121267", "0.5347354", "0.52177024", "0.5205113", "0.51982874", "0.5182671", "0.5138419", "0.5083685", "0.50379884", "0.49795115", "0.49422687", "0.49006882", "0.4892...
0.71007836
0
Resolve the user from their email.
Разрешите пользователю использовать их электронную почту.
protected function resolveUserFromEmail($email) { return $this->user->doesNotBelongToRole($this->rolesUsingUsername()) ->where('email', $email) ->first(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_user_based_on_email () {\n\t\t$user = M('user')\n\t\t\t->where(\"`email`= '\" . $this->userEmail . \"'\")\n\t\t\t->field('`id`,`email`,`first_name`,`last_name`,`phone`,`language`,`register_time`,`region_id`')\n\t\t\t->find();\n\t\n\t\tif (!is_array($user)) {\n\t\t\t$this->return_error('User no...
[ "0.7112849", "0.6948259", "0.68035805", "0.67179847", "0.6709988", "0.6635084", "0.65988415", "0.6573755", "0.6570005", "0.6570005", "0.65013665", "0.64781153", "0.64074117", "0.6360617", "0.63484395", "0.6319529", "0.631873", "0.63118905", "0.6308175", "0.6291629", "0.629053...
0.7005333
1
Returns the ActionManager object
Возвращает объект ActionManager
public function getActionManager() { return $this->actionManager; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActionManager()\n\t{\n\t if (!isset($this->_oActionManager))\n\t $this->_oActionManager = new Inx_Apiimpl_Action_ActionManagerImpl( $this );\n\t return $this->_oActionManager;\n\t}", "public function getActionManagerClass()\n {\n return $this->actionManagerClass;\n }"...
[ "0.8765212", "0.7710395", "0.689664", "0.6855439", "0.66530806", "0.6628559", "0.6627456", "0.6587969", "0.65773404", "0.65470797", "0.65357924", "0.6493335", "0.6493335", "0.6493335", "0.6493335", "0.6493335", "0.645766", "0.64005184", "0.6393291", "0.6323357", "0.6315109", ...
0.87397873
1
Returns the ActionManager's class name
Возвращает имя класса ActionManager
public function getActionManagerClass() { return $this->actionManagerClass; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getActionClass()\n {\n if (empty($this->namespace)) {\n $this->namespace = 'Teleport\\\\Action';\n }\n return $this->namespace . '\\\\' . str_replace('/', '\\\\', $this->action);\n }", "private function manager() {\n\t\treturn strtolower(get_class());\n\t}",...
[ "0.7584237", "0.7062152", "0.69509786", "0.6933489", "0.6854209", "0.6823634", "0.68000174", "0.67374", "0.67374", "0.67367923", "0.6725649", "0.66954535", "0.66897416", "0.66820204", "0.6672216", "0.6671707", "0.665474", "0.6636872", "0.6635881", "0.6631018", "0.65897286", ...
0.8502597
0
Displays a form to edit an existing SignalRecette entity.
Показывает форму для редактирования существующей сущности SignalRecette.
public function editAction(Request $request, SignalRecette $signalRecette) { $deleteForm = $this->createDeleteForm($signalRecette); $editForm = $this->createForm('Administration\AdministrationBundle\Form\SignalRecetteType', $signalRecette); $editForm->handleRequest($request); if ($editForm->isSubmitted() && $editForm->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($signalRecette); $em->flush(); return $this->redirectToRoute('signalrecette_edit', array('id' => $signalRecette->getId())); } return $this->render('signalrecette/edit.html.twig', array( 'signalRecette' => $signalRecette, 'edit_form' => $editForm->createView(), 'delete_form' => $deleteForm->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Recette $recette)\n {\n\n }", "public function actionEdit()\n {\n $formBuilder = new EntityFormBuilder($this->getEntity());\n\n $this->addVars([\n \"isSubmitted\" => !empty($_POST[$this->getEntityClass()]),\n \"formBuilder\" => $formBuilder\n ...
[ "0.72023594", "0.69753695", "0.6931636", "0.69208777", "0.67643493", "0.67636573", "0.6751512", "0.67355216", "0.67155904", "0.6703808", "0.6702759", "0.66876984", "0.66689205", "0.66625834", "0.66624516", "0.6656891", "0.6635887", "0.6631427", "0.6627702", "0.66234475", "0.6...
0.70291907
1
Deletes a SignalRecette entity.
Удаляет сущность SignalRecette.
public function deleteAction(Request $request, SignalRecette $signalRecette) { $form = $this->createDeleteForm($signalRecette); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->remove($signalRecette); $em->flush(); } return $this->redirectToRoute('signalrecette_index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deletebandAction() {\n $serviceLocator = $this->getServiceLocator();\n $entityManager = $serviceLocator->get('doctrine.entitymanager.orm_default');\n $id = $_POST['id'];\n if (isset($id) && $id != '') {\n try {\n $band = $entityManager->getRepos...
[ "0.63157696", "0.6130601", "0.61137587", "0.6098685", "0.60902053", "0.60902053", "0.6070208", "0.6062592", "0.60399866", "0.5991119", "0.5942557", "0.59387916", "0.5926535", "0.59230196", "0.59230196", "0.59180665", "0.59076816", "0.59022796", "0.5887808", "0.5848463", "0.58...
0.7106552
0
Creates a form to delete a SignalRecette entity.
Создает форму для удаления сущности SignalRecette.
private function createDeleteForm(SignalRecette $signalRecette) { return $this->createFormBuilder() ->setAction($this->generateUrl('signalrecette_delete', array('id' => $signalRecette->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createComponentDeleteRate()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno');\r\n\t\t$form->onSuccess[] = callback($this, 'deleteRateSubmitted');\r\n\t\t$form->addProtection(self::MESS_PROTE...
[ "0.6852655", "0.68000305", "0.67441654", "0.67174155", "0.6700876", "0.6693674", "0.6692954", "0.6692847", "0.6670966", "0.6652609", "0.664197", "0.66277254", "0.6597912", "0.6581917", "0.6571568", "0.65656817", "0.6550069", "0.6547646", "0.653935", "0.65380895", "0.65333647"...
0.819208
0
Show the form for creating a new Invoiceedpoint.
Показать форму для создания новой Invoiceedpoint.
public function create() { return view('invoiceedpoints.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new InvoiceForm();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ...
[ "0.6952821", "0.6907702", "0.69021523", "0.689603", "0.6894637", "0.68913865", "0.68440026", "0.6777319", "0.67525387", "0.66943204", "0.66943204", "0.6654199", "0.6651375", "0.66456896", "0.66132545", "0.6582089", "0.65781486", "0.6566771", "0.65549", "0.65516144", "0.654966...
0.76613677
0
Store a newly created Invoiceedpoint in storage.
Храните только что созданную Invoiceedpoint в хранилище.
public function store(CreateInvoiceedpointRequest $request) { $input = $request->all(); $invoiceedpoint = $this->invoiceedpointRepository->create($input); Flash::success('Invoiceedpoint saved successfully.'); return redirect(route('invoiceedpoints.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function save(): void {\n session()->put(\"invoice\", $this->invoice);\n session()->save();\n }", "public function store()\n\t{\t\t\n\t\treturn InvoiceController::save();\n\t}", "public function save() {\n parent::save(); // Save invoice element\n\n $this->users...
[ "0.63295776", "0.62012994", "0.60371614", "0.6034185", "0.59861183", "0.5954109", "0.5941354", "0.5941007", "0.5902876", "0.5870257", "0.5855215", "0.5855215", "0.5855215", "0.5855215", "0.5855215", "0.5855215", "0.5836039", "0.58223957", "0.58223957", "0.58223957", "0.581123...
0.7350494
0
Sign the given data with this key and return signature.
Подпишите предоставленные данные этим ключом и верните подпись.
abstract public function signData($data);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _sign($data, $key)\n {\n return\n hash_hmac('sha1', $data, $key, true);\n }", "public function sign($data_to_sign)\n {\n $base64_signature = base64_encode(hash_hmac('sha256', $data_to_sign, $this->getSharedKey(), true));\n\n return $base64_sig...
[ "0.7734441", "0.7540069", "0.7422148", "0.7147057", "0.70763546", "0.70628226", "0.69663185", "0.67656535", "0.67590505", "0.6701194", "0.6401064", "0.63998157", "0.6343823", "0.6267524", "0.6238679", "0.6210201", "0.61478037", "0.61474717", "0.6136137", "0.61322874", "0.6114...
0.81379324
0
retrieve last 4 digits of card from the reason field
извлечь последние 4 цифры карты из поля причины
protected function _retrieveLast4DigitsFromReason($reason) { $result = ""; if ($reason != "") { $reasonArray = explode(":", $reason); if ($reasonArray != null && is_array($reasonArray)) { if (isset($reasonArray[1])) { $result = $reasonArray[1]; } } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cardLastFour()\n {\n return (string) ($this->razorpayInfo()['payment_information']['last4'] ?? '');\n }", "static public function getLast4Digits($cardNr)\n {\n // Apply RegExp to extract last 4 digits\n $matches = array();\n if (preg_match('/\\d{4}$/', $cardNr...
[ "0.7342469", "0.72413087", "0.6910801", "0.68174905", "0.6330169", "0.6260595", "0.622481", "0.61840093", "0.60498387", "0.60185844", "0.5973207", "0.5950599", "0.5815237", "0.575596", "0.575463", "0.57381475", "0.5674263", "0.5670612", "0.5662411", "0.5661933", "0.5633125", ...
0.7585501
0
Validate if this payment methods allows manual capture This is a default can be forced differently to overrule on acquirer level
Проверить, позволяет ли этот способ оплаты ручное захватывание. Это значение по умолчанию, может быть принудительно изменено для переопределения на уровне провайдера.
protected function _manualCaptureAllowed() { $manualCaptureAllowed = null; $paymentMethod = $this->_paymentMethod; // For all openinvoice methods manual capture is the default if ($this->_adyenHelper->isPaymentMethodOpenInvoiceMethod($paymentMethod)) { return true; } switch ($paymentMethod) { case 'cup': case 'cartebancaire': case 'visa': case 'visadankort': case 'mc': case 'uatp': case 'amex': case 'maestro': case 'maestrouk': case 'diners': case 'discover': case 'jcb': case 'laser': case 'paypal': case 'sepadirectdebit': case 'dankort': case 'elo': case 'hipercard': case 'mc_applepay': case 'visa_applepay': case 'amex_applepay': case 'discover_applepay': case 'maestro_applepay': case 'paywithgoogle': $manualCaptureAllowed = true; break; default: $manualCaptureAllowed = false; } return $manualCaptureAllowed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canCapturePayment();", "public function canCapture()\n {\n $result = false;\n\n $order = $this->getOrder();\n\n if ($order->getData('xpc_txnid')) {\n\n $response = Mage::helper('api_xpc')->requestPaymentInfo($order->getData('xpc_txnid'));\n\n if (\n ...
[ "0.7628225", "0.66087353", "0.6508423", "0.6246415", "0.6246415", "0.6190569", "0.6190569", "0.612837", "0.61076456", "0.60211843", "0.6020063", "0.600258", "0.5995063", "0.5988927", "0.59033996", "0.589675", "0.5883129", "0.5755103", "0.5712945", "0.57070327", "0.57023394", ...
0.8179993
0
/ Belongs to Fornecedor
Принадлежит поставщику
public function fornecedor() { return $this->belongsTo(Fornecedor::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fabricante()\n {\n return $this->belongsTo('App\\Fabricante');\n }", "public function getFkFornecedor()\n {\n return $this->fkFornecedor;\n }", "public function __construct(Fornecedor $fornecedor)\n {\n $this->fornecedor = $fornecedor;\n }", "public func...
[ "0.6011234", "0.59495765", "0.5938925", "0.5840471", "0.5771659", "0.5700642", "0.5664812", "0.56314695", "0.56314695", "0.5590709", "0.55483687", "0.55157995", "0.5507057", "0.549604", "0.5495995", "0.5493968", "0.5479095", "0.54759943", "0.54586315", "0.5443003", "0.5436605...
0.70887387
0
/ HasMany to NotaFiscalItem
/ HasMany к NotaFiscalItem
public function itens() { return $this->hasMany(NotaFiscalItem::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function notaFiscal()\n {\n return $this->hasOne(NotasFiscais::class, 'venda_id');\n }", "public function fiscal() {\n return $this->hasOne(Fiscal::class);\n }", "public function fiscales(){\n return $this->hasOne(Fiscal::class);\n }", "public function invoiceItems()\n ...
[ "0.6885328", "0.62834704", "0.6216871", "0.6058056", "0.60265034", "0.5921068", "0.59034884", "0.5782945", "0.5777331", "0.5744542", "0.5688335", "0.5665216", "0.5635957", "0.5623923", "0.5580388", "0.55720425", "0.55650014", "0.556136", "0.5554019", "0.5544125", "0.55383664"...
0.78268075
0
/ HasMany to Fatura
Многие к одному Fatura
public function faturas() { return $this->hasMany(Fatura::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFaturas()\n {\n return $this->hasMany(Fatura::className(), ['id_pedido' => 'id']);\n }", "public function filmes(){\n return $this->hasMany(Filme::class, 'idioma_id');\n }", "public function fiche() {\n return $this->hasMany(\"App\\Models\\Plantea\", \"id\");\n ...
[ "0.7494313", "0.7251103", "0.713199", "0.6992521", "0.6861986", "0.6818062", "0.680672", "0.680382", "0.67237014", "0.6700077", "0.6697302", "0.6691724", "0.6681101", "0.66419744", "0.66363347", "0.6635787", "0.6635787", "0.66009694", "0.652483", "0.65084594", "0.65070426", ...
0.758761
0
Removes the first occurrence of the $search text on the $subject.
Удаляет первый раз появляющийся текст $search на $subject.
public static function removeFirst($subject, $search, $caseSensitive = true) { return static::replaceFirst($subject, $search, '', $caseSensitive); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function removeLast($subject, $search, $caseSensitive = true)\n {\n return static::replaceLast($subject, $search, '', $caseSensitive);\n }", "public static function replaceAllButFirstOccurence( string $search, string $replace, string $subject ) : string\n {\n $occurences = su...
[ "0.72902066", "0.70799345", "0.6977593", "0.67842084", "0.6708311", "0.6706937", "0.669239", "0.6683868", "0.66389096", "0.66014636", "0.6589686", "0.6589686", "0.6573732", "0.65132517", "0.65038866", "0.65035504", "0.648893", "0.64662707", "0.6422959", "0.6422959", "0.632306...
0.8225584
0
Removes the last occurrence of the $search text on the $subject.
Удаляет последнее вхождение текста $search на $subject.
public static function removeLast($subject, $search, $caseSensitive = true) { return static::replaceLast($subject, $search, '', $caseSensitive); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function beforeLast(string $subject, string $search): string\n {\n if ($search === '') {\n return $subject;\n }\n\n $pos = mb_strrpos($subject, $search);\n\n if ($pos === false) {\n return $subject;\n }\n\n return static::substr($subj...
[ "0.72287714", "0.7228554", "0.7139675", "0.7089645", "0.7089645", "0.6983396", "0.6886658", "0.6833275", "0.6711658", "0.6641416", "0.6628475", "0.6527675", "0.6462473", "0.63799196", "0.634873", "0.62558407", "0.62050086", "0.607125", "0.6020995", "0.5965235", "0.58907086", ...
0.8060611
0
Splits a $subject on the $delimiter and returns the first part. If the delimiter is not found in the string the string is returned.
Разделяет $subject по $delimiter и возвращает первую часть. Если разделитель не найден в строке, возвращается сама строка.
public static function splitFirst($subject, $delimiter) { Assert::notEmpty($delimiter); $parts = explode($delimiter, $subject, 2); return reset($parts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function splitLast($subject, $delimiter)\n {\n Assert::notEmpty($delimiter);\n\n $parts = explode($delimiter, $subject);\n\n return end($parts);\n }", "static private function clipDelimiter($delimiter) {\n if (strlen($delimiter) > 1) {\n $chars = str_spl...
[ "0.6788297", "0.62909055", "0.61455834", "0.61455834", "0.5936752", "0.59234667", "0.5868495", "0.57396346", "0.57396346", "0.57396346", "0.57396346", "0.57204", "0.56550926", "0.5606723", "0.553865", "0.55289406", "0.5483573", "0.5437244", "0.53964037", "0.5374454", "0.53521...
0.822235
0
Splits a $subject on the $delimiter and returns the last part. If the delimiter is not found in the string the string is returned.
Разделяет $subject по $delimiter и возвращает последнюю часть. Если разделитель не найден в строке, возвращается сама строка.
public static function splitLast($subject, $delimiter) { Assert::notEmpty($delimiter); $parts = explode($delimiter, $subject); return end($parts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function splitFirst($subject, $delimiter)\n {\n Assert::notEmpty($delimiter);\n\n $parts = explode($delimiter, $subject, 2);\n\n return reset($parts);\n }", "static private function doAfter($string, $delimiter) {\n // skip over any earlier $delimiter, only see the ...
[ "0.6783926", "0.6537015", "0.6455983", "0.62258226", "0.58989763", "0.58712727", "0.58712727", "0.5822415", "0.57643664", "0.5761944", "0.55834925", "0.554084", "0.55206376", "0.55206376", "0.55206376", "0.55206376", "0.549911", "0.5490898", "0.5417434", "0.53972214", "0.5388...
0.8322216
0
Returns whether the subjects ends with the search string.
Возвращает, заканчивается ли строка поиска строкой.
public static function endsWith($subject, $search, $caseSensitive = true) { if (!$caseSensitive) { $subject = strtolower($subject); $search = strtolower($search); } return $search === '' || substr($subject, -strlen($search)) === $search; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function endsWithReturnsTrueForMatchingLastPartDataProvider() {}", "public function endsWithReturnsFalseForNotMatchingLastPartDataProvider() {}", "function str_has_suffix(string $string, string|array $search, bool $icase = false): bool\n{\n if (is_array($search)) {\n foreach ($search as $searc...
[ "0.7006103", "0.68306446", "0.6631633", "0.6532966", "0.6524123", "0.6517148", "0.6475252", "0.6472034", "0.644101", "0.64372385", "0.6424322", "0.6420387", "0.64108324", "0.638612", "0.6359186", "0.63192034", "0.62978727", "0.62959945", "0.6286402", "0.62780803", "0.62607217...
0.70209926
0
Returns the workflow state.
Возвращает состояние workflow.
public function getWorkflowState() { return $this->workflowState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getWorkflow() {\n return $this->workflow;\n }", "public function getWorkflow(){\n return $this->getTracker()->getWorkflow();\n }", "public function getState() {\n return $this->state;\n }", "public function getState() {\n return $this->state;\n }", "public ...
[ "0.7775008", "0.7610513", "0.7411253", "0.7411253", "0.7411253", "0.7411253", "0.740183", "0.740183", "0.740183", "0.740183", "0.740183", "0.740183", "0.740183", "0.740183", "0.740183", "0.740183", "0.740183", "0.740183", "0.740183", "0.740183", "0.740183", "0.740183", "0...
0.8980424
0
Sets the workflow state.
Устанавливает состояние workflow.
public function setWorkflowState($workflowState) { if ($this->workflowState !== $workflowState) { $this->workflowState = isset($workflowState) ? $workflowState : ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function set_state($state) { $this->state = $state; }", "public function setState($state) { $this->state = $state ; }", "public function set_state($state) {\r\n $this->state = $state;\r\n }", "public function set_state($state)\n {\n $this->state = $state;\n }", "public f...
[ "0.7194844", "0.7007626", "0.69537216", "0.686424", "0.6824456", "0.6817622", "0.6790942", "0.67869693", "0.67608404", "0.67522174", "0.67438364", "0.67438364", "0.6714586", "0.6711109", "0.6696967", "0.66944844", "0.6672618", "0.6672618", "0.6672618", "0.6672618", "0.6672618...
0.71443367
1
Returns the date title.
Возвращает заголовок даты.
public function getDateTitle() { return $this->dateTitle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function title()\n {\n return $this->day . ' ' . $this->time;\n }", "public function title(): string\n {\n return 'Bitacora'.$this->day.'-'.$this->month.'-'.$this->year;\n }", "public function getTitle() {\n return \"Title | \" . time(); \n }", "public function getC...
[ "0.8428915", "0.79188895", "0.7705004", "0.7655098", "0.7484017", "0.73731995", "0.7337162", "0.7334632", "0.7334265", "0.73302567", "0.7248902", "0.7248732", "0.7248732", "0.7248732", "0.7248242", "0.7219038", "0.7205301", "0.72045827", "0.7204196", "0.7202303", "0.7202303",...
0.8769555
0
Sets the date title.
Устанавливает заголовок даты.
public function setDateTitle($dateTitle) { if ($this->dateTitle !== $dateTitle) { $this->dateTitle = isset($dateTitle) ? $dateTitle : ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTitle( $title )\r\n {\r\n $this->_title = $title;\r\n }", "public function setTitle($title)\r\n {\r\n $this->_title = $title;\r\n }", "public function setTitle($title)\r\n {\r\n $this->title = $title . ' | ' . $this->title;\r\n }", "public function se...
[ "0.7285118", "0.72628903", "0.7258378", "0.72568554", "0.7233074", "0.7230021", "0.7225093", "0.72228676", "0.72154045", "0.7214043", "0.7212301", "0.7212283", "0.7212283", "0.72121775", "0.72049004", "0.71967363", "0.7191308", "0.7191257", "0.71889454", "0.71790963", "0.7177...
0.8416566
0
Returns the date description.
Возвращает описание даты.
public function getDateDescription() { return $this->dateDescription; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDescription() {\n return lang('View time, expenses and assignment reports for a specific day');\n }", "public function getDateString()\n {\n return $this->date_string;\n }", "public function getDate(): string\n {\n return $this->date;\n }", "public function getDe...
[ "0.74556166", "0.7263955", "0.722939", "0.7193194", "0.71326804", "0.71297294", "0.69479275", "0.69438255", "0.6871648", "0.68656975", "0.6855509", "0.68515235", "0.6827749", "0.68222326", "0.6811375", "0.68106663", "0.6808084", "0.68072987", "0.67984134", "0.6787314", "0.676...
0.86969507
0
Sets the date description.
Устанавливает описание даты.
public function setDateDescription($dateDescription) { if ($this->dateDescription !== $dateDescription) { $this->dateDescription = isset($dateDescription) ? $dateDescription : ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDate( $date ) {\n\t\t$this->date = $date;\n\t}", "public function setDate($date)\n\t{\n\t\t$this->date = $date;\n\t}", "public function setdate($date) { $this->date = $date; }", "public function setDate($date) {\n $this->date = $date;\n }", "public function setDate($date) {\n ...
[ "0.6864801", "0.6817129", "0.68164", "0.68106264", "0.68106264", "0.6801539", "0.6739296", "0.6739296", "0.6739296", "0.66796464", "0.6675585", "0.66020805", "0.6586989", "0.6552225", "0.65202105", "0.65032095", "0.6461135", "0.642749", "0.6400127", "0.64001125", "0.6397504",...
0.83214724
0
Returns the date image.
Возвращает изображение с датой.
public function getDateImage() { return $this->dateImage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDateImageUrl()\n {\n return $this->dateImageUrl;\n }", "public function getDateImageMeta()\n {\n return $this->dateImageMeta;\n }", "function getImageDate($img){\r\n if (file_exists($img)) {\r\n $date=date (\"F d, Y\", filemtime($img));\r\n return...
[ "0.76841444", "0.7237572", "0.687165", "0.67615277", "0.64524263", "0.64524263", "0.64524263", "0.64524263", "0.64524263", "0.64524263", "0.64524263", "0.64524263", "0.64524263", "0.6443676", "0.6287074", "0.62546086", "0.62545174", "0.6196428", "0.6165261", "0.6154234", "0.6...
0.851952
0
Sets the date image.
Устанавливает изображение даты.
public function setDateImage($dateImage) { if ($this->dateImage !== $dateImage) { $this->dateImage = $dateImage; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDateImageUrl($dateImageUrl)\n {\n if ($this->dateImageUrl !== $dateImageUrl) {\n $this->dateImageUrl = $dateImageUrl;\n }\n }", "public function setDate($date);", "public function setDate($date);", "public function setDate($date);", "public function setDate...
[ "0.69731873", "0.68382186", "0.68382186", "0.68382186", "0.67631626", "0.67134863", "0.6693283", "0.6688855", "0.66767323", "0.66707873", "0.66707873", "0.66632295", "0.6584706", "0.6467203", "0.64029557", "0.6357232", "0.6355729", "0.6343167", "0.63362116", "0.63162595", "0....
0.82435817
0
Returns the date image url.
Возвращает URL изображения даты.
public function getDateImageUrl() { return $this->dateImageUrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDateImage()\n {\n return $this->dateImage;\n }", "public function getDateUrl()\n {\n return $this->dateUrl;\n }", "private function getImageUrl()\n {\n $url = 'img/reconnect.png';\n $filePaths = [\n str_replace('/', DIRECTORY_SEPARATOR, W...
[ "0.7687351", "0.75132036", "0.7268794", "0.7177092", "0.70954686", "0.69534844", "0.6934644", "0.6927079", "0.69262", "0.68321246", "0.68155515", "0.6810853", "0.6802038", "0.6767861", "0.6754573", "0.67511475", "0.67041117", "0.6679254", "0.6653144", "0.6650743", "0.6629251"...
0.8289963
0
Sets the date image url.
Устанавливает URL изображения даты.
public function setDateImageUrl($dateImageUrl) { if ($this->dateImageUrl !== $dateImageUrl) { $this->dateImageUrl = $dateImageUrl; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDateImage($dateImage)\n {\n if ($this->dateImage !== $dateImage) {\n $this->dateImage = $dateImage;\n }\n }", "public function setDateUrl($dateUrl)\n {\n if ($this->dateUrl !== $dateUrl) {\n $this->dateUrl = isset($dateUrl) ? $dateUrl : '';\n...
[ "0.73786753", "0.711175", "0.6873324", "0.6457748", "0.62823343", "0.62439734", "0.6230735", "0.60978913", "0.60953695", "0.6030416", "0.6017425", "0.5988964", "0.5986499", "0.59659946", "0.5946356", "0.59414065", "0.5925839", "0.5923372", "0.5923372", "0.5923372", "0.5906767...
0.7496092
0
Returns the date image meta.
Возвращает метаданные изображения даты.
public function getDateImageMeta() { return $this->dateImageMeta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDateImage()\n {\n return $this->dateImage;\n }", "function get_meta($date) {\n\n\t$app = Slim::getInstance();\n\t\n\t$initialize = array(\n\t\t'title' => $app->config['defaultTitle'],\n\t\t'date' => $date,\n\t\t'prev' => find_prev($date),\n\t\t'next' => find_next($date),\n\t);\n\t...
[ "0.7693699", "0.71691066", "0.7078935", "0.70426536", "0.68764246", "0.6770265", "0.6735211", "0.67298764", "0.6701949", "0.6650892", "0.6575307", "0.65428835", "0.6509651", "0.6472829", "0.6387607", "0.6379602", "0.6379489", "0.6379489", "0.631036", "0.6267069", "0.6260054",...
0.8852231
0
Sets the date image meta.
Устанавливает метаданные изображения даты.
public function setDateImageMeta($dateImageMeta = []) { if ($this->dateImageMeta !== $dateImageMeta) { $this->dateImageMeta = $dateImageMeta; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDateImageMeta()\n {\n return $this->dateImageMeta;\n }", "public function setDateImage($dateImage)\n {\n if ($this->dateImage !== $dateImage) {\n $this->dateImage = $dateImage;\n }\n }", "public function setDate($date = null)\n {\n if (nu...
[ "0.7308449", "0.70788556", "0.6304971", "0.62936753", "0.6128495", "0.6119438", "0.6090124", "0.60898924", "0.6069097", "0.6054226", "0.6050943", "0.6032706", "0.60316503", "0.60261273", "0.6000462", "0.5999546", "0.5999546", "0.5999546", "0.59983987", "0.5964804", "0.5949216...
0.80093014
0
Returns the date url.
Возвращает дату url.
public function getDateUrl() { return $this->dateUrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getURL()\n {\n $date = explode('-', $this->eventdatetime->starttime);\n $day = explode(' ', $date[2]);\n $f = array('y'=>$date[0],\n 'm'=>$date[1],\n 'd'=>$day[0],\n 'eventdatetime_id'=>$this->eventdatetime->id);\n ...
[ "0.8001357", "0.7253532", "0.70884115", "0.7072917", "0.7041704", "0.6782155", "0.67333174", "0.670954", "0.6689193", "0.66259485", "0.65955865", "0.65653604", "0.6514782", "0.6505938", "0.6479729", "0.6460601", "0.6460601", "0.6460601", "0.6458983", "0.6456253", "0.6451874",...
0.863519
0
Sets the date url.
Устанавливает дату URL.
public function setDateUrl($dateUrl) { if ($this->dateUrl !== $dateUrl) { $this->dateUrl = isset($dateUrl) ? $dateUrl : ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDateUrl()\n {\n return $this->dateUrl;\n }", "public function setLink($day,$url)\n {\n if(!is_numeric($day) || ($day < 1 || $day > 31))\n {\n return false;\n }\n $url = str_replace(':day',$day,$url);\n $url = str_replace(':month',$t...
[ "0.6870959", "0.65984887", "0.65466464", "0.6544082", "0.65395457", "0.65375954", "0.6530002", "0.6530002", "0.6530002", "0.6496059", "0.6459549", "0.6459549", "0.6459549", "0.6459549", "0.6459549", "0.644994", "0.64137053", "0.6411774", "0.6360764", "0.6331623", "0.6329504",...
0.8056164
0
Creates url arguments array for easy creation of display urls.
Создает массив аргументов URL для удобного создания отображаемых URL.
public function createUrlArgs() { return [ 'id' => $this->getId() ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createUrlArgs()\n {\n return [\n 'slug' => $this->getSlug()\n ];\n }", "static function buildURL($args = []);", "public function generateUrl( array $arguments = null );", "function GetURLArguments()\n {\n\n // This is a JPGRAPH internal defined that pr...
[ "0.7448763", "0.71828395", "0.66365063", "0.65961283", "0.63773805", "0.6270048", "0.6269473", "0.6056662", "0.6055211", "0.6050826", "0.60254574", "0.60121137", "0.59681565", "0.5905571", "0.5848951", "0.5820619", "0.58090824", "0.5794586", "0.5783492", "0.57501227", "0.5723...
0.7359311
1
Determines whether this entity supports hook subscribers or not.
Определяет, поддерживает ли этот объект подписчиков хуков или нет.
public function supportsHookSubscribers() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function supportsHookSubscribers(): bool\n {\n return true;\n }", "public function is_hooked() {\n return self::$hooked;\n }", "public function hasEventListener($type);", "function is_hook( $type ) {\n\treturn in_array( $type, array( 'filter', 'action', 'filter_reference', 'act...
[ "0.8048563", "0.6269226", "0.6015403", "0.5926401", "0.5863181", "0.585579", "0.579083", "0.5789852", "0.57821125", "0.57624257", "0.5711999", "0.5708385", "0.5690555", "0.56859094", "0.5685029", "0.56833893", "0.56715953", "0.56667", "0.56667", "0.56319433", "0.5624336", "...
0.7951876
1
Returns an array of all related objects that need to be persisted after clone.
Возвращает массив всех связанных объектов, которые необходимо сохранить после клонирования.
public function getRelatedObjectsToPersist(&$objects = []) { return []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRelatedObjectsToPersist(&$objects = []) \n {\n return [];\n }", "public function getRelatedObjectsToPersist(array &$objects = []): array\n {\n return [];\n }", "public function getRelatedObjects(): ?array\n {\n return $this->relatedObjects;\n }", "pro...
[ "0.7369327", "0.70990247", "0.65134513", "0.6371354", "0.62180626", "0.61945695", "0.6149716", "0.61158574", "0.6099958", "0.6080793", "0.60691845", "0.6052505", "0.6052505", "0.6005349", "0.5959695", "0.5954286", "0.59215033", "0.59027076", "0.58894163", "0.58892804", "0.588...
0.7235764
1
Get or set whether to send the HTTP accept header. This method is chainable when setting a value.
Получить или установить значение отправки заголовка HTTP accept. Этот метод цепляемый, когда устанавливается значение.
public function send_accept_header($value = NULL) { if (func_num_args() === 0) { return $this->_send_accept_header; } return $this->_set('_send_accept_header', $value, 'is_bool'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHttpAccept()\n {\n return $this->getServerVariable('HTTP_ACCEPT');\n }", "public function setAccept($v)\n {\n $this->attributes['accept'] = $v;\n\n return $this;\n }", "protected function _get_accept_header()\n\t{\n\t\t$accept_header;\n\t\t$format = strtolowe...
[ "0.672793", "0.66082984", "0.65546477", "0.64618164", "0.64509755", "0.6441144", "0.6441144", "0.6420768", "0.6393785", "0.63897693", "0.63897693", "0.6374668", "0.63489157", "0.6346184", "0.6213893", "0.6213893", "0.6206451", "0.616203", "0.6071804", "0.60528785", "0.6050436...
0.7263359
0
Configure the HTTP accept header sent via cURL.
Настройте HTTP-заголовок Accept, отправляемый через cURL.
protected function _configure_accept_header($curl) { // Set an accept header, if necessary if ($this->_send_accept_header) { $accept = $this->_get_accept_header(); if ( ! empty($accept)) { $curl->add_http_header('Accept', $accept); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setCurlOpts(&$ch) {\n\t\tcurl_setopt ( $ch, CURLOPT_URL, $this->url );\n\t\tcurl_setopt ( $ch, CURLOPT_CONNECTTIMEOUT, 10 );\n\t\tcurl_setopt ( $ch, CURLOPT_RETURNTRANSFER, true );\n\t\tcurl_setopt ( $ch, CURLOPT_TIMEOUT, 60 );\n\t\tcurl_setopt ( $ch, CURLOPT_HTTPHEADER, array ('Accept: applicat...
[ "0.6273784", "0.61525774", "0.61525774", "0.6115797", "0.60540015", "0.60540015", "0.6034196", "0.60211295", "0.5998621", "0.59092486", "0.59021413", "0.58943623", "0.5885169", "0.58386606", "0.58330834", "0.5824894", "0.5821805", "0.5809787", "0.5794408", "0.57580906", "0.57...
0.77809346
0
Get the string to be sent via the accept header.
Получить строку для отправки через заголовок accept.
protected function _get_accept_header() { $accept_header; $format = strtolower($this->_format); switch ($format) { case MMI_API::FORMAT_JAVASCRIPT: $accept_header = 'text/javascript'; break; case self::FORMAT_JSONP: $accept_header = 'text/javascript'; break; default: $accept_header = File::mime_by_ext($format); break; } return $accept_header; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAcceptHeader()\n {\n return \"application/vnd.zend.serverapi+xml;version=1.3\";\n }", "public function getAcceptHeader()\n {\n return \"application/vnd.zend.serverapi+xml;version=1.3\";\n }", "public function getAcceptHeader()\n {\n return \"application/vn...
[ "0.71284264", "0.71284264", "0.7071758", "0.7071758", "0.7023476", "0.6902389", "0.6818789", "0.6803822", "0.67440957", "0.6548214", "0.64108926", "0.6359651", "0.6359651", "0.62846845", "0.6197016", "0.61945945", "0.61945945", "0.61945945", "0.60688764", "0.6064604", "0.6038...
0.7555945
0
Configure the HTTP authorization header sent via cURL.
Настройте HTTP-заголовок авторизации, отправляемый через cURL.
protected function _configure_auth_header($curl) { // Set an auth header, if necessary if ($this->_send_auth_header) { $auth = $this->_get_auth_header(); if ( ! empty($auth)) { $curl->add_http_header('Authorization', $auth); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function set_headers () {\n\t\t\t//\tthat cURL expects\n\t\t\t$arr=array();\n\t\t\tforeach ($this->headers as $key=>$value) $arr[]=sprintf(\n\t\t\t\t'%s:%s',\n\t\t\t\t$key,\n\t\t\t\t$value\n\t\t\t);\n\t\t\t\n\t\t\t$this->set(CURLOPT_HTTPHEADER,$arr);\n\t\t\n\t\t}", "private function set_headers()\n {\...
[ "0.70259297", "0.69748527", "0.697151", "0.6899509", "0.6851529", "0.6835093", "0.6514945", "0.64406", "0.64321667", "0.6396404", "0.62714356", "0.6254906", "0.6224967", "0.61313945", "0.61034757", "0.59935313", "0.5992787", "0.59667414", "0.5955093", "0.59531295", "0.5942064...
0.7432791
0
Get the last cURL response received.
Получить последний полученный cURL-ответ.
public static function last_response() { return self::$_last_response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastResponse(){\n return $this->net->getLastResponse();\n }", "public function getLastResponse()\n {\n return $this->__getLastResponse();\n }", "public function lastResponse()\n\t{\n\t\treturn $this->_last_response;\n\t}", "function getLastResponse()\n\t{\n\t\treturn $this->...
[ "0.80071133", "0.76751804", "0.7657614", "0.762653", "0.76150006", "0.76079065", "0.75979316", "0.7596053", "0.75827885", "0.75827885", "0.75827885", "0.75827885", "0.756862", "0.7556951", "0.75424176", "0.74985135", "0.7478058", "0.74061894", "0.7289844", "0.72833455", "0.72...
0.76982236
1
Combine products by language.
Объедините продукты по языку.
public function combineProductsByLanguage($results) { if (!is_array($results)) { return $results; } if (isset($results['0']->order_item_qty)) { $mode = 'top_sellers'; } elseif (is_array($results) && isset($results['0']->order_item_total)) { $mode = 'top_earners'; } else { return $results; } $translated = array(); $lang = pll_current_language() ?: get_user_meta(get_current_user_id(), 'user_lang', true); /* Filter data by language */ foreach ($results as $data) { $translation = Utilities::getProductTranslationByID( $data->product_id, $lang ); if ($translation) { $data->from = $data->product_id; $data->product_id = $translation->get_id(); } $translated [] = $data; } /* Unique product IDS */ $unique = array(); foreach ($translated as $data) { if (!isset($unique[$data->product_id])) { $unique[$data->product_id] = $data; continue; } $property = ''; switch ($mode) { case 'top_sellers': $property = 'order_item_qty'; break; case 'top_earners': $property = 'order_item_total'; break; default: break; } $unique[$data->product_id]->$property += $data->$property; } return array_values($unique); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function find_all_products($site_lang=false)\n{\n\t$_hooks=find_all_hooks('systems','ecommerce');\n\t$products=array();\n\tforeach (array_keys($_hooks) as $hook)\n\t{\n\t\trequire_code('hooks/systems/ecommerce/'.filter_naughty_harsh($hook));\n\t\t$object=object_factory('Hook_'.filter_naughty_harsh($hook),true);\n\...
[ "0.56441134", "0.56404084", "0.5579559", "0.54607236", "0.5416212", "0.53112", "0.5306108", "0.52996856", "0.5296796", "0.52921623", "0.52895594", "0.5282", "0.527228", "0.52613056", "0.5230048", "0.5210199", "0.5150559", "0.51434094", "0.5097171", "0.5076258", "0.50586146", ...
0.73256165
0
The function set_admin_notifications_page adds notifications pages
Функция set_admin_notifications_page добавляет страницы уведомлений
function set_admin_notifications_page($page_slug, $args) { // Call the admin_notifications_pages class $notifications_pages = (new MidrubBaseAdminComponentsCollectionNotificationsClasses\Notifications_pages); // Set notifications page in the queue $notifications_pages->set_page($page_slug, $args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function create_notifications() {\n\t\tif ( isset( $_GET['page'] ) && $_GET['page'] == 'sprout-apps/settings' ) {\n\t\t\tforeach ( self::$notifications as $notification_id => $data ) {\n\t\t\t\t$notification = self::get_notification_instance( $notification_id );\n\t\t\t\tif ( is_null( $notification )...
[ "0.69532174", "0.68038684", "0.67054456", "0.66439134", "0.6436337", "0.6358192", "0.63443893", "0.6332484", "0.6298214", "0.6262164", "0.62406147", "0.61805886", "0.61648655", "0.61254054", "0.61060137", "0.6097827", "0.60940564", "0.6079833", "0.60209733", "0.601978", "0.60...
0.75941795
0
The function set_admin_notifications_email_template registers a new email template
Функция set_admin_notifications_email_template регистрирует новый шаблон электронной почты
function set_admin_notifications_email_template($template_slug, $args) { // Call the email_templates class $email_templates = (new MidrubBaseAdminComponentsCollectionNotificationsClasses\Email_templates); // Set email templates in the queue $email_templates->set_template($template_slug, $args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setEmailTemplate(string $email_template): void\n {\n $this->_email_template = $email_template;\n }", "public function configureTemplate(): void\n {\n $this->notification->setNotificationTemplateName('UserSuccessSubscription');\n }", "protected function addEmailNotifica...
[ "0.72048545", "0.6647061", "0.6568122", "0.6493264", "0.64080614", "0.6224091", "0.62183815", "0.6188255", "0.61289716", "0.6125988", "0.60994506", "0.6092336", "0.6090941", "0.607333", "0.60364306", "0.59985554", "0.5971604", "0.5941897", "0.5932441", "0.59319866", "0.592841...
0.7978854
0
The function the_admin_notifications_email_template gets the email's template
Функция the_admin_notifications_email_template получает шаблон электронной почты
function the_admin_notifications_email_template($template_slug, $language=NULL) { // Call the email_templates class $email_templates = (new MidrubBaseAdminComponentsCollectionNotificationsClasses\Email_templates); // Gets and return the email templates return $email_templates->the_email_template($template_slug, $language); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmailTemplate()\n {\n return $this->emailTemplate;\n }", "public function getReminderEmailTemplate()\n {\n return $this->scopeConfig\n ->getValue(self::XML_PATH_REMINDER_EMAIL_TEMPLATE, ScopeInterface::SCOPE_STORE);\n }", "function getCreateDataNotifyEmai...
[ "0.74670535", "0.7358436", "0.7280954", "0.71885026", "0.71303093", "0.70820284", "0.70724833", "0.70513505", "0.7037879", "0.7021344", "0.70076907", "0.69748217", "0.6931203", "0.6872859", "0.683788", "0.67946243", "0.67930114", "0.67881626", "0.6751816", "0.67405856", "0.66...
0.76387066
0
The function save_admin_notifications_alert saves a notification's alert
Функция save_admin_notifications_alert сохраняет оповещение об alert
function save_admin_notifications_alert($args) { // Call the alerts class $alerts = (new MidrubBaseAdminComponentsCollectionNotificationsClasses\Alerts); // Save alert return $alerts->save_alert($args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveAlert() {\n\t\twp_enqueue_script('yopress_admin_alert_script', YoPressBase::instance()->getCoreUrl().'/admin/js/yopressAdminAlert.js', array('jquery'));\n\t}", "public function save() {\n\t\t$of = $this->page->of();\t\n\t\tif($of) $this->page->of(false); \n\t\t$result = $this->page->save(SystemNotif...
[ "0.66315067", "0.63428056", "0.6306023", "0.62390834", "0.6084955", "0.6065826", "0.60551196", "0.60283273", "0.6023306", "0.6022222", "0.60036826", "0.59481204", "0.591472", "0.5791754", "0.5752271", "0.57118213", "0.57076114", "0.56832176", "0.5580173", "0.556433", "0.55603...
0.83302206
0
Returns an array of reservation statuses
Возвращает массив статусов бронирования
public static function getStatuses() { $sql = 'SELECT * FROM reservation_status'; $command = Yii::app()->db->createCommand($sql); return $command->queryAll(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listAllReservationStatuses()\n {\n $request = new ListAllReservationStatusesRequest();\n return $this->send($request);\n }", "public static function getStatuses() : array\n {\n return [\n self::STATUS_FREE,\n self::STATUS_RESERVED,\n ...
[ "0.7927453", "0.68072134", "0.6805876", "0.6800353", "0.6795828", "0.6795522", "0.6748104", "0.67442095", "0.67406994", "0.6724357", "0.6724357", "0.6717123", "0.6688897", "0.66866285", "0.66745186", "0.6657184", "0.6656055", "0.6620057", "0.66086394", "0.6574779", "0.6560938...
0.82984537
0
Returns an array of attributes that are in the summary view
Возвращает массив атрибутов, которые находятся в представлении сводки
public static function getSummaryAttributes() { return array( 'id' => array( 'name' => 'id', 'display' => 'ID', 'type' => 'numeric', 'link' => 'endpoint', ), 'source' => array( 'name' => 'source', 'display' => 'Event Request ID', 'type' => 'alpha', 'hide' => 'all', 'link' => 'endpoint1', ), 'event_id' => array( 'name' => 'event_id', 'display' => 'Event ID', 'type' => 'numeric', 'hide' => 'all', 'link' => 'endpoint2', ), 'event_start' => array( 'name' => 'event_start', 'display' => 'Event Start', 'type' => 'numeric', ), 'arena' => array( 'name' => 'arena', 'display' => 'Arena', 'type' => 'alpha', 'hide' => 'phone', ), 'arena_id' => array( 'name' => 'arena_id', 'display' => 'Arena ID', 'type' => 'numeric', 'hide' => 'all', 'link' => 'endpoint3', ), 'location' => array( 'name' => 'location', 'display' => 'Location', 'type' => 'alpha', 'hide' => 'phone,tablet', ), 'location_id' => array( 'name' => 'location_id', 'display' => 'Location ID', 'type' => 'numeric', 'hide' => 'all', 'link' => 'endpoint4', ), 'party' => array( 'name' => 'party', 'display' => 'Party', 'type' => 'alpha,tablet', ), 'notes' => array( 'name' => 'notes', 'display' => 'Notes', 'type' => 'alpha', 'hide' => 'all' ), 'status' => array( 'name' => 'status', 'display' => 'Status', 'type' => 'alpha', ), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function summary()\n\t{\t\n\t\t$summary = '';\n\t\t$set = $this->get_set();\n\t\t$attributes = $set->attributes->where('obligatory', '=', 1)->and_where('type_id', '=', 12)->find_all()->as_array();\n\n\t\tforeach ($attributes as $attribute)\n\t\t{\n\t\t\t$summary .= $this->attr($attribute->name)->value . ' |...
[ "0.70155406", "0.6749137", "0.67224246", "0.67041546", "0.67041546", "0.67041546", "0.67041546", "0.6551966", "0.6523142", "0.6470068", "0.6470068", "0.6470068", "0.6470068", "0.6470068", "0.6470068", "0.6458131", "0.6452627", "0.6452627", "0.6452627", "0.6452627", "0.6448666...
0.7765507
0
codify the data of current session as string
закодировать данные текущей сессии в строку
public static function encode() { return session_encode(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function super_session_encode() {\n\t$super_session = SUPER_WP_Session::get_instance();\n\n\treturn $super_session->json_out();\n}", "public function getSessionOutput() : string;", "public function decode()\n {\n return session_decode();\n }", "function __toString() {\n\n $string = '<pre>...
[ "0.7173604", "0.686777", "0.6674597", "0.65612066", "0.6500836", "0.6453507", "0.63831323", "0.63096356", "0.6303636", "0.62529397", "0.625186", "0.6230393", "0.61886954", "0.6180437", "0.61212933", "0.6112438", "0.6096232", "0.6090563", "0.6063485", "0.60466576", "0.60251874...
0.70927966
1
Deletes a ciudad entity.
Удаляет сущность ciudad.
public function deleteAction(Request $request, Ciudad $ciudad) { $form = $this->createDeleteForm($ciudad); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->remove($ciudad); $em->flush(); } return $this->redirectToRoute('ciudad_index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function posteliminar() {\n $model = (new CiudadRepository())->Obtener($_POST['id']);\n\n $rh = (new CiudadRepository())->Eliminar($model);\n\n print_r(json_encode($rh));\n }", "public function delete(){\n $conexion = new Database();\n\t\t\n\t\tif ($this->codigo){\n ...
[ "0.6730277", "0.6650774", "0.66279453", "0.66175455", "0.6560805", "0.6496063", "0.6413683", "0.6372997", "0.6337634", "0.6317425", "0.6300493", "0.629353", "0.627664", "0.6264798", "0.62490124", "0.62490124", "0.62286836", "0.62149125", "0.62070537", "0.6205154", "0.6179033"...
0.75356734
0
Creates a form to delete a ciudad entity.
Создает форму для удаления сущности ciudad.
private function createDeleteForm(Ciudad $ciudad) { return $this->createFormBuilder() ->setAction($this->generateUrl('ciudad_delete', array('idCiudad' => $ciudad->getIdciudad()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm(ContaCorrente $contaCorrente)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('contacorrente_delete', array('id' => $contaCorrente->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private f...
[ "0.7280934", "0.72023267", "0.715508", "0.7010616", "0.6975236", "0.69601136", "0.6950777", "0.6949952", "0.6936916", "0.6852854", "0.684463", "0.68314785", "0.68280506", "0.6827733", "0.6824616", "0.6819213", "0.68032265", "0.68019766", "0.6796198", "0.6793743", "0.6788217",...
0.81210995
0
Return all available external cache controls
Вернуть все доступные внешние параметры кэширования
public function getCacheControls() { $controls = Mage::app()->getConfig()->getNode(self::XML_PATH_EXTERNAL_CACHE_CONTROLS); return $controls->asCanonicalArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listCache();", "public function all(): array\n {\n return $this->caches;\n }", "public function getCaches() {\n $caches = $this->getFacility(Registry::CACHES);\n foreach ($caches as $cache) $cache->init();\n return $caches;\n }", "public function getAllCacheable();", ...
[ "0.63414496", "0.6203812", "0.6069022", "0.60561323", "0.60501117", "0.6030704", "0.5983009", "0.59770566", "0.591152", "0.5828989", "0.582534", "0.57849485", "0.5714398", "0.56894004", "0.5674587", "0.5671273", "0.5663419", "0.56526405", "0.5651208", "0.564388", "0.5607756",...
0.7867358
0
Disable caching on external storage side by setting special cookie
Отключите кэширование с стороны внешнего хранилища, установив специальный cookie
public function setNoCacheCookie() { $cookie = Mage::getSingleton('core/cookie'); $lifetime = Mage::getStoreConfig(self::XML_PATH_EXTERNAL_CACHE_LIFETIME); $noCache = $cookie->get(self::NO_CACHE_COOKIE); if ($noCache) { $cookie->renew(self::NO_CACHE_COOKIE, $lifetime); } else { $cookie->set(self::NO_CACHE_COOKIE, 1, $lifetime); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bypassCache()\n {\n header('Pragma: no-cache');\n header('Cache-Control: private, no-cache, no-store, max-age=0, must-revalidate, proxy-revalidate');\n }", "public function disableServeFromCache()\n {\n $this->disableCache = true;\n\n $this->setHeader(\"Expire...
[ "0.6518953", "0.6408586", "0.63829756", "0.63731664", "0.6346373", "0.6335093", "0.6310358", "0.62862307", "0.6280561", "0.62718636", "0.6237502", "0.6237502", "0.6235209", "0.6235172", "0.6234938", "0.62322754", "0.62272424", "0.62181675", "0.6215606", "0.6211376", "0.618778...
0.76827717
0
Returns a lifetime of cookie for external cache
Возвращает срок действия куки-файла для внешнего кэша
public function getNoCacheCookieLifetime() { return Mage::getStoreConfig(self::XML_PATH_EXTERNAL_CACHE_LIFETIME); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCookieLifetime() {\r\n return $this->ltime;\r\n }", "public function getCookieLifetime()\n {\n return $this->_cookieLifetime;\n }", "public function getCookieRestrictionLifetime()\n {\n return (int)$this->_currentStore->getConfig(self::XML_PATH_COOKIE_RESTRIC...
[ "0.76690125", "0.7506171", "0.7415081", "0.7318465", "0.72424847", "0.7238511", "0.7123319", "0.71201324", "0.7074304", "0.699618", "0.6954502", "0.69367003", "0.69353116", "0.68651396", "0.68651396", "0.68651396", "0.68651396", "0.68651396", "0.68651396", "0.68651396", "0.68...
0.7661239
1
build the basic select query.
Создайте базовый запрос select.
function _build_select() { global $_DB_DATAOBJECT; $quoteIdentifiers = !empty($_DB_DATAOBJECT['CONFIG']['quote_identifiers']); if ($quoteIdentifiers) { $this->_connect(); $DB = &$_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5]; } $sql = 'SELECT ' . $this->_query['data_select'] . " \n" . ' FROM ' . ($quoteIdentifiers ? $DB->quoteIdentifier($this->__table) : $this->__table) . " \n" . $this->_join . " \n" . $this->_query['condition'] . " \n" . $this->_query['group_by'] . " \n" . $this->_query['having'] . " \n"; return $sql; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _buildSelect()\n\t{\n\t\t// If the query is raw, just set the $this->_values to be\n\t\t// the raw query parameters and return the raw query\n\t\tif($this->_isRawQuery)\n\t\t{\n\t\t\t$this->_values = $this->_rawParameters;\n\t\t\treturn $this->_rawQuery;\n\t\t}\n\n\t\t// Build and return the full ...
[ "0.7802318", "0.779788", "0.7745577", "0.7555772", "0.75366616", "0.7484242", "0.745371", "0.74396896", "0.74086213", "0.73968714", "0.7386803", "0.7356103", "0.73527914", "0.73276746", "0.73206335", "0.72471493", "0.7246084", "0.7224378", "0.72170913", "0.7184401", "0.717407...
0.78961843
0
get/set an sequence key by default it returns the first key from keys() set usage: $do>sequenceKey('id',true); override this to return array(false,false) if table has no real sequence key.
получить/установить последовательный ключ по умолчанию возвращает первый ключ из keys() использование: $do>sequenceKey('id',true); переопределите это, чтобы вернуть массив (false,false), если таблица не имеет реального последовательного ключа.
function sequenceKey() { global $_DB_DATAOBJECT; // call setting if (!$this->_database) { $this->_connect(); } if (!isset($_DB_DATAOBJECT['SEQUENCE'][$this->_database])) { $_DB_DATAOBJECT['SEQUENCE'][$this->_database] = array(); } $args = func_get_args(); if (count($args)) { $args[1] = isset($args[1]) ? $args[1] : false; $args[2] = isset($args[2]) ? $args[2] : false; $_DB_DATAOBJECT['SEQUENCE'][$this->_database][$this->__table] = $args; } if (isset($_DB_DATAOBJECT['SEQUENCE'][$this->_database][$this->__table])) { return $_DB_DATAOBJECT['SEQUENCE'][$this->_database][$this->__table]; } // end call setting (eg. $do->sequenceKeys(a,b,c); ) $keys = $this->keys(); if (!$keys) { return $_DB_DATAOBJECT['SEQUENCE'][$this->_database][$this->__table] = array(false,false,false); } $table = $this->table(); $dbtype = $_DB_DATAOBJECT['CONNECTIONS'][$this->_database_dsn_md5]->dsn['phptype']; $usekey = $keys[0]; $seqname = false; if (!empty($_DB_DATAOBJECT['CONFIG']['sequence_'.$this->__table])) { $seqname = $_DB_DATAOBJECT['CONFIG']['sequence_'.$this->__table]; if (strpos($seqname,':') !== false) { list($usekey,$seqname) = explode(':',$seqname); } } // if the key is not an integer - then it's not a sequence or native if (empty($table[$usekey]) || !($table[$usekey] & DB_DATAOBJECT_INT)) { return $_DB_DATAOBJECT['SEQUENCE'][$this->_database][$this->__table] = array(false,false,false); } if (!empty($_DB_DATAOBJECT['CONFIG']['ignore_sequence_keys'])) { $ignore = $_DB_DATAOBJECT['CONFIG']['ignore_sequence_keys']; if (is_string($ignore) && (strtoupper($ignore) == 'ALL')) { return $_DB_DATAOBJECT['SEQUENCE'][$this->_database][$this->__table] = array(false,false,$seqname); } if (is_string($ignore)) { $ignore = $_DB_DATAOBJECT['CONFIG']['ignore_sequence_keys'] = explode(',',$ignore); } if (in_array($this->__table,$ignore)) { return $_DB_DATAOBJECT['SEQUENCE'][$this->_database][$this->__table] = array(false,false,$seqname); } } $realkeys = $_DB_DATAOBJECT['INI'][$this->_database][$this->__table."__keys"]; // if you are using an old ini file - go back to old behaviour... if (is_numeric($realkeys[$usekey])) { $realkeys[$usekey] = 'N'; } // multiple unique primary keys without a native sequence... if (($realkeys[$usekey] == 'K') && (count($keys) > 1)) { return $_DB_DATAOBJECT['SEQUENCE'][$this->_database][$this->__table] = array(false,false,$seqname); } // use native sequence keys... // technically postgres native here... // we need to get the new improved tabledata sorted out first. if ( in_array($dbtype , array('pgsql', 'mysql', 'mysqli', 'mssql', 'ifx')) && ($table[$usekey] & DB_DATAOBJECT_INT) && isset($realkeys[$usekey]) && ($realkeys[$usekey] == 'N') ) { return $_DB_DATAOBJECT['SEQUENCE'][$this->_database][$this->__table] = array($usekey,true,$seqname); } // if not a native autoinc, and we have not assumed all primary keys are sequence if (($realkeys[$usekey] != 'N') && !empty($_DB_DATAOBJECT['CONFIG']['dont_use_pear_sequences'])) { return array(false,false,false); } // I assume it's going to try and be a nextval DB sequence.. (not native) return $_DB_DATAOBJECT['SEQUENCE'][$this->_database][$this->__table] = array($usekey,false,$seqname); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sequenceKey() {\n return array(false, false, false);\n }", "function sequenceKey()\n {\n return array(false, false, false);\n }", "#[\\ReturnTypeWillChange]\n\tpublic function key()\n\t{\n\t\t$this->load(false);\n\t\t\n\t\treturn \\current($this->keys);\n\t}", "public f...
[ "0.7474209", "0.7403562", "0.64198864", "0.62883526", "0.6258632", "0.62474114", "0.62452835", "0.6234845", "0.6195711", "0.6190274", "0.61836666", "0.61612415", "0.6134723", "0.6117058", "0.6075684", "0.6075684", "0.6075684", "0.6075684", "0.6075684", "0.6075684", "0.6075684...
0.8167807
0
/ =========================================================== / Major Private Methods the core part! / =========================================================== clear the cache values for this class normally done on insert/update etc.
/ =========================================================== / Основные приватные методы, основная часть! / =========================================================== очистка значений кэша для этого класса обычно выполняется при вставке/обновлении и т.д.
function _clear_cache() { global $_DB_DATAOBJECT; $class = strtolower(get_class($this)); if (!empty($_DB_DATAOBJECT['CONFIG']['debug'])) { $this->debug("Clearing Cache for ".$class,1); } if (!empty($_DB_DATAOBJECT['CACHE'][$class])) { unset($_DB_DATAOBJECT['CACHE'][$class]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function clearCache();", "public static function clearCache()\r\n\t{\r\n\t\tparent::clearCache(__CLASS__);\r\n\t}", "public static function clearCache()\r\n\t{\r\n\t\tparent::clearCache(__CLASS__);\r\n\t}", "public static function clearCache()\r\n\t{\r\n\t\tparent::clearCache(__CLASS__);\r\n\...
[ "0.77534807", "0.77280223", "0.77280223", "0.77280223", "0.77280223", "0.77026093", "0.77026093", "0.7677166", "0.7677166", "0.7677166", "0.76761454", "0.7665171", "0.7602236", "0.7535338", "0.7500177", "0.7478233", "0.74602616", "0.7457605", "0.7449007", "0.744767", "0.74061...
0.78686863
0
autoload Class relating to a table (depreciated use ::factory)
Автозагрузка класса, связанного с таблицей (устаревший способ использования ::factory)
function staticAutoloadTable($table) { global $_DB_DATAOBJECT; if (empty($_DB_DATAOBJECT['CONFIG'])) { DB_DataObject::_loadConfig(); } $p = isset($_DB_DATAOBJECT['CONFIG']['class_prefix']) ? $_DB_DATAOBJECT['CONFIG']['class_prefix'] : ''; $class = $p . preg_replace('/[^A-Z0-9]/i','_',ucfirst($table)); $ce = substr(phpversion(),0,1) > 4 ? class_exists($class,false) : class_exists($class); $class = $ce ? $class : DB_DataObject::_autoloadClass($class); return $class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function _getDbTableClass();", "function __autoload($Classe) {\n require __DIR__ . '/crud/' . $Classe . '.class.php';\n}", "public static function Table() { $strClass = self::TableClass(); return new $strClass; }", "public static function Table() { $strClass = self::TableClass(); retu...
[ "0.69247425", "0.68638116", "0.67683405", "0.67683405", "0.67683405", "0.6725888", "0.66971576", "0.66678137", "0.66678137", "0.66678137", "0.66049886", "0.65403736", "0.65312713", "0.6511538", "0.64696133", "0.6451411", "0.63450164", "0.634418", "0.6335037", "0.6332611", "0....
0.70393413
0
PHP Program for nth Catalan Number A recursive function to find nth catalan number
Программа PHP для n-го числа Каталана Рекурсивная функция для нахождения n-го числа Каталана
function catalan($n) { // Base case if ($n <= 1) return 1; // catalan(n) is sum of // catalan(i)*catalan(n-i-1) $res = 0; for($i = 0; $i < $n; $i++) $res += catalan($i) * catalan($n - $i - 1); return $res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNth ($n) ;", "function rec(int $n)\r\n{\r\n\r\n if ($n == 0) {\r\n return;\r\n }\r\n // echo \"n is : $n \\n\";\r\n rec($n - 1);\r\n\r\n echo $n . \" \";\r\n\r\n}", "function pangkat($a, $n)\n{\n\tif ( $n == 0) {\n\t\treturn 1;\n\t} else {\n\t\treturn $a * pangkat($a, $n - 1);...
[ "0.64448166", "0.61898917", "0.6016972", "0.59385216", "0.5824792", "0.57026607", "0.56713265", "0.56557554", "0.5642352", "0.56259644", "0.56246936", "0.5562405", "0.5555972", "0.5539812", "0.55245036", "0.5523321", "0.5514243", "0.55104655", "0.5478399", "0.54763097", "0.54...
0.7305536
0
Registers a listener by its fully qualified class name. (This way the listener does not need to get initialized before it actually get called.) There may be passed a float as second argument representing the patience of the listener. The higher the patience the later the listener is called by the dispatcher.
Регистрирует слушателя по его полностью квалифицированному имени класса. (Этим образом слушатель не нужно инициализировать до того, как он на самом деле будет вызван.) В качестве второго аргумента может быть передано число с плавающей точкой, представляющее уровень терпимости слушателя. Чем выше уровень терпимости, тем позже слушатель вызывается диспетчером.
public function registerListener(string $fQCN, float $patience=0): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addListener(string $name, ?string $className = null, array $config = []): void\n {\n if (strpos($name, '.') !== false) {\n [$plugin, $name] = pluginSplit($name);\n /** @psalm-suppress PossiblyNullOperand */\n $className = $plugin . '.' . Inflector::cameliz...
[ "0.6325865", "0.6162825", "0.61135286", "0.6065243", "0.58636826", "0.5710554", "0.56463605", "0.5628461", "0.5601717", "0.55646676", "0.5437223", "0.5430945", "0.5403387", "0.5375533", "0.53693765", "0.53394926", "0.5336673", "0.528988", "0.5272462", "0.52485347", "0.524665"...
0.7026683
0
Unregisters a listener by its fully qualified class name.
Отписывает слушатель по его полностью квалифицированному имени класса.
public function unregisterListener(string $fQCN): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function RemoveWebListener($class_name)\r\n\t{\r\n\t\tself::$Default->removeListener($class_name);\r\n\t}", "public function removeListener()\n\t{\n\t\tlog::add(__CLASS__, 'debug', ' Suppression des Ecouteurs de ' . $this->getHumanName());\n\t\t$listener = $this->getListener();\n\t\tif (is_object($...
[ "0.70292425", "0.6718981", "0.6680951", "0.65362567", "0.64652705", "0.6343601", "0.6281627", "0.62775624", "0.6155727", "0.6120932", "0.60495603", "0.6002944", "0.5922034", "0.5914707", "0.5914707", "0.5914707", "0.5914707", "0.5914707", "0.5914707", "0.5858558", "0.57966197...
0.7971418
0
Create Invoice in the Database
Создать счет в базе данных
public function createInvoice(): void { $this->invoice = Invoice::create([ 'price' => $this->price, 'user_id' => $this->user->id, 'service_id' => $this->service->id ]); $this->setPaymentInvoice(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _createInvoice()\n {\n if (!$this->_order->canInvoice()) {\n return;\n }\n $invoice = $this->_order->prepareInvoice();\n $invoice->register()->capture();\n $this->_order->addRelatedObject($invoice);\n }", "public function makeInvoice();", "...
[ "0.772549", "0.76111865", "0.75139266", "0.73907816", "0.7356389", "0.7314213", "0.7038264", "0.6957323", "0.6954331", "0.69532114", "0.6937964", "0.68992084", "0.6880706", "0.68545467", "0.68086284", "0.6767942", "0.67536294", "0.6751815", "0.6736152", "0.6728279", "0.672368...
0.7986958
0
Initialize payment in Payment Provider
Инициализация платежа в Поставщике платежей
public function initPayment() { $this->payment = Payment::purchase($this->paymentInvoice); $this->setTransactionId(); $this->createTransaction(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initPayment() ;", "function initOrderPayment() ;", "abstract public function setup_payment(): void;", "public function __construct($payment)\n {\n $this->payment = $payment;\n }", "public function __construct($payment)\n {\n $this->payment = $payment;\n }", "public func...
[ "0.8315225", "0.7872268", "0.756237", "0.75237656", "0.75237656", "0.7456807", "0.7453554", "0.74114656", "0.7373313", "0.7373313", "0.7323494", "0.7236804", "0.7181857", "0.7114796", "0.70661", "0.70483834", "0.704514", "0.70099175", "0.6982874", "0.69755834", "0.69405764", ...
0.82126254
1
Wrapper for t3lib_div::testInt and \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($var).
Обертка для t3lib_div::testInt и \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($var).
public static function isInteger($var) { return Tx_Rnbase_Utility_Strings::isInteger($var); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_integer($var)\n{\n\treturn false;\n}", "function is_integer($var)\n{\n return false;\n}", "function intCheck($var) {\n\t\t return ((string)(int)$var === $var);\n\t\t}", "static function isInt($x){\n\t\tif(is_int($var)){\n\t\t\treturn true;\n\t\t}\n\t\tif((string)(int)$x === (string)$x && $x...
[ "0.71731824", "0.6988798", "0.6988426", "0.6703451", "0.6664648", "0.665115", "0.65393555", "0.6470187", "0.64671475", "0.62972945", "0.6284463", "0.6281951", "0.62275803", "0.6224944", "0.62038547", "0.6152842", "0.61364394", "0.61007625", "0.6099403", "0.60945255", "0.60725...
0.7046203
1
return $sql = "SELECT FROM orders WHERE id_pemesan='$param' and status='proses_3";
return $sql = "SELECT FROM orders WHERE id_pemesan='$param' and status='proses_3";
public function getOrders($param) { return $this->db->get_where('orders', array('id_pemesan' => $param, 'status' => 'pesan')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOrderInfoByids3($orid,$vipid){\n global $db;\n $orinfo=$db->getRow(\"select * from wx_shop_order where id='\".$orid.\"' and vipid=$vipid \");\n return $orinfo;\n}", "function get_pelanggan_pendingPeriksa(){\n $query = $this->db->query(\"select * from pelanggan where status='lunas' or ...
[ "0.6633626", "0.66232854", "0.66056234", "0.6507373", "0.6500394", "0.64201", "0.6400578", "0.6393209", "0.63888997", "0.63582575", "0.6353542", "0.63392884", "0.6328129", "0.631473", "0.6306601", "0.63037145", "0.63010174", "0.629055", "0.62739545", "0.62494415", "0.6245746"...
0.72763836
0
Returns the file path matching the give namespace.
Возвращает путь к файлу, соответствующий заданному пространству имен.
private function getNamespacePath($namespace) { return str_replace('/', DIRECTORY_SEPARATOR, \Yii::getAlias('@' . str_replace('\\', '/', $namespace))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getNamespaceFilepath($namespace = '') {\n\t\treturn (string) parent::getI18Nsetting('locales_path') . '/' . parent::getTranslatorLocale()->getI18Nlocale() . '/' . $namespace . '.' . $this->ext;\n\t}", "private static function getNamespacePath($namespace)\n {\n return array_key_exists...
[ "0.7444587", "0.70374596", "0.6863109", "0.6542237", "0.639441", "0.63418067", "0.6317255", "0.6291286", "0.621995", "0.6173646", "0.6159376", "0.6155599", "0.60750645", "0.60444397", "0.6013198", "0.60058993", "0.6002251", "0.5998348", "0.59951836", "0.5980581", "0.5949928",...
0.7216195
1
Sync update ,delete and create methods
Синхронизированные методы обновления, удаления и создания
public function sync() { $this->update() ->create() ->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sync();", "public function update(){}", "public function update(){\n $this->delete( false );\n $this->create();\n return $this->toClone();\n }", "public function update() {}", "public function update() {}", "public function update() {}", "public function syncDat...
[ "0.65702903", "0.65570897", "0.62571985", "0.61358964", "0.61358964", "0.61358964", "0.6125575", "0.60483193", "0.6027238", "0.6007386", "0.5996602", "0.59779936", "0.59255815", "0.58736193", "0.5837369", "0.58188725", "0.58188725", "0.58188725", "0.58188725", "0.58188725", "...
0.83285654
0
How to handle the list mode for this element.
Как обработать режим списка для этого элемента.
public function getListMode() { return $this->listMode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isList() {\n return false;\n }", "public function setListMode($listMode) {\n $this->listMode = $listMode;\n return $this;\n }", "private function is_list() {\n\t\treturn in_array( $this->id, [ 'img_alt', 'minify_css', 'minify_js', 'active_plugins' ], true );\n\t}",...
[ "0.66614664", "0.64609116", "0.5925704", "0.5925244", "0.59187853", "0.58543515", "0.5826076", "0.57696116", "0.57653844", "0.5754789", "0.57536536", "0.5735554", "0.5705172", "0.5691665", "0.56912327", "0.5673381", "0.56567997", "0.5637693", "0.55778587", "0.5573557", "0.557...
0.7378729
0
Wrapper for get_posts function, that predefines post_type for this custom post type. Any options valid in get_posts can be passed as an option array. Returns an array of objects.
Обертка для функции get_posts, которая предварительно определяет post_type для этого пользовательского типа поста. Любые параметры, допустимые в get_posts, могут быть переданы в виде массива параметров. Возвращает массив объектов.
public function get_objects( $options=array() ) { $defaults = array( 'numberposts' => -1, 'orderby' => 'title', 'order' => 'ASC', 'post_type' => $this->options( 'name' ), ); $options = array_merge( $defaults, $options ); $objects = get_posts( $options ); return $objects; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetPosts($type, $options=[])\n{\n $args = array (\n 'post_type' => $type,\n 'post_status' => 'publish',\n 'posts_per_page' => -1,\n 'caller_get_posts' => 1,\n );\n\n // The Query\n return new WP_Query( array_merge($args, $options) );\n}", "private fu...
[ "0.7776683", "0.7213177", "0.711303", "0.7109099", "0.7087897", "0.70216954", "0.69464886", "0.692085", "0.6879959", "0.6784811", "0.6765346", "0.6679794", "0.6635524", "0.65790296", "0.6558756", "0.65431774", "0.654104", "0.65164036", "0.6428271", "0.6414374", "0.63595474", ...
0.74000716
1
Registers metaboxes defined for custom post type.
Регистрирует метабоксы, определенные для пользовательского типа поста.
public function register_metaboxes() { if ( $this->options( 'use_metabox' ) ) { $metabox = $this->metabox(); add_meta_box( $metabox['id'], $metabox['title'], 'show_meta_boxes', $metabox['page'], $metabox['context'], $metabox['priority'] ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registerMetabox() {\n\t\tadd_action( 'add_meta_boxes', function () {\n\t\t\tadd_meta_box(\n\t\t\t\t$this->metaBoxConfig['slug'],\n\t\t\t\t$this->metaBoxConfig['title'],\n\t\t\t\t[ $this, 'renderBox' ],\n\t\t\t\t$this->metaBoxConfig['post_type'],\n\t\t\t\t$this->metaBoxConfig['location']\n\t\t\t);\n...
[ "0.8048594", "0.78449255", "0.7740942", "0.77373964", "0.7719286", "0.7697298", "0.76798564", "0.7636149", "0.7597826", "0.7577665", "0.7571354", "0.75306994", "0.75030327", "0.74889874", "0.7488489", "0.7484436", "0.74752665", "0.74649847", "0.7440699", "0.7419578", "0.73968...
0.79148227
1
Initiates a new round in the specified room by reseting players cards, assigning game master, giving cards to the competitors and picking the room card.
Инициирует новый раунд в указанной комнате, сбрасывая карты игроков, назначая игрового мастера, распределяя карты участникам и выбирая карту комнаты.
function start_round(int $id_room, string $pnameGM): void { logs("START ROUND CALLED: #$id_room, gamemaster: $pnameGM"); set_room($id_room, 'isStatusLocked', 1); del_players_selected_cards($id_room); set_room_handcards($id_room, 'isSelected', 0); set_room_players($id_room, 'hasPlayed', 0); set_room_players($id_room, 'hasWon', 0); set_room_players($id_room, 'isGameMaster', 0); logs("START ROUND: #$id_room, Reset done"); log_room($id_room); $players = get_room_ready_players($id_room); if (get_player($pnameGM, 'isReady') != 1) pick_random_game_master($id_room); foreach ($players as $p) { $cardsCount = count(get_player_handcards($p)); if (0 < $numberToDraw = ROOM_MAX_HAND_CARDS_COUNT - $cardsCount) draw_card($p, $numberToDraw); if ($p === $pnameGM) { set_player($p, 'isGameMaster', 1); } else { set_player($p, 'isGameMaster', 0); } } logs("START ROUND: #$id_room, Player init done"); log_room($id_room); draw_black_card($id_room); set_current_timestamp('room', $id_room, 'lastRoundStart'); set_room($id_room, 'roundCount', 1+get_room($id_room, 'roundCount')); set_room($id_room, 'isStatusLocked', 0); set_room($id_room, 'status', ROOM_STATUS_PLAYING_ROUND); logs("START ROUND: #$id_room, Final steps done"); log_room($id_room); logs("START ROUND SUCCESS: #$id_room, Final steps done"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newRound() {\r\n // Initialize deck, player and dealer\r\n $this->deck = new Deck();\r\n $this->player = new Player();\r\n $this->dealer = new Dealer();\r\n \r\n\r\n // Round is in play, set starting message\r\n $this->inPlay = true;\r\n $this...
[ "0.6623605", "0.646994", "0.64531356", "0.63360053", "0.6094194", "0.5466398", "0.53107035", "0.5220217", "0.5158938", "0.51455575", "0.5137185", "0.51256317", "0.5112673", "0.5105779", "0.5097306", "0.5065754", "0.50470126", "0.5028984", "0.4996168", "0.49919185", "0.4988509...
0.7368574
0
Returns true if the round has started in the specified room.
Возвращает true, если раунд начат в указанной комнате.
function has_round_started(int $id_room): bool { return null !== get_round_card($id_room); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function can_room_start(int $id_room): bool\n{\n if (get_room($id_room, 'status') !== ROOM_STATUS_STANDBY)\n return false;\n if (!are_room_players_ready($id_room))\n return false;\n if (count(get_room_players($id_room)) < 3)\n return false;\n\n return true;\n}", "public function isStarted()\n {\n...
[ "0.6981513", "0.6512334", "0.6477955", "0.64181095", "0.63636315", "0.63149536", "0.6284231", "0.6197706", "0.6120152", "0.60608387", "0.6046345", "0.6038304", "0.60231894", "0.6000157", "0.5991619", "0.5960136", "0.59384066", "0.59193975", "0.589348", "0.5890445", "0.5855039...
0.78604233
0
Returns the game master player name of the current round in the specified room.
Возвращает имя игрового мастера текущего раунда в указанной комнате.
function get_round_game_master(int $id_room): ?string { $sql = "SELECT P.pname FROM player P WHERE P.id_room = :id_room AND P.isGameMaster <> 0 "; if (null != $gameMaster = get_multiple($sql, ['id_room' => $id_room])) return $gameMaster[0]['pname']; return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRoomName() {\n return $this->roomName;\n }", "public function getName_room()\n {\n return $this->name_room;\n }", "public function getPlayerNameTurn()\r\n {\r\n $players = $this->getPlayers();\r\n return $players[$this->getPlayerTurn()];\r\n ...
[ "0.6403504", "0.6181873", "0.58767945", "0.5850609", "0.5847725", "0.5788027", "0.57125527", "0.56580806", "0.5630756", "0.5611284", "0.5527107", "0.5522761", "0.54371184", "0.54371184", "0.5418976", "0.5416141", "0.5357441", "0.53553617", "0.5353216", "0.5305231", "0.5253655...
0.7109993
0
Returns an array of competitors for the specified room. Competitors are players that are not the game master of the current round.
Возвращает массив конкурентов для указанной комнаты. Конкуренты — это игроки, которые не являются игровым мастером текущего раунда.
function get_round_competitors(int $id_room): array { $sql = 'SELECT P.pname FROM player P WHERE P.id_room = :id_room AND P.isGameMaster = 0; '; $data = get_multiple($sql, ['id_room' => $id_room]); return array_column($data, 'pname'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClients(string $room)\n {\n return $this->getValue($room, RoomContract::ROOMS_KEY) ?? [];\n }", "public function getClients(string $room);", "function get_room_players(int $id_room): array\n{\n $sql = 'SELECT P.pname FROM player P\n WHERE P.id_room = :id_room;\n ';\n $data...
[ "0.6706834", "0.620323", "0.6031033", "0.59788984", "0.59640384", "0.578817", "0.5695529", "0.5653509", "0.5633984", "0.5534273", "0.552135", "0.5503244", "0.5494511", "0.5493073", "0.5481449", "0.54803824", "0.54604924", "0.54390055", "0.54262316", "0.5417389", "0.54028827",...
0.7228879
0
Creates a color input and returns it
Создает элемент ввода цвета и возвращает его
public static function color():InputColor { return new InputColor(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getColorFromHex($input){\n \n $color_convert = strtoupper(str_replace('#', '', $input));\n $color = new Color(\"FF\" . $color_convert);\n \n return $color; \n }", "public function getColor();", "public function getColor();", "function color($name, $value = null, $o...
[ "0.72911084", "0.66566104", "0.66566104", "0.6457145", "0.6455386", "0.6444738", "0.64178485", "0.62869704", "0.6284824", "0.6257695", "0.6252596", "0.6144177", "0.61169434", "0.6080772", "0.6072249", "0.6062728", "0.60551643", "0.6053335", "0.6045316", "0.60041475", "0.59973...
0.8078871
0
Creates a custom button and returns it
Создаёт кастомную кнопку и возвращает её
public static function customButton():InputCustomButton { return new InputCustomButton(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function makeButtons() {}", "public function createButton(){\n $generateTextBox=\"<div class='\".$this->getButtonClass().\"'>\";\n $generateTextBox.=\"<input type='submit' value='{$this->getValue()}'\";\n $generateTextBox.=\"</input>\";\n $generateTextBox.=\"<div>\";\n ...
[ "0.73978156", "0.73463446", "0.730765", "0.7231527", "0.7053103", "0.7022263", "0.69782996", "0.69049525", "0.6853842", "0.68450975", "0.68441767", "0.6836657", "0.6815489", "0.6796917", "0.67609453", "0.675586", "0.67518884", "0.67505294", "0.6746367", "0.6745439", "0.668820...
0.7791886
0
Creates a date input and returns it
Создает элемент ввода даты и возвращает его
public static function date():InputDate { return new InputDate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function input_date($date) {\n date_default_timezone_set('Asia/Manila');\n return date('Y-m-d', strtotime($date));\n}", "public function todayDateInput ()\n {\n $month = date('m');\n $day = date('d');\n $year = date('Y');\n\n $today = $day . '/' . $month . '/' . $year;\n\n ...
[ "0.6938915", "0.67875123", "0.6661236", "0.6594256", "0.6586532", "0.6531224", "0.6490797", "0.64286494", "0.6410024", "0.6374197", "0.63730246", "0.6370082", "0.634638", "0.63360995", "0.6281331", "0.62617654", "0.62612957", "0.6231427", "0.62218636", "0.621769", "0.6209289"...
0.797666
0
Creates an email input and returns it
Создаёт поле ввода электронной почты и возвращает его
public static function email():InputEmail { return new InputEmail(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inputEmail($name, $content) {\n\t$inputText = '<input type=\"email\" id=\"'.$name.'\" name=\"'.$name.'[]\" value=\"'.utf8_encode($content).'\">';\n\t\n\treturn $inputText;\n}", "function createMail () {\n\t\n\t}", "protected function makeEmailAddress() {\n\t\treturn parent::makeEmailAddress('test');\n...
[ "0.68134713", "0.6749405", "0.65635234", "0.6523061", "0.6508058", "0.6507535", "0.6410001", "0.6374342", "0.6373555", "0.6369642", "0.63112026", "0.630824", "0.6307211", "0.6292691", "0.627198", "0.6240388", "0.62383753", "0.6219073", "0.61510146", "0.6131894", "0.61174166",...
0.7414723
0