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
BizForm::SortRecord() sort record on given column
BizForm::SortRecord() сортирует запись по указанному столбцу
public function SortRecord($sort_col) { $pos = strpos($sort_col, ","); if ($pos > 0) $reverse_flag = substr($sort_col, $pos + 1); $sortflag = ($reverse_flag == 1) ? "DESC" : "ASC"; $sort_col = substr($sort_col, 0, $pos); // change the OnSortField $this->m_OnSortField = $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function record_sort($records, $field, $reverse=false){\n\n $hash = array();\n \n foreach($records as $key => $record){\n $hash[$record[$field].$key] = $record;\n }\n \n ($reverse)? krsort($hash) : ksort($hash);\n \n $records = array();\n \n foreach($hash as $record){\n ...
[ "0.6891809", "0.6803265", "0.66187114", "0.6335731", "0.6194742", "0.61785924", "0.61240643", "0.61168146", "0.6114137", "0.6057699", "0.6035701", "0.5988249", "0.59495664", "0.5938796", "0.5880614", "0.5880614", "0.5880614", "0.58648545", "0.586276", "0.5841891", "0.5838168"...
0.7645261
0
BizForm::SearchRecord() show the query record mode
BizForm::SearchRecord() отображает режим записи запроса
public function SearchRecord() { $this->UpdateActiveRecord(null); $this->m_QueryONRender = false; $this->SetDisplayMode(MODE_Q); return $this->ReRender(true,false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showRecordInSearch()\n {\n return !($this->owner->hasField('ShowInSearch') AND false == $this->owner->ShowInSearch);\n }", "function showquery() {\r\n #~ echo '<td align=right>'; // see nav.inc.php for reason\r\n echo '<form name=\"search\" method=POST action=\"'.$_S...
[ "0.73144567", "0.7003529", "0.662968", "0.6529221", "0.6477767", "0.6463561", "0.6332839", "0.6292002", "0.62812436", "0.627197", "0.6210324", "0.6180011", "0.61651844", "0.61642087", "0.61187065", "0.60652727", "0.6026988", "0.6022407", "0.5994263", "0.59770226", "0.5973414"...
0.76463497
0
BizForm::RefreshQuery() clear the search rule and do the original query when view first loaded
BizForm::RefreshQuery() очищает правило поиска и выполняет оригинальный запрос при первом загрузке представления
public function RefreshQuery() { if ($this->m_OnSortField) { $this->SetSortFieldFlag($this->m_OnSortField, null); $this->m_OnSortField = null; $this->GetDataObj()->ClearSortRule(); } $this->SetDisplayMode (MODE_R); $this->m_ClearSearchRule = true; return $this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function resetQuery() {\r\n\t\tunset($this->query);\r\n\t\t$this->query = $this->createQuery();\r\n\t\tunset($this->queryConstraints);\r\n\t\t$this->queryConstraints = array();\r\n\t}", "public function updatingSearch()\n {\n $this->resetPage();\n }", "protected function resetQuery()\n ...
[ "0.698625", "0.6736528", "0.66738003", "0.6599311", "0.6552379", "0.65205246", "0.6426771", "0.6267148", "0.6260573", "0.6220055", "0.6219238", "0.61949193", "0.6187037", "0.61685497", "0.616151", "0.616151", "0.616151", "0.6148903", "0.61411893", "0.6131697", "0.6131697", ...
0.79245067
0
BizForm::Cancel() Cancel current edit or query, then go read mode
BizForm::Cancel() Отменить текущее редактирование или запрос, затем перейти в режим чтения
public function Cancel() { $prevMode = $this->m_Mode; $this->SetDisplayMode(MODE_R); if ($prevMode == MODE_N) // NEW mode to READ mode, has record change, need to refresh the subforms return $this->ReRender(true, true); // EDIT to READ, no record change return $this->ReRender...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }", "public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }", "public function cancel()\n {\n $this->resetInput();\n $this-...
[ "0.7546945", "0.7546945", "0.7259913", "0.71052265", "0.69750965", "0.6943742", "0.6938777", "0.69354075", "0.68767154", "0.68767154", "0.6688513", "0.66838574", "0.6611698", "0.6577655", "0.64540774", "0.64490914", "0.6412394", "0.6385865", "0.63772994", "0.63671595", "0.630...
0.8167068
0
BizForm::NewRecord() show the new record mode
BizForm::NewRecord() отображает режим добавления нового записи
public function NewRecord() { global $g_BizSystem; $this->SetDisplayMode(MODE_N); $recArr = $this->GetNewRecord(); if (!$recArr) return $this->ProcessDataObjError(); $this->UpdateActiveRecord($recArr); // TODO: popup message of new record successful created return $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show_new_record() {\r\n if ($this->allow_new) {\r\n #~ echo \"<p><a href='{$_SERVER['PHP_SELF']}?m={$this->module}&amp;act=new&amp;go=\".urlencode($GLOBALS['full_self_url']).\"'>Insert new row</a>\";\r\n echo '<form method=POST action=\"'.$_SERVER['PHP_SELF'].'\">';\r\n ...
[ "0.7946851", "0.6933514", "0.67558354", "0.6745736", "0.6730596", "0.66538525", "0.6578435", "0.65660226", "0.6497715", "0.6455896", "0.6417721", "0.63568246", "0.6356494", "0.63383865", "0.6324872", "0.6310433", "0.6301497", "0.63014144", "0.62962127", "0.6290102", "0.627470...
0.799912
0
default form validation do nothing. developers need to override this method to implement their logic
При валидации формы по умолчанию ничего не происходит. Разработчикам необходимо переопределить этот метод для реализации своей логики
protected function ValidateForm() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function form_backend_validation()\r\n {\r\n return true ;\r\n }", "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "public function validate() {\n if (!empty($this->value)) {\n parent::validate();\n }\n }", "public function vali...
[ "0.7409651", "0.73257524", "0.73257524", "0.72906363", "0.7247742", "0.7065774", "0.70466435", "0.70052785", "0.6993785", "0.6974428", "0.6966024", "0.69583064", "0.68987995", "0.68730235", "0.6852881", "0.6847783", "0.6795811", "0.6794152", "0.67883754", "0.6783952", "0.6780...
0.73816526
1
BizForm::SaveRecord() Save current edited record with input
BizForm::SaveRecord() Сохранить текущую отредактированную запись с ввода
public function SaveRecord() { // call ValidateForm() if ($this->ValidateForm() == false) return; $recArr = array(); if ($this->ReadInputRecord($recArr) == false) return; if ($this->m_Mode == MODE_N) $dataRec = new DataRecord(null, $this->GetDataObj()); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onSave()\n {\n try\n {\n // open a transaction with database 'samples'\n TTransaction::open('samples');\n \n // get the form data into an active record Entry\n $object = $this->form->getData('AgendaEntry');\n \n ...
[ "0.67028517", "0.6472436", "0.645022", "0.6365255", "0.63632566", "0.6351433", "0.6314028", "0.6313097", "0.6283938", "0.627577", "0.627577", "0.627577", "0.627577", "0.627577", "0.627577", "0.627577", "0.627577", "0.627577", "0.627577", "0.627577", "0.627577", "0.627577", ...
0.7478445
0
BizForm::DeleteRecord() Delete the record of current row
BizForm::DeleteRecord() Удалить запись текущей строки
public function DeleteRecord() { // TODO: support delete multiple records // read the id array from the check box list _REQUEST['row_selections'] global $g_BizSystem; $values = $g_BizSystem->GetClientProxy()->GetFormInputs('row_selections',false); if ($values) { foreach (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteRecord()\n { \n $sql = \"DELETE FROM Cubans WHERE Id = :Id\";\n $statement = $this->connect->prepare($sql);\n $statement->bindValue(':Id', $this->id);\n $statement->execute();\n }", "function deleteRecord()\t{\n\t\tif ($this->conf['delete'])\t{\t// If del...
[ "0.7640079", "0.76286453", "0.75354093", "0.74142456", "0.7413047", "0.7381915", "0.71535695", "0.71475536", "0.7103126", "0.7067173", "0.7059723", "0.7029607", "0.70152307", "0.6950108", "0.6931678", "0.692823", "0.6926597", "0.6907327", "0.6796317", "0.6796317", "0.6796317"...
0.84122926
0
BizForm::RemoveRecord() Remove the record out of the associate relationship
BizForm::RemoveRecord() Удалить запись из связанного отношения
public function RemoveRecord() { $rec = $this->GetActiveRecord(); global $g_BizSystem; $ok = $this->GetDataObj()->RemoveRecord($rec,$bPrtObjUpdated); if (!$ok) return $this->ProcessDataObjError($ok); $html = ""; // rerender parent form's driving form (its field is update...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onRelationManageRemove()\n {\n $this->beforeAjax();\n\n $recordId = post('record_id');\n $sessionKey = $this->deferredBinding ? $this->relationGetSessionKey() : null;\n $relatedModel = $this->relationModel;\n\n /*\n * Remove\n */\n if ($t...
[ "0.6813979", "0.6612005", "0.64071", "0.6311899", "0.63110745", "0.62719935", "0.6255385", "0.6187896", "0.61863273", "0.6184471", "0.61646646", "0.6096491", "0.6087318", "0.6013859", "0.6013756", "0.6010203", "0.6008153", "0.5972906", "0.59727114", "0.59619707", "0.59540707"...
0.7375513
0
BizForm::CopyRecord() Copy current record and paste to a new record Note: copy record will error out if db table uses composite columns as its primary key
BizForm::CopyRecord() Копирует текущий запись и вставляет её в новую запись Примечание: копирование записи завершится с ошибкой, если таблица базы данных использует составные столбцы в качестве первичного ключа
public function CopyRecord() { $rec = $this->GetActiveRecord(); if (!$rec) return; foreach ($rec as $k=>$v) $rec[$k] = addslashes($v); global $g_BizSystem; // get new record array $recArr = $this->GetDataObj()->NewRecord(); $rec["Id"] = $recArr["Id"]; // replace wi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clone_record($db_table) {\n $db_obj = new db_class();\n $typeHash = $db_obj->columnTypeHash($this->table_title);\n \n $sql = 'INSERT INTO ' . $this->table_title ;\n $typeList = '';\n $columns = ' (' ;\n $values = '(' ;\n $paramList = array();\n ...
[ "0.6525337", "0.6165195", "0.6137295", "0.60140705", "0.59805375", "0.5928032", "0.5911303", "0.58938324", "0.5869956", "0.5857455", "0.58397734", "0.57352066", "0.565873", "0.5641316", "0.5585916", "0.55501807", "0.5508207", "0.54714197", "0.54597795", "0.54578537", "0.54333...
0.8193739
0
BizForm::SetClientScripts auto add javascripts code to the page
BizForm::SetClientScripts автоматически добавляет код javascript на страницу
protected function SetClientScripts() { global $g_BizSystem; if ($this->m_jsClass != "jbForm") $g_BizSystem->GetClientProxy()->AppendScripts($this->m_jsClass, $this->m_jsClass.".js"); // scan all elements foreach ($this->m_RecordRow as $ctrl) { $cType = strtoupper($ctrl->m_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function addScripts() {\n global $CFG; \n $script = \"<script type=\\\"text/javascript\\\">\n jQuery(document).ready(function() {\n codeActivity.initEdit(); \n codeActivity.ajaxURL = '\" . $CFG->wwwroot . \"/mod/codeactivity/ajax.php';\n ...
[ "0.7834655", "0.74229556", "0.72017837", "0.71647453", "0.70598006", "0.7002699", "0.70014197", "0.6997561", "0.69918525", "0.69523233", "0.6929925", "0.6902576", "0.69006145", "0.68536353", "0.68114644", "0.68107283", "0.6787066", "0.67858565", "0.6757396", "0.6737201", "0.6...
0.8174726
0
BizForm::ReRender() rerender this form (form is rendered already) .
BizForm::ReRender() перерисовывает этот формат (форма уже отрендерена).
public function ReRender($redrawForm=true, $hasRecordChange=true) { if ($this->m_ReRenderOn == false) return; // consider the postAction $postAction = $this->GetPostAction(); if ($postAction) { $this->HandlePostAction($postAction); return; } global $g_BizSys...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "#[BeforeReRender]\n public function submitFormOnRender(): void\n {\n if (!$this->getFormInstance()->isSubmitted()) {\n $this->submitForm(false);\n }\n }", "protected function ReRenderSubForms()\n {\n if (!$this->m_SubForms)\n return;\n\n $this->m_ActiveRecord...
[ "0.7193632", "0.69183314", "0.61419123", "0.60782564", "0.5925603", "0.59230065", "0.5920741", "0.5748224", "0.57376385", "0.5657635", "0.5573895", "0.5536717", "0.55123013", "0.549581", "0.5471474", "0.54503703", "0.5428482", "0.5414958", "0.54090816", "0.5375595", "0.536293...
0.7392372
0
BizForm::ReRenderSubForms() rerender sub forms who has dependecy on this form. This method is called when parent form's change affect the sub forms
BizForm::ReRenderSubForms() перерисовывает подформы, которые зависят от этой формы. Этот метод вызывается, когда изменения в родительской форме влияют на подформы
protected function ReRenderSubForms() { if (!$this->m_SubForms) return; $this->m_ActiveRecord = $this->GetActiveRecord(); global $g_BizSystem; $mode = $this->GetDisplayMode()->GetMode(); foreach($this->m_SubForms as $subForm) { $formObj = $g_BizSystem->GetObjectFacto...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ReRender($redrawForm=true, $hasRecordChange=true)\n\t{\n\t if ($this->m_ReRenderOn == false)\n\t return;\n\t \n\t // consider the postAction\n\t $postAction = $this->GetPostAction();\n if ($postAction) {\n $this->HandlePostAction($postAction);\n return;\n }\n\...
[ "0.6582182", "0.62850034", "0.60938174", "0.56778204", "0.5406098", "0.534997", "0.5332994", "0.5269312", "0.5265423", "0.52481663", "0.51877964", "0.5104601", "0.50673497", "0.50629926", "0.5018036", "0.5016725", "0.49698514", "0.49688122", "0.4959845", "0.49394217", "0.4908...
0.8432645
0
BizForm::RenderFormattedTable() Render form as table format using table format style Example as template>m_FormatStyle:table_style give the top style of the table. head,rowodd,roweven,rowsel,cell in css file will be used in the table elements
BizForm::RenderFormattedTable() Отображает форму в виде таблицы с использованием стиля таблицы. Пример в виде шаблона>m_FormatStyle:table_style задает верхний стиль таблицы. head, rowodd, roweven, rowsel, cell из файла CSS будут использоваться для элементов таблицы.
protected function RenderFormattedTable() { if ($this->m_QueryONRender) if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule)) return $this->ProcessDataObjError($ok); $dispmode = $this->GetDisplayMode(); $hasSub = $this->m_SubForms ? 1 : 0; //$this->SetDispla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getFormTableContent(){\n\t\t$s_style = 'font-size:'.$this->_emailFontSize.'; font-family:'.$this->_emailFontFamily.';';\n\t\t$bgCol1='#FFFFFF';\n\t\t$bgCol2='#e4edf9';\n\t\t$bgColDarkerBG='#cddaeb';\n\t\t$colOutline='#8a99ae';\n\t\t$rowCount=0;\n\t\t$NL=\"\\r\\n\";\n\t\t$s_ret='<table cellpadding=...
[ "0.6399164", "0.61847943", "0.60661876", "0.60565466", "0.6054906", "0.6051843", "0.6020196", "0.5928422", "0.59245217", "0.5892703", "0.5882187", "0.58610725", "0.58340937", "0.580906", "0.58048266", "0.57858014", "0.57260275", "0.5702808", "0.56300515", "0.56246614", "0.562...
0.7178585
0
Display the matches (in stdout)
Показать совпадения (в stdout)
public function displayMatches() { echo "<h1>List of matches found</h1>"; print_r($this->matches); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function process_matches(&$output, &$match)\n\t{\n\t\tif (sizeof($match) > 0)\n\t\t{\n\t\t\t$data = implode(\"\\n\", $match);\n\t\t\tarray_unshift($output, new vB_Text_Diff_Entry($data, $data));\n\t\t}\n\n\t\t$match = array();\n\t}", "public function getAllMatches() {\n return $this->matches;\n }", "public...
[ "0.6026635", "0.58803254", "0.56374884", "0.55848897", "0.5584837", "0.5574421", "0.55723363", "0.55723363", "0.55261034", "0.5499175", "0.54970646", "0.5496352", "0.5451071", "0.54450196", "0.54265743", "0.54236233", "0.5394202", "0.53872496", "0.53837067", "0.53325796", "0....
0.77459764
0
Loads a given git command, or throws an informative exception if such a command cannot be loaded.
Загружает заданный git-команду или выбрасывает информативное исключение, если такая команда не может быть загружена.
public static function loadCommand($command) { // Check to see if command has already been loaded; if not, do our checks. if (empty(self::$commands[$command])) { // Check to see if it is an excluded command; if so, throw an exception. if (in_array($command, self::$excludedCommands)) { throw ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCommand(string $command);", "abstract protected function getGitCommand(): string;", "private function runGitCommand($command)\n {\n $path = dirname($this->file);\n $process = new Process($command, $path);\n\n if (0 === $process->run()) {\n return trim($proc...
[ "0.6075108", "0.5926321", "0.587538", "0.5646386", "0.5596301", "0.5428948", "0.5323745", "0.5267764", "0.51087785", "0.50897366", "0.5089615", "0.5085852", "0.5067194", "0.5038133", "0.50078964", "0.4954108", "0.49481094", "0.49432927", "0.4932581", "0.4920479", "0.4911014",...
0.7034166
0
Removes the entry from the operations.byml file of the given context that matches the given id. If the entry didn't exist, the method will be silent.
Удаляет запись из файла operations.byml указанного контекста, соответствующую заданному идентификатору. Если запись не существовала, метод будет работать без вывода сообщений.
protected function removeEntry(string $contextId, string $id) { $opFile = $this->getOperationsFile($contextId); $ops = BabyYamlUtil::readFile($opFile); /** * If the entry is found, we remove it directly from the operations. */ $addTheDeleteEntry = true; $r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove($id);", "public function remove($id);", "public static function remove($id)\n {\n $db = Zend_Registry::get('dbAdapter');\n $db->delete('main', 'main. = ' . $id);\n }", "public function remove($id)\n\t{\n\t}", "abstract public function remove($id);", "public func...
[ "0.5948843", "0.5948843", "0.5900992", "0.583733", "0.5799797", "0.56758916", "0.562627", "0.5555392", "0.5544114", "0.55012566", "0.5489974", "0.54875785", "0.54822344", "0.5481346", "0.5436856", "0.54347503", "0.5412185", "0.54042006", "0.53996235", "0.534955", "0.53168017"...
0.76414067
0
Updates the entry in the operations.byml file of the given context that matches the given id. Throws an exception if the file wasn't found, or in case of problems. The options are: move: bool=false. Whether to move or copy the file from the given path to the destination.
Обновляет запись в файле operations.byml указанного контекста, соответствующую заданному идентификатору. Вызывает исключение, если файл не найден или возникли проблемы. Варианты: move: bool=false. Определяет, следует ли переместить или скопировать файл из указанного пути в место назначения.
protected function updateEntry(string $contextId, string $id, ?string $path, array $meta, array $options = []) { if (null !== $path) { $path = $this->getRealPath($path); } $opFile = $this->getOperationsFile($contextId); $ops = BabyYamlUtil::readFile($opFile); $us...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addEntry(string $contextId, string $id, ?string $path, array $meta, array $options = []): array\n {\n if (null !== $path) {\n $path = $this->getRealPath($path);\n }\n\n $type = $options['type'] ?? 'add';\n $useMove = (bool)($options['move'] ?? false);\n\...
[ "0.5894428", "0.58074415", "0.552832", "0.54824644", "0.54824644", "0.54824644", "0.54824644", "0.5441531", "0.5419202", "0.5419202", "0.5387602", "0.538625", "0.538625", "0.53787184", "0.53642166", "0.53601104", "0.53601104", "0.53601104", "0.53601104", "0.53601104", "0.5360...
0.72480106
0
Returns the context dir for the given context id.
Возвращает каталог контекста для заданного идентификатора контекста.
protected function getContextDir(string $contextId): string { return $this->rootDir . "/" . CaseTool::toPortableFilename($contextId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDirectory($id)\n {\n $hash = sha1($id, false);\n $dirs = array(\n $this->getCacheDirectory(),\n substr($hash, 0, 2),\n substr($hash, 2, 2)\n );\n return join(DIRECTORY_SEPARATOR, $dirs);\n }", "protected function getDirector...
[ "0.6628162", "0.6628162", "0.56003535", "0.55993193", "0.5515558", "0.54561937", "0.5429322", "0.5415443", "0.5316108", "0.5307999", "0.5287511", "0.5282807", "0.52705836", "0.5263187", "0.5242585", "0.52309644", "0.5218218", "0.5201452", "0.51810694", "0.5169915", "0.5129694...
0.7305059
0
Creates the operations.byml file if necessary (for the given context id) and returns its path.
Создает файл operations.byml, если это необходимо (для заданного идентификатора контекста) и возвращает его путь.
protected function getOperationsFile(string $contextId): string { $opFile = $this->getContextDir($contextId) . "/operations.byml"; if (false === file_exists($opFile)) { $ops = []; BabyYamlUtil::writeFile($ops, $opFile); } return $opFile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function doGetEntryRealPathByOperation(string $contextId, array $operation, array $options = [])\n {\n return $this->getContextDir($contextId) . \"/files/\" . $operation['path'];\n }", "protected function addEntry(string $contextId, string $id, ?string $path, array $meta, array $options = ...
[ "0.54305196", "0.53098416", "0.5243714", "0.51919615", "0.49407333", "0.48862344", "0.4839997", "0.48362857", "0.4762411", "0.46823785", "0.46757445", "0.46458334", "0.463639", "0.4614914", "0.4492277", "0.44777828", "0.44698673", "0.44611558", "0.44294965", "0.4426375", "0.4...
0.7465523
0
Hook called after the file has been removed from the virtual file system. id: the file identifier op: the operation if one was deleted, or null otherwise realpath: the realpath of the deleted file if one was deleted, or null otherwise
Событие, вызываемое после удаления файла из виртуальной файловой системы. id: идентификатор файла op: операция, если файл был удален, или null в противном случае realpath: реальный путь удаленного файла, если файл был удален, или null в противном случае
protected function onFileRemovedAfter(string $contextId, string $id, ?array $op, ?string $realpath) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeFile(int $id): void\n {\n $stmt = $this->db->prepare(\"DELETE FROM comments WHERE file_id=:id_bind\");\n $stmt->bindValue(':id_bind', $id, \\PDO::PARAM_INT);\n $stmt->execute();\n\n $stmt = $this->db->prepare(\"DELETE FROM files WHERE id=:id_bind\");\n $s...
[ "0.6655746", "0.6428937", "0.626395", "0.6247531", "0.6220674", "0.61671746", "0.610972", "0.610972", "0.610972", "0.60971606", "0.60802203", "0.6078053", "0.6057658", "0.6020345", "0.59970385", "0.5994904", "0.597039", "0.5922993", "0.59033406", "0.58998823", "0.5888017", ...
0.82158256
0
Returns Counts of email records where the given email matches.
Возвращает количество записей электронной почты, где заданный электронный адрес совпадает.
public function emailCounts($email);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUsersByEmail($email) {\n $sql = \"SELECT count(*) as total FROM \" . DB_PREFIX . \"wkpos_user WHERE email = '\" . $email . \"' AND user_id != '\" . $this->session->data['user_login_id'] . \"'\";\n $query = $this->db->query($sql);\n\n return $query->row['total'];\n }", "protected func...
[ "0.71565586", "0.7053754", "0.7026054", "0.695855", "0.6875584", "0.6798478", "0.679187", "0.6596043", "0.65268284", "0.64507735", "0.6441059", "0.64250684", "0.63942015", "0.6330408", "0.6326498", "0.63171285", "0.6182561", "0.6180031", "0.6162699", "0.61534566", "0.61496484...
0.8394017
0
To extract Http Code. HTTP Batch Response can be in one of the two formats 1. HTTP/1.1 100 Continue [newline][newline] HTTP/1.1 Code Message In this case the actual code is the code part of HTTP string in second line 2. HTTP/1.1 Code Message
Для извлечения Http кода. HTTP Batch Response может быть в одном из двух форматов 1. HTTP/1.1 100 Continue [newline][newline] HTTP/1.1 Code Message В этом случае фактический код — это часть кода строки HTTP во второй строке 2. HTTP/1.1 Code Message
public function GetCode() { if($this->_correctHttpLine != null) { preg_match("|^HTTP/[\d\.x]+ (\d+)|", $this->_correctHttpLine, $m); if (isset($m[1])) { return (int)$m[1]; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCode()\n\t{\n\t\t$matches = array();\n\t\tif (isset($this->headers) && isset($this->headers[0]))\n\t\t\tpreg_match('|HTTP/\\d\\.\\d\\s+(\\d+)\\s+.*|', $this->headers[0], $matches);\n\t\treturn isset($matches[1]) ? (int)$matches[1] : 0;\n\t}", "function getHttpCode();", "function get_http_res...
[ "0.73053265", "0.7160599", "0.71346563", "0.70290184", "0.69969416", "0.6822589", "0.6822589", "0.678162", "0.6726381", "0.67052615", "0.67023355", "0.66821796", "0.6654358", "0.65762746", "0.6560805", "0.6540516", "0.64696616", "0.64683145", "0.6461401", "0.6444074", "0.6438...
0.74401766
0
To get the batch response body.
Чтобы получить тело ответа в пакете.
public function GetRawHttpResponse() { return $this->_rawHttpBatchResponse; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBody()\n {\n return $this->response;\n }", "public function getBody() {\n\t\treturn $this->response_body;\n\t}", "public function getBody()\n\t{\n\t\tif ( !$this->executed ) {\n\t\t\treturn 'Trying to fetch response body for a pending request.';\n\t\t}\n\t\treturn $this->respons...
[ "0.70280373", "0.69828504", "0.6885645", "0.67350686", "0.6679059", "0.6639184", "0.6616117", "0.65745234", "0.6566801", "0.65563506", "0.653732", "0.6512043", "0.6510335", "0.6507144", "0.6502652", "0.6501219", "0.6482957", "0.6481892", "0.6472658", "0.64680064", "0.64672595...
0.7176031
0
Construct a HttpBatchResponse object from raw batch response.
Создайте объект HttpBatchResponse из сырых данных ответа в пакете.
public static function Create($httpBatchResponse) { $changesetBoundary = null; $httpResponses = array(); if (!self::CheckIsError($httpBatchResponse)) { $changesetBoundary = HttpBatchResponse::ExtractChangesetBoundary($httpBatchResponse); if (!isset($changesetB...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetAsHttpResponse()\n {\n $parts = explode(\"--\" . $this->_changesetBoundary,\n $this->_rawHttpBatchResponse, 2);\n return new Microsoft_Http_Response($this->GetCode(),\n HttpResponse::extractHeaders($parts[0]),\n ...
[ "0.5658277", "0.56258756", "0.5618119", "0.5466368", "0.5367479", "0.53603345", "0.53492403", "0.5336909", "0.53273875", "0.5327176", "0.5307578", "0.53007185", "0.5270299", "0.52382547", "0.5231376", "0.5222696", "0.51875234", "0.5162311", "0.5123806", "0.5101168", "0.509693...
0.7419049
0
This function returns true if batch header of $rawHttpBatchResponse contains HTTP status code for error else false.
Эта функция возвращает true, если заголовок пакета $rawHttpBatchResponse содержит HTTP-код состояния для ошибки, иначе false.
protected static function CheckIsError($rawHttpBatchResponse) { $httpLine = self::ExtractCorrectHttpLine($rawHttpBatchResponse); if($httpLine != null) { preg_match("|^HTTP/[\d\.x]+ (\d+)|", $httpLine, $m); if (isset($m[1])) { $floorVal = fl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasError()\n {\n return $this->info['http_code'] != '200';\n }", "public function isSuccessful(): bool\n {\n return \\in_array($this->getStatusCode(), [200, 201, 202, 204, 205]);\n }", "public function IsError()\n {\n if($this->_correctHttpLine != null)\n ...
[ "0.6734576", "0.6631673", "0.6616551", "0.6596415", "0.64952564", "0.64580846", "0.6440501", "0.6415775", "0.6405771", "0.637121", "0.62749845", "0.62698436", "0.62678117", "0.62673473", "0.6250424", "0.62315995", "0.6211907", "0.6209211", "0.6200225", "0.61797506", "0.617004...
0.7830958
0
Get the types array map which holds all registered types and the corresponding type class
Получите массив карты типов, который содержит все зарегистрированные типы и соответствующие классы типов
public static function getTypesMap() { return self::$typesMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getTypesMap(): array\n {\n return self::$typesMap;\n }", "public function getTypeMap()\n {\n return $this->typeMap;\n }", "public function getTypeMap()\n {\n }", "public static function get_type_registry()\n {\n }", "public static...
[ "0.82546985", "0.7464621", "0.7455776", "0.717192", "0.71357745", "0.71064496", "0.7083926", "0.7036556", "0.6974769", "0.6972508", "0.69536084", "0.6927291", "0.6861731", "0.6861731", "0.6861731", "0.6861731", "0.68394184", "0.68364877", "0.679472", "0.6779887", "0.670672", ...
0.80459994
1
Record a record hit to the statistics index when stat tracking is enabled; this is called by the Home action.
Записать попадание в рекорд в индекс статистики, если включено отслеживание статистики; это вызывается действием Home.
public function recordHit() { global $configArray; if ($configArray['Statistics']['enabled']) { // Setup Statistics Index Connection $solrStats = ConnectionManager::connectToIndex('SolrStats'); // Save Record View $solrStats->saveRecordView($this->re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function recordAnalytics() {\n\t\t//Is your user agent any of my business? Not really, but don't worry about it.\n\t\texecuteQuery(\"\n\t\t\tINSERT INTO dwm2r_activitymonitor\n\t\t\t(IPAddress,UserAgent,Flags,Seed,CreatedDTS)\n\t\t\tVALUES (\n\t\t\t\t'\".$_SERVER['REMOTE_ADDR'].\"',\n\t\t\t\t'\".$_SERVER['HTTP_US...
[ "0.6572687", "0.64216864", "0.6278415", "0.62199825", "0.61919165", "0.6091253", "0.59876066", "0.59746367", "0.5839471", "0.58259034", "0.5744556", "0.56715214", "0.56668496", "0.5616951", "0.5609843", "0.5601164", "0.55535907", "0.555136", "0.55492556", "0.55422217", "0.551...
0.81755155
0
Set database table prefix
Установить префикс таблиц базы данных
public function setPrefixFromDB(){ foreach($this->getTables() as $table){ $prefix = explode('_', $table); if(isset($prefix[1])){ if($this->prefix==$prefix[0]) break; else $this->prefix = $prefix[0]; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setTablePrefix()\n {\n }", "static function set_table_prefix($tp) {\n\t\tself::$table_prefix = $tp;\n\t}", "public static function getTablePrefix()\n {\n }", "public static function getTablePrefix()\n {\n return 'prefix_';\n }", "public function getTableP...
[ "0.8772204", "0.82414293", "0.8106719", "0.8043617", "0.80148953", "0.7847606", "0.78414595", "0.76680994", "0.7622542", "0.7565888", "0.75385636", "0.74136823", "0.7413044", "0.74047804", "0.73862827", "0.73421973", "0.73334724", "0.7318997", "0.7288911", "0.7255832", "0.724...
0.85105306
1
must check and return this keys from $_POST token [string] new_only [boolean] emptys [boolean] wrongs [boolean] answer_result [boolean] random [boolean] length [int] category [string]
необходимо проверить и вернуть эти ключи из $_POST token [string] new_only [boolean] emptys [boolean] wrongs [boolean] answer_result [boolean] random [boolean] length [int] category [string]
private function check_make_input() { $output = []; if (!isset($_POST['token']) || !isset($_POST['new_only']) || !isset($_POST['emptys']) || !isset($_POST['wrongs']) || !isset($_POST['answer_result']) || !isset($_POST['random']) || !isset($_POST['length']) || !isset($_POST['category'])) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function chooseTokensCheckVars()\n {\n $cart = geoCart::getInstance();\n //check the settings!\n\n if (!$_POST['token_choice']) {\n $msgs = self::_getText();\n\n $cart->addError()\n ->addErrorMsg('tokens_purchase', $msgs['error_choose_token...
[ "0.62056375", "0.6144503", "0.5749659", "0.56880814", "0.5658803", "0.5630164", "0.55228466", "0.54872245", "0.5446063", "0.5445069", "0.5414132", "0.53748727", "0.5369509", "0.5344173", "0.53163314", "0.52772856", "0.5244206", "0.5234528", "0.5233092", "0.5222523", "0.514426...
0.72371405
0
check this option with user access
проверьте этот параметр с доступом пользователя
private function check_access_to_option(array $_option, int $_user_id) { $user_access_code = $this->check_user_access((int) $_user_id); if (!$user_access_code) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cfwprapi_can_user_have_access( WP_REST_Request $request ) {\n return current_user_can( 'manage_options' );\n}", "function ShowOptionLink() {\n\t\tglobal $Security, $scholarship_package;\n\t\tif ($Security->IsLoggedIn()) {\n\t\t\tif (!$Security->IsAdmin()) {\n\t\t\t\treturn $Security->IsValidUserID($s...
[ "0.69238406", "0.6856634", "0.6856634", "0.68552583", "0.68281573", "0.6785348", "0.67772865", "0.6746185", "0.6704687", "0.6704687", "0.6680947", "0.6649449", "0.6633303", "0.6606926", "0.6598789", "0.657869", "0.657869", "0.657869", "0.6578102", "0.6578102", "0.6577317", ...
0.7292744
0
check and return this inputs from $_POST token [string] exma_id [int] corrects [JSON/array] wrongs [JSON/array] emptys [JSON/array]
проверьте и верните эти входные данные из $_POST токен [string] exma_id [int] corrects [JSON/array] wrongs [JSON/array] emptys [JSON/array]
private function check_finish_inputs() { $output = []; if (!isset($_POST["token"]) || !isset($_POST["exam_id"]) || !isset($_POST["corrects"]) || !isset($_POST["wrongs"]) || !isset($_POST["emptys"])) return false; if (empty($_POST["token"]) || empty($_POST["exam_id"]) || empty($_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function check_make_input()\n {\n $output = [];\n\n if (!isset($_POST['token']) || !isset($_POST['new_only']) || !isset($_POST['emptys']) || !isset($_POST['wrongs']) || !isset($_POST['answer_result']) || !isset($_POST['random']) || !isset($_POST['length']) || !isset($_POST['category']))\n ...
[ "0.6677389", "0.60507935", "0.60507935", "0.60507935", "0.5983586", "0.59225214", "0.5901134", "0.5813058", "0.57808274", "0.57808274", "0.57713", "0.5758431", "0.57319653", "0.57111114", "0.5686363", "0.56624967", "0.5650246", "0.5645553", "0.5633591", "0.5629397", "0.562779...
0.7295957
0
Get the svg regex pattern.
Получить шаблон регулярного выражения svg.
private function getSvgRegex() : string { return '~^ <svg\s.+viewBox="(?P<viewBox>0\s0\s(?P<width>\d+)\s(?P<height>\d+))"> # opening <svg> with width and height (from viewBox attribute) <!--.+--> # Font Awesome License C...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getRegularExpression();", "function getRegex() {\n\t\treturn \"/\".$this->prefixes . $this->source . $this->suffixes. \"/\" . $this->modifiers;\n\t}", "public function getRegex() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"regex\", \"\");\n\t}", "public fun...
[ "0.682686", "0.67306954", "0.67304736", "0.6722517", "0.6722517", "0.6662467", "0.65021664", "0.65021664", "0.6462015", "0.6462015", "0.6415263", "0.6415263", "0.6397987", "0.634499", "0.62689596", "0.62675583", "0.62602156", "0.62342733", "0.62114143", "0.6182372", "0.617381...
0.7619533
0
$one nombre de array de los valores de la funtion set $two Los valores que van dentro del array de la function set
$one имя массива значений функции set $two Значения, которые помещаются в массив функции set
public function set($one, $two=null){ if (is_array($one)) { if (is_array($two)) { $data = array_combine($one, $two); }else{ $data = $one; } }else{ $data = array($one=>$two); } $this->_view->setVars($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __setInfo($one, $two = null) {\n\t\t$data = array();\n\n\t\tif (is_array($one)) {\n\t\t\tif (is_array($two)) {\n\t\t\t\t$data = array_combine($one, $two);\n\t\t\t} else {\n\t\t\t\t$data = $one;\n\t\t\t}\n\t\t} else {\n\t\t\t$data = array($one => $two);\n\t\t}\n\t\t$this->_lastInfo = array_merge($t...
[ "0.7536746", "0.7125052", "0.613436", "0.6061652", "0.555009", "0.54816246", "0.54372656", "0.5388178", "0.53716594", "0.5346571", "0.53233355", "0.52968276", "0.52800643", "0.52627784", "0.5234294", "0.5221767", "0.5196658", "0.5189121", "0.5145135", "0.5130264", "0.51247555...
0.7386039
1
Is it command. Commands start from / (slash)
Это команда. Команды начинаются с / (слэш)
private function isCommand(string $string): bool { return strncmp($string, '/', 1) === 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isCommand($text) {\n return ( substr($text, 0, 1) == \"/\" ) ? true : false;\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public funct...
[ "0.8154392", "0.71213853", "0.71213853", "0.71213853", "0.71213853", "0.71213853", "0.69313496", "0.6892232", "0.67215264", "0.6667739", "0.6624764", "0.6597937", "0.6556483", "0.65301263", "0.64847225", "0.6435873", "0.63879263", "0.6371536", "0.6371083", "0.63335234", "0.62...
0.73612386
1
endregion region Main functions Join the game with the specified ID or create a new one and return a new gameID gameID is a string of 3 alphanumeric caracters
endregion region Основные функции Присоединитесь к игре с указанным идентификатором или создайте новую и верните новый gameID gameID является строкой из 3 алфавитно-цифровых символов
function joinGame($gameID, $playerName) { $dbh = connectToDatabase(); if (!$gameID) { // Check that there is no game already using this ID $gameIDIsUnique = true; // If $gameID empty, create new game $gameID = newGameID(); // Count number of rows with $gameID $s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function newGameID()\n{\n return randomString();\n}", "function newGame() {\n\t$newid = uniqid();\n\t$newgame = [\n\t\t'open' => $newid,\n\t\t$newid => ['state' => 'open', 'players' => []],\n\t];\n\tupdateGames($newgame);\n\twriteGame($newid, ['round' => 0]);\n\n\treturn $newid;\n}", "function joinGame($u...
[ "0.6650937", "0.6349432", "0.6175855", "0.6061047", "0.598846", "0.5816179", "0.5740137", "0.5719858", "0.5698816", "0.56089544", "0.5540726", "0.5518419", "0.54598254", "0.54209864", "0.54039454", "0.533514", "0.53332454", "0.53279835", "0.53269917", "0.531378", "0.53016585"...
0.7476717
0
Leave the game with the specified ID or delete it if called by the last player
Выйти из игры с указанным ID или удалить её, если вызван последним игроком
function leaveGame($gameID, $playerName) { // If $gameID empty, ignore if ($gameID === '') { http_response_code(400); die('GAME ID MISSING'); } // Otherwise, leave game $dbh = connectToDatabase(); if (playerIsGM($gameID, $playerName)) { $stmt = $dbh->prepare('UPDATE gam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function leave(Request $request, $id)\n {\n $userId = $request->user()->id;\n $leagueAdminId = League::findOrFail($id)->league_admin_id;\n\n // Ensure user isn't league admin\n if($userId == $leagueAdminId){\n return back()->with('error', 'You cannot leave a league ...
[ "0.64284134", "0.63772726", "0.6266195", "0.6263336", "0.6150872", "0.61379075", "0.6040208", "0.60167336", "0.5949734", "0.5905429", "0.5863817", "0.5853786", "0.5831699", "0.5794543", "0.57802737", "0.57713324", "0.57327783", "0.57167774", "0.57003206", "0.5691744", "0.5663...
0.7176326
0
Create a new 3 letter string to use as gameID
Создайте новый строковый идентификатор из 3 букв для использования в качестве gameID
function newGameID() { return randomString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function make_id () {\n // http://sourceforge.net/projects/phunction/\n return sprintf('%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));\n }", "function generatePopId($length = 3) {\n $characters = '123456789';\n $rand...
[ "0.71837056", "0.6810796", "0.6727847", "0.67093486", "0.6697293", "0.6620383", "0.6557908", "0.6537767", "0.6515797", "0.651169", "0.64956707", "0.64827114", "0.64050347", "0.6390086", "0.6387255", "0.6370516", "0.6363806", "0.6351139", "0.63249147", "0.6248654", "0.62432903...
0.7160302
1
startSession Performs all the actions necessary to initialize this session object. Tries to determine if the the user has logged in already, and sets the variables accordingly. Also takes advantage of this page load to update the active visitors tables.
startSession Выполняет все действия, необходимые для инициализации этого объекта сеанса. Пытается определить, авторизован ли пользователь, и устанавливает переменные соответствующим образом. Также использует этот загрузочный процесс для обновления таблиц активных посетителей.
public function startSession() { session_start(); //Tell PHP to start the session /* Determine if user is logged in */ $this->logged_in = $this->checkLogin(); /** * Set guest value to users not logged in, and update * active guests table accordingly. */ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function initSession(){\n \n self::setSessionIni(); \n self::setSessionHandler();\n session_start();\n self::checkSystemCookie();\n\n // if 'started' is set for previous request\n //we truely know we are in 'in_session'\n if (isset($_SESSION['st...
[ "0.74910915", "0.7424528", "0.73875695", "0.73861045", "0.73327625", "0.7274146", "0.7226246", "0.7200605", "0.7144584", "0.7102855", "0.7057631", "0.7031149", "0.700014", "0.69926053", "0.6959047", "0.69334435", "0.69334435", "0.69251454", "0.69118565", "0.6902492", "0.68901...
0.8554343
0
checkLogin Checks if the user has already previously logged in, and a session with the user has already been established. Also checks to see if user has been remembered. If so, the database is queried to make sure of the user's authenticity. Returns true if the user has logged in.
checkLogin Проверяет, был ли пользователь ранее авторизован и уже существует сессия с пользователем. Также проверяет, запомнен ли пользователь. Если да, производится запрос к базе данных для подтверждения подлинности пользователя. Возвращает true, если пользователь авторизован.
public function checkLogin() { /* Check if user has been remembered */ if (isset($_COOKIE['cookname']) && isset($_COOKIE['cookid'])) { $this->username = $_SESSION['username'] = $_COOKIE['cookname']; $this->userid = $_SESSION['user_id'] = $_COOKIE['cookid']; } /*...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkLogin() {\n if (isset($_SESSION['login'])) {\n if ($_SESSION['login'] == true) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "function check_login()\r\n ...
[ "0.7319114", "0.7270071", "0.7216147", "0.7184806", "0.7154535", "0.7130343", "0.7104686", "0.7059172", "0.7058103", "0.69828135", "0.6981022", "0.6971756", "0.69700074", "0.6953983", "0.6948999", "0.6936746", "0.69221556", "0.68844706", "0.68736815", "0.68723965", "0.6862469...
0.73844343
0
Determines year length, in days.
Определяет продолжительность года, в днях.
public function getYearLength($year);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hebrew_year_days($yr) {\n\t\treturn ( hebrew_to_jd(7, 1, $yr + 1) - hebrew_to_jd(7, 1, $yr) );\n\t}", "public function isLeapYear();", "private function days_to_years( $days ) {\n\t\treturn floor( $days / 365 );\n\t}", "function centuryFromYear($year)\n{\n return $year%100==0?(int)floor($year/100):...
[ "0.70539415", "0.6360501", "0.6303427", "0.62354964", "0.62326586", "0.621807", "0.6201192", "0.6168365", "0.6161536", "0.61393315", "0.61229116", "0.61141455", "0.61095804", "0.6101058", "0.6090608", "0.6087717", "0.60527676", "0.60503185", "0.60429865", "0.603421", "0.60191...
0.7874283
0
Get year's first day index (since the start of the era).
Получить индекс первого дня года (с начала эры).
public function getYearEraDayIndex($year);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getFirstDayOfCurrentYear()\n\t{\n\t\t$dateInSeconds = mktime(0, 0, 0, 1, 1, date('Y'));\n\t\t$date = date('Y-m-d', $dateInSeconds);\n\t\treturn $date;\n\t}", "function getRHUL_StartYear() {\n $dname = getRHUL_LDAP_FieldValue(\"adi_displayname\");\n\tif (strpos($dname, \"(\"))\n\t{\t...
[ "0.7917737", "0.6772323", "0.6712785", "0.66957796", "0.6522487", "0.64649636", "0.64598656", "0.64201635", "0.64189464", "0.63045704", "0.6249713", "0.62312555", "0.6210106", "0.6205686", "0.61913866", "0.6191174", "0.6188909", "0.61677337", "0.6166174", "0.6161696", "0.6141...
0.73779994
1
Gets year & dayIndex (in that year) from an eraDayIndex
Получает год и dayIndex (внутри этого года) из eraDayIndex
public function getYearAndDayIndexFromErayDayIndex($eraDayIndex);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getYearEraDayIndex($year);", "function hebrew_year_days($yr) {\n\t\treturn ( hebrew_to_jd(7, 1, $yr + 1) - hebrew_to_jd(7, 1, $yr) );\n\t}", "function get_year()\n {\n $datearray=getdate($this->timestamp);\n return $datearray[\"year\"];\n }", "public function getYear($a = ...
[ "0.8106487", "0.6026772", "0.5702168", "0.54436815", "0.5394086", "0.5389952", "0.5359254", "0.53544813", "0.5279268", "0.52651006", "0.5243265", "0.52213925", "0.52158445", "0.5195393", "0.5153933", "0.51278275", "0.5104954", "0.51043653", "0.5091387", "0.50894237", "0.50473...
0.8946492
0
Save the $object into the XML $xmlPath
Сохраните $object в XML $xmlPath
function saveObject($object, $xmlPath) { $class_vars = get_object_vars($object); $xml = domxml_new_doc("1.0"); $elements = $xml->create_element(get_class($object)); $elementsNode = $xml->append_child($elements); foreach ($class_vars as $name => $value) { $element = $xml->crea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save(){ \r\n return $this->xmlfile->save($this->absolutepath);\r\n }", "public function saveXML(){\r\n return $this->xml->saveXML();\r\n }", "public function save($object);", "public function SaveObject($object) {\n\t\trequire_once dirname(__FILE__) . '/' . get_clas...
[ "0.67209715", "0.6467804", "0.64130086", "0.6402344", "0.64001524", "0.62155473", "0.6209148", "0.6160196", "0.6107419", "0.6096192", "0.5952925", "0.5931757", "0.5914121", "0.58934987", "0.58796346", "0.5851007", "0.5834234", "0.5725911", "0.57119405", "0.57096404", "0.57036...
0.84185815
0
Display the `Delete` action for listings in in User Dashboard > My Listings.
Показать действие `Delete` для списков в разделе User Dashboard > My Listings.
protected function display_delete_action( $listing ) { if ( $listing->get_status() === 'pending_payment' && ! empty( $this->pending_orders[ $listing->get_id() ] ) ) { return; } $delete_url = add_query_arg( [ 'action' => 'delete', 'job_id' => $listing->get_id() ], wc_get_account_endpoint_url( \MyListin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteAction() {\n\t\t\t$this->_forward('index');\n\t\t}", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "public function deleteList(){\n\n $posts=$this->articleDAO->getPosts()...
[ "0.6695461", "0.6688046", "0.65850246", "0.6575547", "0.6575547", "0.6556444", "0.65543133", "0.65104526", "0.64991283", "0.6494047", "0.64860606", "0.6456677", "0.64559746", "0.6412361", "0.64007103", "0.6391455", "0.63868433", "0.63314265", "0.6310855", "0.62581", "0.625518...
0.72461003
0
/ REQUIRED IF Requerido si el valor del campo en el primer parametro es igual al segundo parametro. EJEMPLO required_if[tipo_inmueble_id,6] Se requiere modificar el core Form_validation lineas 494 y 532 por: if (!preg_match("/required_if\[.+\]/", implode(' ', $rules))) return;
/ Требуется, если значение поля в первом параметре равно второму параметру. ПРИМЕР required_if[tipo_inmueble_id,6] Требуется изменить ядро Form_validation строки 494 и 532 следующим образом: if (!preg_match("/required_if\[.+\]/", implode(' ', $rules))) return;
function required_if($str, $parms) { list($campo, $valor,$label,$desc)=explode(',',$parms,4); if($_POST[$campo]==$valor && $str=='') { $campo=str_replace(array('_id','_'),array('',' '),$campo); $this->CI->form_validation->set_message('required_if', "El campo %s debe contener un dato si {$label} es '{$d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function requiredIf ($param)\n {\n list($OtherFieldName, $rule) = explode(',', $param);\n switch ($rule)\n {\n case 'notEmpty':\n if (empty($this->value) && (isset($_POST[$OtherFieldName]) && !empty($_POST[$OtherFieldName])))\n {\n ...
[ "0.66492856", "0.66092443", "0.6099727", "0.60885715", "0.60039324", "0.59194505", "0.59109366", "0.5886091", "0.58772874", "0.5857938", "0.5842526", "0.57833266", "0.5779513", "0.5754773", "0.57427526", "0.5732554", "0.5729021", "0.57278365", "0.5716129", "0.5713349", "0.568...
0.71176136
0
/ IMAGE VALIDATION Se requiere modificar el core Form_validation lineas 494 y 532 if (!preg_match("/valid_image/", implode(' ', $rules))) return;
/ ПРОВЕРКА ВАЛИДАЦИИ Изменить core Form_validation строки 494 и 532 if (!preg_match("/valid_image/", implode(' ', $rules))) return;
function valid_image($str,$campo) { if($_FILES[$campo]['tmp_name']): /* //Check for image upload if(!isset($_FILES['fuente_pantalla'])) { $this->validation->set_message('valid_image', 'Imagen requerida.'); return false; } //Check for file size if($_FILE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate_image_field($field)\n {\n }", "public function valid_images($str)\n {\n if (!isset($_FILES['image']) || $_FILES['image']['size'] == 0 || $_FILES['image']['error'] != UPLOAD_ERR_OK) {\n $this->form_validation->set_message('valid_images', 'Image not uploaded.');\n ...
[ "0.74268645", "0.7194236", "0.7149642", "0.711936", "0.71177435", "0.71109235", "0.70786494", "0.7025351", "0.6979204", "0.69622344", "0.6839643", "0.67637414", "0.67509955", "0.674953", "0.6744146", "0.6727474", "0.6675485", "0.66685075", "0.6659504", "0.66581726", "0.665729...
0.74498755
0
/ FECHA VALIDA VALIDA QUE LA FECHA VENGA EN FORMATO dd/mm/aaaa
/ ДАТА ВАЛИДА ПРОВЕРЯЕТ, ЧТО ДАТА ПРИХОДИТ В ФОРМАТЕ dd/mm/aaaa
function fecha($str) { $this->CI->form_validation->set_message('fecha', "El campo %s debe contener una fecha en formato dd/mm/aaaa."); return (bool) preg_match("/(^([0]?[1-9]|[1|2][0-9]|[3][0|1])(\/)([0]?[1-9]|[1][0-2])(\/)([0-9]{4}|[0-9]{2})$)|^$/", $str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fecha_valida($fecha){\n if(ereg( \"([0-9]{2})/([0-9]{2})/([0-9]{4})\",$fecha)){\n ereg( \"([0-9]{2})/([0-9]{2})/([0-9]{4})\", $fecha, $mifecha);\n $ok = checkdate($mifecha[2],$mifecha[1],$mifecha[3]);\n if($ok){\n $actual = date(\"Y-m-d\");\n $older = \"1900-01-01\";\n $dtime = st...
[ "0.7377425", "0.72552073", "0.7251032", "0.7169811", "0.7087392", "0.70379645", "0.7023831", "0.7000162", "0.6946052", "0.6920187", "0.6917243", "0.69047433", "0.68789506", "0.68643683", "0.6859587", "0.68500394", "0.6832741", "0.68321055", "0.6812461", "0.6811427", "0.676299...
0.7256409
1
VALIDA QUE LA FECHA DE ENTREGA SEA MAYOR A 3 DIAS HABILES A LA FECHA DE LA ORDEN DE COMPRA
ПРОВЕРИТЬ, ЧТО ДАТА ДОСТАВКИ БОЛЬШЕ 3 РАБОЧИХ ДНЕЙ ОТ ДАТЫ ЗАКАЗА НА ПОКУПКУ
function fecha_entrega($fecha_entrega) { $hoy = date('Y-m-d'); $fecha_valida = date('Y-m-d',strtotime('+3 day',strtotime($hoy))); if($fecha_entrega < $fecha_valida) { $this->CI->form_validation->set_message('fecha_entrega', "El campo %s debe de ser por lo menos 3 d&iacute;as h&aacute;biles despu&eacute;s de...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fecha_instalacion($fecha_instalacion)\n\t{\n\t\t$hoy = date('Y-m-d');\n\t\t$fecha_valida = date('Y-m-d',strtotime('+3 day',strtotime($hoy)));\n\t\t$fecha_maxima = date('Y-m-d',strtotime('+6 month',strtotime($hoy)));\n\t\tif(($fecha_instalacion < $fecha_valida) || ($fecha_instalacion > $fecha_maxima))\n\t\...
[ "0.69990903", "0.67595786", "0.6691304", "0.6566324", "0.6546142", "0.65350574", "0.65154934", "0.64904755", "0.64746803", "0.6438075", "0.64236325", "0.64041567", "0.639524", "0.6393528", "0.63665783", "0.63555723", "0.63553256", "0.63456863", "0.6305961", "0.62813747", "0.6...
0.7187753
0
Get count of moderation reports
Получить количество отчетов о модерации
public function getModerationCountAttribute() { return $this->moderations->count(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countNotModerated(){\n $count = ORM::factory($this->object_name())->where('moderate', '=', 0)->count_all();\n return $count;\n }", "private function basicReport()\n {\n return $this->report->count();\n }", "public function countReports(){\n return count($thi...
[ "0.7249092", "0.65515745", "0.6528217", "0.63330036", "0.6217449", "0.61925083", "0.61684644", "0.61476797", "0.613741", "0.6136108", "0.61269104", "0.61132884", "0.60889643", "0.6078102", "0.6063618", "0.60544413", "0.60443944", "0.6041521", "0.6026915", "0.6018259", "0.6018...
0.7092454
1
Check if the permalink uses %postname%.
Проверьте, использует ли прямая ссылка %postname%.
private function has_postname_in_permalink() { return ( strpos( get_option( 'permalink_structure' ), '%postname%' ) !== false ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasPost(string $name): bool {}", "function isPost($name) {\r\n return ( getPost($name) != false );\r\n}", "function get_permalink($post = 0, $leavename = \\false)\n {\n }", "function get_the_permalink($post = 0, $leavename = \\false)\n {\n }", "function wprss_permalink_exists...
[ "0.698892", "0.6982354", "0.6946954", "0.6924149", "0.66932535", "0.66312087", "0.6591611", "0.6585426", "0.63603777", "0.6270124", "0.62490606", "0.623013", "0.6218549", "0.6104967", "0.6029748", "0.6002472", "0.5979718", "0.59575486", "0.5956387", "0.595535", "0.59324497", ...
0.8740753
0
Sets the applicationIdentityType property value. Type of application that is referenced. Possible values are: aadApplication, bot, tenantBot, office365Connector, and outgoingWebhook.
Устанавливает значение свойства applicationIdentityType. Тип приложения, на которое ссылаются. Возможные значения: aadApplication, bot, tenantBot, office365Connector и outgoingWebhook.
public function setApplicationIdentityType(?TeamworkApplicationIdentityType $value): void { $this->getBackingStore()->set('applicationIdentityType', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setApplicationType($applicationType)\n {\n $this->applicationType = $applicationType;\n return $this;\n }", "public function getApplicationType()\n {\n return $this->applicationType;\n }", "public function setAuthenticationType( $type ) {\n\t\t$this->_mAuthentic...
[ "0.5839746", "0.5718836", "0.52354974", "0.5139693", "0.49972066", "0.497583", "0.4926904", "0.48223728", "0.48081604", "0.4768287", "0.4765876", "0.47505423", "0.4746091", "0.4719808", "0.47184858", "0.47184858", "0.4696542", "0.4696542", "0.4696542", "0.46875224", "0.468752...
0.7571305
0
Page Edit Meta Boxes Show or Hide Sidebar Meta Box
Метabox редактирования страницы Показать или скрыть панель метабокс
function add_page_show_sidebar_metaboxes() { add_meta_box('page_show_sidebar_meta_values', 'Page Sidebar', 'page_show_sidebar_meta_values', 'page', 'side', 'default'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GTPress_hide_pagemeta() {\r\n\tif ($options['hide_pagemeta'] == \"true\") {\r\n\t\tremove_meta_box( 'commentstatusdiv' , 'page' , 'normal' ); // allow comments for pages\r\n\t\tremove_meta_box( 'commentsdiv' , 'page' , 'normal' ); // recent comments for pages\r\n\t\tremove_meta_box( 'postcustom' , 'page' ...
[ "0.72019047", "0.7086406", "0.68498", "0.6814837", "0.68131715", "0.6740622", "0.673663", "0.6707423", "0.67020327", "0.66827893", "0.6675523", "0.663549", "0.6614527", "0.66097975", "0.6607575", "0.6593614", "0.6585065", "0.65683", "0.6562835", "0.6537237", "0.65305334", "...
0.743109
0
Map character frequency as array. Returns array like this: array( )
Маппинг частоты символов как массив. Возвращает массив в таком виде: array( )
private static function frequencyMap($data) { $occurences = array(); while (isset($data[0])) { // Count occurences for the first char and add to frequency map $occurences[base64_encode($data[0])] = substr_count($data, $data[0]); $data = str_replace($data[0], '',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function frequencyOfCharactersArray(string $text)\n {\n $text = mb_strtoupper($text);\n $unique = [];\n\n $lines_arr = preg_split('/\\r\\n/', $text);\n $num_newlines = count($lines_arr) - 1;\n if ($num_newlines) {\n $unique['paragraph'] = $num_newlines;\n }\n\n $text = str_replace...
[ "0.7261822", "0.64978516", "0.6474168", "0.6468677", "0.6303435", "0.6242022", "0.6201956", "0.60705554", "0.60369927", "0.59643245", "0.5952663", "0.5821382", "0.58143157", "0.56799394", "0.56423604", "0.53942055", "0.5292736", "0.5289216", "0.52879566", "0.5278701", "0.5266...
0.7272989
0
Set default arguments Page or post details on a single page or post; site details on any other template. The default arguments can be customized via a filter.
Установить аргументы по умолчанию: детали страницы или поста на одной странице или посте; детали сайта на любом другом шаблоне. Аргументы по умолчанию можно настроить с помощью фильтра.
private function setDefaultArgs() { $args = [ 'title' => get_bloginfo('name'), 'url' => get_bloginfo('url'), 'desc' => get_bloginfo('description'), ]; if (is_page() || is_singular()) { $args = [ 'title' => get_the_title(), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ht_dms_default_paginated_view_arguments( $args = null ) {\n\t$paginated_view_args = array(\n\t\t'uID' => get_current_user_id(),\n\t\t'limit' => 5,\n\t\t'page' => 1,\n\t);\n\n\tif ( is_array( $args ) ) {\n\t\t$paginated_view_args = array_merge( $paginated_view_args, $args );\n\t}\n\n\treturn $paginated_vie...
[ "0.6301038", "0.6133395", "0.60831714", "0.6061171", "0.5944418", "0.5856443", "0.5796426", "0.576162", "0.5754492", "0.5735988", "0.56655335", "0.56044525", "0.5584979", "0.55499923", "0.5523067", "0.551069", "0.55074257", "0.54819846", "0.5405473", "0.5364972", "0.5360249",...
0.790967
0
Set icon paths Sets the URLs and file system paths for the social media icons, which can also be customized via filters.
Устанавливает пути иконок социальных сетей Устанавливает URLs и пути файловой системы для иконок социальных сетей, которые также могут быть настроены с помощью фильтров.
private function setIconPaths() { // Directory URL and path $plugin = CGIT_SOCIALIZE_PLUGIN; $dir = 'icons'; $url = plugin_dir_url($plugin) . $dir; $path = plugin_dir_path($plugin) . $dir; // Apply filters for customization $ext = apply_filters('cgit_socializ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setIcons() {\n\t\t$this->icons = array(\n\t\t\t'slider' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'carousel' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'testimonial' => $this->getSkinURI().'/assets/img/admin-logo-icon.png',\n\t\t\t'portfolio' => $this->g...
[ "0.7025868", "0.586154", "0.5843922", "0.5827118", "0.57907385", "0.57655257", "0.5762675", "0.56828916", "0.5672955", "0.56334555", "0.56205946", "0.5546111", "0.55201936", "0.5511036", "0.5508489", "0.5504296", "0.54753196", "0.547068", "0.5456038", "0.5383028", "0.53718394...
0.8234634
0
Update network URLs Regenerates the URLs for each of the social networks using the URL templates and the current values for the URL arguments.
Обновление URL сети Пересоздает URL для каждой из социальных сетей с использованием шаблонов URL и текущих значений аргументов URL.
private function updateNetworks() { foreach ($this->networks as $net_key => $net_value) { $url = $net_value['template']; foreach ($this->args as $arg_key => $arg_value) { $url = str_replace('{' . $arg_key . '}', $arg_value, $url); } $this->ne...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_network_cache( $networks ) {\n\tforeach ( (array) $networks as $network ) {\n\t\twp_cache_add( $network->id, $network, 'networks' );\n\t}\n}", "function update_network_cache($networks)\n {\n }", "public function generateUrl(): void\n {\n $this->load('urls');\n $createReco...
[ "0.5961742", "0.5837436", "0.579622", "0.5582788", "0.5353659", "0.5343597", "0.5245928", "0.5203176", "0.51202154", "0.5108051", "0.51018727", "0.5080132", "0.50636655", "0.50255495", "0.50093037", "0.49794492", "0.49744123", "0.49476054", "0.49207735", "0.49072805", "0.4879...
0.7968182
0
Get post excerpt If the page that is being shared is a page or single post, attempt to get the excerpt from it without any HTML tags.
Получить выдержку из поста Если страница, которая делится, является страницей или отдельным постом, попытайтесь получить выдержку из нее без каких-либо тегов HTML.
private function getPostExcerpt() { global $post; // If this is not a page or a single post, it cannot have an excerpt and // so the method should return an empty string. if (!is_page() && !is_singular()) { return ''; } // Attempt to get a manaul excerpt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTheExcerpt($post){\n\t$postfile = file_get_contents($post);\n\t$fullpost = getBetween('<div class=\"content\">',\"&nbsp;</div>\",$postfile);\n\t$postExcerpt = trimText($fullpost,750);\n\t$postExcerpt = stripslashes($postExcerpt);\n\treturn $postExcerpt;\n}", "public function excerpt() { return $this-...
[ "0.74206954", "0.7268432", "0.69454074", "0.6917724", "0.674359", "0.67123055", "0.6691639", "0.6671284", "0.6634482", "0.6632367", "0.6590873", "0.6552178", "0.6507734", "0.6503733", "0.6459561", "0.6452262", "0.6419904", "0.64083874", "0.63771987", "0.6353947", "0.6345391",...
0.7835794
0
Return list of all available networks
Вернуть список всех доступных сетей
public function getAvailableNetworks() { return $this->networks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_networks()\n {\n }", "public function getNetworksList() {\n return $this->_get(1);\n }", "public function getNetworksList() {\n return $this->_get(4);\n }", "public function networks()\n {\n return $this->request('get', '/api/teams/'.Helpers::config...
[ "0.78085506", "0.7778569", "0.7701551", "0.76748836", "0.7319537", "0.6873914", "0.6843829", "0.6622548", "0.64519954", "0.6382405", "0.6335826", "0.6311104", "0.6277313", "0.62575454", "0.62363994", "0.6200874", "0.6153595", "0.6099858", "0.6035701", "0.6005851", "0.59477526...
0.7887625
0
Compose URL for executing
Составить URL для выполнения
protected function composeExecURL() { $exec_url = self::BASE_URI . "?key=" . $this->key . "&url=" . urlencode($this->url); if(!empty($this->options)) { foreach($this->options as $key => $value) { $exec_url .= "&" . $key . "=" . $value; } } $t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildFrontendUri() {}", "public function url();", "public function url();", "public function url();", "private function generateUrl() : string\n {\n return $this->apiUrl.$this->ownerRepo.$this->branchPath.$this->branch;\n }", "public function generate_url()\n {\n ...
[ "0.6541003", "0.6465577", "0.6465577", "0.6465577", "0.6306139", "0.62989175", "0.6225217", "0.6193616", "0.6191092", "0.61745036", "0.6170492", "0.6127379", "0.6114157", "0.6112213", "0.60921824", "0.60819685", "0.60546625", "0.60105264", "0.6007052", "0.6002942", "0.6002942...
0.71734166
0
by default eloquent uses "car_product" name for the intermediate table
по умолчанию eloquent использует имя "car_product" для промежуточной таблицы
public function products() { // if the intermediate table is called differently an SQl error is raised // to use a custom table name it should be passed to "belongsToMany" method as the second argument return $this->belongsToMany(Product::class, 'cars__products'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function product(){\n return $this->belongsTo(Product::class);\n }", "public function car() {\n return $this->hasMany('\\App\\Car');\n }", "public function product()\n {\n return $this->belongsTo('\\App\\Product');\n }", "public function product()\n {\n \treturn...
[ "0.6748697", "0.67422545", "0.67222184", "0.67204285", "0.67071104", "0.666943", "0.666943", "0.6654961", "0.6638013", "0.6632344", "0.6624093", "0.66156024", "0.65834343", "0.65834343", "0.65834343", "0.65834343", "0.65833825", "0.65805614", "0.65767497", "0.6549826", "0.653...
0.746124
0
Start Timer for Querys. Always use with query_stop()
Запустить таймер для запросов. Всегда использовать вместе с query_stop()
public function query_start($query) { if (($this->mode > 0) and (!$this->sql_query_running)) { $this->sql_query_running = true; $this->sql_query_start = microtime(true); $this->sql_query_string = $query; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function queryStop()\n\t{\n\t\tif (static::isEnabled(static::DB_BENCHMARK))\n\t\t{\n\t\t\tstatic::$_query['time'] = microtime(true) - static::$_query['time'];\n\t\t\tstatic::$_queries[] = static::$_query;\n\t\t}\n\t}", "private function startTimer()\n\t{\n\t\t// Keep statistics\n\t\tself::$totalCal...
[ "0.6650986", "0.6330967", "0.6266227", "0.6233954", "0.6141267", "0.61263764", "0.6123928", "0.60613054", "0.60442555", "0.6020866", "0.6005213", "0.5919651", "0.58706206", "0.5841991", "0.58296907", "0.5811369", "0.5794595", "0.5710497", "0.55242586", "0.55224067", "0.551286...
0.7223225
0
Sort Array by first Column
Сортировка массива по первой колонке
public function sort_array_by_col($array) { function compare($wert_a, $wert_b) { // Sortierung nach dem zweiten Wert des Array (Index: 1) $a = $wert_a[0]; $b = $wert_b[0]; if ($a == $b) { return 0; } return ($a >...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _sortByArray($array) {}", "function array_sort_by(&$array_initial, $col, $order = SORT_ASC){\n\n $arrAux = array();\n\n foreach ($array_initial as $key=> $row){\n $arrAux[$key] = is_object($row) ? $arrAux[$key] = $row->$col : $row[$col];\n $arrAux[$key] = st...
[ "0.72075224", "0.6971323", "0.68631285", "0.68221426", "0.660125", "0.65709245", "0.65704423", "0.64962673", "0.642985", "0.64006233", "0.63797593", "0.6368654", "0.6332017", "0.6230777", "0.6218475", "0.6204416", "0.6183569", "0.61483496", "0.6057417", "0.60482424", "0.60383...
0.7365537
0
Sets content for passed container names
Устанавливает содержимое для переданных имен контейнеров
public function setContainerContent($containerName, $content = null) { $filter = $containerName; if (is_array($containerName)) { $filter = array_keys($containerName); } $containers = $this->getContentContainers($filter); foreach ($containers as $container) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function setContent();", "protected function setContent() {}", "public function modifyTextContainer($oldName, $newName, $content, $language);", "public function addTextContainer($name, $content, $language);", "public function set($name, $content)\n {\n $this->slots[$name] = $content;\n ...
[ "0.67093754", "0.6180445", "0.6101917", "0.5911395", "0.58794975", "0.5862074", "0.58462167", "0.5804091", "0.5804091", "0.5804091", "0.5804091", "0.5804091", "0.5804091", "0.5804091", "0.5804091", "0.5804091", "0.5804091", "0.57720333", "0.5686377", "0.564637", "0.5643341", ...
0.70741147
0
Returns a list of container names contained in page.
Возвращает список имен контейнеров, содержащихся на странице.
public function containerNames() { return $this->contentManager->listContainerNames(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContainers()\n\t\t{\n\t\t\treturn $this->getTab( '_options_tab' )->getContainers();\n\t\t}", "public function getContainers()\n {\n }", "public function getContainers()\n {\n return $this->containers;\n }", "public function getContainers()\n {\n return $this->c...
[ "0.6195086", "0.61684966", "0.60494167", "0.60494167", "0.59551954", "0.58465576", "0.57482284", "0.5691839", "0.56346464", "0.55717766", "0.5406663", "0.54057586", "0.5392516", "0.53511715", "0.53510904", "0.53258145", "0.5305574", "0.52819705", "0.5267462", "0.5257349", "0....
0.73039705
0
Reads the page description meta tag.
Читает метку страницы description.
public function getPageDescription() { $element = $this->query('meta[name="description"]')->first(); if ($element) { return $element->getAttribute('content'); } return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMetaDescription() {\n return (isset($this->metaDescription) && $this->metaDescription!='') ? $this->metaDescription : Params::param('metainfo-metaDescription');\n }", "public function description()\n {\n $description = $this->DOM->filter(\"meta[name='description']\")->attr(...
[ "0.6822339", "0.6710006", "0.6708061", "0.664036", "0.6541855", "0.6512424", "0.63987523", "0.6394304", "0.63880146", "0.635342", "0.63009965", "0.6257565", "0.61920655", "0.61899346", "0.60884774", "0.6063717", "0.60565317", "0.60435146", "0.6014236", "0.59969735", "0.597199...
0.7191118
0
Sets the page description meta tag with the given content.
Устанавливает метку страницы description с заданным содержимым.
public function setPageDescription($text) { $metaDescription = $this->query('meta[name="description"]')->first(); if ($text === '') { // If empty value passed we need to remove title tag if ($metaDescription) { $this->removeElement($metaDescription); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function description(string $content): MetaTag {\n return static::namedContent('description', $content);\n }", "public function setMetaDescriptionAttribute($value)\n {\n $this->attributes['meta_description'] = $value;\n\n if (empty($value)) {\n $this->attributes['met...
[ "0.7295828", "0.7261422", "0.72327876", "0.7122621", "0.6840984", "0.67465454", "0.67297256", "0.6700923", "0.66913474", "0.66386557", "0.6572405", "0.6570796", "0.6557805", "0.6545076", "0.6531342", "0.6482197", "0.6467233", "0.64413965", "0.63923985", "0.63854766", "0.63701...
0.80547327
0
Gets PaymentDate &lt;xs:element name="PaymentDate" type="SAFdateType"/&gt;
Получает PaymentDate &lt;xs:element name="PaymentDate" type="SAFdateType"/&gt;
public function getPaymentDate(): RDate { \Logger::getLogger(\get_class($this)) ->info( \sprintf( __METHOD__." get '%s'", $this->paymentDate->format(RDate::SQL_DATE) ) ); return $this->paymentDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaymentDate();", "public function getPaymentDate() {\n\t\t// return $this->created_at;\n\t\treturn $this->account ? $this->account->payment_date : $this->created_at;\n\t}", "public function getFirstPaymentDate()\n\t{\n\t\treturn $this->first_payment_date;\n\t}", "public function getFormatt...
[ "0.77713466", "0.74972916", "0.69472134", "0.6801402", "0.67326385", "0.6454902", "0.634827", "0.6205493", "0.6191901", "0.6031016", "0.60275036", "0.60195315", "0.5958611", "0.59426016", "0.59345627", "0.59027904", "0.58933455", "0.5892541", "0.5848577", "0.5848161", "0.5809...
0.77122015
1
Sets PaymentDate &lt;xs:element name="PaymentDate" type="SAFdateType"/&gt;
Sets PaymentDate <xs:element name="PaymentDate" type="SAFdateType"/>
public function setPaymentDate(RDate $paymentDate): void { $this->paymentDate = $paymentDate; \Logger::getLogger(\get_class($this)) ->debug( \sprintf( __METHOD__." set to '%s'", $this->paymentDate->format(RDate::SQL_DATE) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPaymentDate($payment_date);", "public function setTransactionDate($value) {\n\t\tself::$_transactionDate = $value;\n\t}", "public function set_last_payment_date( $value ) {\n\t\t$this->set_prop( 'last_payment_date', $value ) ;\n\t}", "public function setDate($value) {\n\t\t$this->_date = $...
[ "0.7845562", "0.64185447", "0.6366298", "0.63164955", "0.6164906", "0.6102558", "0.6082409", "0.60491043", "0.6032942", "0.60210645", "0.60172725", "0.6013079", "0.6013079", "0.5996242", "0.5950348", "0.58824646", "0.5874693", "0.5752229", "0.5747266", "0.56992215", "0.568049...
0.74097013
1
Returns the assigned adapter
Возвращает назначенный адаптер
public function getAdapter() { return $this->adapter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAdapter()\n {\n return $this->adapter;\n }", "public function getAdapter()\n {\n return $this->adapter;\n }", "public function getAdapter()\n {\n return $this->adapter;\n }", "public function getAdapter()\n {\n return $this->adapter;\n }"...
[ "0.7787258", "0.7787258", "0.7787258", "0.7787258", "0.7787258", "0.7787258", "0.7787258", "0.7787258", "0.7725353", "0.76880276", "0.76491064", "0.76491064", "0.76365167", "0.7589357", "0.7589357", "0.7585564", "0.7583257", "0.747719", "0.74078864", "0.7236702", "0.7236702",...
0.786526
1
Retrieves the helper associated with the specified name. If no helper found, returns false.
Получает вспомогательную функцию, связанную с указанным именем. Если вспомогательная функция не найдена, возвращает false.
public function getHelper($name) { return (array_key_exists($name, $this->helpers)) ? $this->helpers[$name] : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHelper($name)\r\n {\r\n if (isset($this->_helper[$name])) {\r\n return $this->_helper[$name];\r\n }\r\n return null;\r\n }", "public function has($name)\n {\n return isset($this->helpers[$name]);\n }", "public function getHelper(string $name...
[ "0.7726096", "0.71455956", "0.6993883", "0.68904454", "0.6689411", "0.65721655", "0.65159667", "0.6507631", "0.64900804", "0.6356164", "0.61649364", "0.6023918", "0.58729756", "0.5868988", "0.5830039", "0.57814246", "0.5742152", "0.5721857", "0.5658632", "0.56465995", "0.5586...
0.84385365
0
Returns true only and only if the target is less or equal than the greatest migration executed so far.
Возвращает истину только в том случае, если целевой объект меньше или равен наибольшей миграции, выполненной до настоящего момента.
public function isDownwards($target) { return null !== $target && $this->getFilter()->compare($target, $this->getGreatestMigration()) <= 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function reachedMaxMoves(){\r\n if($this->totalMoves == $this->board->getMaxMoves()){\r\n return true;\r\n }\r\n return false;\r\n }", "public function version($target_version)\n\t{ \n\t\t$start = $current_version = $target_version-1;\n\t\t$stop = $target_version;\...
[ "0.61778116", "0.6080323", "0.5946392", "0.5738278", "0.5713029", "0.5688664", "0.5687063", "0.5683649", "0.5628863", "0.56193185", "0.56039834", "0.5579152", "0.5530845", "0.5412094", "0.5401458", "0.5388808", "0.53630245", "0.5322074", "0.5281697", "0.5244626", "0.52423495"...
0.7440257
0
Returns an array of all the migrations that should be executed to reach the provided target, taking into consideration both the executed migrations. This works for both normal migrations and rollbacks.
Возвращает массив всех миграций, которые должны быть выполнены для достижения указанной цели, учитывая как выполненные, так и откатываемые миграции. Это работает как для обычных миграций, так и для откатов.
public function getAvailableMigrations($target=null) { // for normal migration we need all files to target // for rollbacks we need from target to the greatest migration $filter = $this->getFilter(); if (!$this->isDownwards($target)) { if (null !== $target) { $filter->setToVersion($target); } } els...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMigrationsToRun() : array\n {\n $allMigrations = $this->getAllMigrations();\n\n $tableExists = $this->queryBuilderFactory->make()\n ->table_exists($this->table);\n\n if (! $tableExists) {\n return $allMigrations;\n }\n\n /** @var array ...
[ "0.6566407", "0.6549122", "0.65065175", "0.6460152", "0.6412314", "0.63901865", "0.6238462", "0.62335783", "0.6084264", "0.5982342", "0.5952659", "0.59471846", "0.58959377", "0.5857791", "0.5816764", "0.58088714", "0.57287943", "0.56991947", "0.5697555", "0.56852627", "0.5679...
0.8309574
0
Returns all the executed migrations. This acts as a proxy method to AdapterInterface::getMigrations plus the results are sorted according to the assigned filter.
Возвращает все выполненные миграции. Это служит методом-прокси для AdapterInterface::getMigrations, при этом результаты сортируются в соответствии с заданным фильтром.
public function getExecutedMigrations() { $migrations = $this->getAdapter()->getMigrations(); uksort($migrations, array($this->getFilter(), 'compare')); return $migrations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMigrationsToRun() : array\n {\n $allMigrations = $this->getAllMigrations();\n\n $tableExists = $this->queryBuilderFactory->make()\n ->table_exists($this->table);\n\n if (! $tableExists) {\n return $allMigrations;\n }\n\n /** @var array ...
[ "0.74191535", "0.71839124", "0.7168735", "0.71103656", "0.71043146", "0.70602465", "0.70244503", "0.69008493", "0.6890514", "0.6830789", "0.6803787", "0.67936563", "0.67870224", "0.67685294", "0.6757025", "0.6620823", "0.66137254", "0.6528872", "0.6486937", "0.64458954", "0.6...
0.85546994
0
Returns the reference number of the greatest migration
Возвращает номер ссылки наибольшей миграции
public function getGreatestMigration() { return (string) end(array_keys($this->getExecutedMigrations())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastBatchNumber()\n {\n global $wpdb;\n\n $max = $wpdb->get_results(\n \"SELECT MAX(`batch`) as max FROM {$wpdb->prefix}exolnet_migration as em\",\n 'ARRAY_A'\n );\n\n return absint($max[0]['max']) ?? 0;\n }", "private function getMaxAvai...
[ "0.6550333", "0.6362402", "0.6198158", "0.61445165", "0.6137577", "0.60441065", "0.6022636", "0.59896886", "0.5986675", "0.5979175", "0.59742445", "0.5897246", "0.5851074", "0.58434737", "0.58397466", "0.5838604", "0.5832273", "0.5825268", "0.5821111", "0.5814068", "0.5807377...
0.7276018
0
Executes a migration with the purpose to reach the specified target. If target has been already executed we are doing a rollback.
Выполняет миграцию с целью достижения указанной цели. Если цель уже была выполнена, производится откат.
public function migrate($target=null) { $migrations = $this->getAvailableMigrations($target); if (null === $target) { end($migrations); $target = key($migrations); } if (!$this->isDownwards($target)) { return $this->doMigration($migrations, AdapterInterface::UP); } else { return $this->doMigr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function up($targetMigration)\n {\n $migrations = new Ot_Model_DbTable_Migrations($this->_tablePrefix);\n \n $migrationsIdsNotApplied = array_diff(array_keys($this->_availableMigrations), $this->_appliedMigrations);\n \n $migrationsToApply = array();\n \n ...
[ "0.65986085", "0.64678365", "0.63607174", "0.62464625", "0.59522486", "0.5951001", "0.59134656", "0.5821075", "0.58159983", "0.57255673", "0.5698722", "0.55741066", "0.5521083", "0.5499641", "0.54508257", "0.5421777", "0.54066783", "0.53917277", "0.538161", "0.5372396", "0.53...
0.72628933
0
Executes rollback. It reverses a given number (steps) of the already executed migrations.
Выполняет откат. Обратно отменяет заданное количество (шагов) уже выполненных миграций.
public function rollback($steps=1, $redo=false) { $migrations = array_slice($this->getExecutedMigrations(), -$steps, null, true); $migration_steps = $this->getMigrationSteps(); $to_execute = array(); foreach ($migrations as $ref => $migration_class) { $to_execute[$ref] = $migration_steps[$ref]; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rollbackAction(null|int $version=null):void{\n $currentVersion = Migration::getCurrentVersion();\n $migrations = glob($this->config->application->migrationsDir.'*.php');\n if(!isset($version)){\n $version = count($migrations)-1;\n }\n if((int)$version >...
[ "0.70009357", "0.69230497", "0.62698865", "0.62698865", "0.62698865", "0.62698865", "0.6083575", "0.6079513", "0.6079513", "0.60417515", "0.5996267", "0.5996267", "0.59493953", "0.5925792", "0.5922571", "0.5917022", "0.59099555", "0.5871308", "0.5856061", "0.5851709", "0.5839...
0.7283617
0
Go through the filter iterator and stores the fetched migration steps in an associative array with the key holding the reference number for easy access.
Проходите по итератору фильтра и сохраняйте полученные шаги миграции в ассоциативный массив с ключом, содержащим номер ссылки, для удобного доступа.
private function getMigrationSteps() { $migration_steps = array(); foreach ($this->getFilter() as $step) { $migration_steps[$step->getReference()] = $step; } return $migration_steps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMigrations($steps)\n {\n global $wpdb;\n\n $sql = \"SELECT * FROM {$wpdb->prefix}exolnet_migration as em\n WHERE batch >= 1 ORDER BY batch DESC, migration DESC LIMIT {$steps}\";\n\n return $wpdb->get_results($sql, 'ARRAY_A');\n }", "abstract public fun...
[ "0.5509165", "0.54006493", "0.5283156", "0.52501714", "0.5166381", "0.50223976", "0.48835343", "0.4878478", "0.48537058", "0.48440874", "0.47927505", "0.4772981", "0.47431618", "0.46935946", "0.465664", "0.46439365", "0.46239606", "0.4562514", "0.45407766", "0.4528245", "0.45...
0.72580534
0
Show the edit form for dock permissions
Показать форму редактирования разрешений на прикрепление
public function edit(Dock $dock) { $this->authorize(get_class($dock) . '.edit-permissions'); return view('admin::docks.' . $dock->name . '.permissions.edit')->withDock($dock); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit()\n {\n return view('permission::edit');\n }", "public function editPasswordAdmin()\n {\t\n \treturn view('setting.edit-password-admin');\n }", "function displayEditScreen()\t{\t \n\t\t// We handle here Edit mode or Preview Mode\n\t\t// Edit Mode : User can edit fiel...
[ "0.6422253", "0.61636156", "0.6157416", "0.611119", "0.61099756", "0.61066806", "0.609607", "0.6063194", "0.60629123", "0.60542154", "0.6043232", "0.59932494", "0.5989941", "0.59705395", "0.5970034", "0.5966621", "0.59541345", "0.5934438", "0.59246933", "0.58985114", "0.58800...
0.70208114
0
Compares a given response with a given answer; the way which this is performed is determined by the answer_mode variable.
Сравнивает заданный ответ с заданным ответом; способ, которым это осуществляется, определяется переменной answer_mode.
public function compare_response_with_answer(array $response, question_answer $answer) { // Tentative: if this response isn't gradable, it can't match any of the answers. if(!$this->is_gradable_response($response)) { return false; } //parse the response according to t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function compare_response_with_answer(array $response, question_answer $answer) {\n global $question;\n $autofeedback = $this->autofeedback;\n // Check to see if correct or not.\n if (self::compare_string_with_wildcard($response['answer'], $answer->answer, false)) {\n ...
[ "0.72651917", "0.6033109", "0.597804", "0.5946228", "0.59333867", "0.59280324", "0.58845097", "0.5880805", "0.58695847", "0.5847845", "0.5835745", "0.5813978", "0.5729295", "0.56283563", "0.552544", "0.5517053", "0.54978883", "0.5486746", "0.54657376", "0.5459888", "0.5443033...
0.78834724
0
Parses the user response, returning a simple answer. The way in which the user's response is parsed depends on the Response Mode.
Анализирует ответ пользователя, возвращая простой ответ. Способ анализа ответа пользователя зависит от режима ответа.
private function parse_response(array $response) { //strip all leading and trailing whitespace from the answer $response['answer'] = trim($response['answer']); //interpret the user's reponse according to the reponse mode switch($this->response_mode) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function parse_api_response();", "public function parseResponse() {\r\r\n\r\r\n return true;\r\r\n }", "abstract protected function parseResponse($response);", "public function parse()\n\t{\n\t\t//we don't need to hit the API everytime parse is called\n\t\tif (!$this->response)\n\t\t\t$thi...
[ "0.65729606", "0.65415114", "0.6383206", "0.6268041", "0.6210723", "0.61669755", "0.61481166", "0.6058604", "0.60233974", "0.591543", "0.59007543", "0.5894681", "0.5889265", "0.5886553", "0.587376", "0.58668524", "0.5864284", "0.58561826", "0.58544344", "0.5828043", "0.582649...
0.71726936
0
Evaluates an answer object, replacing its answer expression with an evaluated result.
Оценивает объект ответа, заменяя его выражение ответа на результат оценки.
public function evaluate_answer($answerobj, $interpreter = null) { //Create a copy of the given answer... $answer = clone $answerobj; //create a new interpreter if(!$interpreter) { $interpreter = $this->create_interpreter($this->vars, $this->funcs); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function evaluate();", "public function evaluate();", "function e($expr) \n {\n //call the core evaluation method\n return $this->evaluate($expr);\n }", "public function compare_response_with_answer(array $response, question_answer $answer) { \n\n // Tentative: if this ...
[ "0.64550275", "0.64550275", "0.6005985", "0.59536135", "0.5822661", "0.5607408", "0.55310565", "0.55203724", "0.5518396", "0.54791576", "0.54130846", "0.5333577", "0.52867806", "0.52827513", "0.52656186", "0.52289575", "0.51205164", "0.51036745", "0.5044132", "0.496024", "0.4...
0.7066424
0
Find trace by options.
Найти трассировку по параметрам.
protected function findTrace(array $options) { if (empty($options)) { return; } foreach ($this->getTrace() as $trace) { if ($this->hasTraceOptions($trace, $options)) { return $trace; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function trace(array $options = [])\n {\n $self = Debugger::getInstance();\n $defaults = [\n 'depth' => 999,\n 'format' => $self->_outputFormat,\n 'args' => false,\n 'start' => 0,\n 'scope' => null,\n 'exclude' => ['ca...
[ "0.5398092", "0.51319474", "0.5119972", "0.48672327", "0.47193208", "0.47091642", "0.46326286", "0.46305194", "0.46206948", "0.46206948", "0.46206948", "0.46206948", "0.46206948", "0.46206948", "0.46206948", "0.46206948", "0.46206948", "0.46206948", "0.46206948", "0.46206948", ...
0.78948694
0
UnMangle and email address
Размножить и email-адрес
function UnMangle($email) { if (AT_MANGLE != "") $email = str_replace(AT_MANGLE,"@",$email); return ($email); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function string_email( $p_string ) \r\n{\r\n\t$p_string = string_strip_hrefs( $p_string );\r\n\treturn $p_string;\r\n}", "function mangle_email($s) {\r\n\treturn preg_match('/([^@\\s]+)@([-a-z0-9]+\\.)+[a-z]{2,}/is', '<$1@...>', $s);\r\n}", "public static function email($email) {\n\t\treturn str_replace('@', '...
[ "0.6755387", "0.6567935", "0.6485834", "0.6423738", "0.6362452", "0.6240894", "0.62231904", "0.61852723", "0.6181862", "0.616851", "0.60888094", "0.60834867", "0.60789967", "0.60744584", "0.60643893", "0.6035465", "0.60326225", "0.60219187", "0.60116464", "0.60078335", "0.597...
0.7947774
0
return an array, stripped of slashes if magic_quotes_gpc is set
вернуть массив, очищенный от слэшей, если включено magic_quotes_gpc
function StripGPCArray($arr) { if (get_magic_quotes_gpc() != 0) foreach ($arr as $key=>$value) if (is_string($value)) $arr[$key] = stripslashes($value); return ($arr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function undo_magic_quotes() {\n if (get_magic_quotes_gpc()) {\n \n $in = array(&$_GET, &$_POST, &$_REQUEST, &$_COOKIE);\n \n while (list($k,$v) = each($in)) {\n foreach ($v as $key => $val) {\n if (!is_array($val)) {\n $in[$k][$key] = stripslashes($val);\n ...
[ "0.71926653", "0.7074007", "0.70001817", "0.69485855", "0.69453675", "0.69428396", "0.6860316", "0.68527216", "0.6735282", "0.67021024", "0.6683923", "0.6632399", "0.65052444", "0.64834124", "0.64484143", "0.6420708", "0.632399", "0.6311155", "0.6286795", "0.6283601", "0.6247...
0.72119236
0
Strip a value of unwanted characters, which might be hacks.
Удалите из значения нежелательные символы, которые могут быть хаками.
function Strip($value) { $value = StripGPC($value); $value = str_replace("\"","'",$value); $value = preg_replace('/[[:cntrl:][:space:]]+/'," ",$value); // zap all control chars and multiple blanks return ($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function make_clean($value) {\n\t\t$legal_chars = \"%[^0-9a-zA-Z������� ]%\"; //allow letters, numbers & space\n\t\t$new_value = preg_replace($legal_chars,\"\",$value); //replace with \"\"\n\t\treturn $new_value;\n\t}", "public function clean_string($value) {\n $data = trim($value);\n\n // Removes Unwanted...
[ "0.72800666", "0.72079843", "0.71338296", "0.7080963", "0.6982714", "0.695795", "0.6954121", "0.693592", "0.6837615", "0.68168443", "0.6811536", "0.6795291", "0.6789121", "0.6777375", "0.6764461", "0.67625725", "0.6754654", "0.67307234", "0.67293197", "0.67233014", "0.6706056...
0.7927197
0
Check the input for required values. The list of required fields is a commaseparated list of field names.
Проверьте входные данные на наличие требуемых значений. Список требуемых полей представляет собой запятой разделённый список имен полей.
function CheckRequired($reqd,$vars,&$missing) { $bad = false; $list = explode(",",$reqd); for ($ii = 0 ; $ii < count($list) ; $ii++) { $name = $list[$ii]; if ($name) { // // field names can be just straight names, or in this // form...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function validate_required_fields()\n\t{\n\t\t$errors = array();\n\t\t\n\t\tforeach (array_keys($this->_required_fields) as $field)\n\t\t{\n\t\t\t$value = $this->get_field_value($field);\n\t\t\t\n\t\t\tif (!validate::required($value))\n\t\t\t{\n\t\t\t\t$errors[$field] = 'Required';\n\t\t\t}\n\t\t}\n\t\t\n\...
[ "0.71862394", "0.6990089", "0.6868447", "0.68517977", "0.6843158", "0.6805379", "0.6734402", "0.6732079", "0.670135", "0.66926414", "0.66483855", "0.65949297", "0.6552953", "0.65396273", "0.6534771", "0.6500435", "0.6457113", "0.6436637", "0.64264506", "0.64071584", "0.640329...
0.7254165
0
Return a formatted list of the given environment variables.
Вернуть отформатированный список заданных переменных окружения.
function GetEnvVars($list,$s_line_feed) { global $VALID_ENV,$sServerVars; $output = ""; for ($ii = 0 ; $ii < count($list) ; $ii++) { $name = $list[$ii]; if ($name && array_search($name,$VALID_ENV,true) !== false) { // // if the environment variable is empty or non-existent, try // lookin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEnvs();", "private function getEnvironmentVariables()\n {\n return array(\n 'GIT_TERMINAL_PROMPT' => '0',\n 'GIT_ASKPASS' => 'echo',\n );\n }", "protected function get_env_parameters()\n\t{\n\t\t$parameters = array();\n\t\tforeach ($_SERVER as $key =...
[ "0.66357464", "0.637745", "0.6372802", "0.6364524", "0.62468576", "0.6242825", "0.62371224", "0.61860514", "0.61798364", "0.617086", "0.60791445", "0.6060386", "0.60586685", "0.6024537", "0.6018612", "0.60167074", "0.5994406", "0.5976962", "0.5877872", "0.5869686", "0.5840919...
0.744383
0
send the given results to the given email addresses
отправить полученные результаты указанным электронным адресам
function SendResults($results,$to,$a_values) { global $SPECIAL_VALUES; $b_got_filter = (isset($SPECIAL_VALUES["filter"]) && !empty($SPECIAL_VALUES["filter"])); // // special case: if there is only one non-special value and no // filter, then format it as an email // if (count($a_values) == 1 && !$b_got_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function sendEmail($result) {\n Mail::send('emails.results-mail', $result, function($message) use($result) {\n $message->to($result['result']->parentEmail->parent_email)\n ->subject($result['result']->studentIfo->student_first_name . ' Term ' . $result['result']->term . ' Results')\n ...
[ "0.68689436", "0.68324846", "0.671386", "0.66341835", "0.6440061", "0.64225394", "0.6391742", "0.6366359", "0.6352392", "0.6271578", "0.6213478", "0.6200764", "0.61799854", "0.612322", "0.60733664", "0.60463095", "0.60352874", "0.59753597", "0.59634197", "0.59568876", "0.5950...
0.71341485
0
Draws a thick line Changing the thickness of a line using imagesetthickness doesn't produce as nice of result
Рисует толстую линию. Изменение толщины линии с использованием imagesetthickness не дает такого хорошего результата
function drawThickLine($img, $startX, $startY, $endX, $endY, $colour, $thickness) { $angle = (atan2(($startY - $endY), ($endX - $startX))); $dist_x = $thickness * (sin($angle)); $dist_y = $thickness * (cos($angle)); $p1x = ceil(($startX + $dist_x)); $p1y = ceil(($startY + $dist_y)); $p2x = ceil(($endX + $dis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function imagelinethick($image, $x1, $y1, $x2, $y2, $color, $thick = 1)\n{\n if ($thick == 1) {\n return imageline($image, $x1, $y1, $x2, $y2, $color);\n }\n $t = $thick / 2 - 0.5;\n if ($x1 == $x2 || $y1 == $y2) {\n return imagefilledrectangle($image, round(min($x1, $x2) - $t), round(min($y1, ...
[ "0.74529386", "0.74191296", "0.7258595", "0.7055428", "0.7030043", "0.6994356", "0.6969234", "0.65007085", "0.6385935", "0.6333521", "0.6234594", "0.61639994", "0.6093685", "0.60896534", "0.60439724", "0.60207534", "0.597951", "0.5968797", "0.592622", "0.5825955", "0.5748873"...
0.74610996
0
load and get an instance of the event class being tested
загрузить и получить экземпляр класса события, который проверяется
protected function _loadEventClass() { App::uses($this->plugin . 'Events', $this->plugin . '.Lib'); $this->EventClass = $this->plugin . 'Events'; $this->EventClass = new $this->EventClass(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInstance() {\n\t\t$this->assertInstanceOf('EventCore', $this->Event);\n\t}", "public function testFireEventWithClass()\n {\n $eventManager = new EventManager;\n $secret = '1234';\n $eventManager->listen('secret', 'Underlay\\Tests\\Events\\Test@call', function (\n ...
[ "0.72476095", "0.6862377", "0.6752962", "0.6679267", "0.6549169", "0.6377598", "0.62834555", "0.6265913", "0.6254268", "0.6238321", "0.61207473", "0.60978925", "0.6094033", "0.60903376", "0.6075804", "0.60363036", "0.603006", "0.60247064", "0.60161096", "0.5985935", "0.595240...
0.739606
0
test getting the cache config
тестирование получения конфигурации кэша
public function testCacheConfig() { if (!$this->_hasTrigger('setupCache')) { return false; } $expected = $this->_manualCall('setupCache', $this->ObjectEvent); $result = $this->Event->trigger($this->ModelObject, $this->plugin . '.setupCache'); $this->assertEquals($expected, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function configurationIsCached();", "public function testCreateCachedObject() {\n\t\t// Load the config file\n\t\tCore\\Config::load('MyProject');\n\t\tCore\\Config::set('cache', 'enable', true, true);\n\n\t\t// Put the cache\n\t\tCore\\Cache::put('foo', 'bar');\n\n\t\t// The file exists?\n\t\t$this->asse...
[ "0.7166657", "0.7094102", "0.6941396", "0.687526", "0.6807122", "0.6712748", "0.66992867", "0.6686551", "0.6674238", "0.6662307", "0.66509277", "0.6638423", "0.66327775", "0.6583384", "0.65706474", "0.6569947", "0.6559856", "0.65525186", "0.65412664", "0.653488", "0.64902633"...
0.72214276
0
test getting the admin menu
тестирование получения админ-меню
public function testAdminMenu() { if (!$this->_hasTrigger('adminMenu')) { return false; } $expected = $this->_manualCall('adminMenu', $this->ObjectEvent); $result = $this->Event->trigger($this->ViewObject, $this->plugin . '.adminMenu'); $this->assertEquals($expected, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testmenuAction()\n {\n parent::login();\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->isElementPresent(\"id=sortable1\");\n $this->isElementPresent(\"id=sortable2\");\n parent...
[ "0.752425", "0.7481123", "0.7481123", "0.7481123", "0.7424119", "0.7341663", "0.73120207", "0.72790366", "0.72790366", "0.7277605", "0.7250286", "0.7166449", "0.7166398", "0.7162262", "0.70940125", "0.7069317", "0.7055192", "0.7049629", "0.7032223", "0.70124835", "0.70110583"...
0.7660423
0
Validate the Font Awesome icon name.
Проверьте имя иконки Font Awesome.
public static function validateIconName($element, FormStateInterface $form_state) { // Load the configuration settings. $configuration_settings = \Drupal::config('fontawesome.settings'); // Check if we need to bypass. if ($configuration_settings->get('bypass_validation')) { return; } $val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "public function getIconName() {}", "private function assertTheNameOnlyContainsAllowedCharacters()\n {\n if (1 !== preg_match(self::NAME_REGEX, $this->getName())) {\n throw new Ex...
[ "0.58730716", "0.58730716", "0.58724123", "0.58724123", "0.5839516", "0.56914526", "0.56051415", "0.5596326", "0.55347383", "0.5519239", "0.551734", "0.55072576", "0.54797703", "0.5433613", "0.5433613", "0.543236", "0.54220545", "0.5421784", "0.53743976", "0.53476727", "0.534...
0.7926421
0
Calculates the URL to the page containing parameters for the form fields which have been specified as needing values passed via the URL. This helps when the CMS user wants to copy and paste the URL in to an email to others, or display on the screen etc. Often a 3rd party system should create the paramertised URL.
Вычисляет URL страницы, содержащей параметры для полей формы, которые были указаны как требующие передачи значений через URL. Это полезно, когда пользователь CMS хочет скопировать и вставить URL в электронное письмо другим людям или отобразить его на экране и т.д. Часто сторонняя система должна создать параметризованны...
protected function calculateUrlWithParams() { // Get the absolute URL to the page including the site domain. // Get the Url parameter records for this page. // Also include the project coordinator field values in the URL parameters. $pageUrl = $this->AbsoluteLink(); $paramet...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_url_params()\n {\n }", "private function getParamsUrlFormat() {\n $urlParams = \"\";\n\n if ($this->getMethod() == 'GET') {\n $urlParams .= ($this->getPaging()) ? \n \"?_paging=1\" : \n \"\";\n $urlParams .= ($thi...
[ "0.6785151", "0.67579556", "0.6423543", "0.63742775", "0.6314623", "0.6295872", "0.6285857", "0.6260256", "0.6258695", "0.62438756", "0.6184899", "0.6171379", "0.61319715", "0.6098319", "0.60783106", "0.60723263", "0.60273266", "0.60028243", "0.59857315", "0.5982742", "0.5977...
0.7867275
0
Returns a list of previously created metadata postcard records for this page from the session these are output on the page so the user can see a history of records they have added this session.
Возвращает список ранее созданных метаданных записей пост-карточек для этой страницы из сессии, которые выводятся на странице, чтобы пользователь мог увидеть историю записей, которые он добавил в этой сессии.
public function PreviouslyCreatedRecords() { $createdRecords = new ArrayList(); // Only if we are to display the records added this session then get the info for that. if ($this->DisplayRecordList) { $records = Session::get('PostcardRecordsCreated_' . $this->ID); if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getCollectedRecords() {}", "protected function getCollectedRecords() {}", "protected function getCollectedRecords() {}", "function getRecords() {\n\t\treturn $this->records;\n\t}", "public function getMetadatas()\n {\n $matadata = new Cms_Model_Application_Page_Metadata();\n ...
[ "0.58330387", "0.58330387", "0.5830978", "0.5688265", "0.5546298", "0.5535827", "0.5535827", "0.55225563", "0.5510357", "0.5474016", "0.5450865", "0.543416", "0.53774935", "0.5371524", "0.53500473", "0.5195472", "0.51752853", "0.5144721", "0.51433235", "0.5117926", "0.5096426...
0.70930344
0
The newest deployable version of the appliance. The current appliance can't be updated into this version, and the owner must manually deploy this OVA to a new appliance. Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1;
Самая новая развертываемая версия устройства. Текущее устройство нельзя обновить до этой версии, и владелец должен вручную развернуть этот OVA на новое устройство. Сгенерировано из поля protobuf .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1;
public function getNewDeployableAppliance() { return $this->new_deployable_appliance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setNewDeployableAppliance($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\VMMigration\\V1\\ApplianceVersion::class);\n $this->new_deployable_appliance = $var;\n\n return $this;\n }", "public function setInPlaceUpdate($var)\n {\n GPBUtil::checkMessage(...
[ "0.83875597", "0.5545925", "0.5045859", "0.4931152", "0.48497114", "0.47563252", "0.47412688", "0.47286463", "0.46525753", "0.46510193", "0.4648335", "0.4630422", "0.45924392", "0.45295712", "0.4512411", "0.4494492", "0.44933486", "0.44880563", "0.4478327", "0.4460974", "0.44...
0.74558955
1
The newest deployable version of the appliance. The current appliance can't be updated into this version, and the owner must manually deploy this OVA to a new appliance. Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1;
Самая новая развертываемая версия устройства. Текущее устройство нельзя обновить до этой версии, и владелец должен вручную развернуть этот OVA на новое устройство. Сгенерировано из поля protobuf .google.cloud.vmmigration.v1.ApplianceVersion new_deployable_appliance = 1;
public function setNewDeployableAppliance($var) { GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ApplianceVersion::class); $this->new_deployable_appliance = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNewDeployableAppliance()\n {\n return $this->new_deployable_appliance;\n }", "public function setInPlaceUpdate($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\VMMigration\\V1\\ApplianceVersion::class);\n $this->in_place_update = $var;\n\n return $t...
[ "0.7454592", "0.55472726", "0.50470424", "0.49348116", "0.48488587", "0.47581327", "0.4744319", "0.47306126", "0.46555945", "0.46532592", "0.4652101", "0.46337828", "0.45940655", "0.45313075", "0.45160908", "0.4497303", "0.44941166", "0.44891012", "0.44770998", "0.44632533", ...
0.8387163
0
The latest version for in place update. The current appliance can be updated to this version using the API or m4c CLI. Generated from protobuf field .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2;
Самая последняя версия для в-place обновления. Текущее устройство можно обновить до этой версии с помощью API или m4c CLI. Сгенерировано из поля protobuf .google.cloud.vmmigration.v1.ApplianceVersion in_place_update = 2;
public function setInPlaceUpdate($var) { GPBUtil::checkMessage($var, \Google\Cloud\VMMigration\V1\ApplianceVersion::class); $this->in_place_update = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInPlaceUpdate()\n {\n return $this->in_place_update;\n }", "public function setNewDeployableAppliance($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\VMMigration\\V1\\ApplianceVersion::class);\n $this->new_deployable_appliance = $var;\n\n return $t...
[ "0.504715", "0.47204202", "0.4435094", "0.4427902", "0.4257221", "0.4225132", "0.42122072", "0.419359", "0.41304266", "0.4128884", "0.40900788", "0.4089813", "0.4089813", "0.40574875", "0.40398026", "0.40329742", "0.40275565", "0.40243804", "0.4023196", "0.40115404", "0.40115...
0.82146156
0
Handle the article "created" event.
Обработайте событие "created" статьи.
public function created(Article $article) { if ($article->is_top == 1 && $article->status == 1) { Article::topArticle(true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle(Article $article): void\n {\n // Log également un article stat avec pour action create.\n $article->setSlug($this->slug->generate($article->getTitle()));\n $article->setAuthor($this->token->getToken()->getUser());\n }", "public function createAction()\n {\n\n ...
[ "0.6548769", "0.6399625", "0.62261313", "0.60732126", "0.6056525", "0.6029116", "0.60059524", "0.5978391", "0.597736", "0.5976863", "0.5891212", "0.5891212", "0.5872244", "0.58556974", "0.58203787", "0.58025295", "0.5795747", "0.57853097", "0.5779718", "0.5745753", "0.5743379...
0.70579916
0