query
stringlengths
11
3.13k
ru_query
stringlengths
9
3.91k
document
stringlengths
18
71k
metadata
dict
negatives
listlengths
0
100
negative_scores
listlengths
0
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Returns the value of field link_sort
Возвращает значение поля link_sort
public function getLinkSort() { return $this->link_sort; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSortValue() {}", "public function field()\n {\n return 'sort';\n }", "function getSortLink($column) {\r\n\t\tif (isset($this->columnsSort[$column])) {\r\n\t\t\treturn $this->columnsSort[$column];\r\n\t\t}\r\n\t\treturn '';\r\n\t}", "function get_sort_field() {\n if ($th...
[ "0.7294715", "0.68771464", "0.65729415", "0.65696096", "0.65521663", "0.65494007", "0.6537048", "0.65263706", "0.65263706", "0.64881957", "0.64650774", "0.6463633", "0.6454175", "0.6301562", "0.6257209", "0.6189514", "0.61632544", "0.6138899", "0.6135669", "0.6112982", "0.611...
0.81248116
0
Adds score to player.
Добавляет очки игроку.
abstract public function addScore(Player $player, int $score) : void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function incrementScore()\n {\n $this->score++;\n }", "public function onScoreChange(string $player, int $score) : void\n {\n $this->addToScoreboard($player, $score);\n }", "public function setScore($score);", "public function addScore($userId, $score)\n {\n $userSc...
[ "0.7453294", "0.73203975", "0.6860134", "0.6713778", "0.6651941", "0.6610821", "0.65830326", "0.6500653", "0.6495022", "0.6495022", "0.6491327", "0.64800054", "0.6424106", "0.62964803", "0.6281837", "0.6281837", "0.62422526", "0.62116706", "0.61729723", "0.6169601", "0.610239...
0.8316533
0
Render the full HTML panel.
Отобразить полную HTML-панель.
public function render() { $attributes = $this->attributes; if (!isset($attributes['class'])) { $attributes['class'] = 'panel panel-' . $this->context; } else { $attributes['class'] = 'panel panel-' . $this->context . ' ' . $attributes['class']; } $attributes = $this->html->attributes($attributes); $html = [ "<div{$attributes}>", $this->renderHeading(), $this->renderBody(), $this->renderFooter(), "</div>", ]; return join(PHP_EOL, $html); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render_panel_templates()\n {\n }", "public function render() {\n\t\techo '<div class=\"wrap\">';\n\t\t$this->render_error_message();\n\t\t$this->render_title();\n\t\t$this->render_form();\n\t\techo '</div>';\n\t}", "public function displayPanel()\n {\n $template['TITLE'] = $th...
[ "0.7363441", "0.72554326", "0.7240341", "0.7224435", "0.71202326", "0.7085076", "0.7046934", "0.69620323", "0.6915723", "0.6911814", "0.68700105", "0.6827779", "0.68149114", "0.68107784", "0.67871475", "0.6785201", "0.67723536", "0.6761449", "0.6751271", "0.6748457", "0.67274...
0.8337715
0
Render the panel heading HTML.
Отобразить HTML-заголовок панели.
public function renderHeading() { if (empty($this->header['contents'])) { return ''; } /// Attributes /// $attributes = (empty($this->header['attributes']) ? [] : $this->header['attributes']); if (!isset($attributes['class'])) { $attributes['class'] = 'panel-heading'; } else { $attributes['class'] = 'panel-heading ' . $attributes['class']; } $attributes = $this->html->attributes($attributes); /// Contents /// $contents = $this->header['contents']; if (!empty($this->header['contentsWrapper'])) { $contents = sprintf($this->header['contentsWrapper'], $contents); } /// More /// $more = (empty($this->header['more']) ? '' : $this->header['more']); if (!empty($more) && !empty($this->header['moreWrapper'])) { $more = sprintf($this->header['moreWrapper'], $more); } $html = [ "<div{$attributes}>", $contents . $more, '</div>', ]; return join(PHP_EOL, $html); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renderHeader() {\r\n\t\t\r\n\t\tif ($this->title !== false) {\r\n\t\t\techo CHtml::openTag('div', $this->headerHtmlOptions);\r\n\t\t\tif ($this->title) {\r\n\t\t\t\t$this->title = '<h3 class=\"panel-title\" style=\"display: inline;\">' . $this->title . '</h3>';\r\n\r\n\t\t\t\tif ($this->headerIcon)...
[ "0.77511543", "0.71830016", "0.7127938", "0.7110497", "0.69709337", "0.6783366", "0.6727756", "0.6685596", "0.6676051", "0.6651903", "0.6634233", "0.6624446", "0.65770566", "0.65333307", "0.64896756", "0.64878184", "0.64597297", "0.64336276", "0.64002067", "0.6399844", "0.637...
0.8389067
0
Render the panel body HTML.
Отобразить HTML-тело панели.
public function renderBody() { if (empty($this->body['contents']) && empty($this->table['contents']) && empty($this->listGroup['contents'])) { return ''; } /// Contents /// $html = (empty($this->body['contents']) ? '' : $this->body['contents']); if (!empty($html) && !empty($this->body['withPanelBody'])) { /// Attributes /// $attributes = (empty($this->body['attributes']) ? [] : $this->body['attributes']); if (!isset($attributes['class'])) { $attributes['class'] = 'panel-body'; } else { $attributes['class'] = 'panel-body ' . $attributes['class']; } $attributes = $this->html->attributes($attributes); $html = sprintf("<div{$attributes}>%s</div>", $html); } /// Table /// if (!empty($this->table['contents'])) { $html = (empty($this->table['beforeBody']) ? $html . $this->table['contents'] : $this->table['contents'] . $html); } /// List Group /// if (!empty($this->listGroup['contents'])) { $html = (empty($this->listGroup['beforeBody']) ? $html . $this->listGroup['contents'] : $this->listGroup['contents'] . $html); } return $html; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render()\n\t{\n\t\t$attributes = $this->attributes;\n\n\t\tif (!isset($attributes['class']))\n\t\t{\n\t\t\t$attributes['class'] = 'panel panel-' . $this->context;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$attributes['class'] = 'panel panel-' . $this->context . ' ' . $attributes['class'];\n\t\t}\n\n\t\t$attri...
[ "0.8052262", "0.69554204", "0.68688864", "0.68539697", "0.68373764", "0.6810312", "0.67865384", "0.67283165", "0.66860175", "0.66026384", "0.65918046", "0.6572601", "0.64686507", "0.6445399", "0.6440532", "0.64295644", "0.64239", "0.63894624", "0.63664955", "0.63598454", "0.6...
0.7961846
1
Render the panel footer HTML.
Отобразить HTML-футер панели.
public function renderFooter() { if (empty($this->footer['contents'])) { return ''; } /// Attributes /// $attributes = (empty($this->footer['attributes']) ? [] : $this->footer['attributes']); if (!isset($attributes['class'])) { $attributes['class'] = 'panel-footer'; } else { $attributes['class'] = 'panel-footer ' . $attributes['class']; } $attributes = $this->html->attributes($attributes); /// Contents /// $contents = $this->footer['contents']; if (!empty($this->footer['alignRight'])) { $contents = sprintf('<span class="pull-right">%s</span>', $contents); } $html = [ "<div{$attributes}>", $contents, '</div>', ]; return join(PHP_EOL, $html); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renderPanelFooter(){\n $content = ArrayHelper::getValue($this->panelFooter,'content','');\n $htmlOptions = ArrayHelper::getValue($this->panelFooter,'htmlOptions',[]);\n Html::addCssClass($htmlOptions,' '.self::PANEL_FOOTER);\n echo Html::tag('div',$content,$htm...
[ "0.88012105", "0.78500175", "0.77907544", "0.7691063", "0.76740956", "0.7589509", "0.7458886", "0.74405646", "0.7405688", "0.73652893", "0.73323375", "0.7314484", "0.7296114", "0.7281612", "0.72765106", "0.72645223", "0.7244863", "0.7209226", "0.71536887", "0.71311283", "0.71...
0.8534983
1
Add email activate button to form
Добавить кнопку активации электронной почты в форму
private function _addActivateButton() { //Button send email $this->addElement( 'radio', 'sendEmail', array( 'class' => 'radio toggler', 'label' => 'L_SEND_MAIL_FORM', 'onclick' => "myToggle(this, 'y', 'emailToggle');", 'listsep' => ' ', 'disableLoadDefaultDecorators' => true, 'multiOptions' => array( 'y' => 'L_YES', 'n' => 'L_NO', ), 'decorators' => array('Default'), ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function activation()\n {\n if (!$this->_mod()->setting('activation')) redirect();\n\n if (user_is_login()) $this->_redirect();\n\n\n $form = array();\n\n $form['validation']['params'] = array('email_activation', 'security_code');\n\n $form['submit'] = function ($params...
[ "0.71377826", "0.6829161", "0.65386397", "0.650179", "0.65002304", "0.64558876", "0.6408349", "0.6397302", "0.6359765", "0.63358736", "0.62924755", "0.62571275", "0.6247217", "0.6211451", "0.61918366", "0.61759067", "0.617569", "0.6157252", "0.61476177", "0.6119668", "0.61045...
0.7737356
0
Add button to add a ccrecipient
Добавить кнопку для добавления получателя ccrecipient
private function _addButtonAddRecipientCc() { $this->addElement( 'button', 'AddCc', array( 'disableLoadDefaultDecorators' => true, 'content' => $this->getView()->getIcon('plus') . ' ' . $this->_lang->getTranslator()->_('L_ADD_RECIPIENT'), 'decorators' => array('Default'), 'escape' => false, 'label' => '', 'class' => 'Formbutton emailToggle', 'onclick' => "addEmailRecipientCc();", ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cacsp_add_button( $type = 'delete' ) {\n\t$r = array(\n\t\t'id' => \"bpsp-{$type}\",\n\t\t'component' => 'members',\n\t\t'must_be_logged_in' => true,\n\t\t'block_self' => false,\n\t\t'link_text' => 'delete' == $type ? __( 'Delete', 'social-paper' ) : __( 'Publish', 's...
[ "0.6232809", "0.59525734", "0.5898039", "0.5845884", "0.5840996", "0.57359505", "0.57342017", "0.5717088", "0.57089794", "0.5696737", "0.5694821", "0.5652244", "0.5615313", "0.5596376", "0.5589496", "0.55643576", "0.5562761", "0.55545825", "0.5548249", "0.55404514", "0.552515...
0.79273427
0
Get the RSS Status Values as associated array usage in form
Получить значения статуса RSS в виде ассоциативного массива для использования в форме
public function getRSSValuesForForm() { $enums = $this->app['db.utils']->getEnumValues(self::$table_name, 'rss'); $result = array(); foreach ($enums as $enum) { $result[$enum] = $this->app['utils']->humanize($enum); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getStatuses() {\n return static::$vars['status']['values'];\n }", "public function getWorkflowstatusArray() {\r\n $wsList=$this->getWorkflowstatus();\r\n $result=array();\r\n // Initialize\r\n $statusList=SqlList::getList('Status');\r\n $profileList=SqlList::getLis...
[ "0.656759", "0.6227248", "0.61881167", "0.6174124", "0.61148536", "0.61031437", "0.603738", "0.6009659", "0.5992896", "0.5988289", "0.5982781", "0.594477", "0.5937341", "0.5908761", "0.5899932", "0.5889509", "0.58768946", "0.5847231", "0.58268464", "0.58158654", "0.5805687", ...
0.70229036
0
Get the ENUM values of field redirect_target as associated array for usage in form
Получить значения ENUM поля redirect_target в виде ассоциативного массива для использования в форме
public function getTargetTypeValuesForForm() { $enums = $this->app['db.utils']->getEnumValues(self::$table_name, 'redirect_target'); $result = array(); foreach ($enums as $enum) { $result[$enum] = $enum; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function getValue()\n {\n return [\n \"redirects\" => [\n \"login\" => \"/login\",\n \"logout\" => \"/logout\",\n \"user_profile\" => \"/profile\",\n ],\n ];\n }", "public function getRedirectOptions()\n {\n r...
[ "0.6254799", "0.6009407", "0.5940422", "0.5913461", "0.5879455", "0.5690432", "0.5651514", "0.56297284", "0.5625656", "0.56026757", "0.5553371", "0.5549252", "0.55486983", "0.55141366", "0.55031306", "0.5499249", "0.54904324", "0.54768085", "0.546475", "0.5443124", "0.5431647...
0.8412939
0
Select the content in previous or next order to the given content ID.
Выберите содержимое в порядке предыдущего или следующего относительно заданного идентификатора содержимого.
protected function selectPreviousOrNextContentForID($content_id, $select_previous=true, $language='EN') { try { $category_table = FRAMEWORK_TABLE_PREFIX.'flexcontent_category'; $content_table = self::$table_name; // first get the primary category of $content_id $SQL = "SELECT `category_id` FROM `$category_table` WHERE `content_id`='$content_id' AND `is_primary`='1'"; $category_id = $this->app['db']->fetchColumn($SQL); if ($category_id < 1) { // no hit ... $this->app['monolog']->addDebug("Can't find the primary category ID for content ID $content_id.", array(__METHOD__, __FILE__)); return false; } // get the publishing date of $content_id $SQL = "SELECT `publish_from` FROM `$content_table` WHERE `content_id`='$content_id'"; $published_from = $this->app['db']->fetchColumn($SQL); if (empty($published_from)) { // invalid record? $this->app['monolog']->addDebug("Can't select the `publish_from` date for content ID $content_id", array(__METHOD__, __LINE__)); return false; } // now select the content record if ($select_previous) { $select = '>='; $direction = 'DESC'; } else { $select = '<='; $direction = 'ASC'; } $SQL = "SELECT * FROM `$content_table` ". "LEFT JOIN `$category_table` ON `$category_table`.`content_id`=`$content_table`.`content_id` ". "WHERE `$content_table`.`content_id` != $content_id AND `category_id`=$category_id AND `is_primary`=1 AND ". "'$published_from' $select `publish_from` AND `status` != 'UNPUBLISHED' AND `status` != 'DELETED' AND ". "`language`='$language' ORDER BY `publish_from` $direction LIMIT 1"; $result = $this->app['db']->fetchAssoc($SQL); // prepare the content for output $content = $this->prepareContent($result); return (!empty($content)) ? $content : false; } catch (\Doctrine\DBAL\DBALException $e) { throw new \Exception($e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function selectPreviousContentForID($content_id, $language='EN')\n {\n return $this->selectPreviousOrNextContentForID($content_id, true, $language);\n }", "public function selectNextContentForID($content_id, $language='EN')\n {\n return $this->selectPreviousOrNextContentForID($conte...
[ "0.7287582", "0.6613465", "0.6014164", "0.53843474", "0.5332272", "0.53240615", "0.5220005", "0.5177798", "0.5168871", "0.5141681", "0.5139787", "0.5106567", "0.50863856", "0.5065553", "0.5014715", "0.5010921", "0.5009441", "0.49960896", "0.4990475", "0.49849865", "0.4961515"...
0.7288852
0
Select the content in previous order to the given content ID.
Выберите содержимое в предыдущем порядке до заданного идентификатора содержимого.
public function selectPreviousContentForID($content_id, $language='EN') { return $this->selectPreviousOrNextContentForID($content_id, true, $language); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function selectPreviousOrNextContentForID($content_id, $select_previous=true, $language='EN')\n {\n try {\n $category_table = FRAMEWORK_TABLE_PREFIX.'flexcontent_category';\n $content_table = self::$table_name;\n // first get the primary category of $content_id\...
[ "0.70222956", "0.61089504", "0.60798293", "0.58823335", "0.58491653", "0.58221054", "0.5777855", "0.5732065", "0.56945837", "0.5647453", "0.56367606", "0.55799586", "0.5522274", "0.5491693", "0.54657775", "0.5456406", "0.54508877", "0.54246444", "0.54221034", "0.54221034", "0...
0.7868805
0
Select the content in next order to the given content ID.
Выберите содержимое в следующем порядке по заданному идентификатору содержимого.
public function selectNextContentForID($content_id, $language='EN') { return $this->selectPreviousOrNextContentForID($content_id, false, $language); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function selectPreviousOrNextContentForID($content_id, $select_previous=true, $language='EN')\n {\n try {\n $category_table = FRAMEWORK_TABLE_PREFIX.'flexcontent_category';\n $content_table = self::$table_name;\n // first get the primary category of $content_id\...
[ "0.65603405", "0.57956594", "0.576293", "0.5617372", "0.56006634", "0.54050785", "0.5358894", "0.52668315", "0.5258009", "0.5224112", "0.5198157", "0.51836115", "0.51748073", "0.5171529", "0.51450706", "0.5132423", "0.51320004", "0.5128055", "0.5111173", "0.50928414", "0.5080...
0.7063372
0
Select the contents for the given Category ID. Order the results by status (BREAKING, PUBLISHED ...) and publishing date descending
Выберите содержимое для заданного идентификатора категории. Отсортируйте результаты по статусу (BREAKING, PUBLISHED ...) и дате публикации в порядке убывания
public function selectContentsByCategoryID($category_id, $status=array('PUBLISHED','BREAKING'), $limit=100, $order_by='publish_from', $order_direction='DESC', $exclude_ids=null) { try { $content_table = self::$table_name; $category_table = FRAMEWORK_TABLE_PREFIX.'flexcontent_category'; $in_status = "('".implode("','", $status)."')"; $SQL = "SELECT * FROM `$content_table` ". "LEFT JOIN `$category_table` ON `$category_table`.`content_id`=`$content_table`.`content_id` WHERE "; if (!is_null($exclude_ids) && is_array($exclude_ids) && !empty($exclude_ids)) { $in_exclude = "('".implode("','", $exclude_ids)."')"; $SQL .= "`$content_table`.`content_id` NOT IN $in_exclude AND "; } if (in_array($order_by, array('publish_from','breaking_to','archive_from','timestamp'))) { $SQL .= "`category_id`=$category_id AND `status` IN $in_status ORDER BY ". "FIELD (`status`,'BREAKING','PUBLISHED','HIDDEN','ARCHIVED','UNPUBLISHED','DELETED'), ". "`$order_by` $order_direction"; } else { $SQL .= "`category_id`=$category_id AND `status` IN $in_status ORDER BY ". "`$content_table`.`$order_by` $order_direction"; } if (!is_null($limit)) { $SQL .= " LIMIT $limit"; } $results = $this->app['db']->fetchAll($SQL); $contents = array(); foreach ($results as $result) { // prepare the content for output $contents[] = $this->prepareContent($result); } return (!empty($contents)) ? $contents : false; } catch (\Doctrine\DBAL\DBALException $e) { throw new \Exception($e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function select_content_from_category($category_id){\n $sql = \"Select *\n From content, content_category\n where content.isdeleted = 0\n and content.content_category_id = $category_id\n and content.content_category_id = content_category.con...
[ "0.7064953", "0.65929514", "0.6332288", "0.6324033", "0.63199884", "0.6175476", "0.6157511", "0.60647804", "0.60388863", "0.600025", "0.59871715", "0.5974288", "0.5971106", "0.5958966", "0.59265965", "0.5907479", "0.5893774", "0.5884719", "0.5880183", "0.58755934", "0.5849952...
0.75260174
0
Get the content TYPE for the given content ID
Получить тип содержимого для заданного идентификатора содержимого
public function getContentType($content_id) { try { $content = self::$table_name; $category = FRAMEWORK_TABLE_PREFIX.'flexcontent_category'; $category_type = FRAMEWORK_TABLE_PREFIX.'flexcontent_category_type'; $SQL = "SELECT `category_type` FROM `$category_type` ". "LEFT JOIN `$category` ON `$category`.`category_id`=`$category_type`.`category_id` ". "LEFT JOIN `$content` ON `$content`.`content_id`=`$category`.`content_id` ". "WHERE `$content`.`content_id`=$content_id"; $result = $this->app['db']->fetchColumn($SQL); return (!is_null($result)) ? $result : false; } catch (\Doctrine\DBAL\DBALException $e) { throw new \Exception($e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContentType($id) {\n\t\t$model = $this->repository->getContentType($id);\n\t\treturn $model;\n\t}", "public function getContentType()\n {\n return self::$_contentTypes[$this->_values['type_id']];\n }", "function get_type( $postID ) {\n\t\t$type = wp_get_post_terms( $postID, 'doc...
[ "0.7329906", "0.7116648", "0.67298543", "0.6728422", "0.6686946", "0.66866225", "0.6679723", "0.6667895", "0.6592067", "0.65471095", "0.65229326", "0.65229326", "0.65229326", "0.65229326", "0.65229326", "0.64767265", "0.64709073", "0.64581853", "0.6443873", "0.6434678", "0.64...
0.7241363
1
Connect a route name to an URL pattern. Additionally, attach an action to a route, and impose some restrictions to route arguments. $route_name string which represents our route. $route_url route pattern, e.g. 'category/:arg/wildcard_arg' $controller name of the controller class $action controller method to execute on match $reqs array of requirements for route arguments, keys are route argument names, values are regular expressions Please note that $controller and $action are only conventions. If you intend to do your own dispatching, you get to choose their meaning, i.e. "controller" could be a file, "action" could be a class, and you could extract "method" from arguments by hand. You can get the original route_url afterwards with RouteMap::url_for();
Связать имя маршрута с шаблоном URL. Дополнительно, привязать действие к маршруту и наложить некоторые ограничения на аргументы маршрута. $route_name — строка, представляющая наш маршрут. $route_url — шаблон маршрута, например, 'category/:arg/wildcard_arg'. $controller — имя класса контроллера. $action — метод контроллера, который выполняется при совпадении. $reqs — массив требований для аргументов маршрута, ключи — имена аргументов маршрута, значения — регулярные выражения. Пожалуйста, обратите внимание, что $controller и $action являются лишь соглашениями. Если вы планируете реализовать собственное распределение, вы можете сами определить их значение, то есть «контроллер» может быть файлом, «действие» — классом, а вы можете вручную извлекать «метод» из аргументов. После этого вы можете получить исходный маршрут_url с помощью RouteMap::url_for();
public function connect($route_name, $route_url, $controller = NULL, $action = NULL, array $reqs = NULL) { if (!empty($controller) || !empty($action)) { $this->_urls[$route_name] = $route_url; $parts = explode('/', $route_url); $this->_actions[$route_name] = array($controller, $action); $is_dynamic = False; foreach ($parts as $offset => $part) { if (!empty($part) && (($part[0] == ':') || ($part[0] == '*'))) { $is_dynamic = True; $this->_args[$route_name] = $part; } } if ($is_dynamic) { $this->_dynamic[$route_name] = $parts; if (!empty($reqs)) { $this->_reqs[$route_name] = $reqs; } } else { $this->_static[$route_name] = $parts; } } else { $this->_passive[$route_name] = $route_url; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function connect($name = null, $route = null, $defaults = null, $requirements = null) {\n\t\tif (is_null($name)) {\n\t\t\ttrigger_error('No route passed to connect', E_USER_WARNING);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// get the arguments from the function and pad the rest of the array so that the list call wo...
[ "0.6303007", "0.6153703", "0.6082236", "0.6080585", "0.6038033", "0.5861941", "0.584687", "0.5839736", "0.5768204", "0.57083035", "0.5690697", "0.5671842", "0.565586", "0.56380343", "0.557616", "0.5573284", "0.5553463", "0.5553147", "0.55414826", "0.5491619", "0.54898256", ...
0.7701583
0
Extract route arguments for some matching url As usual, arguments named "parts" are arrays of path components.
Извлекайте аргументы маршрута для некоторого совпадающего URL. Как и обычно, аргументы с именем "parts" являются массивами компонентов пути.
protected function extract_args(array $route_parts, array $url_parts) { $args = array(); $i = 0; foreach ($route_parts as $offset => $part) { if ($part[0] == ':') { $args[substr($part, 1)] = $url_parts[$offset]; } elseif ($part[0] == '*') { /* Wildcard arg can contain slashes, join all parts after '*' * Additionally, it must be last argument, return imediately. */ $args[substr($part, 1)] = implode('/', array_slice($url_parts, $i)); return $args; } $i++; } return $args; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PartsParseRoute($segments)\n{\n\t$args = array();\n\t$count = count($segments);\n\n\tif ($count === 1)\n\t{\n\t\t$idFromPN = PartsHelper::getIdFromPartNumber(str_replace(\"_\",\".\",$segments[0]));\n\n\t\tif ($idFromPN)\n\t\t{\n\t\t\t$args['id'] = $idFromPN;\n\t\t\t$args['view'] = 'form';\n\t\t}\n\t\telse...
[ "0.68216074", "0.6481472", "0.6436538", "0.63286567", "0.63265866", "0.63245463", "0.62633646", "0.62170964", "0.61276907", "0.6082948", "0.60581", "0.60421205", "0.60341203", "0.60291135", "0.6011075", "0.6005336", "0.599938", "0.5939866", "0.5929484", "0.590694", "0.5897196...
0.79876447
0
Get stored URL for a named route, optionally filling route arguments in the process. Missing route args are replaced with '?'.
Получить сохраненный URL для маршрута с именем, при этом, при необходимости, заполняя аргументы маршрута. Отсутствующие аргументы маршрута заменяются на '?'.
public function url_for($route_name, array $route_args = NULL) { if (array_key_exists($route_name, $this->_passive)) { return $this->_urls[$route_name]; } if (array_key_exists($route_name, $this->_static)) { return $this->base_url . $this->_urls[$route_name]; } if (!array_key_exists($route_name, $this->_dynamic)) { throw new ERouteMapNotFound(); } $url = ''; $this->_notmatch_args = false; foreach ($this->_dynamic[$route_name] as $part) { if ($part[0] == ':') { $arg_name = substr($part, 1); $arg = $route_args[$arg_name]; // Joostina, патч для пропуска параметров, равных 0 if (empty($arg) && !($arg === 0)) { $arg = '?'; } $url .= "/$arg"; } elseif ($part[0] == '*') { $arg_name = substr($part, 1); $arg = $route_args[$arg_name]; if (empty($arg)) { $arg = ''; } $url .= "/$arg"; break; } else { $url .= "/$part"; } } return $this->base_url . ltrim($url, '/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_url($route_name, $var = array()) {\n\n return get_route($route_name, $var);\n}", "public function generateUrl(string $routename, array $args = []):string {\n return RouterManager::getRouteByNameAndOptions($routename, $args);\n }", "public function getRoute($name, array $args = []);", ...
[ "0.6712139", "0.6490744", "0.64670175", "0.64647645", "0.6425001", "0.62450635", "0.61010176", "0.6084739", "0.6059304", "0.6003054", "0.5896945", "0.58241445", "0.5797249", "0.579009", "0.57830787", "0.5756417", "0.57387894", "0.5700481", "0.56807333", "0.5663713", "0.564838...
0.70597464
0
Add route on failed list, with code and optional message RouteMap::error() is hardcoded fail action. We don't check whether $route_name exists, but if you forget to connect $route_name to URL pattern, it can't be returned from RouteMap::match() as "fail" route.
Добавить маршрут в список неудачных, с кодом и необязательным сообщением. Метод RouteMap::error() является жёстко заданным действием неудачи. Мы не проверяем, существует ли $route_name, но если вы забудете привязать $route_name к шаблону URL, он не может быть возвращён из RouteMap::match() как маршрут "fail".
public function fail($route_name, $http_code = 404, $msg = NULL) { $this->_failed[$route_name] = array( 'http_code' => $http_code, 'msg' => $msg ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addFailure(string $key, string $ruleName, array $parameters = [], string $customMessage=null);", "public function fails()\n {\n $this->route->onHttpError(function($code, $router) {\n switch($code) {\n case 404:\n $router->response()->body(\n ...
[ "0.64231277", "0.63102406", "0.62489057", "0.609408", "0.6037779", "0.57346386", "0.56050074", "0.55201775", "0.5466357", "0.5458468", "0.54089445", "0.539834", "0.5372923", "0.53270066", "0.5292262", "0.52641016", "0.5140677", "0.51372796", "0.5119598", "0.51080585", "0.5101...
0.7171258
0
Get next task with uuid.
Получить следующее задание с uuid.
public function nextTask() { $instance = (new TaskInstance)->load($this->nextTask); if ( $instance->identity() ) { return $instance->workInstance($this); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_next_task()\n {\n }", "public function loadByNextTask($uuid) {\n $instance = $this->find(array(\n 'nextTask' => $uuid\n ));\n $instance = reset($instance);\n\n if ( $instance ) {\n $instance = $instance->data();\n }\n else {\n $instance = ar...
[ "0.7503667", "0.64715755", "0.6362394", "0.619643", "0.6041996", "0.6022066", "0.59764135", "0.59764135", "0.59384376", "0.59305316", "0.5910095", "0.59094805", "0.59094805", "0.5867846", "0.58081573", "0.57677656", "0.57677656", "0.5743002", "0.573836", "0.5723752", "0.57204...
0.7590362
0
Adds triple rdf:type and sets current subject.
Добавляет тройной rdf:type и устанавливает текущий субъект.
private function addRdfType($uri, $type) { $this->currentSubject = $uri; $this->currentDomain = $type; dispatcher($this)->onNewTriple($uri, 'rdf:type', $type); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRdfType(string $rdf_type): self;", "public function addSubjectType($subjectType = null): object\n\t{\n\t\tif (null !== $subjectType && !($subjectType instanceof FHIRCode)) {\n\t\t\t$subjectType = new FHIRCode($subjectType);\n\t\t}\n\t\t$this->_trackValueAdded();\n\t\t$this->subjectType[] = $su...
[ "0.60080564", "0.571434", "0.5495732", "0.5345581", "0.53209966", "0.5313455", "0.52891034", "0.5269981", "0.5259669", "0.52048516", "0.51969206", "0.5098943", "0.5073418", "0.50683945", "0.5041499", "0.5036116", "0.5026575", "0.5025377", "0.5022901", "0.50106585", "0.4997289...
0.7194378
0
Initialize from a PEMformatted string.
Инициализация из строки в формате PEM.
public static function fromString(string $str): self { if (preg_match(self::PEM_REGEX, $str, $match) !== 1) { throw new UnexpectedValueException('Not a PEM formatted string.'); } $payload = preg_replace('/\s+/', '', $match[2]); if (! is_string($payload)) { throw new UnexpectedValueException('Failed to decode PEM data.'); } $data = base64_decode($payload, true); if ($data === false) { throw new UnexpectedValueException('Failed to decode PEM data.'); } return self::create($match[1], $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function fromString($str) {\n\t\tif (!preg_match_all(PEM::PEM_REGEX, $str, $matches, PREG_SET_ORDER)) {\n\t\t\tthrow new \\UnexpectedValueException(\"No PEM blocks.\");\n\t\t}\n\t\t$pems = array_map(\n\t\t\tfunction ($match) {\n\t\t\t\t$payload = preg_replace('/\\s+/', \"\", $match[2]);\n\t\t\t\t$dat...
[ "0.7793375", "0.63176984", "0.55417025", "0.54020387", "0.5398977", "0.5398977", "0.52980715", "0.5272019", "0.5178936", "0.51758593", "0.51396173", "0.5106858", "0.5045017", "0.5023481", "0.50134635", "0.5003579", "0.4957309", "0.49495873", "0.4940331", "0.49361205", "0.4931...
0.73418415
1
Set Dokan Pro modules
Настройка модулей Dokan Pro
public function set_modules( $modules ) { $this->dokan_pro_modules = $modules; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setModuleInformation()\n {\n if (count(self::$_aModuleData['chains'])) {\n $oUtilsObject = oxRegistry::get(\"oxUtilsObject\");\n $oConfig = oxRegistry::getConfig();\n\n $oUtilsObject->setModuleVar(\"aModules\", self::$_aModuleData['chains']);\n ...
[ "0.70425534", "0.66352224", "0.64503354", "0.6153825", "0.59959453", "0.5974741", "0.5911636", "0.5886277", "0.5867421", "0.5837705", "0.5836287", "0.5828496", "0.5815861", "0.5809925", "0.5809925", "0.5806351", "0.5793181", "0.5760534", "0.5760284", "0.57124084", "0.5705766"...
0.70048165
1
Get a list of module ids
Получить список идентификаторов модулей
public function get_all_module_ids() { static $module_ids = []; if ( ! $module_ids ) { $modules = $this->get_all_modules(); $module_ids = array_keys( $modules ); } return $module_ids; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getModulesList();", "public function getModuleList ()\n {\n return $this->getBasicIdSelectList('cms_module_data');\n }", "public function getIds();", "function get_module_list()\n\t{\n\t\t$module_list = $this->object->get_registry()->get_module_list();\n\t\t$version_list =...
[ "0.74782944", "0.7225144", "0.7204538", "0.7127855", "0.7036466", "0.70250607", "0.6965723", "0.6948705", "0.6939196", "0.6780528", "0.6780443", "0.6779604", "0.6775647", "0.6738479", "0.6723079", "0.6711773", "0.6689814", "0.66549534", "0.660581", "0.65871865", "0.656908", ...
0.8191457
0
Run this function before response is sent back to the user.
Запустите эту функцию перед тем, как ответ будет отправлен пользователю.
public function beforeResponseHook() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function preResponse(Request_Abstract $request, Response_Abstract $response)\n {\n //Hook::run('preResponse', ['request' => $request, 'response' => $response]);\n }", "public function preResponse() {\n $response = Zibo::getInstance()->getResponse();\n $view = $response->getView(...
[ "0.70602554", "0.70393485", "0.69089586", "0.6734709", "0.66923875", "0.66712254", "0.6637939", "0.6618257", "0.66028714", "0.6550478", "0.651982", "0.647678", "0.63773125", "0.63741004", "0.6363305", "0.6358304", "0.6336454", "0.6336391", "0.63233155", "0.63138086", "0.62986...
0.7753942
0
Scan for all available themes.
Сканировать все доступные темы.
private function scanThemes() { $themeDirectories = glob($this->basePath.'/*', GLOB_ONLYDIR); $themes = collect(); if(count($themeDirectories)){ foreach ($themeDirectories as $key => $themePath) { $themeConfigPath = $themePath.'/'.config('theme.config.name'); $themeChangelogPath = $themePath.'/'.config('theme.config.changelog'); if (file_exists($themeConfigPath)) { $t = json_decode(file_get_contents($themeConfigPath), true); $themeConfig = $t; $themeConfig = $this->checkInDatabase($themeConfig, $key); $c = json_decode(file_get_contents($themeChangelogPath), true); $themeConfig['changelog'] = $c; $themeConfig['path'] = $themePath; if (array_has($themeConfig, 'theme')) { $themes[data_get($themeConfig, 'theme')] = collect($themeConfig); } } } } $this->themes = $themes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function scanThemes()\r\n {\r\n\r\n $parentThemes = [];\r\n\r\n foreach ($this->loadThemesJson() as $data) {\r\n\r\n // Create theme\r\n $theme = new Theme($data['name'], $data['views-path']);\r\n\r\n // Has a parent theme? Store parent name to resolve later...
[ "0.7333662", "0.7111265", "0.7018022", "0.6871127", "0.6765171", "0.6710169", "0.6672981", "0.6601873", "0.6546006", "0.65427756", "0.65370333", "0.6537011", "0.6534418", "0.6528142", "0.65129703", "0.6487545", "0.6483867", "0.6482808", "0.6479328", "0.6470493", "0.64367515",...
0.802279
0
Google Cloud Datastore options. Generated from protobuf field .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2;
Опции Google Cloud Datastore. Сгенерировано из поля protobuf .google.privacy.dlp.v2.DatastoreOptions datastore_options = 2;
public function setDatastoreOptions($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\DatastoreOptions::class); $this->writeOneof(2, $var); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDatastoreOptions()\n {\n return $this->readOneof(2);\n }", "public function get_datastore() {\n\t\treturn $this->datastore;\n\t}", "public function setDatastoreKey($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Dlp\\V2\\DatastoreKey::class);\n $this->w...
[ "0.6388152", "0.57789195", "0.5360333", "0.49396682", "0.48383543", "0.46203437", "0.46186042", "0.45934713", "0.45761642", "0.45623332", "0.45185953", "0.45060882", "0.44607207", "0.4457235", "0.44391337", "0.44370204", "0.44168168", "0.4374868", "0.43702453", "0.43610868", ...
0.7467378
0
Cloud Storage options. Generated from protobuf field .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3;
Варианты хранения в облаке. Сгенерировано из поля protobuf .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3;
public function getCloudStorageOptions() { return $this->readOneof(3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCloudStorageOptions($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Dlp\\V2\\CloudStorageOptions::class);\n $this->writeOneof(3, $var);\n\n return $this;\n }", "public function cloudStorage(): CloudStorageGroup\n {\n return $this->cloudStorage;\n ...
[ "0.79020107", "0.5916225", "0.5563271", "0.5438447", "0.51987946", "0.4866037", "0.48580816", "0.48479626", "0.48127156", "0.47852066", "0.47838098", "0.47625607", "0.47217277", "0.46999994", "0.46853283", "0.4656488", "0.46537864", "0.4628692", "0.4606524", "0.45981747", "0....
0.77593803
1
Cloud Storage options. Generated from protobuf field .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3;
Варианты облачного хранилища. Сгенерировано из поля protobuf .google.privacy.dlp.v2.CloudStorageOptions cloud_storage_options = 3;
public function setCloudStorageOptions($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\CloudStorageOptions::class); $this->writeOneof(3, $var); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCloudStorageOptions()\n {\n return $this->readOneof(3);\n }", "public function cloudStorage(): CloudStorageGroup\n {\n return $this->cloudStorage;\n }", "public function getStorageOptions()\n {\n return ['default' => ''];\n }", "public function getICl...
[ "0.77595913", "0.59161204", "0.5564386", "0.54382443", "0.5200146", "0.48654372", "0.48591226", "0.484901", "0.4813384", "0.4786068", "0.47822434", "0.47613698", "0.47200376", "0.4698864", "0.46858197", "0.4656514", "0.46525717", "0.46271747", "0.4604251", "0.45992127", "0.45...
0.79010427
0
BigQuery options. Generated from protobuf field .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4;
Опции BigQuery. Сгенерировано из поля protobuf .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4;
public function getBigQueryOptions() { return $this->readOneof(4); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setBigQueryOptions($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Dlp\\V2\\BigQueryOptions::class);\n $this->writeOneof(4, $var);\n\n return $this;\n }", "public function getLogBigqueryRequest($options)\n {\n // unbox the parameters from the associat...
[ "0.73184675", "0.5650787", "0.5607929", "0.5426547", "0.5387262", "0.5370819", "0.52878636", "0.5269378", "0.5224575", "0.5192821", "0.50874317", "0.48790708", "0.4834502", "0.48020288", "0.47965786", "0.47302815", "0.47208387", "0.46613374", "0.46534303", "0.46467394", "0.46...
0.7475813
0
BigQuery options. Generated from protobuf field .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4;
Опции BigQuery. Сгенерировано из поля protobuf .google.privacy.dlp.v2.BigQueryOptions big_query_options = 4;
public function setBigQueryOptions($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\BigQueryOptions::class); $this->writeOneof(4, $var); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBigQueryOptions()\n {\n return $this->readOneof(4);\n }", "public function getLogBigqueryRequest($options)\n {\n // unbox the parameters from the associative array\n $service_id = array_key_exists('service_id', $options) ? $options['service_id'] : null;\n $...
[ "0.7476538", "0.56513965", "0.56073046", "0.54271585", "0.538816", "0.53715706", "0.52883935", "0.5270368", "0.5224189", "0.5193231", "0.5088115", "0.48788583", "0.48341143", "0.4802593", "0.4796621", "0.47295812", "0.47208503", "0.4660834", "0.46554995", "0.4647665", "0.4637...
0.7318618
1
Generated from protobuf field .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6;
Сгенерировано из поля protobuf .google.privacy.dlp.v2.StorageConfig.TimespanConfig timespan_config = 6;
public function setTimespanConfig($var) { GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\StorageConfig\TimespanConfig::class); $this->timespan_config = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTimespanConfig()\n {\n return $this->timespan_config;\n }", "public function getTimeSpan() {\n return $this->_timespan;\n }", "public function timespan($timespan)\n {\n $this->timespan = $timespan;\n\n return $this;\n }", "public function setTimeSpan($timesp...
[ "0.67752266", "0.532919", "0.51694775", "0.49808356", "0.45926148", "0.44685107", "0.42252463", "0.414794", "0.41353714", "0.41296947", "0.41203782", "0.41025776", "0.41007775", "0.40797147", "0.4070499", "0.40597403", "0.4044393", "0.40287954", "0.40152743", "0.40105477", "0...
0.82536036
0
function to load profile page view
функция для загрузки страницы просмотра профиля
public function profilepageDisplay() { $this->load->view('profilepage'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function profile()\r\n{\r\n $userManager = new \\Devnetwork\\Blog\\Model\\UserManager();\r\n $profile = $userManager->getProfile($_GET['id']);\r\n\r\n require('views/profile.view.php');\r\n}", "public function userProfile(){\n $this->view('includes/userProfileView');\n \n $this->view->ren...
[ "0.78586364", "0.7833946", "0.7832243", "0.7736897", "0.7522542", "0.74765193", "0.74197644", "0.7404837", "0.7389576", "0.73841554", "0.73818344", "0.7339096", "0.7323387", "0.7306935", "0.7302967", "0.72962916", "0.7285613", "0.72844166", "0.72826695", "0.7270256", "0.72620...
0.8068742
0
Tests Christmas Day. Christmas Day is celebrated on December 25th.
Тесты Рождества. Рождество празднуется 25 декабря.
public function testChristmasDay() { $year = 2001; $this->assertHoliday(self::COUNTRY, self::HOLIDAY, $year, new DateTime("$year-12-25", new DateTimeZone(self::TIMEZONE))); // Substituted Holiday on Monday (Christmas Day falls on Sunday) $year = 6101; $this->assertHoliday(self::COUNTRY, 'substituteHoliday:christmasDay', $year, new DateTime("$year-12-26", new DateTimeZone(self::TIMEZONE))); // Substituted Holiday on Friday (Christmas Day falls on Saturday) $year = 2060; $this->assertHoliday(self::COUNTRY, 'substituteHoliday:christmasDay', $year, new DateTime("$year-12-24", new DateTimeZone(self::TIMEZONE))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCatholicChristmasDayNoSubstitution(): void\n {\n // 2022-12-25 (Sunday) catholicChristmasDay (Католицький день Різдва)\n $year = 2022;\n $holiday = 'catholicChristmasDay';\n\n $this->assertHolidayWithSubstitution(\n self::REGION,\n $holiday,\...
[ "0.71820873", "0.6642868", "0.66426164", "0.6437238", "0.6336279", "0.6306556", "0.62987995", "0.622589", "0.61272717", "0.6113932", "0.6097697", "0.6091028", "0.6044789", "0.60136324", "0.5994741", "0.59688467", "0.59513396", "0.5950715", "0.5933998", "0.59275293", "0.591247...
0.8069831
0
Number of recently viewed products.
Количество недавно просмотренных продуктов.
public function getProductsCount() { return Mage::getModel('reports/product_index_viewed')->getCount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ol_get_view_product_in_page() {\n\t$count = 9;\n\n\tif ( isset( $_SESSION['mstore_view_count'] ) ) {\n\t\t$count = $_SESSION['mstore_view_count'];\n\t}\n\n\treturn $count;\n}", "public static function getNumberOfProductsToShow()\n\t{\n\t\treturn GetConfig('CustomersAlsoViewedCount');\n\t}", "public fu...
[ "0.7324022", "0.70454353", "0.69377655", "0.6916593", "0.68669564", "0.6801746", "0.68006825", "0.6791141", "0.67685705", "0.6733471", "0.67316055", "0.66995114", "0.6661045", "0.6648184", "0.6625983", "0.653815", "0.6533019", "0.65325963", "0.649566", "0.64927435", "0.648964...
0.7574886
0
Just return the price from Vircurex
Просто верните цену с Vircurex
function fetch_vircurex_market_price() { $btc_usd_json = file_get_contents('https://vircurex.com/api/get_highest_bid.json?base=BTC&alt=USD'); $btc_usd = json_decode($btc_usd_json)->value; $ppc_btc_json = file_get_contents('https://vircurex.com/api/get_highest_bid.json?base=PPC&alt=BTC'); $ppc_btc = json_decode($ppc_btc_json)->value; $ppc_usd = $btc_usd * $ppc_btc; return round($ppc_usd, 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function price();", "public function getPrice();", "public function getPrice();", "public function getPrice();", "public function getPrice()\n {\n return $this->source['real_price'];\n }", "public function getPrice(): float;", "function getPrice()\n {\n }", "function getPrice();", ...
[ "0.75957084", "0.75499266", "0.75499266", "0.75499266", "0.75205374", "0.75091237", "0.7444096", "0.7432898", "0.74104315", "0.73677826", "0.7315596", "0.7303932", "0.7289355", "0.7283499", "0.7283499", "0.72720027", "0.72443", "0.7239893", "0.723703", "0.7228164", "0.7228164...
0.7695007
0
ASS_AnswerMultipleResponse constructor The constructor takes possible arguments an creates an instance of the ASS_AnswerMultipleResponse object.
Конструктор ASS_AnswerMultipleResponse Конструктор принимает возможные аргументы и создает экземпляр объекта ASS_AnswerMultipleResponse.
function ASS_AnswerMultipleResponse ( $answertext = "", $points_checked = 0.0, $order = 0, $points_unchecked = 0, $id = -1 ) { parent::__construct($answertext, $points_checked, $order, $id); $this->setPointsUnchecked($points_unchecked); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(array $responses)\n {\n $this->responses = $responses;\n }", "public function __construct(array $answers)\n {\n $this->answers = $answers;\n }", "public function test_answer_create_multiple_answers_fail()\n {\n $url = $this->makeUrl('/v1/patient/{...
[ "0.6321621", "0.62321097", "0.6190948", "0.6016193", "0.59611017", "0.59611017", "0.59611017", "0.59611017", "0.5927813", "0.5927813", "0.58470285", "0.58163124", "0.5772025", "0.57122695", "0.567624", "0.56586796", "0.56245697", "0.5620801", "0.552", "0.552", "0.54942995", ...
0.76370597
0
Returns the points for an unchecked answer Returns the points for an unchecked answer
Возвращает баллы за неотмеченный ответ Возвращает баллы за неотмеченный ответ
function getPointsUnchecked() { return $this->points_unchecked; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPoints($uid, $answer){\n\t\t$questionArr = $this->pi_getRecord('tx_simplesurvey_questions', $uid);\n\t\t$question = $questionArr['question'];\n\t\tif(is_numeric($this->pointsArr[$question][$answer])){\n\t\t\treturn $this->pointsArr[$question][$answer];\n\t\t}\n\t\treturn 0;\n\t}", "public function ge...
[ "0.67989606", "0.675196", "0.64741814", "0.6262672", "0.623118", "0.6129152", "0.59125245", "0.586185", "0.57857525", "0.5673057", "0.5663674", "0.56516695", "0.56075126", "0.5602754", "0.55368376", "0.55222213", "0.5520973", "0.54761595", "0.5476055", "0.5464493", "0.5404441...
0.7593968
0
Sets the points for an unchecked answer Sets the points for an unchecked answer
Устанавливает баллы за неотмеченный ответ Устанавливает баллы за неотмеченный ответ
function setPointsUnchecked($points_unchecked = 0.0) { $new_points = str_replace(",", ".", $points_unchecked); if ($this->checkPoints($new_points)) { $this->points_unchecked = $new_points; } else { $this->points_unchecked = 0.0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPointsUnchecked() \n {\n\treturn $this->points_unchecked;\n }", "function ASS_AnswerMultipleResponse (\n $answertext = \"\",\n $points_checked = 0.0,\n $order = 0,\n $points_unchecked = 0,\n\t\t$id = -1\n )\n {\n\tparent::__construct($answertext, $points_checked, $order, $id);\n $t...
[ "0.6577104", "0.61041385", "0.5945441", "0.5846633", "0.5768078", "0.57557654", "0.5613724", "0.5507338", "0.54090977", "0.53900886", "0.535961", "0.5353366", "0.53529453", "0.52576786", "0.52436525", "0.5206185", "0.51768345", "0.51460177", "0.51365936", "0.50774497", "0.506...
0.78963137
0
List Your Topics To list up to 100 existing topics in the current AWS Region, use the ListTopics operation.
Список ваших тем. Чтобы перечислить до 100 существующих тем в текущей области AWS, используйте операцию ListTopics.
public function listYourTopics() { try { $result = $this->_snsClient->listTopics([ ]); } catch (AwsException $e) { Yii::$app->session->setFlash('error', $e->getMessage()); } /** @var Result $result */ return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function index() {\r\n $this->__requireLogin();\r\n $this->set('TopicsList', $this->Topic->findAll());\r\n }", "public function getAllTopics() {\r\n $sql = 'SELECT * FROM topics';\r\n\r\n $this->_lastResult = $this->_db->Execute($sql);\r\n\r\n $result = $this->_getItemsFromResult();\r\n...
[ "0.69756967", "0.69383943", "0.6894819", "0.676596", "0.67069536", "0.65704226", "0.65629274", "0.6556827", "0.6555426", "0.65301836", "0.64781713", "0.6429025", "0.6418522", "0.6389273", "0.63656515", "0.6357434", "0.63260627", "0.62914747", "0.62914747", "0.6258099", "0.624...
0.74078006
0
Confirm Subscription to a Topic To actually create a subscription, the endpoint owner must acknowledge intent to receive messages from the topic using a token sent when a subscription is established initially, as described earlier. Confirmation tokens are valid for three days. After three days, you can resend a token by creating a new subscription.
Подтверждение подписки на тему Для фактического создания подписки владелец конечной точки должен подтвердить намерение получать сообщения с темы с помощью токена, отправленного при первоначальном создании подписки, как описано ранее. Токены подтверждения действительны в течение трех дней. После трех дней вы можете повторно отправить токен, создав новую подписку.
public function confirmSubscriptionToTopic($subscription_token, $topic) { try { $result = $this->_snsClient->subscribe([ 'Token' => $subscription_token, 'TopicArn' => $topic, ]); Yii::$app->session->setFlash('success', Yii::t('aws', 'Email {0} subscribed to Topic correctly', $endpoint)); } catch (AwsException $e) { Yii::$app->session->setFlash('error', $e->getMessage()); } /** @var Result $result */ return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function confirmSubscription($token, $threadId)\n {\n try {\n $result = $client->confirmSubscription([\n //'AuthenticateOnUnsubscribe' => false, // use if required\n 'Token' => $token, // REQUIRED\n 'TopicArn' => $threadId, // REQUIRED\n ...
[ "0.6471213", "0.60400736", "0.57795155", "0.5740434", "0.57285506", "0.5660994", "0.55950415", "0.55642927", "0.5526778", "0.5519472", "0.54723513", "0.5471139", "0.54627734", "0.54183924", "0.5338782", "0.53330266", "0.52944374", "0.52866197", "0.526626", "0.5242458", "0.523...
0.70670867
0
Filter blockquote in the content to pull them out of the main div so they bleed full width
Фильтруйте блок цитаты в содержимом, чтобы вытащить их из основного div, чтобы они занимали полную ширину
function filter_blockquote($content){ if(!is_admin()): $search = '/<blockquote>(.*?)<\/blockquote>/'; //This is for large size image $replace = '</div><blockquote class="margin_auto">$1</blockquote><div class="col-md-10 col-lg-9 margin_auto no_padding">'; return preg_replace($search, $replace, $content); endif;//is_admin }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sukelius_quote_content( $content ) {\r\n \r\n\tif ( has_post_format( 'quote' ) ) {\r\n\r\n\t\tpreg_match( '/<blockquote.*?>/', $content, $matches );\r\n\r\n\t\tif ( empty( $matches ) )\r\n\t\t\t$content = \"<blockquote>{$content}</blockquote>\";\r\n\t}\r\n\r\n\treturn $content;\r\n}", "function q...
[ "0.6403456", "0.63257146", "0.6132489", "0.5885785", "0.58706224", "0.569114", "0.5659607", "0.56505084", "0.56147325", "0.5605923", "0.5596436", "0.5587536", "0.55660987", "0.55486023", "0.55339473", "0.5445662", "0.540224", "0.5392981", "0.5384233", "0.5304519", "0.5280439"...
0.7844884
0
Remove the taxonomies from the side column of the Counseollors edit screen
Удалите таксономии из боковой колонки экрана редактирования Counseollors
function remove_taxonomies_metaboxes() { remove_meta_box( 'tagsdiv-technique', 'counsellor', 'side' ); remove_meta_box( 'tagsdiv-specialty', 'counsellor', 'side' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_custom_taxonomy_meta_boxes() {\n\t//remove_meta_box( 'customerdiv', 'todo', 'side' );\n\t//remove_meta_box( 'customerdiv', 'time_entry', 'side' );\n\tremove_meta_box( 'tagsdiv-todo_status', 'todo', 'side' );\t\n}", "public function unregister_taxonomies()\n {\n }", "public function remove...
[ "0.6834278", "0.6714117", "0.6417243", "0.6411122", "0.64032394", "0.6386868", "0.63651645", "0.6350936", "0.62912405", "0.62703615", "0.62413573", "0.61200094", "0.6109039", "0.6087702", "0.60693514", "0.6055652", "0.6043106", "0.60326624", "0.6023749", "0.59975815", "0.5996...
0.74057174
0
Reads all the xml data inside the storage, returning a SimpleXMLElement of it.
Читает все xml-данные внутри хранилища, возвращая SimpleXMLElement из них.
public function readXML() { $this->create(); $this->checkStorageFile(); return new \SimpleXMLElement($this->storage_file->getContent()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readXml();", "public function readXML ( ) {\n\n return $this->asXML();\n }", "function xml_get_contents()\n\t{\n\t\treturn $this->xml->xml_document;\n\t}", "public function getXml() {\n $xml = @simplexml_load_file($this->xmlfile);\n if ($xml instanceof SimpleXMLElement...
[ "0.6965647", "0.66268176", "0.6563239", "0.6316712", "0.61025333", "0.6084316", "0.6058804", "0.60561997", "0.60392904", "0.59356695", "0.59352607", "0.592928", "0.5870589", "0.581093", "0.5794129", "0.57857263", "0.5770951", "0.5767387", "0.57643735", "0.5741508", "0.5733000...
0.86036426
0
Writes the xml data inside the storage.
Записывает данные xml внутри хранилища.
public function saveXML($xml_data) { $this->create(); $this->checkStorageFile(); $this->storage_file->setContent($xml_data->asXML()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveXML(){\n return $this->data->saveXML();\n }", "protected function write_xml_data( $data ) {\n\t\t\n\t\t$xmlString = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\t\t \t\t\t<shopistasstore>\n\t\t \t\t\t\t<created_at>'.$this->get_current_date_time().'</created_at>\n\t\t ...
[ "0.67692477", "0.66138256", "0.643167", "0.6301586", "0.62312424", "0.61886024", "0.6153465", "0.6111326", "0.6098679", "0.60911393", "0.60679835", "0.60158044", "0.59770185", "0.5973678", "0.5947536", "0.59273213", "0.5912003", "0.591092", "0.5898815", "0.5897483", "0.589748...
0.71718216
0
Tests if class implements response interface
Проверяет, реализует ли класс интерфейс ответа
public function testIsResponseClass() { $cut = new AddressArchive(); $this->assertInstanceOf('\Sake\BlockchainWalletApi\Response\ResponseInterface', $cut); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function supports(ResponseInterface $response): bool;", "public function testIsResponseClass()\n {\n $cut = new Send();\n $this->assertInstanceOf('\\Sake\\BlockchainWalletApi\\Response\\ResponseInterface', $cut);\n }", "abstract protected function validateResponse(ResponseInterface $...
[ "0.7733763", "0.7347388", "0.7159205", "0.6877336", "0.68110955", "0.67735136", "0.6728963", "0.6700255", "0.66964", "0.66922444", "0.6688821", "0.6608911", "0.6565527", "0.655207", "0.647472", "0.647472", "0.64122117", "0.6406962", "0.6346552", "0.63029027", "0.6283563", "...
0.7372347
1
Modifies the import object to force all uids, if required database tables are empty
Модифицирует объект импорта для принудительного назначения всех uids, если требуемые таблицы базы данных пусты
public function modifyImporter(\TYPO3\CMS\Impexp\ImportExport $import) { if ($this->isEmptyDatabase()) { $import->force_all_UIDS = TRUE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function importDatabaseData() {}", "public function import()\n {\n try {\n //Yii::$app->getDb()->createCommand('SET foreign_key_checks = 0;')->execute();\n\n $this->dropIndexes();\n\n $this->importAddressObjectLevel();\n\n $this->importAddressObject...
[ "0.6668247", "0.6643398", "0.64047545", "0.6363794", "0.62915045", "0.6280147", "0.60940033", "0.60360134", "0.60113", "0.59770167", "0.5876959", "0.5817976", "0.5811435", "0.5760301", "0.5720301", "0.57119584", "0.5706788", "0.5660137", "0.5647777", "0.56107265", "0.5600982"...
0.7499048
0
Checks if all tables with the exception of matching ignoreTablePatterns are empty
Проверяет, пусты ли все таблицы, кроме тех, которые соответствуют ignoreTablePatterns
protected function isEmptyDatabase() { $isEmpty = FALSE; $tables = $GLOBALS['TYPO3_DB']->admin_get_tables(); foreach(array_keys($tables) as $tableName) { foreach($this->ignoreTablePatterns as $ignoreTablePattern) { if (preg_match($ignoreTablePattern, $tableName)) { continue 2; } } $res = $GLOBALS['TYPO3_DB']->sql_query('SELECT COUNT(*) as records FROM ' . $tableName . ' WHERE 1=1'); if ($res !== FALSE) { // reset for next table $isEmpty = FALSE; $countRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); $GLOBALS['TYPO3_DB']->sql_free_result($res); if ($countRow['records'] > 0) { // records found, break and return break; } // okay, no records $isEmpty = TRUE; } } return $isEmpty; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function find_missing_tables() {\n\n\t\t$db_tables = get_option( $this->option_key, array() );\n\n\t\t$missing_tables = array();\n\t\tforeach ( $this->get_tables_list() as $table ) {\n\t\t\tif ( ! in_array( $table, $db_tables, true ) ) {\n\t\t\t\t$missing_tables[] = $table;\n\t\t\t}\n\t\t}\n\n\t\treturn ...
[ "0.6655167", "0.65603185", "0.6517098", "0.64914227", "0.64232844", "0.63855535", "0.6342366", "0.6325095", "0.6230529", "0.6186313", "0.61450857", "0.6110961", "0.61066777", "0.609064", "0.6076432", "0.60753334", "0.6070447", "0.6063229", "0.6027641", "0.5986486", "0.5955243...
0.7286462
0
Display a dropdown which contains all the available itemtypes
Показать выпадающий список, содержащий все доступные типы элементов
function showItemtype($ID, $value = 0) { global $CFG_GLPI; //Criteria already added : only display the selected itemtype if ($ID > 0) { if ($item = getItemForItemtype($this->fields['itemtype'])) { echo $item->getTypeName(); } echo "<input type='hidden' name='itemtype' value='".$this->fields['itemtype']."'>"; } else { $options = []; //Add criteria : display dropdown foreach ($CFG_GLPI['unicity_types'] as $itemtype) { if ($item = getItemForItemtype($itemtype)) { if ($item->canCreate()) { $options[$itemtype] = $item->getTypeName(1); } } } asort($options); $rand = Dropdown::showFromArray('itemtype', $options, ['display_emptychoice' => true]); $params = ['itemtype' => '__VALUE__', 'id' => $ID]; Ajax::updateItemOnSelectEvent("dropdown_itemtype$rand", "span_fields", $CFG_GLPI["root_doc"]."/ajax/dropdownUnicityFields.php", $params); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function available_item_types()\n {\n }", "public function get_submenu_types() {\n\t\t\t\t$type = $this->input->post('types');\n\t\t\t\t$HTML = \"\";\n\t\t\t\t$data = $this->Menus_model->populate_submenu($type);\n\t\t\t\tif (!empty ($data)) {\n\t\t\t\t\t\tforeach ($data as $d2) {\n\t\t\t\t\t\t\t\t$H...
[ "0.74383956", "0.70197254", "0.7015355", "0.69585145", "0.68391436", "0.67324996", "0.6718472", "0.67065054", "0.66138935", "0.6611503", "0.661012", "0.661012", "0.66100913", "0.6561963", "0.65443134", "0.65053916", "0.65020776", "0.6482616", "0.6431539", "0.6426719", "0.6423...
0.74125284
1
Dropdown fields for a specific itemtype
Поле выпадающего списка для конкретного типа элемента
static function dropdownFields($itemtype, $options = []) { global $DB; $p = [ 'name' => 'fields', 'display' => true, 'values' => [], ]; if (is_array($options) && count($options)) { foreach ($options as $key => $val) { $p[$key] = $val; } } //Search option for this type if ($target = getItemForItemtype($itemtype)) { //Do not check unicity on fields in DB with theses types $blacklisted_types = ['longtext', 'text']; //Construct list $values = []; foreach ($DB->listFields(getTableForItemType($itemtype)) as $field) { $searchOption = $target->getSearchOptionByField('field', $field['Field']); if (!empty($searchOption) && !in_array($field['Type'], $blacklisted_types) && !in_array($field['Field'], $target->getUnallowedFieldsForUnicity())) { $values[$field['Field']] = $searchOption['name']; } } $p['multiple'] = 1; $p['size'] = 15; return Dropdown::showFromArray($p['name'], $values, $p); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sgfc_populate_business_select_field( $form ) {\n\n foreach ( $form['fields'] as &$field ) {\n\n // if ( $field->type != 'select' ) {\n // continue;\n // }\n\n if(strpos( $field->cssClass, 'sgfc_populate_businesses_and_organizations' ) !== false){\n\n\n \t$choices ...
[ "0.67493206", "0.6453102", "0.6417357", "0.6328662", "0.6295156", "0.62876356", "0.62864697", "0.62864697", "0.62630427", "0.62630427", "0.61940587", "0.6192822", "0.6192822", "0.6164546", "0.61638534", "0.6076381", "0.6044991", "0.6020222", "0.6011804", "0.6006821", "0.59970...
0.7029088
0
check_template() Checks if current theme has the template file for this post type
check_template() Проверяет, имеет ли текущая тема файл шаблона для этого типа поста
function check_template() { $template_name = 'single-event.php'; $source_template_file = dirname( __FILE__ ) .'/templates/' . $template_name; $theme_folder = get_stylesheet_directory(); if( !file_exists( $theme_folder . '/' . $template_name ) ) copy( $source_template_file, $theme_folder . '/' . $template_name ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function check_template()\n {\n return is_readable($this->template);\n }", "abstract public function hasTemplate();", "public function hasTemplate() {}", "abstract protected function _checkTemplateFileExists();", "public function hasTemplate()\n {\n return true;\n }", "p...
[ "0.73353064", "0.7048427", "0.70212424", "0.6996986", "0.69654334", "0.69654334", "0.6954166", "0.6919956", "0.6894106", "0.6869107", "0.68366283", "0.68183005", "0.6812572", "0.68017733", "0.6739337", "0.671544", "0.67147833", "0.671254", "0.6705582", "0.6699921", "0.6665422...
0.76511866
0
template_render( $name, $vars = null, $echo = true ) Helper to load and render templates easily
template_render( $name, $vars = null, $echo = true ) Помощник для удобной загрузки и отображения шаблонов
function template_render( $_name, $vars = null, $echo = true ) { ob_start(); if( !empty( $vars ) ) extract( $vars ); if( !isset( $path ) ) $path = dirname( __FILE__ ) . '/templates/'; include $path . $_name . '.php'; $data = ob_get_clean(); if( $echo ) echo $data; else return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function template_render( $name, $vars = null, $echo = true ) {\n ob_start();\n if( !empty( $vars ) )\n extract( $vars );\n \n if( !isset( $path ) )\n $path = dirname( __FILE__ ) . '/templates/';\n \n include $path . $name . '.php';\n \n $data = ob_get_clean();\n \n if( ...
[ "0.903137", "0.89781886", "0.8153546", "0.7994749", "0.77018636", "0.7636018", "0.7569655", "0.7568663", "0.7552572", "0.74434805", "0.7411388", "0.73971456", "0.7323279", "0.7254032", "0.72282445", "0.7215746", "0.72142786", "0.7206753", "0.7193166", "0.71685255", "0.7149911...
0.8992515
1
Construct HTML tag with supplied attributes. $html = getTag('img/', ['src'=>'foo.gif','border'=>0]); // "" The following rules are respected: 1. all array key=>val elements appear as attributes with value escaped. getTag('div/', ['data'=>'he"llo']); > 2. boolean value true will add attribute without value getTag('td', ['nowrap'=>true]); > 3. null and false value will ignore the attribute getTag('img', ['src'=>false]); > 4. passing key 0=>"val" will redefine the element itself getTag('img', ['input', 'type'=>'picture']); > 5. use '/' at end of tag to close it. getTag('img/', ['src'=>'foo.gif']); > 6. if main tag is selfclosing, overriding it keeps it selfclosing getTag('img/', ['input', 'type'=>'picture']); > 7. simple way to close tag. Any attributes to closing tags are ignored getTag('/td'); > 7b. except for 0=>'newtag' getTag('/td', ['th', 'align'=>'left']); > 8. using $value will add value inside tag. It will also encode value. getTag('a', ['href'=>'foo.html'] ,'click here >>'); > click here &gt;&gt; 9. you may skip attribute argument. getTag('b','text in bold'); > text in bold 10. pass array as 3rd parameter to nest tags. Each element can be either string (inserted asis) or array (passed to getTag recursively) getTag('a', ['href'=>'foo.html'], [['b','click here'], ' for fun']); > click here for fun 11. extended example: getTag('a', ['href'=>'hello'], ['b', 'class'=>'red', ['i', 'class'=>'blue', 'welcome']]); > welcome'
Создать HTML-тег с указанными атрибутами. $html = getTag('img/', ['src'=>'foo.gif','border'=>0]); // "" Следующие правила соблюдаются: 1. Все элементы массива ключ=>значение появляются как атрибуты с экранированным значением. getTag('div/', ['data'=>'he"llo']); > 2. Логическое значение true добавляет атрибут без значения getTag('td', ['nowrap'=>true]); > 3. Значения null и false игнорируются. getTag('img', ['src'=>false]); > 4. Передача ключа 0=>"val" переопределяет сам элемент. getTag('img', ['input', 'type'=>'picture']); > 5. Использование "/" в конце тега для его закрытия. getTag('img/', ['src'=>'foo.gif']); > 6. Если основной тег самозакрывающийся, его переопределение сохраняет его самозакрывающимся. getTag('img/', ['input', 'type'=>'picture']); > 7. Простой способ закрытия тега. Все атрибуты закрывающих тегов игнорируются. getTag('/td'); > 7b. Исключение: 0=>'newtag' getTag('/td', ['th', 'align'=>'left']); > 8. Использование $value добавляет значение внутри тега. Оно также кодируется. getTag('a', ['href'=>'foo.html'] ,'click here >>'); > click here &gt;&gt; 9. Вы можете пропустить аргумент атрибута. getTag('b','text in bold'); > text in bold 10. Передача массива как третьего параметра для вложения тегов. Каждый элемент может быть либо строкой (вставляется как есть), либо массивом (передается в getTag рекурсивно). getTag('a', ['href'=>'foo.html'], [['b','click here'], ' for fun']); > click here for fun 11. Расширенный пример: getTag('a', ['href'=>'hello'], ['b', 'class'=>'red', ['i', 'class'=>'blue', 'welcome']]); > welcome
public function getTag($tag = null, $attr = null, $value = null) { if ($tag === null) { $tag = 'div'; } elseif (is_array($tag)) { $tmp = $tag; if (isset($tmp[0])) { $tag = $tmp[0]; if (is_array($tag)) { // OH a bunch of tags $output = ''; foreach ($tmp as $subtag) { //var_dump($subtag); $output .= $this->getTag($subtag); } return $output; } unset($tmp[0]); } else { $tag = 'div'; } if (isset($tmp[1])) { $value = $tmp[1]; unset($tmp[1]); } else { $value = null; } $attr = $tmp; } if ($tag[0] === '<') { return $tag; } if (is_string($attr)) { $value = $attr; $attr = null; } if (is_string($value)) { $value = $this->encodeHTML($value); } elseif (is_array($value)) { $result = []; foreach ($value as $v) { if (is_array($v)) { $result[] = $this->getTag(...$v); } else { $result[] = $v; } } $value = implode('', $result); } if (!$attr) { return "<$tag>".($value !== null ? $value."</$tag>" : ''); } $tmp = []; if (substr($tag, -1) == '/') { $tag = substr($tag, 0, -1); $postfix = '/'; } elseif (substr($tag, 0, 1) == '/') { if (isset($attr[0])) { return '</'.$attr[0].'>'; } return '<'.$tag.'>'; } else { $postfix = ''; } foreach ($attr as $key => $val) { if ($val === false) { continue; } if ($val === true) { $tmp[] = "$key"; } elseif ($key === 0) { $tag = $val; } else { $tmp[] = "$key=\"".$this->encodeAttribute($val).'"'; } } return "<$tag".($tmp ? (' '.implode(' ', $tmp)) : '').$postfix.'>'.($value !== null ? $value."</$tag>" : ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tag($tag='html', $attributes=array(), $content='', $closing=true ) \n\t{\n\t\t// specify a general html tag template\n\t\t$tmpl = '<%1$s %2$s />';\n\t\tif( $closing )\n\t\t{\n\t\t\t$tmpl = '<%1$s %2$s>%3$s</%1$s>';\n\t\t}\n\t\t\n\t\t$strAttr = \"\";\n\t\tforeach( $attributes as $name=>$val )\n\t\t{\n\t\t\...
[ "0.6876828", "0.6673344", "0.66224664", "0.6519716", "0.6409333", "0.63954806", "0.6321194", "0.62756747", "0.6252685", "0.6229164", "0.62172955", "0.6205758", "0.6202916", "0.6174651", "0.6134485", "0.61113936", "0.61022896", "0.6092089", "0.6068816", "0.6023037", "0.6004083...
0.7107539
0
Get list of SQL update files for this database
Получить список файлов SQL-обновлений для этой базы данных
private function getUpdateFiles() { // Get the folder from the database name $sqlFolder = $this->db->name; if ($sqlFolder == 'mysqli') { $sqlFolder = 'mysql'; } elseif ($sqlFolder == 'sqlsrv') { $sqlFolder = 'sqlazure'; } // Default folder to core com_admin if (!$this->folder) { $this->folder = JPATH_ADMINISTRATOR . '/components/com_admin/sql/updates/'; } return JFolder::files( $this->folder . '/' . $sqlFolder, '\.sql$', 1, true, array('.svn', 'CVS', '.DS_Store', '__MACOSX'), array('^\..*', '.*~'), true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllUpdateFiles()\n {\n $completeDataModels = $this->getAllMigrationDataModels();\n $converter = $this->getDataModelConverter();\n\n return $converter->convertDataModelsToLegacySystem($completeDataModels);\n }", "public function get_update_files() {\n\t\tif ( ! $this-...
[ "0.6958649", "0.6663381", "0.65511453", "0.64897716", "0.6421891", "0.62343365", "0.619887", "0.61899227", "0.6186033", "0.61788267", "0.6177303", "0.61146075", "0.60754323", "0.60540843", "0.6048405", "0.60259414", "0.6013493", "0.5998015", "0.5989344", "0.59629434", "0.5947...
0.7816198
0
Trim comment and blank lines out of a query string
Удалить комментарии и пустые строки из строки запроса
private function trimQuery($query) { $query = trim($query); while (substr($query, 0, 1) == '#' || substr($query, 0, 2) == '--' || substr($query, 0, 2) == '/*') { $endChars = (substr($query, 0, 1) == '#' || substr($query, 0, 2) == '--') ? "\n" : "*/"; if ($position = strpos($query, $endChars)) { $query = trim(substr($query, $position + strlen($endChars))); } else { // If no newline, the rest of the file is a comment, so return an empty string. return ''; } } return trim($query); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stripComments(&$sql) {\n\t\t$sql = trim(String::regexp_replace(sprintf('/^\\s*%s(.*)$/m', $this->commentDelim), '', $sql));\n\t}", "static function trimQuery($q)\n {\n $q1 = preg_replace(\"/[^&]+=(?:&|$)/\", \"\", $q);\n return $q1 ;\n }", "private function removeComments($sql) {\n retu...
[ "0.70200926", "0.68964016", "0.66748065", "0.65683395", "0.63715297", "0.62721455", "0.61944187", "0.6191793", "0.61695856", "0.6133701", "0.6133485", "0.6130966", "0.61242515", "0.61135256", "0.61023355", "0.6032148", "0.60297596", "0.6020195", "0.6014577", "0.6010846", "0.5...
0.8157736
0
Check if given field contains relation name
Проверить, содержит ли заданное поле имя отношения
protected function isRelation($field) { return strpos($field, ':') !== false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_fk_field($resName, $field) {\n return array_key_exists(\"foreignKey\",$this->dataModel[$resName][\"fields\"][$field]);\n }", "public abstract function hasField($name);", "public function hasAssociation($fieldName)\n {\n\n }", "function validate_relationship_field($field)\n {\n ...
[ "0.70700324", "0.67480344", "0.66880006", "0.66687614", "0.6614622", "0.6602407", "0.65821147", "0.6512335", "0.64177823", "0.63414514", "0.6295283", "0.6253398", "0.6163664", "0.61420727", "0.60646313", "0.60403967", "0.59791", "0.59564424", "0.5946286", "0.59130436", "0.590...
0.7367243
0
Splits given field name containing relation name into relation name and field name
Разделяет заданные имя поля, содержащее имя отношения, на имя отношения и имя поля
protected function splitRelationField($field) { $parts = explode(':', $field); $partsCount = count($parts); return [implode('.', array_slice($parts, 0, $partsCount - 1)), $parts[$partsCount - 1]]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _splitFieldname($field) {\n\t\t$regex = '/^([a-z0-9_-]+)\\.([a-z 0-9_-]+|\\*)$/iS';\n\n\t\tif (strpos($field, '.') !== false && preg_match($regex, $field, $matches)) {\n\t\t\treturn [$matches[1], $matches[2]];\n\t\t}\n\t\treturn [null, $field];\n\t}", "public function getRelationFieldName() {}...
[ "0.645269", "0.63087463", "0.622344", "0.6157708", "0.57776034", "0.5777192", "0.5588866", "0.55620146", "0.5531351", "0.5475411", "0.5453396", "0.543404", "0.5411804", "0.538255", "0.53701496", "0.53470564", "0.53467834", "0.534284", "0.5292753", "0.52690214", "0.5267947", ...
0.70798063
0
$args['walker'] = new I3D_Walker_Nav_Menu;
$args['walker'] = new I3D_Walker_Nav_Menu;
function i3d_modify_wp_nav_menu_args($args) { return $args; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_setup_nav_menu_item($menu_item)\n{\n}", "function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {\n//\t var_dump($args);\n global $wp_query;\n $indent = ( $depth > 0 ? str_repeat( \"\\t\", $depth ) : '' ); // code indent\n // depth dependent classes\n $depth_classes = ...
[ "0.69484437", "0.6804809", "0.6755467", "0.67373925", "0.6725512", "0.668162", "0.6658355", "0.6645723", "0.65704453", "0.6569607", "0.6548431", "0.6546987", "0.65426433", "0.65172434", "0.6499897", "0.64912075", "0.6483101", "0.6473834", "0.64703774", "0.6457825", "0.6457825...
0.7046887
0
/ Get agency by id
/ Получить агентство по идентификатору
function get_agency($id) { return $this->db->get_where('agency',array('id'=>$id))->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_agency($id=null){\n $result = $this->db->get_where('agency', array('id'=>$id));\n return $result->row(0);\n }", "function getAgencyDetails($agency_id)\n {\n $agency = $this->leftJoin('companies', 'agencies.agency_id', '=', 'companies.agencies_agent_id')\n ...
[ "0.74491507", "0.64498013", "0.6390028", "0.63658667", "0.62663615", "0.6159016", "0.6157736", "0.6157736", "0.6036243", "0.60082436", "0.6000518", "0.59181756", "0.5868574", "0.5862752", "0.5824862", "0.58166456", "0.5814162", "0.57853913", "0.57761234", "0.57623893", "0.576...
0.74853635
0
/ function to delete agency
Функция для удаления агентства
function delete_agency($id) { return $this->db->delete('agency',array('id'=>$id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_data1($id){\n $this->db->where(\"AgencyID\", $id); \n $this->db->delete(\"bpas_master_agency\");\n }", "function delete() {\n\t\t$sql = \"DELETE FROM \".$this->swm_db.\".swm_attend\n\t\t\t\tWHERE sa_id=?\";\n\t\t$this->swm->query($sql, array($this->sa_id));\n\t}", "publi...
[ "0.6665072", "0.6380027", "0.63795286", "0.629989", "0.6294609", "0.6259527", "0.61711556", "0.61333686", "0.6109738", "0.60683805", "0.604479", "0.60398763", "0.6014811", "0.5994967", "0.5983957", "0.59710157", "0.59628123", "0.59590554", "0.595392", "0.59275013", "0.5927501...
0.71176296
0
////////////////////////////////////////////////////////////// Get unique field of table //////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////// Получение уникального поля таблицы //////////////////////////////////////////////////////////////
function GetUniqFld($table) { global $database; $database->setQuery('SHOW KEYS FROM '.$table); $indexes = $database->loadAssocList(); $uniq_fld = ''; if(!empty($indexes)) foreach($indexes as $index) if($index['Non_unique'] == 0) { $uniq_fld = $index['Column_name']; break; } return $uniq_fld; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_unique_field($table, $field, $value){\n $results = search_table_equal($table, $field, $value);\n \n if (sizeof($results) === 1){\n return $results[0];\n }else{\n return null;\n }\n }", "public function fieldUniqueNumber();", "private functi...
[ "0.80481774", "0.75052994", "0.69321746", "0.6900678", "0.68367183", "0.67171633", "0.669916", "0.6553567", "0.6507337", "0.6461605", "0.64177966", "0.63945687", "0.6364424", "0.62518936", "0.6241672", "0.6235683", "0.6188911", "0.6180073", "0.6177455", "0.6174609", "0.615962...
0.86060596
0
////////////////////////////////////////////////////////////// Get table name from query //////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////// Получить имя таблицы из запроса //////////////////////////////////////////////////////////////
function TableFromSQL($sql) { $in = strpos(strtolower($sql),'from ') + 5; $end = strpos($sql,' ',$in); $end = empty($end)?strlen($sql):$end; // If table name in query end return substr($sql,$in,$end - $in); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_table_name($sql){\n $pattern = \"/FROM `(.*?)`/\";\n preg_match($pattern, $sql, $matches);\n return isset($matches[1]) ? $matches[1] : null;\n }", "function g16_get_tableName($name)\n{\n return OPT_DB_TBLPREFIX.$name;\n}", "abstract public function\r\n\t\tget_table...
[ "0.7800241", "0.7382203", "0.73478925", "0.72672665", "0.72392684", "0.72323453", "0.7180917", "0.7171078", "0.7105248", "0.70496607", "0.702575", "0.6995827", "0.69468576", "0.69340056", "0.6888515", "0.6888515", "0.6871719", "0.6870164", "0.68569064", "0.68569064", "0.68569...
0.77034175
1
For last three symbols. If you need get domain extension.
Для последних трех символов. Если вам нужно получить расширение домена.
public static function getDomainEx(){ $domain = str_replace('/', '', self::Base_URL()); return substr($domain, -3); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ign_getDomain() {\n $d = explode('.', $_SERVER['HTTP_HOST']);\n // $d_copy keeps code simple\n $d_copy = $d;\n // Make sure the last 2 values look like TLDs (no more than 3 characters). Not bulletproof (.info? .mobi?), but simple.\n if ( (count($d) > 2) && (strlen(array_pop($d_copy)) < 4) &...
[ "0.735337", "0.71002036", "0.6827738", "0.67938054", "0.67876005", "0.6781408", "0.67395127", "0.67395127", "0.67395127", "0.67395127", "0.67324305", "0.6675115", "0.66096866", "0.66084886", "0.6606569", "0.65863925", "0.6583693", "0.65825623", "0.6558792", "0.6550619", "0.65...
0.7194139
1
Get message factory mock.
Получить фабрику сообщений в виде мока.
protected function getMessageFactoryMock() { return $this ->getMockBuilder('Uphold\HttpClient\Message\MessageFactory') ->disableOriginalConstructor() ->setMethods(null) ->getMock() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function messageFactory()\n {\n if (isset($this->messageFactory)) {\n return $this->messageFactory;\n }\n\n return MessageFactoryDiscovery::find();\n }", "public function getMessageFactory();", "public function getMessageFactory();", "private function getMessageMo...
[ "0.7942077", "0.7571803", "0.7571803", "0.7375154", "0.6585261", "0.65565777", "0.6472185", "0.63880575", "0.63880575", "0.63880575", "0.63880575", "0.63880575", "0.63880575", "0.63880575", "0.63880575", "0.63880575", "0.63880575", "0.63880575", "0.6369498", "0.6355384", "0.6...
0.8326736
0
Extract the database name from a given DSN
Извлеките имя базы данных из заданного DSN
protected function parseDbName($dsn) { preg_match('#dbname=([a-zA-Z0-9\_]+)#', $dsn, $matches); return $matches[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDatabaseName()\n\t{\n\t\t$dsn = $this->result->connection->getDsn();\n\t\t$matches = [];\n\t\tif (preg_match('~\\b(database|dbname)=(.*?)(;|$)~', $dsn, $matches))\n\t\t{\n\t\t\treturn $matches[2];\n\t\t}\n\t\treturn NULL;\n\t}", "protected function parseDbName($dsn)\n {\n preg_match(...
[ "0.757804", "0.7570313", "0.71454215", "0.709476", "0.6881424", "0.6863013", "0.6794643", "0.6715431", "0.67130953", "0.6676394", "0.66409844", "0.6577878", "0.65640116", "0.6494705", "0.64567995", "0.6392261", "0.6392261", "0.638312", "0.6360963", "0.6357735", "0.6349641", ...
0.78488904
0
Check the PropelConfiguration object.
Проверьте объект PropelConfiguration.
protected function checkConfiguration() { $parameters = $this->getContainer()->get('propel.configuration')->getParameters(); if (!isset($parameters['datasources']) || 0 === count($parameters['datasources'])) { throw new \RuntimeException('Propel should be configured (no database configuration found).'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkConfiguration() {\n\t\t//\n\t}", "public function checkConfiguration();", "public function validateConfiguration() {}", "function validateConfiguration() ;", "public function validateConfiguration() : bool {}", "public function checkConfig()\n {\n static $checked;\n\n ...
[ "0.7082583", "0.6917236", "0.66307265", "0.6443267", "0.6439504", "0.63703656", "0.63350135", "0.6220872", "0.61954933", "0.6172751", "0.612057", "0.6094914", "0.60914797", "0.60906476", "0.604871", "0.5989851", "0.5987774", "0.59728956", "0.5896654", "0.58927566", "0.5887019...
0.7359633
0
Provide access for visitor to service
Предоставить доступ посетителю к сервису
function grantVisitorAccess($service);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkVisitorAccess($service);", "abstract public function getService();", "public function getService();", "abstract protected function getServiceInstance();", "protected function ogAccess() {\n return \\Drupal::service('og.access');\n }", "public static function services();", "public func...
[ "0.71431315", "0.65971595", "0.63473666", "0.6053839", "0.59849787", "0.59326166", "0.58548695", "0.58534783", "0.5806808", "0.5780549", "0.57338816", "0.57248694", "0.56849104", "0.5653159", "0.56201565", "0.56190777", "0.5604956", "0.5599237", "0.5586069", "0.5566983", "0.5...
0.74818134
0
Revoke access for visitor to service
Отозвать доступ посетителю к сервису
function revokeVisitorAccess($service);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function revokeAccessAction()\n {\n /** @var $client \\Analytics\\Service\\Client\\Google */\n $client = $this->serviceLocator->get('Analytics.Client');\n\n if ($client->revokeAccess()) {\n /** @var $request \\Zend\\Http\\PhpEnvironment\\Request */\n $request = ...
[ "0.7228266", "0.71136075", "0.6673363", "0.6586364", "0.6441616", "0.62882096", "0.6282115", "0.6246825", "0.6235452", "0.618777", "0.61574864", "0.6079538", "0.60763705", "0.6064689", "0.6036833", "0.6003763", "0.5998443", "0.5943614", "0.5935643", "0.5929724", "0.59247136",...
0.862836
0
Check access for visitor to service
Проверить доступ для посетителя к сервису
function checkVisitorAccess($service);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function grantVisitorAccess($service);", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "public function checkAccess() {}", "publi...
[ "0.73936903", "0.7174454", "0.7174454", "0.7174454", "0.7174454", "0.7174296", "0.7174296", "0.7174296", "0.7174296", "0.71740484", "0.69132876", "0.66801625", "0.653087", "0.6486498", "0.6437371", "0.63222957", "0.6289924", "0.6227034", "0.62045246", "0.6183933", "0.614693",...
0.867319
0
beforeFind callback Sets the models virtualFields property based on the usage of a new model::find option 'virtualFields' If the key is used the merged virtualFields are cached
beforeFind callback устанавливает свойство virtualFields модели на основе использования нового параметра model::find 'virtualFields'. Если ключ используется, объединенные virtualFields кэшируются.
public function beforeFind( &$Model, $query ){ if( !empty( $Model->virtualFields )){ $virtualFields = isset( $query[ 'virtualFields' ] ) ? $query[ 'virtualFields' ] : array_keys( $Model->virtualFields ); if( $virtualFields !== true ){ $this->_backVirtualFields[ $Model->alias ] = $Model->virtualFields; $Model->virtualFields = !empty( $virtualFields ) ? array_intersect_key( $Model->virtualFields, array_flip( (array) $virtualFields )) : array( ); } } return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function afterFind( &$Model, $results, $primary = false ){ \n if( !empty( $this->_backVirtualFields[ $Model->alias ] )){\n $Model->virtualFields = $this->_backVirtualFields[ $Model->alias ];\n } \n }", "function beforeFind(Model $Model, $query) {\n //Depe...
[ "0.65783864", "0.6426654", "0.6015546", "0.59536934", "0.5873925", "0.5868742", "0.5864329", "0.5831098", "0.5798838", "0.5762364", "0.5752125", "0.5712523", "0.56899583", "0.56899583", "0.56613797", "0.5637194", "0.555424", "0.55044305", "0.5446151", "0.54272676", "0.5369084...
0.7229183
0
afterFind callback Restores any merged virtualFields cached in the beforeFind callback
afterFind callback восстанавливает любые объединенные virtualFields, кэшированные в beforeFind callback
public function afterFind( &$Model, $results, $primary = false ){ if( !empty( $this->_backVirtualFields[ $Model->alias ] )){ $Model->virtualFields = $this->_backVirtualFields[ $Model->alias ]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function afterFind() {\n $this->_oldAttributes = $this->getAttributes();\n parent::afterFind();\n }", "public function afterFind() {\n $this->_oldAttributes = $this->getAttributes();\n parent::afterFind();\n }", "public function afterFind() {\n\t\t// log aside original ...
[ "0.7434127", "0.7434127", "0.7342622", "0.73392403", "0.73392403", "0.72505003", "0.71648264", "0.7142069", "0.7063046", "0.694954", "0.6939174", "0.6755538", "0.6755538", "0.6680154", "0.66252166", "0.6485884", "0.6458362", "0.6343317", "0.6315927", "0.63075256", "0.62565356...
0.74701476
0
get file list from expired.db
получить список файлов из expired.db
function getExpiredFileList($until=null) { isset($until) or $until = $_SERVER['REQUEST_TIME'] - $this->expire * 60; $stmt = $this->pdo->prepare( 'SELECT path FROM expired WHERE expiredAt <= :expiredAt' ); $stmt->bindValue(':expiredAt', $until, PDO::PARAM_INT); $stmt->execute(); $stmt->setFetchMode(PDO::FETCH_COLUMN, 0); $list = array(); foreach ($stmt as $file){ $list[] = $file; } return $list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function files_list();", "protected function getExpiredFiles()\n {\n $backupsFolder = \\Yii::getAlias($this->backupDir);\n $expireTimestamp = time() - $this->expireTime;\n $extensions = ['tar', 'bz2', 'gzip', 'zip'];\n\n $filter = function ($path) use ($expireTimestamp, $ext...
[ "0.6846433", "0.6702155", "0.66739386", "0.66242784", "0.65426105", "0.6474554", "0.64468694", "0.6409766", "0.64016306", "0.63922995", "0.6388149", "0.6374588", "0.63629603", "0.6332759", "0.6323822", "0.6297678", "0.62725127", "0.6258771", "0.6223289", "0.62101746", "0.6192...
0.7133347
0
Build and return an array mapping response message code, AVS response and CVV response to friendly error messages for customers Authorize.Net CIM response message codes can be found here: Authorize.Net CIM AVS and CVV responses can be found here:
Создайте и верните массив, отображающий код сообщения ответа, ответ AVS и ответ CVV на дружественные сообщения об ошибках для клиентов. Коды сообщений ответа Authorize.Net CIM можно найти здесь: Ответы AVS и CVV Authorize.Net CIM можно найти здесь:
public function getResponseToMessageMap() { // Array which maps response codes to error messages // 1st field is response message code // 2nd field is AVS response code // 3rd field is CVV response code // When null is specified for AVS response and / or CVV response, the message will be used in cases when AVS and / or CVV response is not present return array( // AVS Mismatches array( 'E00027', 'G', null, 'Your card issuer does not support a billing address / zip code check!' ), array( 'E00027', 'S', null, 'Your card issuer does not support a billing address / zip code check!' ), array( 'E00027', 'Y', null, 'The extended zip code for your billing address does not match!' ), array( 'E00027', null, null, 'Billing address does not match!' ), // CVV Mismatches array( 'E00027', 'Y', 'N', 'CVV code does not match!' ), array( 'E00027', null, 'N', 'CVV code does not match!' ), array( 'E00044', null, 'N', 'CVV code does not match!' ), array( 'E00044', null, 'U', 'Your card issuer does not support a CVV match!' ), array( 'E00044', null, null, 'CVV code does not match!' ), // Other error messages array( 'E00002', null, null, 'The transaction has been declined!' ), array( 'E00003', null, null, 'The transaction has been declined!' ), array( 'E00004', null, null, 'The transaction has been declined!' ), array( 'E00006', null, null, 'The credit card number is invalid!' ), array( 'E00007', null, null, 'The credit card expiration date is invalid!' ), array( 'E00037', null, null, 'The credit card number is invalid!' ), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function processCIMResponse()\n { \n\t\tglobal $objPage;\n\t\t\n $arrResponse = array\n (\n 'resultCode' => $this->objResponse->xml->messages->resultCode->__toString(),\n 'messageCode' => $this->objResponse->xml->messages->message->code->__toString(),\n ...
[ "0.6850572", "0.6565629", "0.60659033", "0.60556924", "0.59689033", "0.59461415", "0.58947545", "0.58531445", "0.5837183", "0.5721192", "0.5688544", "0.5644312", "0.5630953", "0.5612731", "0.5605449", "0.5590683", "0.5534533", "0.54928064", "0.54793906", "0.5467374", "0.54379...
0.7742279
0
/ Search Highlighting This highlights search terms in both titles, excerpts and content
/ Выделение поисковых запросов Выделение поисковых запросов в заголовках, выдержках и содержимом
function search_excerpt_highlight() { $excerpt = get_the_excerpt(); $keys = implode('|', explode(' ', get_search_query())); $excerpt = preg_replace('/(' . $keys .')/iu', '<strong class="search-highlight">\0</strong>', $excerpt); echo '<p>' . $excerpt . '</p>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function alpha_highlight_search_results($text){\n if(is_search()){\n $pattern = '/('. join('|', explode(' ', get_search_query())).')/i';\n $text = preg_replace($pattern, '<span class=\"search-highlight\">\\0</span>', $text);\n }\n return $text;\n}", "function search_content_highlight($cont...
[ "0.7965226", "0.790923", "0.7545994", "0.7231151", "0.7100109", "0.7087753", "0.70001394", "0.6941878", "0.6861898", "0.6813653", "0.66387933", "0.6634108", "0.6634108", "0.65977174", "0.6404705", "0.6404705", "0.6365082", "0.6365082", "0.6354133", "0.6348371", "0.6345082", ...
0.8097311
0
Lists all clivagem entities.
Перечисляет все сущности clivagem.
public function indexAction() { $em = $this->getDoctrine()->getManager(); $clivagems = $em->getRepository('AppBundle:Clivagem')->findAll(); return $this->render('clivagem/index.html.twig', array( 'clivagems' => $clivagems, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('RsmsTrabajandoBundle:Clientes')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "public function indexAction()\n {\n $em = $this-...
[ "0.74732006", "0.7231611", "0.7230384", "0.71152765", "0.70443976", "0.701194", "0.69911695", "0.6978178", "0.696866", "0.69607955", "0.6957299", "0.6955065", "0.68822336", "0.686873", "0.6854751", "0.68284607", "0.682814", "0.681568", "0.681568", "0.6794262", "0.6771035", ...
0.75137293
0
Creates a form to delete a clivagem entity.
Создает форму для удаления сущности clivagem.
private function createDeleteForm(Clivagem $clivagem) { return $this->createFormBuilder() ->setAction($this->generateUrl('clivagem_delete', array('id' => $clivagem->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm(ContaCorrente $contaCorrente)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('contacorrente_delete', array('id' => $contaCorrente->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private f...
[ "0.7470587", "0.74569416", "0.7453456", "0.7402874", "0.73797536", "0.72987545", "0.7295839", "0.7255673", "0.72284377", "0.72154886", "0.7209779", "0.72083884", "0.7203011", "0.7193656", "0.71935874", "0.7187538", "0.71861094", "0.7185518", "0.71727383", "0.7151817", "0.7142...
0.83809644
0
List of available formats
Список доступных форматов
public static function getAvailableFormats() { return static::$formats; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllFormats() {\n\t}", "public function getFormats();", "public function getAvailableFormats() {\r\n return $this->list_files_preg($this->mapping_formats_file_path, '/.+\\.csv/i',true);\r\n }", "public function getFormats()\n {\n return Format::getList();\n ...
[ "0.84161216", "0.8408485", "0.84017205", "0.83412606", "0.8323264", "0.828028", "0.82015985", "0.8060399", "0.7990588", "0.79769075", "0.78205264", "0.7798543", "0.77657753", "0.77606976", "0.77288884", "0.7541678", "0.75219953", "0.75213724", "0.747098", "0.73955643", "0.738...
0.8920098
0
define('GENIMO_URL', $current_url); Register and load the widget
define('GENIMO_URL', $current_url); Регистрация и загрузка виджета
function genimo_load_widget() { register_widget('genimo_widget'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function aw_load_widget() {\r\n\t\tregister_widget( 'SI_Widget' );\r\n\t}", "function activate_google_albums_widget_plugin(){\n Includes\\Base\\Activate::activate();\n}", "function example_load_widgets(){\n\tregister_widget('Example_Widget');\n}", "function widget_js() {\n\n\t\t$folder = JanrainCapture::g...
[ "0.6650371", "0.657754", "0.6551126", "0.64399153", "0.6421143", "0.6390496", "0.6355065", "0.6346516", "0.6332148", "0.6327519", "0.6269261", "0.6257219", "0.62504673", "0.6249423", "0.6241577", "0.6232713", "0.621165", "0.6194413", "0.6189294", "0.6169551", "0.61641794", ...
0.7059795
0
Rotates an image at the given angle. Optional $background can be used to specify the fill color of the empty area of rotated image.
Поворачивает изображение на заданный угол. Опциональный параметр $background может быть использован для указания цвета заполнения пустых областей повернутого изображения.
function rotate($angle, Color $background = null);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rotateImage ($background, $degrees) {}", "public function rotate($angle, $bg_color = 0x000000) {\n\t\t$this->setResource( imagerotate($this->getResource(), $angle, $bg_color) );\n\n\t\t// If the image format is gif or png, make the new background transparent.\n\t\tif ($this->getFormat() == 'gif' ...
[ "0.8256777", "0.7426285", "0.66632026", "0.6540552", "0.62894666", "0.6248045", "0.6071893", "0.6044933", "0.5997374", "0.5934394", "0.5918694", "0.5834479", "0.5823381", "0.5791858", "0.57404834", "0.5714851", "0.5669467", "0.56650394", "0.5659407", "0.5637504", "0.5633423",...
0.78265476
1
Flips current image using horizontal axis
Переворачивает текущее изображение относительно горизонтальной оси
function flipHorizontally();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function horizontalFlip() {\n\t\tif (function_exists('imageflip')) {\n\t\t\timageflip($this->_image, IMG_FLIP_HORIZONTAL);\n\t\t} else {\n\t\t\t$image = imagecreatetruecolor($this->width, $this->height);\n\t\t\t$dst_y = 0;\n\t\t\t$src_y = 0;\n\t\t\t$coordinate = ($this->width - 1);\n\t\t\tforeach (range($th...
[ "0.7736446", "0.7567612", "0.7303505", "0.6837383", "0.6616575", "0.64296496", "0.6421013", "0.6316649", "0.62874293", "0.6244597", "0.61513495", "0.6122083", "0.5996191", "0.5882473", "0.5838971", "0.57519364", "0.5730861", "0.56507224", "0.5633004", "0.5632662", "0.55261636...
0.76897025
1
Flips current image using vertical axis
Переворачивает текущее изображение относительно вертикальной оси
function flipVertically();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ImageFlipVertical(\\raylib\\Image &$image): void { }", "public function flipImage () {}", "public function verticalFlip() {\n\t\tif (function_exists('imageflip')) {\n\t\t\timageflip($this->_image, IMG_FLIP_VERTICAL);\n\t\t} else {\n\t\t\t$image = imagecreatetruecolor($this->width, $this->height);\n\t...
[ "0.74425155", "0.7427855", "0.7410122", "0.7037729", "0.6708667", "0.6694722", "0.66602683", "0.65792286", "0.65237105", "0.6328222", "0.6235404", "0.62120265", "0.6174279", "0.60278434", "0.60022277", "0.5997303", "0.5865266", "0.5692933", "0.56880873", "0.5613493", "0.54740...
0.76359475
0
Custom comment popup link
Сustom comment popup link
function white_comments_popup_link() { $comment_icon = '<span class="comment-icon glyphicon glyphicon-comment"><small class="comment-total">%d</small></span>'; $comments_icon = '<span class="comment-icon glyphicon glyphicon-comment"><small class="comment-total">%s</small></span>'; return comments_popup_link(sprintf($comment_icon, ''), sprintf($comment_icon, '1'), sprintf($comments_icon, '%'), 'btn btn-default btn-xs'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comments_popup_link($zero = \\false, $one = \\false, $more = \\false, $css_class = '', $none = \\false)\n{\n}", "function bus_leader_comments_link() {\n\tif ( ! post_password_required() && comments_open() && '0' != get_comments_number() ) { \n echo '<span class=\"comments-link\">';\n comme...
[ "0.78950727", "0.73917586", "0.7346148", "0.7116448", "0.69289243", "0.6866401", "0.6823626", "0.67165565", "0.66887206", "0.6669886", "0.6669692", "0.6641172", "0.66310364", "0.661527", "0.66105866", "0.65845627", "0.6570445", "0.65541565", "0.65496206", "0.65447223", "0.653...
0.800158
0
Test that include_trashed is ignored if the model doesn't use the softDelete trait.
Тест, в котором include_trashed игнорируется, если модель не использует признак softDelete.
public function testSoftDeletesWithNonSoftDeleteModel() { $post1 = PostWithIncludeTrashed::create([ 'title' => 'A Post Title' ]); $this->assertEquals('a-post-title', $post1->slug); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isUsingSoftDeletes(Model $model): bool\n {\n return method_exists($model, 'trashed');\n }", "public function implementsSoftDeletes() : bool {\n return false;\n}", "public function testSoftDeletesWithTrashed()\n {\n $post1 = PostWithSoftDeletingIncludeTrashed::create([...
[ "0.7073123", "0.68401325", "0.6840095", "0.6703119", "0.6649963", "0.66045785", "0.65779835", "0.6507196", "0.6466288", "0.6432032", "0.6405021", "0.63360333", "0.63319767", "0.6306068", "0.63012564", "0.6244685", "0.62248355", "0.6217931", "0.61813146", "0.61701953", "0.6125...
0.7309309
0
/returns the mean value of the colors and the list of all pixel's colors
возвращает среднее значение цветов и список всех цветов пикселей
public function colorMeanValue($i) { $colorList = array(); $colorSum = 0; for($a = 0;$a<8;$a++) { for($b = 0;$b<8;$b++) { $rgb = imagecolorat($i, $a, $b); $colorList[] = $rgb & 0xFF; $colorSum += $rgb & 0xFF; } } return array($colorSum/64,$colorList); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function imageMeanColor($rel_path) {\n global $docroot;\n $impath = $docroot . $rel_path;\n $image = imageCreateFromAny($impath);\n list($width, $height) = getimagesize($impath);\n\n $tmp_img = ImageCreateTrueColor(1,1);\n ImageCopyResampled($tmp_img,$image,0,0,0,0,1,1,$width,$height);\n $rgb = Image...
[ "0.7201323", "0.7190435", "0.6452968", "0.6398002", "0.62666637", "0.61436176", "0.59961665", "0.59541845", "0.5924867", "0.5789288", "0.5768141", "0.576434", "0.5759737", "0.5749458", "0.57274514", "0.5621356", "0.55330026", "0.55007964", "0.54636955", "0.54577565", "0.54467...
0.794899
0
/main function. returns the hammering distance of two images' bit value
/основная функция. возвращает расстояние постукивания двух изображений по значениям битов
public function compare($a,$b) { $i1 = $this->createImage($a); $i2 = $this->createImage($b); if(!$i1 || !$i2){return false;} $i1 = $this->resizeImage($i1,$a); $i2 = $this->resizeImage($i2,$b); imagefilter($i1, IMG_FILTER_GRAYSCALE); imagefilter($i2, IMG_FILTER_GRAYSCALE); $colorMean1 = $this->colorMeanValue($i1); $colorMean2 = $this->colorMeanValue($i2); $bits1 = $this->bits($colorMean1); $bits2 = $this->bits($colorMean2); $hammeringDistance = 0; for($a = 0;$a<64;$a++) { if($bits1[$a] != $bits2[$a]) { $hammeringDistance++; } } return $hammeringDistance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function colorDistance($color1, $color2) {\r\n $r1 = 0; $g1 = 0; $b1 = 0;\r\n getRGBFromColor($color1, $r1, $g1, $b1);\r\n $r2 = 0; $g2 = 0; $b2 = 0;\r\n getRGBFromColor($color2, $r2, $g2, $b2);\r\n return abs($r1 - $r2) + abs($g1 - $g2) + abs($b1 - $b2);\r\n}", "function compare($leftImage, $righ...
[ "0.59058774", "0.5806463", "0.5787358", "0.5786623", "0.56685615", "0.56477535", "0.56244135", "0.5569227", "0.5558376", "0.55466956", "0.55451536", "0.55328286", "0.55297357", "0.5510729", "0.54658234", "0.5422142", "0.5419841", "0.5383289", "0.53730285", "0.53704834", "0.53...
0.7007859
0
Get the Query to find all the servers by a type
Получить запрос для поиска всех серверов по типу
public function findServersByTypeQuery($type) { $eManager = $this->getEntityManager(); $query = $eManager->createQueryBuilder() ->select('s') ->from('ServerBundle:Server', 's') ->innerJoin('s.type', 't') ->where('t.name = :type') ->orderBy('s.subtype', 'ASC') ->setParameter('type', $type) ; return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findServersByType($type)\n\t{\n\t\t$query = $this->findServersByTypeQuery($type);\n\t\n\t\treturn $query->getQuery()->getResult();\n\t}", "public function toQuery($type);", "function getSpecialQuery($type)\n {\n\n switch ($type) {\n case 'databases':\n if (!f...
[ "0.7311454", "0.6586775", "0.6365335", "0.62947017", "0.6172787", "0.61198133", "0.6109578", "0.6075175", "0.6044329", "0.6031967", "0.60277873", "0.60115486", "0.5971173", "0.59589404", "0.59486294", "0.59318197", "0.59153384", "0.5851686", "0.5834545", "0.58177793", "0.5800...
0.80983204
0
Get all the servers by a type
Получить все серверы по типу
public function findServersByType($type) { $query = $this->findServersByTypeQuery($type); return $query->getQuery()->getResult(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listObjectsOnServer($type)\n {\n $result = array();\n foreach ($this->world['injector'] as $injector) {\n $server = $injector->getInstance('Horde_Kolab_Server');\n $objects = $server->listObjects($type);\n $result[] = $objects;\n }\n r...
[ "0.7586858", "0.7348945", "0.6680698", "0.65668416", "0.6540265", "0.6418375", "0.63489854", "0.6337355", "0.6324408", "0.6270607", "0.6240834", "0.6179156", "0.6151711", "0.6149189", "0.6099331", "0.6083598", "0.60565126", "0.60361886", "0.60351706", "0.60033804", "0.5992853...
0.82678574
0
Get the shortcut production apps
Получить краткие производственные приложения
public function findWithShortcutProductionApps() { $entityManager = $this->getEntityManager(); //Get the website type $websiteType = $entityManager->getRepository('ServerBundle:ServerType')->findOneBy(array( 'name' => 'Website' )); //Get the development subtype $developmentType = $entityManager->getRepository('ServerBundle:ServerSubType')->findOneBy(array( 'name' => 'Development' )); //Get the production environment $productionEnvironment = $entityManager->getRepository('ServerBundle:ServerEnvironment')->findOneBy(array( 'name' => 'Production' )); //Get the shortcuts return $entityManager->getRepository('ServerBundle:Server')->findBy(array( 'shortcut' => true, 'type' => $websiteType->getId(), 'subtype' => $developmentType->getId(), 'environment' => $productionEnvironment->getId() )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getApps();", "public function getAppLinks()\n {\n global $conf, $registry;\n\n $out = array();\n\n if (isset($conf['menu']['apps']) && is_array($conf['menu']['apps'])) {\n foreach ($conf['menu']['apps'] as $app) {\n if (!$registry->isInacti...
[ "0.7350753", "0.71038675", "0.7077031", "0.7057948", "0.6997261", "0.6983235", "0.6983235", "0.6983235", "0.6671266", "0.6628422", "0.6567647", "0.640922", "0.6355875", "0.6305665", "0.6305586", "0.628696", "0.62098867", "0.62019897", "0.61593074", "0.6157258", "0.613547", ...
0.780695
0
Get the shortcut management apps
Получить приложения управления ярлыками
public function findWithShortcutManagementApps() { $entityManager = $this->getEntityManager(); //Get the website type $websiteType = $entityManager->getRepository('ServerBundle:ServerType')->findOneBy(array( 'name' => 'Website' )); //Get the development subtype $developmentType = $entityManager->getRepository('ServerBundle:ServerSubType')->findOneBy(array( 'name' => 'Management' )); //Get the shortcuts return $entityManager->getRepository('ServerBundle:Server')->findBy(array( 'shortcut' => true, 'type' => $websiteType->getId(), 'subtype' => $developmentType->getId() )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getApps();", "public function getAppLinks()\n {\n global $conf, $registry;\n\n $out = array();\n\n if (isset($conf['menu']['apps']) && is_array($conf['menu']['apps'])) {\n foreach ($conf['menu']['apps'] as $app) {\n if (!$registry->isInacti...
[ "0.73336184", "0.71803474", "0.7015912", "0.6850193", "0.68451905", "0.68451905", "0.68451905", "0.6723564", "0.6609432", "0.6555167", "0.65323114", "0.65253156", "0.6395001", "0.6317431", "0.61900264", "0.61431974", "0.61361516", "0.61176264", "0.604169", "0.602405", "0.6005...
0.77677023
0
Get current skip mode
Получить текущий режим пропуска
public function getSkipMode(): string { return $this->skip_mode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSkip()\n {\n return $this->skip;\n }", "public function getSkip() {\n return $this->skip;\n }", "public function getIsSkippable(){\n\t\treturn $this->isSkippable;\n\t}", "public function getSkippedFlag(){\n\t\treturn $this->skippedFlag;\n\t}", "public function getS...
[ "0.7013944", "0.6957422", "0.671453", "0.6637865", "0.6510811", "0.6493983", "0.63006777", "0.614508", "0.61000884", "0.6049831", "0.6049357", "0.5990283", "0.5990283", "0.5978998", "0.59726554", "0.5950603", "0.5949562", "0.5936048", "0.5935132", "0.59341353", "0.59210426", ...
0.87138855
0
Document's header. Prints a rectangle around the page.
Заголовок документа. Выводит прямоугольник вокруг страницы.
function Header() { $this->Rect(2, 2, 206, 293); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Header() {\r\n\t\t$this->Rect(2, 2, 206, 293);\r\n\t}", "protected function drawDocumentHeader()\r\n {\r\n // Init\r\n $iWidth = 70;\r\n $this->resetFontColor();\r\n\r\n // Contents\r\n $sOrderNumber = $this->structure['data']['first_page']['num_bdc'];\r\n $s...
[ "0.79272467", "0.77145314", "0.7534957", "0.7440446", "0.7438442", "0.7247603", "0.7200901", "0.7200635", "0.7197546", "0.71152514", "0.70502836", "0.7032771", "0.70235723", "0.7020533", "0.70161587", "0.6993214", "0.6985", "0.694899", "0.69144964", "0.68994033", "0.6897981",...
0.7920768
1
Returns the directory paths.
Возвращает пути к директориям.
public function getPaths();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDirectories();", "public function getDirectories();", "public static function get_paths()\n {\n return glob(Config::get('gallery-view.images_path') . '*', GLOB_ONLYDIR);\n }", "public function getAllPaths()\n {\n return $this->paths;\n }", "public function get_d...
[ "0.78952616", "0.78952616", "0.78751343", "0.78231704", "0.7749181", "0.77270895", "0.7570822", "0.7566413", "0.7542943", "0.7542943", "0.75414425", "0.749038", "0.749038", "0.74590224", "0.7457956", "0.7457956", "0.7457956", "0.7457956", "0.7457956", "0.7439081", "0.7420175"...
0.7981102
0
Sets a directory path by name.
Устанавливает путь к директории по имени.
public function setPath($name, $path);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDirectory($path);", "public function setPath($path)\r\n {\r\n $this->_directory = $path;\r\n }", "function setDirPath($value) {\n $this->dir_path = $value;\n }", "function set_path($path)\n\t{\n\t\t$this->_dir_actual = $this->_path_absoluto.$path;\n\t\tif( ! is_dir($th...
[ "0.74794745", "0.70019644", "0.69084215", "0.684239", "0.67322093", "0.6650396", "0.660032", "0.6525542", "0.6473868", "0.6441374", "0.6438489", "0.643828", "0.637626", "0.63684314", "0.63053125", "0.629174", "0.62807393", "0.61737645", "0.6161899", "0.6110402", "0.60696197",...
0.7602527
0
Tests iterating over the values returns the values not the hash keys
Тесты итерации по значениям возвращают значения, а не ключи хеша
public function testIteratingOverValuesReturnsValuesNotHashKeys(): void { $expectedValues = [ new MockObject(), new MockObject() ]; $this->set->addRange($expectedValues); $actualValues = []; foreach ($this->set as $key => $value) { // Make sure the hash keys aren't returned by the iterator $this->assertTrue(is_int($key)); $actualValues[] = $value; } $this->assertEquals($expectedValues, $actualValues); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testIteratingOverValues() : void\n {\n $expectedArray = [\n new KeyValuePair('foo', 'bar'),\n new KeyValuePair('baz', 'blah')\n ];\n $hashTable = new ImmutableHashTable($expectedArray);\n $actualValues = [];\n\n foreach ($hashTable as $key...
[ "0.79256576", "0.7118095", "0.67471945", "0.6409982", "0.63674027", "0.62841475", "0.62461424", "0.6111686", "0.6111333", "0.60606706", "0.59728795", "0.5874541", "0.5746365", "0.5743578", "0.5727809", "0.56615096", "0.56417817", "0.561808", "0.55878085", "0.5582165", "0.5579...
0.8118209
0
Get the article recipients associated with the user.
Получить получателей статьи, связанных с пользователем.
public function recipients() { return $this->hasMany('App\ArticleRecipient', 'article_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_recipients()\n\t{\n\t\treturn $this->recipients;\n\t}", "public function users()\n {\n return $this->belongsToMany('App\\User', 'article_recipients', 'article_id', 'user_id');\n }", "public function getRecipients()\n {\n return $this->recipients;\n }", "public fu...
[ "0.72530353", "0.71542335", "0.7152133", "0.7090352", "0.7066423", "0.7041022", "0.6956212", "0.68498665", "0.6717669", "0.6682292", "0.6646822", "0.66132635", "0.6601606", "0.6555687", "0.64498", "0.6399233", "0.6349114", "0.6340609", "0.6269614", "0.6229558", "0.6153253", ...
0.76071066
0
Get name of approver
Получить имя согласующего
public function getApproverName() { if (isset($this->rApproved)) { return $this->rApproved->getFullName(); } return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function PatrolName() {\r\n if ($this->patrol === null) $this->ApiGetIndividual();\r\n if ($this->patrol === null) return null;\r\n return $this->patrol->name;\r\n }", "public function getOAuthName();", "function organizerName()\n {\n $organizer = $this->getAttribute('ORGANIZER', tru...
[ "0.65523815", "0.6299804", "0.6177844", "0.6164874", "0.61217564", "0.61096096", "0.61096096", "0.60648614", "0.6016432", "0.6016432", "0.6011339", "0.59854674", "0.5937886", "0.5868864", "0.5867253", "0.58651316", "0.5843134", "0.58249766", "0.57942784", "0.57628345", "0.573...
0.8227496
0
Remove old work schedules
Удалить старые расписания работы
public function removeOldWorkSchedule() { $arrUserId = $this->getUserIdArray(); $criteria = new CDbCriteria(); $criteria->addInCondition('employee_id', $arrUserId); $criteria->addBetweenCondition('work_day', $this->date_from, $this->date_to); $rowDeleted = HrWorkSchedules::model()->deleteAll($criteria); Loggers::info('Deleted', $rowDeleted, __CLASS__ . '::' . __FUNCTION__ . '(' . __LINE__ . ')'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove_shedules() {\n\t\t\twp_clear_scheduled_hook( 'monstroid_scheduled_update' );\n\t\t}", "function pt_remove() {\n\t\t$this->_clean_cron_array();\n\t}", "function deleteScheduling() {\n\t\t$db = PearDatabase::getInstance();\n\t\t$db->pquery('DELETE FROM vtiger_scheduled_reports WHERE report...
[ "0.7306961", "0.7211247", "0.70722234", "0.668688", "0.6590237", "0.65742785", "0.6456685", "0.64331394", "0.6398579", "0.6274254", "0.6259933", "0.6232951", "0.62221307", "0.61808", "0.61808", "0.613415", "0.6124473", "0.6094408", "0.60652196", "0.6062662", "0.6042248", "0...
0.78784174
0
Handle save work schedule
Обработка сохранения расписания работы
public function saveWorkSchedule($data) { $this->removeOldWorkSchedule(); foreach ($data as $item) { $item = trim($item, "[]"); $arrData = explode(',', $item); if (count($arrData) == 3) { $workSchedule = new HrWorkSchedules('create'); $workSchedule->work_day = CommonProcess::convertDateTime($arrData[1], DomainConst::DATE_FORMAT_10, DomainConst::DATE_FORMAT_DB); $workSchedule->work_shift_id = str_replace("\"", '', $arrData[0]); $workSchedule->work_plan_id = $this->id; $workSchedule->employee_id = $arrData[2]; if ($workSchedule->save()) { } else { Loggers::error('Save failed', CommonProcess::json_encode_unicode($workSchedule->getErrors()), __CLASS__ . '::' . __FUNCTION__ . '(' . __LINE__ . ')'); } } else { Loggers::error('Data get from POST wrong format', '', __CLASS__ . '::' . __FUNCTION__ . '(' . __LINE__ . ')'); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveScheduleInformation() {\n\t\t$db = PearDatabase::getInstance();\n\n\t\t$selectedRecipients = $this->get('selectedRecipients');\n\t\t$scheduledInterval = $this->get('scheduledInterval');\n\t\t$scheduledFormat = $this->get('scheduledFormat');\n\n\t\t$db->pquery('INSERT INTO vtiger_scheduled_reports(repo...
[ "0.70315105", "0.6667957", "0.6647498", "0.6553408", "0.6545875", "0.6511967", "0.64159906", "0.6391259", "0.63524073", "0.6342404", "0.63414055", "0.63406426", "0.6299225", "0.6293673", "0.6286151", "0.62540376", "0.625381", "0.62319756", "0.6219023", "0.62034804", "0.618640...
0.70267075
1
Auto create work schedule
Автоматически создать график работы
public function autoCreateWorkSchedule() { $fromDate = $this->date_from; $toDate = $this->date_to; $period = CommonProcess::getDatePeriod($fromDate, $toDate); $arrWorkShifts = HrWorkShifts::getArrayByRole($this->role_id); $arrUserId = $this->getUserIdArray(); $this->removeOldWorkSchedule(); foreach ($period as $dt) { $date = $dt->format(DomainConst::DATE_FORMAT_DB); $workShift = CommonProcess::getRandomElementInArray($arrWorkShifts); if ($workShift != NULL) { foreach ($arrUserId as $userId) { HrWorkSchedules::insertOne($date, $workShift->id, $this->id, $userId); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createSchedule(): void\n {\n wp_schedule_event(\n $this->start->getTimestamp(),\n $this->recurrence,\n $this->getHook(),\n $this->args );\n }", "public function run()\n {\n for($i=0;$i<7;++$i) {\n \tWorkDay::create([\n ...
[ "0.7449843", "0.7102072", "0.6987803", "0.6636053", "0.66319704", "0.66173744", "0.6600024", "0.6563938", "0.6562819", "0.65493107", "0.6538762", "0.65359646", "0.6505347", "0.6477514", "0.6450679", "0.64387965", "0.6419127", "0.6404718", "0.63952476", "0.6369947", "0.6346856...
0.81522304
0
Get Back Background Image
Восстановить фоновое изображение
public function getBackBackgroundImage() { return $this->_backBackgroundImage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBackground()\r\n\t{\r\n\t\tif ( ! empty($this->raw['images']['backdrops']))\r\n\t\t{\r\n\t\t\t$key = array_rand($this->raw['images']['backdrops'], 1);\r\n\r\n\t\t\t$img = $this->raw['images']['backdrops'][$key];\r\n\r\n\t\t\treturn $this->imgBase . 'w780' . $img['file_path'];\r\n\t\t}\r\n\t}", ...
[ "0.8006855", "0.7594221", "0.75928366", "0.70110524", "0.70014507", "0.6890154", "0.663992", "0.6603874", "0.64509296", "0.6394191", "0.6343312", "0.6293808", "0.6217832", "0.6195525", "0.6166039", "0.61388946", "0.61179525", "0.610636", "0.6096942", "0.6087338", "0.6079434",...
0.83554906
0