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
/ drawBreadcrumb create a breadcrumb string of current page and it's parents
/ drawBreadcrumb создает строку хлебных крошек текущей страницы и её родителей
public function drawBreadcrumb($guid = false){ global $db, $siteID, $page; $guid = ($guid) ? $guid : $this->guid; $html = ''; $link = array(); // current page $link[] = $this->drawTitleByGUID($guid); // add all precedings parents to the array while($parent = $this->g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_crumbs() {\n\t\n\t\t$breadcrumb = '';\n\t\t$args = $this->args;\n\n\t\t// Get the items based on page context \n\t\t$trail = $this->get_trail();\n\n\t\t// If items are found, build the trail \n\t\tif ( !empty( $trail ) && is_array( $trail ) ) {\n\n\t\t\t// Wrap the trail and add the 'Before' elemen...
[ "0.71042824", "0.6899634", "0.6875399", "0.68744063", "0.67655104", "0.675449", "0.6738329", "0.6686126", "0.6686126", "0.6626228", "0.6616606", "0.65868396", "0.6558155", "0.6555853", "0.65501714", "0.65462065", "0.65421826", "0.6463206", "0.64543813", "0.64513445", "0.64448...
0.7264157
0
This draws a TinyMCE area for workstream panels
Это рисует область TinyMCE для панелей рабочих потоков
public function drawWorkPanelTinyMCE() { $html = '<script type="text/javascript" src="/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce.js"></script>'."\n"; $html .= '<script type="text/javascript" src="/treeline/behaviour/tiny_mce/tiny_mce_workpanel.js"></script>'; return $html; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function drawPanelTinyMCE() {\n\t\t\t// This needs cutting down to edit a panel -- basic formatting etc\n\t\t\t$html = '<script type=\"text/javascript\" src=\"/treeline/includes/tiny_mc3/jscripts/tiny_mce/tiny_mce.js\"></script>'.\"\\n\";\n\t\t\t$html .= '<script type=\"text/javascript\" src=\"/treeline/beh...
[ "0.72126967", "0.63477916", "0.6169561", "0.60817474", "0.5958625", "0.59205747", "0.58576584", "0.5855306", "0.5834674", "0.5833665", "0.5828502", "0.5819284", "0.5788769", "0.57825243", "0.56552345", "0.5642422", "0.563686", "0.5562818", "0.5505961", "0.54764557", "0.546864...
0.7308784
0
12/12/2008 Phil Redclift Draw a list of publishable pages or panels with available options and pagination
12/12/2008 Phil Redclift Нарисовать список опубликованных страниц или панелей с доступными вариантами и пагинацией
public function drawPagePublishableList($page = 1, $format = 0){ global $site; //print "dPPL($page, $format)<br>\n"; $this->setPerPage(10); $this->setPage($page); if($results = $this->getPagePublishableList($page, $format, $site->id) ){ switch($format){ case '0': case 'pages': $format = '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function drawPageList($page=1, $action=false, $cat=false, $term=false, $type=false, $format=0, $guid=''){\n \tglobal $site, $help, $db;\n\t\t//print \"dPL(page-$page, action-$action, cat-$cat, term-$term, type-$type, format-$format, guid-$guid)<br>\\n\";\n\n\t\t$action = $_REQUEST['action'];\n\t\t$this->...
[ "0.68333185", "0.671128", "0.660589", "0.64493936", "0.64398426", "0.64063853", "0.6394497", "0.63881314", "0.6373561", "0.63563", "0.6354984", "0.63354003", "0.6331671", "0.6303768", "0.63000077", "0.6298029", "0.62846", "0.62740624", "0.6240661", "0.6232736", "0.6232736", ...
0.7056663
0
Lists all Description models.
Список всех моделей Description.
public function actionIndex() { $dataProvider = new ActiveDataProvider([ 'query' => Description::find(), 'pagination' => [ 'pageSize' => 500, ], ]); return $this->render('index', [ 'dataProvider' => $dataProvider, ]); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listDescriptions() {\n\t\tglobal $HTML;\n\t\tglobal $page;\n\t\tglobal $id;\n\n\t\t$this->getDescription();\n\n\t\t$languages = $this->languageClass->getItems();\n\n\t\t$table = $HTML->table();\n\t\t$table->setTableId(\"descriptions\");\n\t\t$table->setHeader(0, $this->translate(\"Language\"), \"sortby\")...
[ "0.70090115", "0.6997039", "0.6897286", "0.6590344", "0.65867376", "0.64061403", "0.63147694", "0.63147694", "0.6262452", "0.61530447", "0.6132926", "0.6132926", "0.6089586", "0.60877186", "0.608287", "0.6020357", "0.6020357", "0.6017267", "0.6012613", "0.5985329", "0.5964233...
0.7364362
0
Creates a new Description model. If creation is successful, the browser will be redirected to the 'view' page.
Создаёт новый модель Description. Если создание успешно, браузер будет перенаправлен на страницу 'view'.
public function actionCreate($id) { $model = new Description(); $model['document_id'] = $id; if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['documents/view', 'id' => $model->document_id]); //return $this->redirect(['document...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new Oadode();\n $modelDescription = new DescriptionOfGoods();\n $posts = Yii::$app->request->post();\n if (!empty(Yii::$app->request->post())) {\n $posts['DescriptionOfGoods']['application_id'] = $posts['Oadode']['application_i...
[ "0.7433268", "0.6871088", "0.68105143", "0.670898", "0.6687145", "0.66647655", "0.6550234", "0.65500414", "0.65337807", "0.6521266", "0.6513174", "0.6511628", "0.6503335", "0.6501384", "0.6466586", "0.6458145", "0.6431864", "0.64296955", "0.6421154", "0.641741", "0.6416731", ...
0.7537911
0
Reads up to $length bytes from the socket
Читает до $length байт из сокета
public function read($length) { $this->checkClosed(); $buffer = ''; while (\mb_strlen($buffer, '8BIT') < $length) { $result = \socket_read($this->socket, $length - mb_strlen($buffer, '8BIT')); if (false === $result) { $this->throwException(); } $buffer .= $result; } return $buffer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _read($length) {\n $data = false;\n if (!feof($this->_socket)) {\n $data = fread($this->_socket, $length);\n }\n return $data;\n }", "public function readBytes($length) {}", "public function read($length) {\n\n $readArray = array($this->client...
[ "0.7984958", "0.77911794", "0.77310944", "0.7719773", "0.7719773", "0.7719773", "0.7476275", "0.7390496", "0.7373764", "0.72505784", "0.7250164", "0.7219543", "0.7185529", "0.7082907", "0.69429016", "0.68879724", "0.67739826", "0.6772535", "0.6731308", "0.6731308", "0.6726359...
0.7827217
1
Get info box links
Получить ссылки на информационные ящики
public function getInfoBoxLinks(): array { return $this->infoBoxLinks; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInfoLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info'),\n 'text' => $this...
[ "0.70678055", "0.63040435", "0.62986875", "0.62572926", "0.6247154", "0.6224018", "0.6160695", "0.60526663", "0.6035727", "0.5989982", "0.5966752", "0.5943227", "0.59385127", "0.59358466", "0.59358466", "0.5913795", "0.5863666", "0.5793611", "0.5783598", "0.57747376", "0.5768...
0.7830577
0
Retorna o valor da variavel sobrecarregada readonly
Возвращает значение переменной readonly, перегруженной
public function getReadonly() { return $this->readonly; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_readonly() {\n return $this->readonly;\n }", "function getReadOnly() { return $this->_readonly; }", "public function readonly()\n {\n return $this->readOnly;\n }", "public function getReadOnlyFlag() {}", "function isReadonly()\n {\n return $this->readonl...
[ "0.7760357", "0.7470642", "0.737028", "0.7365338", "0.7151776", "0.714521", "0.71421534", "0.70207226", "0.69978625", "0.6965153", "0.6891848", "0.68911356", "0.68911356", "0.6890165", "0.66784906", "0.66634506", "0.66554147", "0.6650697", "0.6650697", "0.6650697", "0.6650623...
0.75702703
1
devuelve el numero total de articulos de la cesta
возвращает общее количество товаров в корзине
public function total_articulos(){ if (count($this->listArticulos)==0) return 0; $total = 0; foreach ($this->listArticulos as $elArticulo) $total+=$elArticulo->unidades; return $total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function peso_cesta(){\r\n\t\t\t$peso = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo){\r\n\t\t\t\t$peso+=($elArticulo->peso*$elArticulo->unidades);\r\n\t\t\t\tparent::$log->debug(\"Peso $elArticulo->articulo= $elArticulo->peso(kg) * $elArticulo->unidades(u) = \".($elArticulo->unidades*$elArticul...
[ "0.7362208", "0.7281163", "0.72636515", "0.72375077", "0.7120975", "0.6973062", "0.6923486", "0.69006646", "0.6899283", "0.6867667", "0.6853451", "0.6853451", "0.67440104", "0.6714775", "0.67050654", "0.6698671", "0.66927797", "0.66927797", "0.6663949", "0.6663949", "0.666394...
0.7756246
0
calcula el valor de la cesta sin iva
вычисли значение корзины без НДС
public function cesta_sin_iva(){ $total = 0; foreach ($this->listArticulos as $elArticulo){ $precio = $elArticulo->oferta>0?$elArticulo->oferta:$elArticulo->precio; $total+= round($elArticulo->unidades*$precio,2); } return $total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function iva_articulos(){\r\n\t\t\t$total = $this->cesta_con_iva()-$this->cesta_sin_iva();\t\t\t\r\n\t\t\treturn $total;\r\n\t\t}", "public function cesta_con_iva(){\r\n\t\t\t$total = 0;\r\n\t\t\tforeach ($this->listArticulos as $elArticulo){\r\n\t\t\t\t$precio = $elArticulo->oferta_iva>0?$elArticulo->ofe...
[ "0.70917654", "0.7078778", "0.7063861", "0.7031414", "0.6912993", "0.653774", "0.64183605", "0.6406777", "0.63552207", "0.6313561", "0.63073564", "0.6266073", "0.62406814", "0.62013954", "0.6155552", "0.61512136", "0.6135551", "0.61159354", "0.60699856", "0.6029383", "0.60229...
0.7189105
0
calcula el valor de la cesta con iva
вычисли значение корзины с учетом налога на добавленную стоимость
public function cesta_con_iva(){ $total = 0; foreach ($this->listArticulos as $elArticulo){ $precio = $elArticulo->oferta_iva>0?$elArticulo->oferta_iva:$elArticulo->precio_iva; $total+= round($elArticulo->unidades*$precio,2); } return $total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function calcolaValutazione()\n {\n\n $media=0;\n $i=0;\n foreach ($this->valutazioni as &$value){\n $media=$media+$value->getvoto();\n $i++;}\n $this->valutazione=$media/$i;\n\n }", "public function cesta_sin_iva(){\r\n\t\t\t$total = 0;\r\n\t\t\tforeac...
[ "0.70791763", "0.6963673", "0.6861621", "0.6747814", "0.674198", "0.67208266", "0.6698211", "0.66798043", "0.6679106", "0.6644655", "0.66413426", "0.6618285", "0.6531306", "0.6531306", "0.64778817", "0.64447266", "0.63951766", "0.6391793", "0.6363039", "0.6334774", "0.6321913...
0.7028373
1
Return the higher version of $version1 and $version2 if both match. Else return false.
Верните более высокую версию $version1 и $version2, если они совпадают. В противном случае верните false.
public static function matchVersions($version1, $version2) { if ($version1 == '*') { return $version2; } if ($version2 == '*') { return $version1; } if ($version1 == $version2) { return $version1; } $v1 = self::_normalizeVe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function cmp($version1, $version2) {\r\n list($N1, $M1, $K1) = explode(self::SEPARATOR, $version1);\r\n list($N2, $M2, $K2) = explode(self::SEPARATOR, $version2);\r\n if($N1 == $N2) {\r\n if($M1 == $M2) {\r\n if($K1 == $K2) {\r\n retur...
[ "0.6775682", "0.6516803", "0.64387816", "0.637249", "0.63653535", "0.6319751", "0.6317614", "0.6222706", "0.61863184", "0.6147283", "0.6147029", "0.61251545", "0.61182356", "0.605372", "0.5943914", "0.59289575", "0.59118646", "0.590628", "0.5859649", "0.5773274", "0.57573664"...
0.71580714
0
Elimina un objeto Software en la base de datos.
Удалите объект Software из базы данных.
public function delete($software){ $idSoftware=$software->getIdSoftware(); try { $sql ="DELETE FROM `software` WHERE `idSoftware`='$idSoftware'"; return $this->insertarConsulta($sql); } catch (SQLException $e) { throw new Exception('Primary key is null'); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function formularioSoftwareEliminar() {\nrequire_once \"conexionsql.php\";\nrequire_once \"formularios.php\";\n$conSoftware= \"SELECT ID_SOFTWARE,SOFTWARE from software WHERE ESTATUS_ACTIVO = '1' ORDER BY software ASC\";\n\t//Campo tipo de software\n\t$software= new campoSeleccion(\"selSoftware\",\"formularioCamp...
[ "0.64566755", "0.6401665", "0.6349787", "0.6008747", "0.5876905", "0.5828173", "0.57892084", "0.57748693", "0.5773277", "0.57418996", "0.5715777", "0.570108", "0.56923735", "0.5690761", "0.5688333", "0.5688333", "0.5688333", "0.5688333", "0.5654845", "0.5639798", "0.5601446",...
0.70580244
0
Get connection additional meta data
Получить дополнительные метаданные соединения
public function getConnectionData() { return $this->metadata; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function storeConnectionMetadata(){\n }", "private function getConnectionInfo()\n {\n return [\n 'host' => $this->getSocketEndPoint(),\n 'ssl_file' => $this->sslPem,\n 'pass_phrase'=> $this->passPhrase\n ];\n }", "public function renvoi_infos()...
[ "0.7050878", "0.69874465", "0.6580915", "0.6558569", "0.6425122", "0.6425122", "0.6425122", "0.6425122", "0.6424165", "0.6424165", "0.6423141", "0.6423141", "0.6423141", "0.6410834", "0.62939113", "0.62496597", "0.6200032", "0.6185897", "0.6169638", "0.6152231", "0.60146755",...
0.73848355
0
Get Qordoba Application API server requests count
Получить количество запросов к серверу API приложения Qordoba
public function getRequestCount() { return $this->requestCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function requests() : int;", "public function count()\n {\n return count($this->requests);\n }", "public function getTotalRequests() {\n return $this->debug_total_url_requests + $this->debug_total_cache_requests;\n }", "protected function get_request_counts()\n {\n ...
[ "0.7011747", "0.6697103", "0.6645872", "0.64557415", "0.6433863", "0.6410419", "0.64079434", "0.63513035", "0.6244766", "0.6242627", "0.6148921", "0.61134356", "0.6085051", "0.608057", "0.608057", "0.60766256", "0.60030407", "0.59947133", "0.5944215", "0.59314203", "0.5922137...
0.7095199
0
Remove an asset of the given block id. $assets is an array such [ $targetAssetGroupName => [ $files ] ]
Удалить актив (активы) с заданного идентификатора блока. $assets — это массив такого вида [ $targetAssetGroupName => [ $files ] ]
public function removeAssets($id, $assets=[]){ $block = $this->layout->getOrCreate($id); foreach($assets as $targetAssetGroupName => $files) { if(!isset($block->assets[$targetAssetGroupName])) $block->assets[$targetAssetGroupName] = []; foreach($files as $file) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_uploaded_asset(string $name) {\n\t\t$this->readychk();\n\t\tfor ($i = 0; $i < count($this->assets); $i++) {\n\t\t\tif ($this->assets[$i]->get_filename() === $name) {\n\t\t\t\t$this->assets[$i]->remove();\n\t\t\t\tunset($this->assets[$i]);\n\t\t\t\t$this->assets = array_values($this->assets);\n\t\t\...
[ "0.5887005", "0.5509836", "0.5471387", "0.53618497", "0.53612363", "0.53542495", "0.53401524", "0.52285993", "0.52134526", "0.51818085", "0.5165567", "0.51029575", "0.5078412", "0.5034152", "0.50251263", "0.4982963", "0.49823695", "0.49730876", "0.4966568", "0.4958806", "0.49...
0.78297806
0
Performs a strict search on the given block id assets in order to replace it in place with the new given asset. $replacements is an array such [ search => replacement, search2 => replacement2, search3 => replacement3, ]
Выполняет строгий поиск по заданным блокам id-активов с целью замены их в месте нахождения новым заданным активом. $replacements — это массив вида [ search => replacement, search2 => replacement2, search3 => replacement3, ]
public function replaceAssets($id, $replacements=[]){ $block = $this->layout->getOrCreate($id); foreach($replacements as $search => $replacement) { foreach ($block->assets as $blockAssetsName=>$blockAssets) { foreach($blockAssets as $i=>$asset) { if ($asse...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function replaceArray(string $s, string $search, array $replacements): string {\n $rcnt = \\count($replacements);\n $chunks = explode($search, $s, $rcnt + 1);\n $rcnt = min($rcnt, \\count($chunks) - 1);\n $r = [];\n foreach ($chunks as $k => $c) {\n $r[] = $c;\n...
[ "0.5614894", "0.531159", "0.530125", "0.5272799", "0.52708435", "0.5198837", "0.51715016", "0.5171105", "0.5157851", "0.51076007", "0.5089996", "0.503949", "0.5005643", "0.5005549", "0.50027084", "0.49753448", "0.4961913", "0.49293178", "0.49262136", "0.4867715", "0.4834068",...
0.70654595
0
Sets default data of a block. It won t override existing data.
Устанавливает данные по умолчанию блока. Не перезапишет существующие данные.
public function setDefaultData($id, $data=[]){ $block = $this->layout->getOrCreate($id); $block->data = array_merge($data, $block->data); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDefaultData(array $defaultData);", "public function set_default_data() {\n\t\t$this->button_text_color = '#FFFFFF';\n\t\t$this->button_background_color = '#6699CC';\n\n\t\t$this->header_text_color = '#FFFFFF';\n\t\t$this->header_background_color = '#6699CC';\n\n\t\t$this->button_te...
[ "0.70001775", "0.6673804", "0.65988475", "0.6460158", "0.6280704", "0.6220668", "0.62193245", "0.61695296", "0.6124416", "0.6097691", "0.60851735", "0.6080923", "0.6016338", "0.5987591", "0.59522134", "0.59375185", "0.5924406", "0.59153664", "0.58835083", "0.586682", "0.58609...
0.7074599
0
Sets default meta of a block. It won t override existing meta.
Устанавливает метаданные блока по умолчанию. Не перезаписывает существующие метаданные.
public function setDefaultMeta($id, $meta=[]){ $block = $this->layout->getOrCreate($id); $block->meta = array_merge($meta, $block->meta); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Admin_Action_SetDefaultBlock() {\n $blockId = $this->_getPOSTRequest ( 'blockId', 0 );\n $query = \"UPDATE\" . \" [|PREFIX|]dynamic_content_block \" . \" SET activated = '1' WHERE blockid = '\" . intval($blockId) . \"'\";\n $this->db->Query ( $query );\n return;\n }",...
[ "0.6154203", "0.6144028", "0.60402644", "0.6012862", "0.59804505", "0.59152275", "0.5830632", "0.58130014", "0.58130014", "0.579798", "0.57962245", "0.5772951", "0.5765425", "0.57624954", "0.5744855", "0.5737117", "0.57257444", "0.56606275", "0.5636814", "0.5630772", "0.55915...
0.7151838
0
Insert given block $id after $target.
Вставить блок $id после $target.
public function insertAfterBlock ($target, $id, $options=[]){ $this->layout->set($id, $options); $this->layout->afterBlockResolve($target, function ($ev, Layout $layout) use($target, $id) { $layout->resolve($id); }); $this->layout->afterBlockRender($target, function ($ev, Lay...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insertBeforeBlock ($beforeTarget, $id, $options=[]){\n $this->layout->set($id, $options);\n $this->layout->beforeBlockResolve($beforeTarget, function ($ev, Layout $layout) use($beforeTarget, $id) {\n $layout->resolve($id);\n });\n $this->layout->afterBlockRend...
[ "0.6122838", "0.5998077", "0.5956537", "0.593856", "0.585453", "0.5811107", "0.5688809", "0.5471552", "0.54665357", "0.5428693", "0.53672606", "0.53312707", "0.52666485", "0.5226337", "0.5209901", "0.5179317", "0.51652014", "0.5132075", "0.50668764", "0.50602645", "0.5059369"...
0.8031932
0
Insert given block $id before $target.
Вставить заданный блок $id перед $target.
public function insertBeforeBlock ($beforeTarget, $id, $options=[]){ $this->layout->set($id, $options); $this->layout->beforeBlockResolve($beforeTarget, function ($ev, Layout $layout) use($beforeTarget, $id) { $layout->resolve($id); }); $this->layout->afterBlockRender($before...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insertAfterBlock ($target, $id, $options=[]){\n $this->layout->set($id, $options);\n $this->layout->afterBlockResolve($target, function ($ev, Layout $layout) use($target, $id) {\n $layout->resolve($id);\n });\n $this->layout->afterBlockRender($target, function...
[ "0.72835696", "0.619182", "0.5970821", "0.59299946", "0.59293926", "0.56704956", "0.56358546", "0.56205475", "0.5582418", "0.5540327", "0.5468629", "0.53650683", "0.5363491", "0.53501904", "0.5336499", "0.53161293", "0.52821857", "0.52744657", "0.52545947", "0.52440816", "0.5...
0.7175697
1
Return an array of services.
Вернуть массив сервисов.
public function getServices(): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getServices(): array\n {\n return static::$services;\n }", "public function getServices();", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function g...
[ "0.8545805", "0.8473749", "0.82858324", "0.82858324", "0.82858324", "0.82527", "0.82202506", "0.8206234", "0.8202", "0.8202", "0.8172218", "0.81468475", "0.81380796", "0.80998296", "0.8094448", "0.8055901", "0.8043465", "0.7907757", "0.7870094", "0.7823053", "0.78099114", "...
0.8554304
0
Factory for latitude element
Фабрика для элемента широты
public static function getLatitude() { $element = new Lib_Form_Element_Location_Angle_Latitude(); return $element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function latitude();", "public function getLat();", "public function get_latitude()\n {\n }", "public function get_latitude()\n {\n }", "public function __construct($lat)\r\n {\r\n $this->_lat = $lat;\r\n }", "public function getLatitude(): float;...
[ "0.74209243", "0.68726623", "0.65430665", "0.65428853", "0.6269292", "0.6192432", "0.6070432", "0.60351795", "0.60193914", "0.5994152", "0.5994152", "0.5994152", "0.59904516", "0.5985785", "0.59775925", "0.5977136", "0.5904754", "0.58949745", "0.58822596", "0.58098316", "0.58...
0.75437814
1
Factory for zoom element
Фабрика для элемента увеличения
public static function getZoom() { $element = new Lib_Form_Element_Location_Zoom(); return $element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function zoom() {\n\t}", "public function withZoomFactor(ZoomFactor $zoom);", "public function setZoom($value) {\n\t}", "public function setZoomControl()\n {\n $args = func_get_args();\n\n if (isset($args[0]) && ($args[0] instanceof ZoomControl)) {\n $this->zoomControl = $a...
[ "0.6895346", "0.6477751", "0.6240417", "0.6199307", "0.61519223", "0.5948865", "0.58420247", "0.5725698", "0.5606518", "0.55294526", "0.5332833", "0.5328538", "0.5313203", "0.5194862", "0.5133661", "0.5058262", "0.50443584", "0.49868488", "0.49411896", "0.49311587", "0.492284...
0.747505
1
Factory for yaw element
Фабрика для элемента поворота по оси Y
public static function getYaw() { $element = new Lib_Form_Element_Location_Angle_Yaw(); return $element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getPitch()\n {\n $element = new Lib_Form_Element_Location_Angle_Pitch();\n return $element;\n }", "public static function getPitch()\n {\n $element = new Lib_Form_Element_Location_Angle_Pitch();\n return $element;\n }", "public function rotation(float $roll = 0, float $pi...
[ "0.5865664", "0.5865664", "0.5455798", "0.52979374", "0.5297914", "0.49167404", "0.47630802", "0.4608474", "0.45746073", "0.44602305", "0.437359", "0.4358086", "0.43561172", "0.42919478", "0.42919478", "0.42662618", "0.424432", "0.42413345", "0.42394114", "0.42288628", "0.417...
0.7410582
1
Factory for pitch element
Фабрика для элемента тона
public static function getPitch() { $element = new Lib_Form_Element_Location_Angle_Pitch(); return $element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPitch($var)\n {\n GPBUtil::checkDouble($var);\n $this->pitch = $var;\n\n return $this;\n }", "public function getPitch()\n {\n return $this->pitch;\n }", "public function isFixedPitch() {}", "public static function PER_TITLE_TEMPLATE_FIXED_RESOLUTION...
[ "0.6282948", "0.62495756", "0.57025963", "0.4707126", "0.44642088", "0.44642088", "0.4435667", "0.44162688", "0.44123766", "0.44120726", "0.43990508", "0.42864943", "0.4281105", "0.4275681", "0.42736807", "0.42550054", "0.42541358", "0.42514467", "0.42454562", "0.42281085", "...
0.75069624
1
return key from array $dupmodper is an array, $val is an array values
вернуть ключ из массива $dupmodper является массивом, $val является значениями массива
function getkey($dupmodper,$val) { foreach($dupmodper as $key => $product) { foreach($product as $keyd => $pro) { if($pro==$val) { return $keyd; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkdupmodval($arr1,$val,$out,$numrot)\n {\n $flagfirst=\"true\";\n $flagsecond=\"true\";\n\n for($i=1;$i<=$numrot;$i++)\n {\n $array1='';\n\n $array1=$arr1.\",\".$i;\n\n if($out[$array1][0]==...
[ "0.57781434", "0.565092", "0.54245055", "0.5341402", "0.5294565", "0.52659744", "0.52405083", "0.52304256", "0.51900876", "0.5170495", "0.5148409", "0.5148409", "0.5139063", "0.51377743", "0.51029915", "0.50272", "0.50239426", "0.50239426", "0.501781", "0.498051", "0.49765763...
0.8026075
0
Lists all Aduan models.
Перечисляет все модели Aduan.
public function actionIndex() { $searchModel = new AduanSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return alunos::all();\n }", "public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n ...
[ "0.69506145", "0.6660783", "0.6575569", "0.65560204", "0.6529977", "0.64454526", "0.64379543", "0.63589925", "0.63365895", "0.6330718", "0.63300276", "0.6290233", "0.6290233", "0.6280876", "0.62726367", "0.62690115", "0.6267467", "0.62508184", "0.6248572", "0.62256753", "0.62...
0.70658875
0
Creates a new Aduan model. If creation is successful, the browser will be redirected to the 'view' page.
Создает новый модель Aduan. Если создание успешно, браузер будет перенаправлен на страницу 'view'.
public function actionCreate() { $model = new Aduan(); $modelAction = new AduanAction(); if ($model->load(Yii::$app->request->post())) { $model->progress_id = 30; $model->created_at = new Expression('NOW()'); $model->updated_at = new Expression('NOW()'); $r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new AktaBadan();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->register = $this->generateRegister(\"register\");\n $model->save();\n return $this->redirect(['view', 'id' => $model->id, 'akta_badan_jenis_...
[ "0.7383302", "0.73092717", "0.72995526", "0.72545713", "0.7201327", "0.72003156", "0.715731", "0.7155964", "0.71446204", "0.7063768", "0.7033752", "0.69891995", "0.69360983", "0.6909538", "0.68825126", "0.68750364", "0.68749535", "0.6872798", "0.6808623", "0.6788547", "0.6778...
0.7430517
0
Show table wiht linked licenses to user
Показать таблицу с связанными лицензиями пользователю
static function showLicenses(User $user) { global $DB; $ID = $user->getField('id'); echo "<div class='spaced'><table class='tab_cadre_fixehov'>"; $header = "<tr><th>".__('Software')."</th>"; $header .= "<th>".__('Licenses')."</th>"; $header .= "<th>".__('Added')."</th></tr>"; echo $header; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function licensesViewAction(){\n $this->setDialogAction([\n 'id' => 'messages-response',\n 'title' => 'Aktywuj lub przedłuż dostęp do usługi Kryptos',\n ]);\n $request = $this->getRequest();\n \n $LicenseRepository = Application_Service_Utilities::g...
[ "0.6470301", "0.59512675", "0.5898452", "0.58076394", "0.5798497", "0.5766815", "0.57250226", "0.57234275", "0.57055265", "0.56449306", "0.5583922", "0.5566481", "0.5553278", "0.55459774", "0.5538098", "0.55198485", "0.5504716", "0.5499712", "0.54753596", "0.5469555", "0.5467...
0.77051556
0
Merges the current validation results with another results
Объединяет текущие результаты проверки с другими результатами
public function mergeResults(ValidationResults $results) : ValidationResults { foreach ($results->result() as $field => $messages) { foreach ($messages as $message) { $this->addFieldError($message, $field); } } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function merge($result_to_merge){\n \t// If result to merge is valid do nothing - everything is ok with it, there is no messages\n if($result_to_merge->is_valid()) return;\n\n // Set current result is valid flag.\n $this->set_valid($result_to_merge->is_valid());\n\n // Append ...
[ "0.6731893", "0.59041816", "0.587736", "0.5832342", "0.5663359", "0.565843", "0.5632467", "0.56121176", "0.560608", "0.55872214", "0.5583743", "0.5525473", "0.5486941", "0.5456027", "0.5331851", "0.5228975", "0.521775", "0.5193049", "0.51674277", "0.513594", "0.5127728", "0...
0.7211679
0
Add filtering by profile ids
Добавить фильтрацию по идентификаторам профилей
public function addIdsToFilter($profileIds) { $this->addFieldToFilter('main_table.profile_id', $profileIds); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _addProfileFilters($profile)\n {\n $filters = array();\n // Table prefix\n $tablePrefix = 'main_table.';\n if (Mage::helper('xtcore/utils')->mageVersionCompare(Mage::getVersion(), '1.4.0.1', '<=')) {\n $tablePrefix = '';\n }\n // Filters\n ...
[ "0.70045054", "0.6059881", "0.59145576", "0.58513653", "0.5801575", "0.5777886", "0.5754601", "0.57530564", "0.5722057", "0.56824994", "0.56702447", "0.5595527", "0.5585487", "0.5585487", "0.5585487", "0.5585487", "0.5585487", "0.5585487", "0.5585487", "0.55811626", "0.557924...
0.7286731
0
/ Check if Woocommerce plugin is enabled.
Проверьте, включен ли плагин Woocommerce.
function pacz_woocommerce_enabled() { if ( class_exists( 'woocommerce' ) ) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_enabled()\n{\n\tif(class_exists('Woocommerce'))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "public static function Woocommerce_active_check() {\n\n if ( ! self::$active_plugins ) {\n self::init();\n }\n\n return in_array( 'woocommerce/woocommerce.php', self::$active_plug...
[ "0.86097246", "0.8061898", "0.79279613", "0.78518116", "0.7786144", "0.77810293", "0.7728562", "0.772674", "0.7656062", "0.7560867", "0.7560824", "0.74796635", "0.74720454", "0.74670833", "0.73723966", "0.7365595", "0.73313284", "0.7331207", "0.722258", "0.7222475", "0.710527...
0.838199
1
Output the proceed to checkout button.
Выведите кнопку "Перейти к оплате".
function pacz_woocommerce_button_proceed_to_checkout() { $checkout_url = wc_get_checkout_url(); ?> <div class="button-icon-holder alt checkout-button-holder"><a href="<?php echo esc_url($checkout_url); ?>" class="checkout-button"><i class="pacz-icon-shopping-cart"></i><?php esc_html_e( 'Proceed to Checkout', 'cl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaymentSubmitButtonText()\n\t{\n\t\treturn \"Proceed to 2checkout.com to pay\";\n\t}", "public function back_to_cart_button_on_checkout() {\n\t\t\tif ( is_checkout() && ! is_wc_endpoint_url( 'order-received' ) && astra_get_option( 'checkout-back-to-cart-button' ) ) {\n\n\t\t\t\t$back_to_cart_t...
[ "0.6786226", "0.66228294", "0.6604154", "0.64324665", "0.6425758", "0.6398898", "0.63734585", "0.63566506", "0.6330638", "0.63095325", "0.62946326", "0.62737215", "0.62566847", "0.6229695", "0.62105095", "0.62018585", "0.61375", "0.6136642", "0.6135022", "0.6009594", "0.60082...
0.8038283
0
/ popup_head STYLES MEDIA THICKBOX
/ popup_head СТИЛИ МЕДИА ТОЛСТЫЙ КУБИК
function popup_head() { if(isset($_GET["acf_type"]) && $_GET['acf_type'] == 'file') { ?> <style type="text/css"> #media-upload-header #sidemenu li#tab-type_url, #media-upload-header #sidemenu li#tab-gallery { display: none; } #media-items tr.url, #media-items tr.align, #medi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addHead()\n\t{ \n JHtml::_('bootstrap.tooltip');\n $doc = JFactory::getDocument();\n $doc->addScript(JURI::root() . 'modules/mod_hwd_flickr_photobox/js/jquery.magnific-popup.js');\n $doc->addStylesheet(JURI::root() . 'modules/mod...
[ "0.7114883", "0.6542088", "0.6391102", "0.63659793", "0.6343879", "0.6194973", "0.61317265", "0.60871404", "0.6086672", "0.60591704", "0.603693", "0.603667", "0.60150325", "0.60047954", "0.5970681", "0.5956265", "0.5952326", "0.5932", "0.5925613", "0.5905263", "0.590126", "...
0.7285876
0
/ media_send_to_editor SEND IMAGE TO ACF DIV
/ media_send_to_editor Отправить изображение в DIV ACF
function media_send_to_editor($html, $id) { parse_str($_POST["_wp_http_referer"], $arr_postinfo); if(isset($arr_postinfo["acf_type"]) && $arr_postinfo["acf_type"] == "file") { $file_src = wp_get_attachment_url($id); ?> <script type="text/javascript"> self.parent.acf_div.find('input.value...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function image_media_send_to_editor($html, $attachment_id, $attachment)\n {\n }", "function custom_send_image_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt ) {\n\n\t$url = wp_get_attachment_url($id);\n\n\t$html_str = '<div class=\"align-' . esc_attr($align) . '\">';\n\n \t\t$html_str ...
[ "0.766068", "0.71962106", "0.6821833", "0.6803288", "0.6479158", "0.6464659", "0.6266107", "0.6123092", "0.6122282", "0.6063534", "0.6046032", "0.60208213", "0.6011127", "0.6002279", "0.59955156", "0.59920454", "0.59417444", "0.5940703", "0.5930676", "0.59271455", "0.5918169"...
0.7584899
1
Register Skinr API information. This is required for your module to have its include files loaded. The full documentation for this hook is in the advanced help.
Зарегистрируйте информацию о Skinr API. Это необходимо для того, чтобы ваши модульные файлы загружались. Полная документация по этому хуку находится в разделе продвинутой помощи.
function hook_skinr_api() { return array( 'api' => 1, 'path' => drupal_get_path('module', 'modulename'), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function customize_register()\n {\n }", "public function customize_register()\n {\n }", "function registerHooks()\n{\n add_action('after_setup_theme', 'setupTheme');\n add_action('rest_api_init', 'registerEndpoints');\n}", "private function settings_api_init() {\r\n\t...
[ "0.61668235", "0.61668235", "0.5984445", "0.59811187", "0.5975049", "0.58939624", "0.58470666", "0.5816593", "0.5813113", "0.5775154", "0.57325256", "0.5711132", "0.57100123", "0.56764996", "0.5669077", "0.5669077", "0.5669077", "0.5669077", "0.5669077", "0.5669077", "0.56690...
0.70791835
0
Apply this filter on the given listing.
Примените этот фильтр к указанному списку.
public function apply(AbstractListing $listing);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ApplyFilter($listing_type)\n\t{\n\t\tif(!$this->request->is('ajax') && !Configure::read('debug') > 0)\n\t\t\treturn;\n\n\t\tif ($this->params == null || !array_key_exists('url', $this->params))\n\t\t\treturn;\n\n\t\t$this->layout = 'ajax';\n\t\t$filterSettings = $this->params['url'];\n\t\t$listing_...
[ "0.5979383", "0.5771317", "0.57443184", "0.57345635", "0.55280644", "0.55153775", "0.54941267", "0.5309077", "0.5269654", "0.52590233", "0.5241889", "0.5092571", "0.5045326", "0.50415593", "0.5018646", "0.4993416", "0.49844474", "0.4983254", "0.49534687", "0.49480397", "0.494...
0.7384152
0
Adds an error to the Crowdfox error log.
Добавляет ошибку в журнал ошибок Crowdfox.
protected function addToErrorLog($error) { $add = $error['DETAILS']; unset($add['ErrorCode']); unset($add['ErrorMessage']); $add['Action'] = $error['APIACTION']; MagnaDB::gi()->insert(TABLE_MAGNA_COMPAT_ERRORLOG, array( 'mpID' => $this->mpID, 'errormessag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addError($error){\n $this->_errors[] = $error;\n }", "protected function add_error($error){\n\t\t$this->errors[] = $error;\n\t}", "public function add_error($error)\n {\n\n $this->erorr = true;\n $this->errors[] = $error;\n\n $this->set_errors();\n...
[ "0.6957766", "0.6884796", "0.68320507", "0.6805602", "0.67948514", "0.6791798", "0.67000777", "0.6686646", "0.66764367", "0.6674423", "0.6658749", "0.66341823", "0.6633284", "0.65961623", "0.6502241", "0.64977914", "0.64953595", "0.64688045", "0.64618176", "0.64349157", "0.64...
0.7044375
0
Get data of a TaskAssignee from a record
Получить данные TaskAssignee из записи
public function getTaskAssigneeDataFromRecord (array $record, $taskUserType) { try { switch ($taskUserType) { case 1: return array( "aas_uid" => $record[0], "aas_name" => $record[1], "aas_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAssigneeName();", "public function getAssignee()\n {\n return $this->assignee;\n }", "public function getAssigneeEmail();", "function todos_get_assignee_filter_callback($row) {\n\t$result = new stdClass();\n\t$result->name = $row->name;\n\t$result->guid = (int) $row->guid;\n\t...
[ "0.6486139", "0.61653143", "0.6121818", "0.6118804", "0.6062872", "0.5794433", "0.55956435", "0.5594956", "0.5552415", "0.5549948", "0.55202794", "0.5459199", "0.54537106", "0.54421103", "0.5438439", "0.5320148", "0.52923447", "0.52818376", "0.521014", "0.52020836", "0.514399...
0.7041452
0
Register settings in admin area.
Настройки регистрации в административной области.
public function register_haa_settings() { add_settings_section( 'haa_settings_section', 'Hide Admin Area', '', 'general' ); add_settings_field( 'haa_admin_area', '<label for="haa_admin_area">Admin URL slug</label>', array($this, 'display_settings_field'), 'g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function admin_init() {\n\t\tregister_setting( $this->options_key, $this->options_key, array( $this, 'save_settings' ) );\n\t}", "public function register_settings()\n {\n }", "public function register_settings()\n {\n }", "public static function register_settings() {\n\t\...
[ "0.766443", "0.7506476", "0.7505662", "0.74705565", "0.74521106", "0.73050004", "0.7267962", "0.72407234", "0.7227277", "0.7221165", "0.7180942", "0.7176924", "0.71709675", "0.71666557", "0.715807", "0.71288097", "0.71215546", "0.70814985", "0.70776325", "0.70585775", "0.7004...
0.75238883
1
Display the admin setting field.
Показать поле настройки администратора.
public function display_settings_field($args) { $value = get_option('haa_admin_area', 'hidden-admin'); echo '<input name="haa_admin_area" type="text" id="haa_admin_area" value="' . $value . '" class="regular-text">'; echo '<p class="description">Use alpha-numeric characters, dashes and underscores.<br>Avoi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show_settings() {\n\n\t\twoocommerce_admin_fields( $this->get_settings() );\n\t}", "public function admin_options() {\r\n echo '<h3>' . __('Mondido', 'mondido') . '</h3>';\r\n echo '<p>' . __('Mondido, Simple payments, smart functions', 'mondido') . '</p>';\r\n ec...
[ "0.7783596", "0.7523776", "0.74974597", "0.7376712", "0.73449314", "0.72992563", "0.72598404", "0.72366637", "0.712594", "0.71164614", "0.7097803", "0.7045047", "0.701411", "0.69982946", "0.69931847", "0.69823045", "0.6926087", "0.69090605", "0.6900909", "0.6877817", "0.68565...
0.7547517
1
Redirect the user to the login page with secret key.
Перенаправьте пользователя на страницу входа с секретным ключом.
public function redirect_with_secret_key() { $page_url = $this->get_current_page_url(); $admin_page = get_site_url() . '/' . $this->admin_area; if (($page_url == $admin_page) || ($page_url == $admin_page . '/')) { wp_redirect(home_url() . '/wp-login.php?secret_key=' . $this->secret_key); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function redirect_wp_login() {\n if (is_user_logged_in()) {\n wp_redirect(get_admin_url());\n }\n elseif (!$_GET['secret_key'] == $this->secret_key) {\n wp_redirect(home_url());\n }\n }", "public function redirectToLogin() {\n\t\t//\tcreate and save the state parameter\n\t\t$openIdS...
[ "0.7395793", "0.68597186", "0.6719834", "0.6717994", "0.6570512", "0.6562267", "0.6526539", "0.6480429", "0.6467411", "0.64668715", "0.6466571", "0.64567727", "0.6449607", "0.64067537", "0.64016044", "0.6377699", "0.6357113", "0.6333054", "0.6302936", "0.6278311", "0.6242418"...
0.77438414
0
check if we are stull logged in on the remote cloud
проверить, все ли еще мы авторизованы на удаленной облаке
public function isLoggedIn(){ if(!$this->connected){ return false; } return $this->apiCall('checklogin'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_authenticated(){\n\t\tif(isset($_SESSION['uid']) && $_SESSION['ip'] == $_SERVER['REMOTE_ADDR']){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "private function _logged_in()\n {\n /*if(someone is logged in)\n RETURN TRUE;*/\n }", "public functio...
[ "0.71268004", "0.7119378", "0.70059866", "0.6981071", "0.69660866", "0.6896745", "0.6894364", "0.6881728", "0.6871433", "0.6856603", "0.68371224", "0.68370557", "0.68236864", "0.681719", "0.68129855", "0.68038446", "0.6790503", "0.67749", "0.6761543", "0.6761543", "0.6757974"...
0.73428464
0
Check if file of the same deployed path exists in package
Проверьте, существует ли файл по тому же развернутому пути в пакете
private function isFileExistsInPackage($filePath, Package $package) { /** @var PackageFile $file */ foreach ($package->getFiles() as $file) { if ($file->getDeployedFileName() === $filePath) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function localFileExists()\n {\n return file_exists($this->GetRealPath());\n }", "function neosIsInstalled(): bool\n{\n return test('[ -f {{deploy_path}}/shared/Configuration/Settings.yaml ]');\n}", "public function is_exist_file() {\r\n\t\treturn file_exists( $this->get_path( 'file' ) )...
[ "0.6696969", "0.6673357", "0.6640315", "0.65828615", "0.65762126", "0.6548806", "0.6526441", "0.65192235", "0.65053487", "0.6492756", "0.64772654", "0.64634717", "0.6448921", "0.6436461", "0.64267933", "0.6424429", "0.642147", "0.64121205", "0.6405623", "0.6394189", "0.638286...
0.7132946
0
Test it prints Fizz for multiples of 3, Buzz for multiples of 5, FizzBuzz? for multiples of both 3 and 5
Тест выводит Fizz для кратных 3, Buzz для кратных 5, FizzBuzz? для кратных и 3, и 5
public function test_it_prints() { // ADDED: check if the number contains the value as "string" (ie 13 is Fizz, 53 is Buzz etc) $expected = '1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz Fizz 14 FizzBuzz? 16 17 Fizz 19 Buzz Fizz 22 Fizz Fizz Buzz '; $this->assertEquals($expected, $this->kata->print...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFizz() {\n\t\t$testFizzBuzz = new FizzBuzz();\n\n\t\t//pass in a vlalue that should return Fizz\n\t\t$expected = 'Fizz';\n\t\t$response = $testFizzBuzz->evaluate(3);\n\n\t\t//assert that you got the correct response.\n\t\t$this->assertEquals($expected, \n\t\t\t\t\t\t\t$response, \n\t\t\t\t\t\t\...
[ "0.7165587", "0.7119616", "0.71095306", "0.64468217", "0.63495094", "0.6283529", "0.62743455", "0.6052282", "0.57791924", "0.5682514", "0.56733114", "0.56232566", "0.54784524", "0.54673094", "0.5435781", "0.5435165", "0.53490114", "0.5329325", "0.5319659", "0.5306297", "0.525...
0.714626
1
calls the searchByISBN method from Patron class,gets the result and calls the controlSearch
вызывает метод searchByISBN класса Patron, получает результат и вызывает controlSearch
function executeSearchByISBN($patron, $bookISBN){ $result = $patron->searchByISBN($bookISBN); $res=$this->controlSearch($result); return $res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function controlSearch($result){\n\t\t$bookIDs = $this->getBookIDs($result);\n\t\t$bookObjects = array();\n\n\t\tfor($i = 0; $i < count($bookIDs); $i++){\n\t\t\t$bookObject = constructBook($bookIDs[$i]);\n\t\t\t$bookObjects[$i] = $bookObject;\n\t\t}\n\t\t\n\t\t$currentPatronID = $_SESSION['currentPatronID'];\n\t\t...
[ "0.7064732", "0.67656755", "0.6432695", "0.6421345", "0.62704927", "0.6166718", "0.61459535", "0.61213976", "0.610957", "0.61066437", "0.61066437", "0.6100272", "0.6095888", "0.6051537", "0.60473675", "0.60280454", "0.5897859", "0.58899283", "0.58899283", "0.58709306", "0.582...
0.79055
0
calls the searchByTitle method from Patron class,gets the result and calls the controlSearch
вызывает метод searchByTitle из класса Patron, получает результат и вызывает controlSearch
function executeSearchByTitle($patron, $bookTitle){ $result = $patron->searchByTitle($bookTitle); $res=$this->controlSearch($result); return $res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function controlSearch($result){\n\t\t$bookIDs = $this->getBookIDs($result);\n\t\t$bookObjects = array();\n\n\t\tfor($i = 0; $i < count($bookIDs); $i++){\n\t\t\t$bookObject = constructBook($bookIDs[$i]);\n\t\t\t$bookObjects[$i] = $bookObject;\n\t\t}\n\t\t\n\t\t$currentPatronID = $_SESSION['currentPatronID'];\n\t\t...
[ "0.7028611", "0.67987436", "0.6761465", "0.67500824", "0.67500824", "0.66232157", "0.65744936", "0.6524228", "0.65228516", "0.6499335", "0.6485807", "0.64037704", "0.64037704", "0.63253295", "0.63253295", "0.62896276", "0.62815714", "0.627655", "0.6199791", "0.61980593", "0.6...
0.75970006
0
calls the searchByAuthor method from Patron class,gets the result and calls the controlSearch
вызывает метод searchByAuthor из класса Patron, получает результат и вызывает controlSearch
function executeSearchByAuthor($patron, $bookAuthor){ $result = $patron->searchByAuthor($bookAuthor); $res=$this->controlSearch($result); return $res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function controlSearch($result){\n\t\t$bookIDs = $this->getBookIDs($result);\n\t\t$bookObjects = array();\n\n\t\tfor($i = 0; $i < count($bookIDs); $i++){\n\t\t\t$bookObject = constructBook($bookIDs[$i]);\n\t\t\t$bookObjects[$i] = $bookObject;\n\t\t}\n\t\t\n\t\t$currentPatronID = $_SESSION['currentPatronID'];\n\t\t...
[ "0.73001415", "0.69102263", "0.667388", "0.6632834", "0.65635866", "0.6556991", "0.6556991", "0.6306147", "0.6192684", "0.6191442", "0.61802083", "0.61802083", "0.615509", "0.6124594", "0.6124594", "0.61217934", "0.6074303", "0.6073879", "0.6010613", "0.5989623", "0.59701335"...
0.76581144
0
gets the queryResult and calls displaySearch after getting bookObjects
получает queryResult и вызывает displaySearch после получения bookObjects
function controlSearch($result){ $bookIDs = $this->getBookIDs($result); $bookObjects = array(); for($i = 0; $i < count($bookIDs); $i++){ $bookObject = constructBook($bookIDs[$i]); $bookObjects[$i] = $bookObject; } $currentPatronID = $_SESSION['currentPatronID']; $currentPatron = constructPatron($c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displaySearch($bookObjects, $suggestedBooks){\n\t\t$noOfResult = count($bookObjects);\n\t\t$noOfSuggest = count($suggestedBooks);\n\t\techo \"<div class = 'RSContainer12'>\";\n\t\tif ($noOfResult <= 1){\n\t\t\t$a=$noOfResult.\" result found\";\n\t\t}\n\t\telse{\n\t\t\t$a=$noOfResult.\" results found\";\n\...
[ "0.6768391", "0.65706915", "0.65238774", "0.6344322", "0.63364303", "0.6286292", "0.6286275", "0.6260877", "0.6242725", "0.62202054", "0.6198047", "0.61036855", "0.6099593", "0.6089794", "0.60334677", "0.59971875", "0.59771603", "0.59742594", "0.59606254", "0.5912823", "0.590...
0.72020805
0
returns array of BookIds later used to construct book Objects
возвращает массив BookIds, используемый позже для построения объектов книг
function getBookIDs($queryResult){ $num_results = $queryResult->num_rows; $arrayOfBookIDs = array(); for($i = 0; $i < $num_results; $i++){ $row = $queryResult->fetch_assoc(); $arrayOfBookIDs[$i] = $row['BookID']; } return $arrayOfBookIDs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdManifest(): array\n {\n return $this->books->getIdDict();\n }", "public abstract function get_ids();", "public function getIds();", "public function getIds();", "public function getAllIds(): array;", "public function getBookList() {\n\n $booklist = array();\n\n ...
[ "0.70754516", "0.7040359", "0.68828154", "0.68828154", "0.6692486", "0.66098523", "0.6585005", "0.6579276", "0.65656066", "0.6552998", "0.65242594", "0.65051824", "0.6486124", "0.64849406", "0.64849406", "0.64849406", "0.64849406", "0.64849406", "0.64849406", "0.64849406", "0...
0.7256911
0
Show a certain reservation resource
Показать определенный ресурс бронирования
function show( $resource ){ $where = "reservation_status <> 'Pending' AND id = {$resource}"; $reservation = where( 'reservations', $where ); $reservation = $reservation[0]; return view('admin/reservation/preview_reservation', compact( 'reservation' )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Reservation $reservation)\n {\n }", "public function show(Reservation $reservation)\n {\n \n }", "public function show(Reservation $reservation)\n {\n //\n }", "public function show(Reservation $reservation)\n {\n //\n }", "public function s...
[ "0.7899342", "0.7890413", "0.78833014", "0.78833014", "0.78833014", "0.73021346", "0.6822746", "0.67211705", "0.6600088", "0.6584223", "0.65509945", "0.6497486", "0.6471546", "0.64575887", "0.6445756", "0.64301246", "0.6402467", "0.6365312", "0.636353", "0.6360391", "0.634581...
0.81634784
0
Return whether env is production or not.
Верните true, если env — производственная среда, иначе false.
function is_prod() { return env() === 'production'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_production() {\n\treturn ENV == PRODUCTION;\n}", "public static function isProductionEnv() {\n return getenv('ENVIRONMENT') !== false && strtolower(getenv('ENVIRONMENT')) === \"production\";\n }", "public function isProduction(): bool\n {\n return $this->env === 'production';\n ...
[ "0.91954964", "0.89817804", "0.8956651", "0.8786681", "0.86842465", "0.8605008", "0.8582791", "0.85158914", "0.8398841", "0.83440757", "0.8332403", "0.8257692", "0.8246422", "0.8143468", "0.8115966", "0.80501974", "0.80416745", "0.8003937", "0.79955316", "0.79729277", "0.7966...
0.900192
1
Return whether env is staging or not.
Верните, является ли env стейджингом или нет.
function is_staging() { return env() === 'staging'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isDev(){ return $_ENV['CURRENT_ENVIRONMENT'] == ENVIRONMENT_DEV; }", "public function inDevelopment() {\n try {\n return Config::get()->environment === 'dev';\n } catch (Throwable $e) {\n return false;\n }\n }", "function is_dev()\n{\n return env('APP_ENV') === 'local' ? true : ...
[ "0.76748675", "0.7580123", "0.7546528", "0.7530555", "0.7526153", "0.744025", "0.7399078", "0.73750705", "0.73685217", "0.73070115", "0.7305181", "0.730027", "0.7293459", "0.72865105", "0.72363687", "0.723184", "0.7173596", "0.7158384", "0.7146758", "0.7126769", "0.7125726", ...
0.9197006
0
Return whether env is development or not.
Верните значение, указывающее, является ли env разработкой или нет.
function is_dev() { return env() === 'development'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function inDevelopment() {\n try {\n return Config::get()->environment === 'dev';\n } catch (Throwable $e) {\n return false;\n }\n }", "public static function isDev()\n {\n return isset($_SERVER['ENV']) && $_SERVER['ENV'] == 'dev';\n }", "public function isDev()\n {\n...
[ "0.90092945", "0.8847917", "0.87833214", "0.8780316", "0.8767585", "0.8741018", "0.8690957", "0.8610205", "0.86090136", "0.85923016", "0.8567077", "0.856207", "0.8455687", "0.84478235", "0.8409347", "0.8300692", "0.8258994", "0.822494", "0.8201635", "0.8068385", "0.8061002", ...
0.90173423
0
determins whether loggedin user is an admin
определяет, является ли авторизованный пользователь администратором
function is_admin() { //is a user logged in? //if so, check admin status //returns true/false }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isAdminUser() {}", "private function isAdmin() {\n\t\tif (Auth::user()->user == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "function is_user_admin()\n {\n }", "public function isAdmin()\n {\n return ($this->username === \"admin\");\n }", ...
[ "0.8694181", "0.8573152", "0.856735", "0.8557797", "0.85452276", "0.85357547", "0.85109293", "0.85100454", "0.8496684", "0.84932864", "0.84784436", "0.84620965", "0.8455575", "0.84384304", "0.84166634", "0.83944213", "0.8393615", "0.83757454", "0.83740205", "0.8367474", "0.83...
0.8955718
0
delete project (flag) (update)
удалить проект (флаг) (обновление)
public function delete_project ($project_id) { //$this->where($whereProp, $whereValue); //$this->update($tableName, $tableData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete() {\n $sql = sprintf(\"DELETE FROM project WHERE id=%d\", $this->id);\n self::$connection->execute($sql);\n }", "function delete_project( $user, $project )\n {\n //Unimplemented\n }", "public function deleteProject($projectId)\n {\n $registry = Zend_Regi...
[ "0.7927244", "0.7809106", "0.74298686", "0.7425521", "0.7410738", "0.7352987", "0.7327835", "0.7290202", "0.7183213", "0.71527284", "0.71237016", "0.7114173", "0.70665795", "0.7065376", "0.7061413", "0.7058735", "0.6989879", "0.6989879", "0.6989879", "0.6989879", "0.6989879",...
0.7891412
1
get projects by owner
получить проекты по владельцу
public function get_projects_by_owner ($project_owner_id) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function getAllByOwner($uid){\n\n\t\trequire_once 'DBO.class.php';\n\t\trequire_once 'Project.class.php';\n\n\t\t$db = DBO::getInstance();\n\n\t\t$statement = $db->prepare('SELECT *\n\t\t\t\tFROM projects\n\t\t\t\tWHERE owner = :uid\n\t\t\t\tLIMIT 0,9999\n\t\t\t\t');\n\t\t$statement->execute(array(\n\t\t\t\...
[ "0.7649363", "0.7518689", "0.7052439", "0.6708711", "0.6657363", "0.66305506", "0.6532051", "0.64964193", "0.6493181", "0.6457399", "0.6349091", "0.6299494", "0.6265213", "0.626446", "0.6218517", "0.6214902", "0.6148556", "0.6136886", "0.6103394", "0.60757065", "0.6074616", ...
0.85964656
0
sort projects??? (date, priority, status) (different functions)
сортировка проектов??? (дата, приоритет, статус) (различные функции)
public function sort_projects_by_date () { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProjects(){\n $projects = Project::all()->sortBy('dead');\n return $projects;\n }", "public function Sorting_projectID($desc = false) {\r\n\t\treturn array(\r\n\t\t\t'order'\t=> array(\r\n\t\t\t\t'ext_project_project.id ' . self::getSortDir($desc)\r\n\t\t\t)\r\n\t\t);\r\n\t}",...
[ "0.61348593", "0.60477847", "0.59888655", "0.58978623", "0.5878903", "0.587457", "0.5867446", "0.5867446", "0.58651793", "0.58571887", "0.5857053", "0.5828148", "0.5794306", "0.5786594", "0.5786594", "0.5679771", "0.56378764", "0.5636776", "0.5636511", "0.5635997", "0.5609667...
0.8324421
0
General localization helper to lookup entries from a language file. The argument list is processed by the function itself. Some things to keep in mind: If the key resolves to something else than a string in the language file (e.g. an array) the data from the language file is returned as it is. No `printf` string substi...
Общая служба локализации для поиска записей из файла языка. Список аргументов обрабатывается самой функцией. Некоторые моменты, на которые стоит обратить внимание: если ключ разрешается в что-то другое, чем строка в файле языка (например, массив), данные из файла языка возвращаются как есть. Не производится подстановка...
function l(){ global $_LOCALE; $entry = $_LOCALE; $args = func_get_args(); for($i = 0; $i < count($args); $i++){ $key = $args[$i]; if ( array_key_exists($key, $entry) ) { $entry = $entry[$key]; if ( ! is_array($entry) ) break; } else { $entry = 'Missing entry in language file: ' . join(' → ',...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lang_parse($key, $args)\n{\n\tglobal $lang;\n\t\n\t// Make sure the key is uppercase\n\t$key = strtoupper($key);\n\t\n\t// Does that key exist?\n\tif(!$lang[$key])\n\t{\n\t\t// So we know it needs to be translated.\n\t\treturn '{' . $key . '}';\n\t}\n\telse\n\t{\n\t\treturn mb_vsprintf($lang[$key], $args,...
[ "0.7279577", "0.6540411", "0.6520563", "0.6399052", "0.63652545", "0.63652295", "0.62738055", "0.6249757", "0.6221519", "0.61775416", "0.6134317", "0.6119666", "0.6086963", "0.60842663", "0.60628957", "0.6046162", "0.5997787", "0.5970214", "0.5904781", "0.5892247", "0.5887992...
0.787046
0
Converts the specified number of bytes into a more human readable format like KiByte or MiByte. The function name is inspired by Rails but the implementation is was written completely from scratch.
Преобразует указанное количество байтов в более человеко-читаемый формат, например, Килобайт или Мегабайт. Название функции вдохновлено Rails, но реализация написана полностью с нуля.
function number_to_human_size($bytes){ $border = 1024 * 1.5; if ($bytes < $border) return sprintf('%u Byte', $bytes); $bytes /= 1024; if ($bytes < $border) return sprintf('%u KiByte', $bytes); $bytes /= 1024; return sprintf('%.1f MiByte', $bytes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function format_bytes($a_bytes) {\n if ($a_bytes < 1024) {\n return $a_bytes .' B';\n } elseif ($a_bytes < 1048576) {\n return round($a_bytes / 1024, 2) .' Kb';\n } elseif ($a_bytes < 1073741824) {\n return round($a_bytes / 1048576, 2) . ' Mb';\n } elseif ($a_bytes < 1099511627776)...
[ "0.7012805", "0.6907971", "0.6894629", "0.68690646", "0.6838405", "0.67738885", "0.6735905", "0.6632421", "0.6607589", "0.66063565", "0.6600233", "0.6581037", "0.6559254", "0.65476817", "0.65440226", "0.6541024", "0.65246475", "0.64672637", "0.64318246", "0.643092", "0.642606...
0.7140833
0
Returns a element that displays $date in the specified $format (see The element also contains additional information so the timezoneconverter.js script can convert the date to the users local timezone. Since the users timezone can only be queried via JavaScript this has to be done on the client side. If the script fail...
Возвращает элемент, отображающий $date в указанном $format (см. Элемент также содержит дополнительную информацию, позволяющую скрипту timezoneconverter.js преобразовать дату в местное время пользователя. Поскольку часовой пояс пользователя можно определить только с помощью JavaScript, это преобразование должно выполнят...
function timezone_aware_date($date, $format){ return sprintf('<time dateTime="%s" data-format="%s">%s %s</time>', ha($date->format('c')), ha($format), h($date->format($format)), h($date->format('T'))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "#[@xslmethod]\n public function format($date, $format, $timezone= NULL) {\n $timezone= empty($timezone) ? NULL : $timezone;\n return create(new Date($date))->toString($format, new TimeZone($timezone));\n }", "function cjpopups_local_date($format, $date = null){\n\tif($date == null){\n\t\t$datetim...
[ "0.7029795", "0.686546", "0.66377497", "0.64296293", "0.6333258", "0.62527645", "0.6164469", "0.6120645", "0.6111242", "0.61034757", "0.6090205", "0.60514086", "0.6050627", "0.59989536", "0.59812903", "0.5976918", "0.5969996", "0.5947739", "0.59021217", "0.589873", "0.5893695...
0.7360215
0
hide all the additional fields
скрыть все дополнительные поля
public function hideExtraField() { $this->houses=false; $this->jobs_training=false; $this->motorcycles =false; $this->cars = false; $this->offices=false; $this->lands_plots=false; return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function hideFieldsForAddEdit()\n\t{\n\t\tif ($this->isAdd() || $this->isCopy() || $this->isGridAdd())\n\t\t\t$this->document_sequence->Visible = FALSE;\n\t}", "function block_editor_meta_box_hidden_fields()\n {\n }", "public function disableHideMetaboxes()\n\t\t{\n\t\t\techo \"<style type='tex...
[ "0.78019714", "0.7149522", "0.6889631", "0.6883819", "0.684302", "0.6729229", "0.66946036", "0.6664629", "0.6664629", "0.66048455", "0.655331", "0.6448749", "0.644795", "0.6430207", "0.64134943", "0.64083785", "0.6375005", "0.6307153", "0.62356997", "0.6203117", "0.6179247", ...
0.8430341
0
Creates a new Ora model. If creation is successful, the browser will be redirected to the 'view' page.
Создает новый модель Ora. Если создание успешно, браузер будет перенаправлен на страницу 'view'.
public function actionCreate() { $model = new Ora(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->ora_id]); } return $this->render('create', [ 'model' => $model, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate() {\n $model = new Foro();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\...
[ "0.7379511", "0.7269288", "0.724252", "0.7242053", "0.720272", "0.7155753", "0.71260834", "0.7086938", "0.7065825", "0.7060445", "0.7054933", "0.7049293", "0.7040371", "0.70306695", "0.70282245", "0.6992228", "0.6941502", "0.6924051", "0.69131786", "0.6911839", "0.6897251", ...
0.8534152
0
/ Name: Power of K Description: Check if a given number is a power of k. Date: 20181003
/ Название: Степень K Описание: Проверить, является ли заданное число степенью k. Дата: 20181003
function isPowerOf($number, $k) { $check = false; while($number > 0) { $digit = $number % $k; if($digit > 1) return false; if($digit == 1) { if($check) return false; $check = true; } $number /= $k; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function power($base,$n){\r\n $x=pow($base,$n);\r\n return $x;\r\n}", "function elevaralcubo($num1){\n \n $res=pow($num1,3);\n \n print \"El resultado es \".$res.\"<br>\";\n \n }", "static function powerOfTwo($n)\n { \n if ($n >= 0 && $n < 31) {\n $pow = 2**$...
[ "0.6677741", "0.6453918", "0.643831", "0.63851243", "0.63441986", "0.6291515", "0.62561446", "0.6187342", "0.6181521", "0.6160313", "0.611166", "0.5981184", "0.59737355", "0.5945893", "0.5941851", "0.5928495", "0.59120536", "0.5875188", "0.58676165", "0.58524734", "0.58121467...
0.8458784
0
Sets a new nameValueList Each NameValueList container will contain one aspect of a motor vehicle that is compatible with the motor vehicle part or accessory. For example, the allowed names might include 'Year', 'Make', and 'Model', 'Trim', and 'Engine'.
Устанавливает новый список значений имен. Каждый контейнер NameValueList будет содержать один аспект автомобиля, совместимый с частью или аксессуаром автомобиля. Например, разрешенные имена могут включать 'Year', 'Make', и 'Model', 'Trim', и 'Engine'.
public function setNameValueList(array $nameValueList) { $this->nameValueList = $nameValueList; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addToNameValueList(\\Nogrod\\eBaySDK\\Shopping\\NameValueListType $nameValueList)\n {\n $this->nameValueList[] = $nameValueList;\n return $this;\n }", "public function addToVariationSpecifics(\\Nogrod\\eBaySDK\\Shopping\\NameValueListType $nameValueList)\n {\n $this-...
[ "0.64360535", "0.63710874", "0.5956659", "0.54454404", "0.54256636", "0.54168296", "0.54070723", "0.5330376", "0.5260967", "0.5201104", "0.51572716", "0.51410294", "0.51410294", "0.51410294", "0.51410294", "0.51410294", "0.5111854", "0.50845665", "0.5073521", "0.5048008", "0....
0.7180552
0
Gets as compatibilityNotes This field contains any notes pertaining to the compatibility being specified. This field is only returned if set for the compatible vehicle.
Содержит как compatibilityNotes Это поле содержит любые примечания, относящиеся к указанной совместимости. Это поле возвращается только в том случае, если оно задано для совместимого автомобиля.
public function getCompatibilityNotes() { return $this->compatibilityNotes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCompatibilityNotes($compatibilityNotes)\n {\n $this->compatibilityNotes = $compatibilityNotes;\n return $this;\n }", "public function getRelationshipNotes()\n {\n return $this->getFieldArray('580');\n }", "public function getNotes()\n {\n return $th...
[ "0.64572346", "0.6265718", "0.62258565", "0.6032568", "0.6002821", "0.59488624", "0.59106076", "0.5892726", "0.5892726", "0.5892726", "0.5892726", "0.5892726", "0.5809816", "0.5791018", "0.5779749", "0.5675466", "0.5659128", "0.5605167", "0.5577785", "0.5577785", "0.55344814"...
0.80064195
0
Sets a new compatibilityNotes This field contains any notes pertaining to the compatibility being specified. This field is only returned if set for the compatible vehicle.
Устанавливает новые примечания по совместимости. Это поле содержит любые примечания, относящиеся к указываемой совместимости. Это поле возвращается только в случае, если оно задано для совместимого автомобиля.
public function setCompatibilityNotes($compatibilityNotes) { $this->compatibilityNotes = $compatibilityNotes; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCompatibility($compatibility)\n {\n $this->compatibility = $compatibility;\n }", "public function getCompatibilityNotes()\n {\n return $this->compatibilityNotes;\n }", "public function setNotes($value) {\n\t\tif ($value == NULL) {\n\t\t\t$this->_notes = \"\";\n\t\t}...
[ "0.65060246", "0.62129796", "0.52103335", "0.52076805", "0.5187977", "0.51185656", "0.51185656", "0.5071659", "0.5019787", "0.49142265", "0.4890676", "0.484247", "0.47113353", "0.47016624", "0.468077", "0.46458665", "0.46356836", "0.45696023", "0.45592895", "0.45392442", "0.4...
0.72131103
0
Get selected page IDs
Получить идентификаторы выбранных страниц
protected function getPageIds() { return (array)explode(',', $this->getData('pages')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSelectedPageUids() {\r\n\t\treturn $this->selectedPageUids;\r\n\t}", "function get_all_page_ids()\n {\n }", "protected function getPrintPageIds()\n\t{\n\t\tif(is_array($_POST[\"wordr\"]))\n\t\t{\n\t\t\tasort($_POST[\"wordr\"]);\t\t\t\n\t\t\t$page_ids = array_keys($_POST[\"wordr\"]);\t\...
[ "0.75358623", "0.7198504", "0.71682554", "0.6999016", "0.698778", "0.6961683", "0.67020625", "0.6681024", "0.6623196", "0.6476639", "0.6476639", "0.64423746", "0.6306155", "0.62652755", "0.6198524", "0.61918813", "0.6078848", "0.6041805", "0.6041805", "0.5932843", "0.58454865...
0.7498354
1
Set token in client cookie
Установить токен в cookie клиента
function setCryostemTokenCookie() { $current_time = time(); if(isset($_SESSION['cryostemToken']) && !empty($_SESSION['cryostemToken'])) { $token = $_SESSION['cryostemToken']->access_token; $expires = $current_time + $_SESSION['cryostemToken']->expires_in -100; setcookie('cryostemToken'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTokenFromCookie($token) {\n\t\t\t$this->tokenFromCookie = $token;\n\t\t}", "private function setToken() {\n $this->admin->rememberToken = password_hash($this->admin->username.generateSalt().time().generateSalt(), PASSWORD_DEFAULT);\n\n setcookie(\"adminUsername\", $this->admin->username...
[ "0.80971926", "0.7412908", "0.7254007", "0.70575297", "0.68581414", "0.6848265", "0.6841037", "0.67958033", "0.6785657", "0.6770088", "0.66900533", "0.6674568", "0.66610134", "0.66581374", "0.66293204", "0.66001207", "0.65938", "0.6584912", "0.6523374", "0.65193415", "0.65169...
0.7425439
1
Adds plugin localization Domain: cynetiquelabels
Добавляет локализацию плагина Домен: cynetiquelabels
function localization() { load_plugin_textdomain( 'cynetique-labels', false, dirname( plugin_basename( __FILE__ ) ) . '/language/' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function localizeLabels() {\n // (standard fields) and the artifact field table with a special flag and make sure\n // all tracker scripts handle them properly\n // For now make a big hack!! (see import.php func=showformat)\n $submitted_field = $this->art_field_fact->getFieldFromName('submitted_by');\n...
[ "0.65898657", "0.6542543", "0.61049074", "0.5950589", "0.59000653", "0.5863118", "0.5834209", "0.57861704", "0.57651937", "0.5666108", "0.5645403", "0.5635516", "0.5599845", "0.5589072", "0.5565746", "0.55436015", "0.5509131", "0.5508124", "0.5507005", "0.5498575", "0.5481726...
0.70902514
0
Converts a PHP error int to a string
Преобразует PHP-ошибку в строку
private function _errorNumberString($intval) { $errorlevels = array( E_ALL => 'E_ALL', E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', E_STRICT => 'E_STRICT', E_USER_NOTICE => 'E_USER_NOTICE', E_USER_WARNING => 'E_USER_WARNING', E_USER_ERROR => 'E_USER_ERROR', E_COMPILE_WARNING => 'E_COMPILE_WARNI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function error_level_tostring($intval, $separator)\r\n{\r\n $errorlevels = array(\r\n 2047 => 'E_ALL',\r\n 1024 => 'E_USER_NOTICE',\r\n 512 => 'E_USER_WARNING',\r\n 256 => 'E_USER_ERROR',\r\n 128 => 'E_COMPILE_WARNING',\r\n 64 => 'E_COMPILE_ERROR',\r\n 32 => 'E_C...
[ "0.65706104", "0.6526057", "0.6408439", "0.6399977", "0.63790435", "0.6315022", "0.6289075", "0.6205981", "0.60789806", "0.6077935", "0.5952338", "0.59312487", "0.5879333", "0.58779275", "0.5835858", "0.5826138", "0.5825865", "0.57955927", "0.5780753", "0.5779524", "0.576538"...
0.7100479
0
Whether or not at least one instance has been declared
Есть ли хотя бы один экземпляр, объявленный или нет
static public function hasInstances() { return (bool) self::$instances; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function hasInstance()\n {\n return !self::$_instance ? false : true;\n }", "public static function hasInstance(){\n\t\tif(self::$instance !== null){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static function hasInstance() {\n return (self::$instance != null);\n ...
[ "0.6926299", "0.68663096", "0.67592394", "0.67344093", "0.6689967", "0.66549003", "0.64389706", "0.64000255", "0.6397344", "0.62822354", "0.62742686", "0.6272355", "0.62215495", "0.6200866", "0.61925787", "0.6155768", "0.6132393", "0.6132393", "0.6116919", "0.61125475", "0.61...
0.7229147
0
Delete all existings notes in the instance
Удалить все существующие заметки в экземпляре
public function clearNotes() { $this->notes = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteAll()\n {\n return Laranote::where('model', get_class($this))\n ->where('model_id', $this->id)\n ->delete();\n }", "function cust_note_purge(){\r\n\t}", "public function delete() {\n // Deleting microarticles.\n $microarticles = $this->getMicroarti...
[ "0.65949166", "0.64415646", "0.6431757", "0.6355776", "0.6355776", "0.6355776", "0.6349734", "0.6345583", "0.63322914", "0.6330526", "0.6279643", "0.61425626", "0.61310434", "0.61271375", "0.611366", "0.6108818", "0.61079586", "0.60894454", "0.6082706", "0.6046894", "0.604407...
0.72404635
0
Whether or not the instance has notes.
Есть ли у экземпляра заметки.
public function hasNotes() { return (bool) $this->notes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHasnotes()\n {\n return $this->hasnotes;\n }", "public function HasNotesAvailable($numNotes)\n {\n return true;\n }", "public function issetNotes($index)\n {\n return isset($this->notes[$index]);\n }", "public function hasRemark(){\n return $this...
[ "0.7832878", "0.7188616", "0.66524655", "0.65862316", "0.64008695", "0.63334745", "0.63169765", "0.63169765", "0.6316238", "0.6172684", "0.6170044", "0.6170044", "0.6170044", "0.61361814", "0.6133082", "0.6111851", "0.6111851", "0.6111851", "0.6111851", "0.6111851", "0.609171...
0.8806864
0
Retrieve all notes of all instances in an array.
Получить все заметки всех экземпляров в массиве.
static public function getAllNotes() { $notes = array(); foreach (self::$instances as $i) { $notes = array_merge($notes, $i->getNotes()); } return $notes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findAll()\r\n {\r\n $sql = \"SELECT * FROM note\";\r\n try {\r\n $sth=$this->executer($sql);\r\n $rows = $sth->fetchAll(PDO::FETCH_ASSOC);\r\n } catch (PDOException $e) {\r\n die(\"Erreur lors de la requête SQL : \" . $e->getMessage());\r\n ...
[ "0.7148266", "0.7115256", "0.7059663", "0.6985267", "0.68412703", "0.67093337", "0.6664714", "0.6662751", "0.64520955", "0.6357014", "0.6309638", "0.6259194", "0.6259194", "0.6259194", "0.6259194", "0.6259194", "0.62185127", "0.61943984", "0.6185033", "0.6170607", "0.61289346...
0.7910401
0
Return the last index used in this instance
Вернуть последний использованный индекс в этом экземпляре
public function getLastIndex() { return $this->index - 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEndIndex()\n {\n return $this->end_index;\n }", "public function last()\n {\n if($this->length()>0)\n {\n return $this->getAt(($this->length()-1));\n }\n throw new \\OutOfBoundsException();\n }", "protected function setIndexAtMax()\n ...
[ "0.7855067", "0.74609345", "0.733592", "0.72967386", "0.7281308", "0.7230087", "0.72265196", "0.7222558", "0.7169545", "0.7104575", "0.70201665", "0.695318", "0.694076", "0.69365275", "0.6914049", "0.69137734", "0.69001776", "0.68961084", "0.6892495", "0.6887779", "0.6882234"...
0.8650569
0
Creates a stream with int numbers from start to end by increments of a step. The range is inclusively.
Создаёт поток с целыми числами от start до end с шагом step. Диапазон включает оба конца.
public static function rangeInt(int $start, int $end, int $step = 1): self { return self::range($start, $end, $step); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function range($start, $end, $step = null): static;", "public function range(int $start, int $end = null, int $step = null, bool $equal = null) : \\Generator\n {\n $step = $step ?? 1;\n $equal = $equal ?? false;\n\n if (0 === $step) {\n return;\n }\n\n $isR...
[ "0.63381207", "0.621782", "0.5998347", "0.57822376", "0.57073665", "0.5627097", "0.5624641", "0.527763", "0.52707136", "0.50886863", "0.50744015", "0.4999341", "0.49987864", "0.49843305", "0.49477094", "0.49309063", "0.4901814", "0.48718464", "0.48344502", "0.47204393", "0.46...
0.7073182
0
Creates a stream with float numbers from start to end by increments of a step. The range is inclusively.
Создает поток с числом float от start до end с шагом step. Диапазон включает оба конца.
public static function rangeFloat(float $start, float $end, float $step = 1): self { return self::range($start, $end, $step); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function floatRange($min, $max)\n {\n $min = (float)$min;\n $max = (float)$max;\n\n if ($min > $max) {\n throw new \\Exception(\"Invalid integer range: \\$max should be at least $min, but it was set to $max\");\n }\n\n while (true) {\n yield...
[ "0.5762401", "0.5664802", "0.55207586", "0.5248579", "0.51220423", "0.49899173", "0.4924174", "0.47165972", "0.46979418", "0.46696383", "0.4607607", "0.45898265", "0.45523062", "0.45390302", "0.45363644", "0.44968668", "0.4488178", "0.44526297", "0.44419226", "0.4436335", "0....
0.7213506
0
If no callback is provided, return the first Stream's element. If a callback is provided, return the first element whose callback returns true. A default return can also be provided if nothing is found. Otherwise, an exception is thrown.
Если не предоставлен callback, верните первый элемент Stream. Если предоставлен callback, верните первый элемент, для которого callback возвращает true. Также можно указать значение по умолчанию, если ничего не найдено. В противном случае будет выброшено исключение.
public function collectFirst(callable $callback = null, $default = null) { if($callback) { foreach ($this as $value) { if($callback($value)) { return $value; } } if (is_null($default)) { throw new \InvalidArgumentException('No element matching the criteria was found.'); } return $defau...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function firstOr(callable $callback){\n $result = $this->first();\n \n if($this->count==0){\n return call_user_func($callback);\n }\n\n return $result;\n }", "public function first(Closure $callback, $default = null)\n {\n foreach ($this->items as...
[ "0.73195654", "0.7304124", "0.7194703", "0.70436037", "0.7026656", "0.6956812", "0.6955377", "0.6913111", "0.6913111", "0.68229026", "0.6736036", "0.6681367", "0.65475136", "0.6502102", "0.6491796", "0.6313454", "0.6284653", "0.61106586", "0.60158604", "0.59619176", "0.595026...
0.7359192
0
If no callback is provided, return the last Stream's element. If a callback is provided, return the last element whose callback returns true. A default return can also be provided if nothing is found. Otherwise, an exception is thrown.
Если не предоставлен обратный вызов, верните последний элемент потока. Если предоставлен обратный вызов, верните последний элемент, для которого обратный вызов возвращает true. Также можно предоставить значение по умолчанию, если ничего не найдено. В противном случае выбрасывается исключение.
public function collectLast(callable $callback = null, $default = null) { if(!$callback) { $callback = function($_) { return true; }; } foreach ($this as $value) { if($callback($value)) { $element_found = $value; } } if (isset($element_found)) { return $element_found; } if (is_null...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function last(callable $callback = null)\n {\n if (null === $callback) {\n return end($this->items);\n }\n\n return $this->filter($callback)->last();\n }", "public function firstOr(callable $callback){\n $result = $this->first();\n \n if($this->co...
[ "0.69488955", "0.6819548", "0.6819459", "0.6515807", "0.6490716", "0.6485077", "0.6454872", "0.62238806", "0.62103343", "0.6166496", "0.6163891", "0.6144044", "0.6111412", "0.6111412", "0.6067586", "0.605912", "0.5973615", "0.5958467", "0.58836025", "0.587183", "0.5865332", ...
0.7370889
0
Take n elements of the stream.
Возьмите n элементов потока.
public function take(int $n_elements): self { $generator = function (iterable $iterable, int $n_elements) { if ($n_elements == 0) { return; } $count = 0; foreach ($iterable as $element) { yield $element; if (++$count == $n_elements){ break; } } } ; return new self($generator($t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function take($n, $stream) {\n foreach ($stream as $x) {\n if ($n-- === 0) {\n break;\n }\n yield $x;\n }\n}", "function take(iterable $iterable, int $n): Iterator\n{\n /** @psalm-suppress DeprecatedFunction */\n return slice($iterable, 0, $n);\n}", "function take($c...
[ "0.76029557", "0.7163059", "0.71334714", "0.687185", "0.6801092", "0.6401976", "0.6279521", "0.6146138", "0.61352503", "0.60863906", "0.606901", "0.58727854", "0.56067765", "0.5592765", "0.55332947", "0.5481268", "0.54710144", "0.5452936", "0.544439", "0.541599", "0.5401967",...
0.7187302
1
Skip n elements of the stream.
Пропустить n элементов потока.
public function skip(int $n_elements): self { return new self(new \LimitIterator($this, $n_elements)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function skip($n);", "public function skip($howMany);", "function skip($count);", "public function skip($n)\n {\n $this->check($n);\n $this->pos += $n;\n }", "public function skip($amount);", "public function skip($length) {}", "public function skip($offset = 0);", "functio...
[ "0.8461647", "0.7727323", "0.75114566", "0.738938", "0.7284405", "0.7264593", "0.69134307", "0.67743367", "0.6654874", "0.64932793", "0.6481634", "0.6470369", "0.6342277", "0.6315845", "0.6228642", "0.61722", "0.6162867", "0.6147567", "0.6146523", "0.60279554", "0.602723", ...
0.78368443
1
Writes all elements into the given resource. This method consumes the stream.
Записывает все элементы в заданный ресурс. Этот метод потребляет поток.
public function intoResource($resource): void { foreach ($this as $value) { fwrite($resource, $value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function writeStream($resource);", "public function updateStream($resource);", "public function putStream($resource);", "public function writeXmlResourceList() {\n // Neues XMLWriter-Objekt\n $this->xmlwriter = new \\XMLWriter();\n\n // Dokumenteneigenschaften\n $this->xmlw...
[ "0.70547235", "0.59955335", "0.5983213", "0.52996385", "0.52570987", "0.5147224", "0.50401485", "0.5022386", "0.5003748", "0.5000327", "0.49150887", "0.48501125", "0.4841634", "0.48354453", "0.48026127", "0.48020732", "0.48020732", "0.48020732", "0.48019445", "0.48019445", "0...
0.7379074
0
Calculates the transpose matrix for the current stream. All elements of the stream must be an iterable. If the elements don't have the same size, the size of the smaller element will be used. It does consumes the stream, but not the elements. So, if used in a stream of streams, only the main stream will be consumed.
Вычисляет транспонированную матрицу для текущего потока. Все элементы потока должны быть итерируемыми. Если элементы имеют разный размер, будет использоваться размер меньшего элемента. Этот метод потребляет поток, но не элементы. Поэтому, если он используется в потоке потоков, будет потреблен только основной поток.
public function transpose(): Stream { $streams = $this->map(function (iterable $iterable) { return Stream::of($iterable); }) ->collect(); if (count($streams) == 0) { return new self(new \ArrayIterator([])); } $generator = function (\Iterator ...$streams): \Generator { foreach ($streams as $stream...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function transpose();", "function transpose(array $xs)\n{\n if (!$xs) {\n return array();\n }\n //special case: row matrix\n if (count($xs) == 1) {\n return array_chunk($xs[0], 1);\n }\n return call_user_func_array(\n 'array_map',\n array_merge(array(null), $x...
[ "0.63671273", "0.6071555", "0.58615166", "0.5771654", "0.52695733", "0.51774955", "0.5106475", "0.4842924", "0.4817503", "0.47582892", "0.47341698", "0.47305107", "0.47294202", "0.4497927", "0.43362233", "0.43002367", "0.4119687", "0.40805608", "0.40076873", "0.39971435", "0....
0.722229
0
Executes a Cartesian product of the current stream (set A) with the given iterable (set B). The Cartesian product (AxB) returns subsets combining all elements of A with all elements of B. Each combination is contained in a array. It consumes the given stream.
Выполняет декартово произведение текущего потока (множество A) с заданным итерируемым объектом (множество B). Декартово произведение (AxB) возвращает подмножества, объединяющие все элементы A с всеми элементами B. Каждая комбинация содержится в массиве. Потребляет заданный поток.
public function cartesianProduct(iterable $stream): Stream { $generator = function ($set_b) { foreach ($this as $element_a) { foreach ($set_b as $element_b) { yield [$element_a, $element_b]; } } }; return new self($generator(iterator_to_array($stream))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function product(iterable ...$iterables) : \\Generator\n {\n $pools = [];\n foreach ( $iterables as $i => $iterable ) {\n foreach ( $iterable as $ii => $v ) {\n $pools[ $i ][ $ii ] = $v;\n }\n }\n\n $result = [ [] ];\n foreach ( $poo...
[ "0.62899864", "0.58701104", "0.5776011", "0.5727239", "0.5709965", "0.5388537", "0.5285905", "0.52151376", "0.51961654", "0.51206464", "0.48926914", "0.48033327", "0.47730547", "0.47282317", "0.4720078", "0.4680656", "0.46797884", "0.4677009", "0.46274552", "0.45820397", "0.4...
0.79956293
0
Applies the callback to each element of the stream and return a stream with array pairs where the first element is the return of the callback and the second one is a Stream with all values for which the callback returned that value. The return of the callback can be a scalar or an object. If an object is returned we us...
Применяет обратный вызов к каждому элементу потока и возвращает поток с массивами пар, где первый элемент — это результат обратного вызова, а второй — поток со всеми значениями, для которых обратный вызов вернул это значение. Результат обратного вызова может быть скаляром или объектом. Если возвращается объект, мы испо...
public function groupBy(callable $callback): Stream { $values = []; $keys = []; foreach ($this as $value) { $key = $callback($value); $hashed_keys = is_object($key) ? spl_object_hash($key) : $key; $values[$hashed_keys][] = $value; $keys[$hashed_keys] = $key; } $generator = function (array $values...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function keyBy(callable $callback): Stream {\n\t\t$generator = function (Stream $stream) use ($callback) {\n\t\t\tforeach ($stream as $value) {\n\t\t\t\tyield [$callback($value), $value];\n\t\t\t}\n\t\t};\n\t\treturn new Stream($generator($this));\n\t}", "protected static function mapStream($things, $call...
[ "0.67603105", "0.6529293", "0.65021646", "0.6350013", "0.6084933", "0.6047412", "0.5984444", "0.5984171", "0.5685418", "0.5643321", "0.56116086", "0.54669714", "0.5448248", "0.5446845", "0.54466915", "0.5380335", "0.5379854", "0.5375079", "0.5373469", "0.5373469", "0.53574806...
0.7529892
0
Add an user in a working group
Добавить пользователя в рабочую группу
function addUserToWorkinggroup($idWG){ require_once 'model/dbConnector.php'; $connexion = openDBConnexion(); $request = $connexion->prepare(' INSERT INTO bdd_satisfevent.users_has_workinggroups SET Users_idUsers = ?, WorkingGroups_idWorkingGroups = ?'); $request->execute(array($_SESSION['logged...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add() {\n\t\t$data = array (\n\t\t\t'be_users_uid' => $this['beUserUid'],\n\t\t\t'group_uid' => $this['groupUid'],\n\t\t\t'rights' => $this['rights']\n\t\t);\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_INSERTquery(\n\t\t\t'tx_passwordmgr_group_be_users_mm',\n\t\t\t$data\n\t\t);\n\t\tif ( $res ) {\n\t\t\...
[ "0.7490189", "0.71064216", "0.70748335", "0.69329166", "0.6901319", "0.6900726", "0.6647482", "0.6639866", "0.65988183", "0.65927345", "0.65243244", "0.65088683", "0.6503552", "0.64202017", "0.64126563", "0.6395145", "0.638195", "0.6359744", "0.6356307", "0.63518393", "0.6347...
0.7216636
1
Get the id of the most recent statistic entered
Получить идентификатор последней введенной статистики
function getStatId(){ $connexion = openDBConnexion(); $request = $connexion->prepare(' SELECT idStatistics FROM bdd_satisfevent.statistics ORDER BY idStatistics DESC LIMIT 1 '); $request->execute(array()); $result = $request->fetchAll(); return $result[0]['idStatistics']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastId() \n {\n if(!Patient::all() -> isEmpty()){\n $recentId = Patient::orderBy('patient_id', 'desc')->first()->patient_id;\n return $recentId;\n }\n }", "public function getMostRecentRunId() {\n return (float) $this->profile->mostRecentRun->at...
[ "0.6897157", "0.6890844", "0.6872332", "0.67314315", "0.67112243", "0.6698977", "0.65915495", "0.6590501", "0.65786535", "0.650163", "0.64815086", "0.6474372", "0.64730155", "0.644067", "0.6439496", "0.6422828", "0.6399042", "0.63962114", "0.63622415", "0.63537735", "0.634597...
0.717757
0
Get the working group id base on the user and the event
Получить идентификатор рабочей группы на основе пользователя и события
function getWGId($idUser, $idEvent){ $connexion = openDBConnexion(); $request = $connexion->prepare(' SELECT WorkingGroups_has_Events.workinggroups_idWorkingGroups FROM bdd_satisfevent.WorkingGroups_has_Events INNER JOIN users_has_workinggroups ON users_has_workinggroups.workinggroups_idWorkingGroups = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGroupId()\n {\n return $this->baseEvent->getGroupId();\n }", "function getEventByWorkingGroup($idWG)\n{\n require_once 'model/dbConnector.php';\n $connexion = openDBConnexion();\n $request = $connexion->prepare('SELECT Events_idEvents FROM bdd_satisfevent.workinggroups_ha...
[ "0.652635", "0.6381773", "0.61937577", "0.6164693", "0.6144389", "0.6006382", "0.5998823", "0.5975784", "0.59653914", "0.58733255", "0.583411", "0.5826008", "0.5791973", "0.57471985", "0.57310975", "0.569286", "0.56752086", "0.56752086", "0.5636416", "0.5630865", "0.56105065"...
0.71097666
0
Returns INSERT statement for the configuration
Возвращает инструкцию INSERT для конфигурации
private static function getInsertStatement(array $options) { $keys = array(); $values = array(); foreach ($options as $k=>$v) { $value = "'${v}'"; $key = $k; if (substr($k, 0, 1) == '!') { $key = substr($k, 1); $value = $v; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInsertSql()\n {\n $str1 = '';\n $str2 = '';\n $n = 0;\n foreach (array_keys(get_class_vars(get_class($this))) as $k) {\n if (!in_array($k, $this->tblIndex) && $k != 'tblName' && $k != 'schema' && $k != 'tblIndex' && $k != 'exists' && isset($this->$k)) {\n ...
[ "0.7297543", "0.723196", "0.69954044", "0.6951405", "0.6889822", "0.68562096", "0.68002415", "0.6761208", "0.67434525", "0.66645634", "0.6567215", "0.6537455", "0.6465932", "0.6457262", "0.64342535", "0.642758", "0.63511896", "0.63438666", "0.62071216", "0.6191851", "0.615890...
0.7452282
0
/ Function for displaying success msgs on the page
/ Функция для отображения сообщений об успехе на странице
function displaySuccessMsg() { if(isset($_SESSION['success'])) { // Set up row in accordance with Bootstrap grid /*echo '<div class="container"><div class="row"><div class="col-md-12">';*/ echo '<div class="row"><div class="col-md-12">'; foreach ($_SESSION['success'] as $success) { echo '<p class="success">...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displaySuccessMessage($index,$params = array()) {\n\t\tglobal $lang;\n\t\n\t\treturn '<div class=\"alert alert-success\">'.getLang('form_success_'.$index,$params).'</div>';\n\t}", "function success($msg) {\n if ($msg) {\n echo \" <div class=\\\"success\\\">\" . $msg . \"</div>\\n\";\n }...
[ "0.7768924", "0.7753875", "0.7735741", "0.75878567", "0.7514757", "0.750029", "0.7392212", "0.73364615", "0.73083806", "0.73083806", "0.7304544", "0.72780824", "0.72702426", "0.722043", "0.7167448", "0.7103742", "0.70419693", "0.7015826", "0.7008529", "0.6980826", "0.6975675"...
0.7935905
0
Build the HTML for the 404 page
Создайте HTML для страницы 404
public function get_404_page(){ $html = '<article class="wm-article" id="page-404"><h1 class="wm-article-title">404 - Page Not Found</h1>'; $html .= '<h2 class="wm-article-title">Uh oh.</h2><p>The content you requested could not be found. You can try searching with the search bar above or go ba...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function error404() {\n header('This is not the page you are looking for', true, 404);\n $html404 = sprintf(\"<title>Error 404: Not Found</title>\\n\" .\n \"<main><div class=\\\"container\\\"><div class=\\\"row\\\"><div class=\\\"col-lg-10 offset-lg-1\\\">\" .\n \"...
[ "0.76333153", "0.75446385", "0.732521", "0.730215", "0.71489125", "0.711139", "0.7106229", "0.71031475", "0.70857406", "0.70511013", "0.7046355", "0.69810414", "0.69568044", "0.6938217", "0.69349355", "0.69050485", "0.68822885", "0.6860923", "0.6857469", "0.68534213", "0.6852...
0.7592076
1
Build the HTML for a post page
Создать HTML для страницы поста
public function get_post_page(){ global $wp_query; $post = $wp_query->posts[0]; if( !post_password_required( $post->ID ) ){ // TODO: PULL IN ALL THE $WM_posts FUNCTIONS AND DELETE THAT CLASS $dates = $this->get_raw_dates( $post->ID ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createHTML () {\r\n\t\t\r\n\t\t//Declare STD Object $res\r\n\t\t$res = $this->blogstate->blogStatement();\r\n\r\n\t\t$blogPost = \"\";\r\n\r\n\t\t//Adding news items contained in $res variable.\r\n\t\tforeach($res AS $key => $val) {\r\n\t\t\t$catLink = \"\";\r\n\t\t\t$categoryAnchors = explode(\",\...
[ "0.696", "0.6860179", "0.6852585", "0.6847191", "0.67278755", "0.66660607", "0.6567037", "0.6318268", "0.6306781", "0.6289134", "0.6282355", "0.62683606", "0.62245166", "0.6149113", "0.6144237", "0.6138769", "0.6101573", "0.6088951", "0.60771894", "0.60653156", "0.6046471", ...
0.7005251
0
Returns a new instance of a question type object from a given type.
Возвращает новый экземпляр объекта типа вопроса на основе заданного типа.
public static function create($type, $array) { switch ($type) { case "mcq": return new QuestionMcq($array); break; case "mrq": return new QuestionMrq($array); break; case "text": return new Qu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create($question, $type = ObjectFactory::TEXT_QUESTION) {\n $questionObj = $this->objectFactory->createQuestion($type);\n $questionObj->setQuestion($question);\n $this->poll->addItem($questionObj);\n return $questionObj;\n\t}", "public function create($question, $type ...
[ "0.71917206", "0.7169161", "0.6743878", "0.6612354", "0.65161306", "0.64408576", "0.6431556", "0.63544756", "0.6207042", "0.6207042", "0.61765534", "0.6045034", "0.59302336", "0.58876675", "0.58876675", "0.5881977", "0.583725", "0.57928276", "0.57760805", "0.57624876", "0.575...
0.7591309
0
Returns an array of placeholders that should be replaced for the given attribute.
Возвращает массив плейсхолдеров, которые должны быть заменены для заданного атрибута.
public function getPlaceholders($attribute) { $placeholders = array_get($this->getAllPlaceholders(), $attribute); if ($placeholders == '*') { $placeholders = array_keys($this->getAllReplacements()); $this->placeholdersCache[$attribute] = $placeholders; } return $placeholders; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function preparedPlaceholders(): array\n {\n $placeholders = [];\n foreach ($this->placeholders() as $placeholder => $var) {\n $placeholders['{{' . $placeholder . '}}'] = strpos($var, '--') !== 0 \n ? $this->arg($var) \n : $this->opt(substr($var, ...
[ "0.64113945", "0.6238869", "0.6179997", "0.61313057", "0.5947015", "0.5838302", "0.56937784", "0.5659289", "0.5588449", "0.5523605", "0.54995155", "0.5364709", "0.53527945", "0.5303889", "0.5249378", "0.52315205", "0.52257085", "0.51491827", "0.5148841", "0.5096799", "0.50843...
0.7437464
0
Get the attribute=>placeholders array for this model.
Получите массив атрибутов=>заглушек для этой модели.
protected function getAllPlaceholders() { if (!is_array($this->placeholdersCache)) { $modelPlaceholders = Config::get('replaceable.' . get_called_class() . '.attributes', []); $globalPlaceholders = Config::get('replaceable.*.attributes', []); $this->placeholdersCache = array_merge($globalPlaceholders, $model...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPlaceholders(): array\n {\n return $this->placeholders;\n }", "public function getPlaceholders();", "protected function preparedPlaceholders(): array\n {\n $placeholders = [];\n foreach ($this->placeholders() as $placeholder => $var) {\n $placeholders...
[ "0.73024267", "0.63581324", "0.62972516", "0.6289107", "0.6261235", "0.6061663", "0.6015741", "0.5858576", "0.5858091", "0.5849457", "0.5818723", "0.57967", "0.5720385", "0.5706505", "0.5662698", "0.56374025", "0.56259274", "0.56223655", "0.5614927", "0.5610826", "0.5606831",...
0.73366445
0
Get the replacement value for a given placeholder
Получить значение замены для заданного плейсхолдера
protected function getReplacementValue($placeholder) { if (array_key_exists($placeholder, $this->replacementValuesCache)) { return $this->replacementValuesCache[$placeholder]; } $value = array_get($this->getAllReplacements(), $placeholder); if (is_callable($value)) { $value = call_user_func($value, $this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetReplacement($placeholder)\n {\n if (isset($this->texts[$placeholder]))\n {\n return $this->texts[$placeholder];\n }\n return $this->phpTranslator->GetReplacement($placeholder);\n }", "public function getPlaceholder();", "public function getPlaceho...
[ "0.75451463", "0.6964015", "0.6785272", "0.6785272", "0.67500484", "0.6726901", "0.6337455", "0.59207726", "0.5911548", "0.58798647", "0.58527297", "0.5771997", "0.57652986", "0.57361174", "0.57252425", "0.5645024", "0.56378925", "0.56235844", "0.55310726", "0.54720587", "0.5...
0.80661523
0
Create database table for Genesis consumers
Создать таблицу базы данных для потребителей Genesis
protected static function createConsumersDbTable() { global $db; $db->Execute( 'CREATE TABLE IF NOT EXISTS `' . TABLE_EMERCHANTPAY_CHECKOUT_CONSUMERS . '` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `customer_id` int(10) unsigned NOT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createDatabaseStructure() {}", "public function create()\n {\n $db = XenForo_Application::get('db');\n $db->query('CREATE TABLE `' . self::DB_TABLE . '`\n (`threema_id` CHAR(8) NOT NULL PRIMARY KEY,\n `public_key` CHAR(64) NOT NULL)\n ');\n ...
[ "0.6813986", "0.67879766", "0.6774321", "0.6663597", "0.65212095", "0.6457117", "0.6431111", "0.63883066", "0.6378652", "0.6363745", "0.62243336", "0.621194", "0.62028563", "0.6186105", "0.61833113", "0.6182795", "0.6169286", "0.61677396", "0.6159433", "0.6158371", "0.6158089...
0.7688224
0
Add modules settings to ZenCart configuration table
Добавить настройки модулей в таблицу конфигурации ZenCart
protected static function addModuleConfigurationsToDb() { static::_addMainConfigurationEntries(); static::_addCredentialsConfigurationEntries(); static::_addTransactionsConfigurationEntries(); static::_addWpfConfigurationEntries(); static::_addOrderConfigurationEntries(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModuleConfig() {\n $this->data['config_value'] = array_merge($this->helper_setting->getSetting($this->module_code),$this->helper_setting->getSetting('module_'.$this->module_code));\n }", "public function updateModuleFile() {\n\t\t$module = Yii::app()->db->createCommand(\"SELECT * FROM ...
[ "0.6795552", "0.6567651", "0.6541905", "0.6502597", "0.64680785", "0.6438933", "0.64385194", "0.63848305", "0.6356", "0.63506526", "0.63158846", "0.626857", "0.6251879", "0.622227", "0.61562586", "0.61420506", "0.6107641", "0.6080995", "0.60755223", "0.6074327", "0.6071657", ...
0.7484395
0