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
return boolean as string 'true' / 'false'
вернуть булевое значение в виде строки 'true' / 'false'
function bool2str($bool) { if($bool ===false) return 'false'; else return 'true'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bool_s($boolean) {\n\treturn ($boolean ? 'true' : 'false');\n}", "public static function strbool($bool){\r\n return ($bool) ? \"true\" : \"false\";\r\n }", "function format_bool(mixed $input): string\n{\n return $input ? 'true' : 'false';\n}", "function bool_to_string($value) {\n ...
[ "0.80348504", "0.80206877", "0.78751075", "0.7846424", "0.76890635", "0.7611359", "0.7559533", "0.7543506", "0.7523593", "0.75164706", "0.74617386", "0.7412224", "0.7410573", "0.7393141", "0.73901856", "0.7379897", "0.73708546", "0.7250726", "0.7164452", "0.71530366", "0.7104...
0.8142804
0
compare two objects. Arguments are passed byreference test: equals, not equal, equal identity, not equal identity
сравнить два объекта. Аргументы передаются по ссылке тест: равенство, неравенство, равенство по идентичности, неравенство по идентичности
function compareObjects(&$ob1, &$ob2) { print_pre('o1 == o2 : ' . bool2str($ob1 == $ob2)); print_pre('o1 != o2 : ' . bool2str($ob1 != $ob2)); print_pre('o1 === o2 : ' . bool2str($ob1 === $ob2)); print_pre('o1 !== o2 : ' . bool2str($ob1 !== $ob2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function equals($other);", "public function equals( $A, $B );", "public function equals($other) { return $this->obj==Sandbox::unwrap($other); }", "protected function compareObjects(object $a, object $b): int\n {\n // see https://github.com/php/php-src/issues/10513\n return strcmp(spl_object_...
[ "0.6673335", "0.65883684", "0.6582047", "0.6493526", "0.6361353", "0.6307741", "0.62992543", "0.6271147", "0.6259657", "0.62595", "0.62512934", "0.6212965", "0.62024915", "0.614383", "0.61387986", "0.60835725", "0.6081624", "0.60350287", "0.6030523", "0.60098636", "0.6003072"...
0.7712369
0
Check initial states exists
Проверить, существуют ли начальные состояния
public function hasInitial() { return !empty($this->initialStates); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isInitial();", "public function isInitialised();", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n ...
[ "0.6860986", "0.6655938", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", "0.65015686", ...
0.76447755
0
Check final states exists
Проверить, существуют ли конечные состояния
public function hasFinal() { return !empty($this->finalStates); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasState(){\n return $this->_has(4);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n return $this->_has(1);\n }", "public function hasState(){\n ...
[ "0.6827876", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "0.6805831", "...
0.7345255
0
Get all final states
Получить все конечные состояния
public function getFinal() { return $this->hasFinal() ? array_values($this->finalStates) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStates() {\n return $this->state;\n }", "abstract public function states();", "public function getStates(): array\n {\n return $this->states;\n }", "public function getStates(): StateSet;", "public function getStates() {\n\t\treturn empty( $this->container['states'...
[ "0.67806", "0.6576226", "0.6572894", "0.65708417", "0.6479763", "0.6455002", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0.64391106", "0....
0.7338602
0
Get all normal states
Получить все нормальные состояния
public function getNormal() { return $this->hasNormal() ? array_values($this->normalStates) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStates(): array\n {\n return $this->states;\n }", "public function getStates() {\n return $this->state;\n }", "public function getAllStates() {\n $states = [];\n $values = DB::table(self::TABLE_NAME)\n ->select([self::C_STATE, self::C_STATE_FUL...
[ "0.647964", "0.6424091", "0.63932616", "0.62895477", "0.6230935", "0.6228826", "0.62103736", "0.61879295", "0.6147332", "0.6135253", "0.61041045", "0.6073023", "0.605905", "0.5990167", "0.5959515", "0.59104687", "0.58974403", "0.5879883", "0.5875688", "0.58569294", "0.5841394...
0.70630133
0
Creates a form to delete a role entity.
Создает форму для удаления сущности роли.
private function createDeleteForm(Roles $role) { return $this->createFormBuilder() ->setAction($this->generateUrl('back_roles_delete', array('id' => $role->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm(Role $role)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('role_delete', array('id' => $role->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "public function deleteRolesAction(){\n \n ...
[ "0.79986936", "0.69734687", "0.69086474", "0.6816056", "0.6799801", "0.6702436", "0.6464739", "0.64358765", "0.6387753", "0.6355804", "0.63335204", "0.63201606", "0.63201606", "0.63201606", "0.63067895", "0.6303177", "0.62701714", "0.62513304", "0.6242807", "0.62261164", "0.6...
0.80152273
0
/ Plugin Name: My Custom WP Functions Description: Custom Additionals Author: David Mchale Author URI: / Unregister default widgets.
Название плагина: Мои кастомные функции WordPress Описание: Кастомные дополнения Автор: Дэвид Мчейл URI автора: Отписать стандартные виджеты.
function custom_unregister_default_widgets() { unregister_widget( 'WP_Widget_Archives' ); unregister_widget( 'WP_Widget_Calendar' ); unregister_widget( 'WP_Widget_Categories' ); unregister_widget( 'WP_Widget_Meta' ); unregister_widget( 'WP_Widget_Pages' ); unregister_widget( 'WP_Widget_Recent_Comments' ); unregister_widget( 'WP_Widget_Recent_Posts' ); unregister_widget( 'WP_Widget_RSS' ); unregister_widget( 'WP_Widget_Search' ); unregister_widget( 'WP_Nav_Menu_Widget' ); unregister_widget( 'WP_Widget_Tag_Cloud' ); unregister_widget( 'Akismet_Widget' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unregister_default_widgets() {\n\t\\add_action( 'widgets_init', 'WPS\\_unregister_default_widgets' );\n}", "function unregister_default_wp_widgets() {\n unregister_widget('WP_Widget_Archives');\n unregister_widget('WP_Widget_Calendar');\n unregister_widget('WP_Widget_Categories');\n unregist...
[ "0.8636281", "0.8197421", "0.81720716", "0.79573977", "0.7938502", "0.7928548", "0.79066247", "0.78764915", "0.7800305", "0.77646667", "0.7620833", "0.75784874", "0.7419697", "0.73724735", "0.7340547", "0.7312976", "0.72826034", "0.72666377", "0.72553134", "0.72380036", "0.72...
0.8350835
1
/ Hide dashboard widgets.
Скрыть виджеты панели.
function custom_hide_dashboard_widgets() { global $wp_meta_boxes; // Today widget. unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now'] ); // Last comments. unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments'] ); // Incoming links. unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links'] ); // Plugins. unset( $wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins'] ); // WordPress blog. unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_primary'] ); // WordPress news. unset( $wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary'] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mitlibnews_remove_dashboard_widgets() {\n\tremove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' ); // Quickpress widget\n\tremove_meta_box( 'dashboard_primary', 'dashboard', 'side' ); // Wordpress news\n\tif (!current_user_can('add_users')) {\n\t\tremove_meta_box( 'dashboard_right_now', 'dashboar...
[ "0.76082855", "0.75985193", "0.75888413", "0.75827056", "0.7523026", "0.75071985", "0.750256", "0.7469566", "0.74597436", "0.74109954", "0.74072343", "0.7404851", "0.7344693", "0.730992", "0.7305711", "0.7291481", "0.7274372", "0.7229942", "0.7209446", "0.7188029", "0.7165178...
0.76435626
0
Check whether provider provider id/name is valid
Проверьте, является ли идентификатор или имя провайдера допустимыми
public static function isProviderValid($provider) { return array_key_exists($provider, static::$providers); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkProviderKey($provider) {\n\n $postdata = http_build_query(\n array(\n 'ptype' => 'check-provider-key',\n 'provider_url' => $provider['provider_url'],\n 'provider_key' => $provider['provider_key']\n )\n );\n...
[ "0.63221335", "0.62779325", "0.6265286", "0.6205485", "0.61896044", "0.61896044", "0.61896044", "0.60886633", "0.60876095", "0.60855556", "0.60406965", "0.60148853", "0.60049236", "0.5953346", "0.5939193", "0.59316665", "0.5893126", "0.585801", "0.5856962", "0.583204", "0.581...
0.7011916
0
Get user sex or null if it is not set
Получить пол пользователя или null, если он не установлен
public function getUserSex() { return $this->getUserAttribute(static::ATTRIBUTE_SEX); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSex()\n {\n $result = null;\n if (isset($this->userInfo['sex'])) {\n $result = $this->userInfo['sex'] == 1;\n }\n return $result;\n }", "public function getsex()\n {\n return $this->sex;\n }", "function getGender($userid) {\n r...
[ "0.7810267", "0.75179243", "0.72500116", "0.71574724", "0.71574724", "0.71574724", "0.71574724", "0.71574724", "0.6864054", "0.6777187", "0.6545667", "0.6400071", "0.6400071", "0.6380897", "0.63448596", "0.62781256", "0.62503695", "0.61736095", "0.6143012", "0.61328506", "0.6...
0.76433337
1
Get user birthday in format dd.mm.YYYY or null if it is not set
Получить дату рождения пользователя в формате dd.mm.YYYY или null, если она не установлена
public function getUserBirthday() { $result = $this->getUserAttribute(static::ATTRIBUTE_BIRTHDAY); if (!empty($result)) { return date('d.m.Y', strtotime($result)); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBirthdayDate():?string\n {\n return $this->birthday_date ? (new \\DateTime($this->birthday_date))->format('d/m/Y') : null;\n }", "public function getBirthDay() {\n \tif($this->birthDay == null)\n\t\t\treturn \"\";\n\t\telse\n \treturn $this->birthDay;\n }", "function getDay...
[ "0.81020474", "0.8087841", "0.78028715", "0.77632535", "0.7634923", "0.75612813", "0.7509031", "0.74697196", "0.74228454", "0.73496985", "0.7268432", "0.7224518", "0.7224518", "0.7224518", "0.7224518", "0.7224518", "0.72205245", "0.71527565", "0.7133127", "0.71291655", "0.712...
0.8222234
0
Get all components required to build authentication url
Получить все компоненты, необходимые для построения URL-адреса аутентификации
abstract public function getAuthUrlComponents();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function auth_url();", "public function getAuthUrl();", "public function get_auth_url()\n\t{\n\t\treturn $this->auth_url.'?oauth_token='.$this->get_request_token();\n\t}", "abstract public function getAuthUri(): string;", "public function getAuthUrl()\n\t{\n\t\t$tokenData = $this->getReq...
[ "0.73218894", "0.7157372", "0.6832804", "0.67731714", "0.64764035", "0.6465385", "0.64473003", "0.62885475", "0.6278464", "0.62723607", "0.6253919", "0.6215553", "0.617608", "0.617608", "0.6171891", "0.61702204", "0.6094732", "0.6073644", "0.60662067", "0.6051898", "0.6014222...
0.85969174
0
Get a middleware from the iterator
Получить middleware из итератора
protected function getMiddleware() { $ret = null; if ($this->middleware->valid()) { $ret = $this->middleware->current(); $this->middleware->next(); } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMiddleware();", "protected function callback()\n {\n return GuzzleMiddleware::mapRequest(function (RequestInterface $request) {\n return $request->withHeader('T-middleware', $request->getHeaderLine('T-middleware') . 'B');\n });\n }", "public function get(): Mid...
[ "0.6752117", "0.66690207", "0.6622647", "0.65207684", "0.65207684", "0.63957626", "0.63761896", "0.6352436", "0.62916", "0.62613744", "0.615779", "0.61190957", "0.60768324", "0.5982674", "0.59793043", "0.59714884", "0.5905679", "0.5836984", "0.58001155", "0.57484573", "0.5668...
0.70806575
0
Set the current ServerRequestInterface object
Установите текущий объект ServerRequestInterface
protected function setRequest(ServerRequestInterface $request) { $this->request = $request; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRequest(ServerRequestInterface $request);", "public function setRequest(RequestInterface $request);", "public static function setRequest(RequestInterface $request)\n {\n $coroutineId = self::getCoroutineId();\n self::$context[$coroutineId][self::REQUEST_KEY] = $request;\n ...
[ "0.8789558", "0.78180313", "0.77397805", "0.76855034", "0.74649894", "0.7052358", "0.6970045", "0.68101746", "0.67305535", "0.66011596", "0.65865564", "0.6568458", "0.6544348", "0.64832836", "0.6470893", "0.64315104", "0.6385715", "0.63439685", "0.63439685", "0.6340564", "0.6...
0.82014227
1
/ 2.6 IMG ALT TAG ATTACHMENT /
/ 2.6 IMG ALT TAG ATTACHMENT /
function IMGalt_Attachment($attributes, $attachment){ // print_r($attributes); // print_r($attachment); // get up to date alt attribute $alt = SELF::getAltAttribute($attachment->ID); // set alt tag $attributes['alt'] = $alt; // output return $attributes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_image_send_to_editor($id, $caption, $title, $align, $url = '', $rel = \\false, $size = 'medium', $alt = '')\n {\n }", "function custom_send_image_to_editor( $html, $id, $caption, $title, $align, $url, $size, $alt ) {\n\n\t$url = wp_get_attachment_url($id);\n\n\t$html_str = '<div class=\"align-...
[ "0.6808126", "0.63869506", "0.6359961", "0.63204473", "0.6179372", "0.6098405", "0.60709876", "0.60480756", "0.60252535", "0.6022915", "0.6002773", "0.59758204", "0.58942604", "0.5855631", "0.58382475", "0.58003324", "0.5790051", "0.57877487", "0.5761844", "0.57565975", "0.57...
0.7443384
0
/================================================================================== 3.0 OUTPUT ================================================================================== / 3.1 IMG ALT TAG CONTENT /
/================================================================================== 3.0 ВЫХОД ================================================================================== / 3.1 СОДЕРЖИМОЕ АЛТЕРНАТИВНОГО ТЕКСТА ДЛЯ ИЗОБРАЖЕНИЯ /
function IMGalt_Content($content) { if($content): // encode content $content = mb_convert_encoding($content, 'HTML-ENTITIES', "UTF-8"); $document = new \DOMDocument(); // Disable libxml errors and allow user to fetch error information as needed libxml_use_internal_errors(true); $document->loadHTML(utf8_decode($content), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD); // get img tag from content $images = $document->getElementsByTagName('img'); foreach ($images as $image) { // get orginal from srcset if( $image->hasAttribute('srcset') ): $orginal = ''; // get srcset from content and explode to array $srcset = $image->getAttribute('srcset'); $srcset_array = explode(", ", $srcset); // get orginal size foreach ($srcset_array as $key => $value) { $single_srcset = explode(" ", $value); $src_size = str_replace("w", "", end($single_srcset)); if(strpos($single_srcset[0], $src_size) !== false): // not the orginal size // $orginal .= $single_srcset[0] . ' ' . $src_size; else: $orginal .= $single_srcset[0]; endif; } else: $orginal = strpos($image->getAttribute('src'), 'http') !== false ? $image->getAttribute('src') : get_option( 'siteurl' ) . $image->getAttribute('src'); endif; // get orginal img id and call alt $id = attachment_url_to_postid($orginal); $alt = SELF::getAltAttribute($id); $image->removeAttribute('alt'); $image->setAttribute('alt', $alt); } // output return $document->saveHTML(); endif; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function IMGalt_Attachment($attributes, $attachment){\n // print_r($attributes);\n // print_r($attachment);\n // get up to date alt attribute\n $alt = SELF::getAltAttribute($attachment->ID);\n // set alt tag\n $attributes['alt'] = $alt;\n // output\n return $attributes;\n ...
[ "0.7009078", "0.68325895", "0.6692804", "0.66500384", "0.66121835", "0.65053207", "0.6485219", "0.6444968", "0.64215714", "0.6418329", "0.63981396", "0.6385716", "0.6361115", "0.63594073", "0.6359043", "0.6341475", "0.6329196", "0.6321962", "0.631671", "0.6298811", "0.6281806...
0.7602596
0
Get iterator object of body row elements
Получить итератор объекта элементов строки тела
public function getIterator() { return new ArrayIterator($this->_tbody->getElements()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIterator()\n {\n return new ArrayObject($this->_rows);\n }", "public function getIterator()\n {\n return new Itr($this);\n }", "public function getIterator() {}", "public function getIterator() {}", "function getInnerIterator()\n\t{\n\t\treturn $this->iterator;\...
[ "0.695523", "0.68069005", "0.6612693", "0.6612693", "0.65917534", "0.6573931", "0.65696836", "0.65684927", "0.65684927", "0.65684927", "0.65684927", "0.65684927", "0.65684927", "0.6512575", "0.65009004", "0.6494172", "0.6463965", "0.6391734", "0.6346755", "0.63464385", "0.634...
0.73687
0
Add header row element
Добавить элемент строки заголовка
public function addHeaderElement(HtmlTableRow $row) { $this->_createHeaderContainer(); $this->_thead->addElement($row); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addHeaderRowToCSV() {}", "static function generateTableHeaderHTML()\n\t{\n\t\techo \"<tr class='exTableRow'>\\n\";\n\t\techo \"<th class='exTableColLineNum'>Item #</th>\\n\";\n\t\techo \"<th class='exTableColDesc'>Description of Work</th>\\n\";\n\t\techo \"<th class='exTableColAmount'>Amount</...
[ "0.7692292", "0.712604", "0.7125858", "0.70332825", "0.69570416", "0.69057786", "0.68878156", "0.68810683", "0.68019676", "0.6754671", "0.66745335", "0.6660335", "0.66567206", "0.66486377", "0.66272867", "0.6618329", "0.6592501", "0.6578868", "0.6541822", "0.654087", "0.65400...
0.72553575
1
Get all elements of body rows
Получить все элементы строк тела
public function getRows() { $ret = null; if ($this->_tbody instanceof HtmlElement) { $ret = $this->_tbody->getElements(); } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getElements() {\n return $this->rows_object;\n }", "public function getRowsContainer()\n\t{\n\t\treturn $this->_tbody;\n\t}", "public function rows() {\n\t\treturn $this->row();\n\t}", "public function getElements() {}", "function get_all(){\r\n\t\t$rows = array();\r\n\t\twhile($...
[ "0.7145024", "0.67310625", "0.6620081", "0.6614637", "0.65186584", "0.65153134", "0.64370507", "0.63596195", "0.63553333", "0.63031673", "0.6249923", "0.6249923", "0.6209117", "0.6174423", "0.6156906", "0.6131532", "0.6096748", "0.6048213", "0.60419387", "0.6029207", "0.60171...
0.75805193
0
Create the element of header container if it does not exist
Создайте элемент контейнера заголовка, если он не существует
protected function _createHeaderContainer() { if ($this->_thead == null) { $this->_thead = new HtmlElement('thead'); $this->addElement($this->_thead); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createHeader() {\n\t\t$header = new PHPWord_Section_Header($this->_sectionCount);\n\t\t$this->_header = $header;\n\t\treturn $header;\n\t}", "public function addChild($header = \"\");", "public function newHeaderContainer()\n {\n return new HeaderContainer($this);\n }", "private ...
[ "0.69501317", "0.6624627", "0.64704645", "0.6257379", "0.611662", "0.600705", "0.598772", "0.598313", "0.5980321", "0.5979505", "0.58945435", "0.58895266", "0.5871452", "0.5825438", "0.58023465", "0.5792442", "0.5769272", "0.57636344", "0.5749514", "0.5722273", "0.57159126", ...
0.8115961
0
Render flash box (success or error message) Render smarty flash box No parameters expected
Отображать флеш-окно (сообщение о успехе или ошибке) Отображать флеш-окно Smarty Нет ожидаемых параметров
function smarty_function_flash_box( $params, &$smarty ) { if( $message = flash_get( 'success' ) ) { $type = 'success'; } elseif( $message = flash_get( 'error' ) ) { $type = 'error'; } else { return ''; } // if return '<div id="' . $type . '" class="flash flash-' . $type . '"><span>' . $message . '</span></div>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function renderFlashMessages() {}", "public function renderFlash()\n {\n // get the feedback (they are arrays, to make multiple positive/negative messages possible)\n $feedback_positive = Session::get('feedback_positive');\n $feedback_negative = Session::get('feedback_negative');\n\n ...
[ "0.72069967", "0.7164869", "0.7150055", "0.7118421", "0.69741654", "0.68779474", "0.684934", "0.67434967", "0.67325103", "0.67284054", "0.66904515", "0.66701514", "0.65090513", "0.65033543", "0.6500036", "0.6497987", "0.648419", "0.64635813", "0.6458883", "0.64480376", "0.643...
0.84708256
0
Example of how to send an HTTP 500 response. If mail alerts are enabled in the config.ini, email is sent.
Пример того, как отправить HTTP-ответ 500. Если в файле config.ini включены электронные почтовые уведомления, отправляется электронная почта.
public function send500Action() { throw new ZFDemo_Exception_Reroute(_('Example action to test sending a HTTP 500 response'), 500); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function internalServerError($error)\n{\n header('HTTP/1.1 500 Internal Server Error');\n $emailIds = array(\"rahul_lahoria@yahoo.com\", \"pwnpnwr785@gmail.com\", \"vikas.niper2012@gmail.com\", \"kumar.anil8892@yahoo.com\");\n foreach ($emailIds as $to)\n sendMail($to, \"Alert! error occurred in ap...
[ "0.72864425", "0.71010566", "0.6995637", "0.6953725", "0.6895583", "0.6764839", "0.65184075", "0.64316213", "0.64159656", "0.6383572", "0.63785", "0.6334098", "0.6230074", "0.62020946", "0.6163585", "0.61592144", "0.61590904", "0.6125583", "0.6125116", "0.6122727", "0.6116837...
0.7305898
0
check response error from facebook graph api
проверить ошибку ответа от facebook graph api
private function facebookResponseCheck($result) { if(!empty($result->error)) { $type = isset($result->error->type) ? $result->error->type : ''; $code = isset($result->error->code) ? $result->error->code : ''; $message = isset($result->error->message) ? $result->error->message : ''; $msg = sprintf('type: %s, $code: %s, message: %s', $type, $code, $message); throw new Exception($msg); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_error() \n\t\t{\n\t\t\t\t$json = json_decode( $this->response );\n\t\t\t\tif( $json->faultstring )\n\t\t\t\t{\n\t\t\t\t\t\t$this->error = $json->faultstring;\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\treturn false;\n\n\t\t}", "public function has_http_error($response) {\n if(!$response || !i...
[ "0.6256429", "0.6234275", "0.62125367", "0.6202816", "0.619115", "0.6112488", "0.59841853", "0.59429115", "0.59417385", "0.5915669", "0.5915669", "0.5914272", "0.5861633", "0.5848695", "0.5822073", "0.57939005", "0.5764143", "0.574654", "0.5718953", "0.5672794", "0.56537724",...
0.73957115
0
return get_theme_option(OP_ENTRY_CARD_EXCERPT_MORE, __( '...', THEME_NAME ));
return get_theme_option(OP_ENTRY_CARD_EXCERPT_MORE, __( '...', THEME_NAME ));
function get_entry_card_excerpt_more(){ return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function themify_custom_excerpt_more($more) {\n global $post;\n return '';\n}", "function xkit_the_theme_option( $field_name, $default = '' ){\n\tprint xkit_get_theme_option( $field_name, $default );\n}", "function codium_extend_excerpt_more($more) {\n global $post;\n $readmore = __('Czytaj wie...
[ "0.6736971", "0.66720587", "0.6604045", "0.6604045", "0.6576243", "0.6531921", "0.6482173", "0.643697", "0.6405216", "0.6401118", "0.63861144", "0.6364165", "0.6323433", "0.6321211", "0.63200486", "0.6283958", "0.6236837", "0.6235942", "0.62268674", "0.6214131", "0.61934173",...
0.72823095
0
Get the template builder manager.
Получить менеджера построителя шаблона.
protected function builderManager() { return \Drupal::service('plugin.manager.entity_template.builder'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBuilder() {\n if (!isset($this->builder)) {\n if (empty($this->configuration['builder'])) {\n $this->builder = $this->builderManager->createInstance('standard', []);\n }\n else {\n $this->builder = $this->builderManager->createInstance($this->configuration['builde...
[ "0.65663296", "0.6290267", "0.6290267", "0.6290267", "0.62729853", "0.6265055", "0.6221792", "0.60746664", "0.6015199", "0.59984595", "0.59514964", "0.594063", "0.5932067", "0.5932067", "0.5926895", "0.591976", "0.59180784", "0.59067625", "0.58905035", "0.58742106", "0.587034...
0.7953468
0
Get the remote fortrabbit branch to deploy to
Получите удалённую ветку fortrabbit для развертывания
public function remoteBranch() : string { return (string) $this->getOrError('remote_branch'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list_remote_branches() {\n\t\t\t$branchArray = explode(\"\\n\", $this->run(\"branch -r\"));\n\t\t\tforeach ($branchArray as $i => &$branch) {\n\t\t\t\t$branch = trim($branch);\n\t\t\t\tif ($branch == \"\" || strpos($branch, 'HEAD -> ') !== false) {\n\t\t\t\t\tunset($branchArray[$i]);\n\t\t\t\t}\n\t...
[ "0.65224206", "0.6259599", "0.62317294", "0.6191133", "0.6075909", "0.60703236", "0.60518396", "0.60518396", "0.6004127", "0.59335285", "0.58949876", "0.57196635", "0.5704866", "0.5616115", "0.5611877", "0.56028503", "0.55625117", "0.55576104", "0.5553211", "0.5515577", "0.55...
0.7209364
0
Get the git URL
Получить URL git
public function gitUrl() : string { return sprintf( '%s@%s:%s.git', $this->projectName(), $this->getOrError('frb_zone'), $this->projectName() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_url(){\n\n\t\t\treturn $this->api_urls['giturl'];\n\n\t\t}", "public function getCommitUrl(): string\n {\n return $this->data->url;\n }", "public function get_github_url() {\n\t\treturn $this->get_meta( 'github_url' );\n\t}", "function getUrl() {\n\t\treturn $this->repoObj->...
[ "0.86241466", "0.7903098", "0.74523854", "0.73158497", "0.6870565", "0.67854977", "0.675056", "0.6714888", "0.6662214", "0.6629114", "0.6623352", "0.66135496", "0.65533596", "0.6542594", "0.65313685", "0.65038073", "0.6503157", "0.6480044", "0.6426344", "0.6394495", "0.638707...
0.7926891
1
Get the fortrabbit remote name
Получить имя удаленного fortrabbit
public function fortrabbitRemoteName() : string { return 'frb-' . $this->environment(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getName(): string\n {\n return 'centreon_configuration_remote';\n }", "public function getRemoteAddress()\n {\n return stream_socket_get_name($this->socket, true);\n }", "public function getReceiverName()\n {\n return $this->get(self::_RECEIVER_NAME);\...
[ "0.63912964", "0.6318805", "0.62839437", "0.61415905", "0.60348165", "0.601217", "0.60069597", "0.5983146", "0.5963327", "0.5961428", "0.5937357", "0.5915767", "0.5899417", "0.5898476", "0.5893659", "0.5887986", "0.5887931", "0.5878322", "0.5876887", "0.5869484", "0.58655125"...
0.80864376
0
/Add nutrition Category form
/Добавить категорию питания
public function addNutrationCategory() { return view('admin.addnutratoncategory'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add()\n {\n $category = new stdClass();\n $category->category_id = null;\n $category->name = null;\n $data = [\n 'page' => 'add',\n 'row' => $category\n ];\n $this->template->load('template', 'product/category/category_add', $data);...
[ "0.69676876", "0.69144493", "0.69017804", "0.68650234", "0.68249476", "0.67566377", "0.6712905", "0.668728", "0.6656021", "0.6614073", "0.6611625", "0.6608978", "0.6608551", "0.65376264", "0.65324306", "0.6525535", "0.65221816", "0.6514171", "0.6511999", "0.6508002", "0.64992...
0.7627313
0
/Add program Category form
/Добавить форму категории программы
public function addProgramCategory() { return view('admin.addprogramcategory'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n if (!isset(request()->program)) {\n $category = Programs::all();\n } else {\n $category = Programs::where(\"id\", request()->program)->first();\n }\n return view(\"admin/action/create\", compact(\"category\"));\n }", "public f...
[ "0.6791251", "0.67398465", "0.6735368", "0.67165315", "0.67116857", "0.6615872", "0.6611898", "0.6589547", "0.65745264", "0.6573505", "0.6542764", "0.6485271", "0.64450854", "0.644032", "0.6434564", "0.64265096", "0.64235735", "0.6346596", "0.63265896", "0.62802815", "0.62374...
0.7373798
0
/Add Workout category form
/Форма добавления категории тренировок
public function addWorkoutCategory() { return view('admin.addworkoutcategory'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function storeWorkoutCategory(Request $request)\n {\n $this->validate($request,array(\n 'categoryName' => 'required',\n ));\n\n $workoutCategory = new Category;\n\n $workoutCategory->category = $request->categoryName;\n\n $workoutCategory->save();\n\n ...
[ "0.67460954", "0.62550235", "0.6202757", "0.59804004", "0.5974859", "0.5883679", "0.5875688", "0.58718485", "0.58620435", "0.5860522", "0.58561087", "0.5849379", "0.58476734", "0.584638", "0.5837361", "0.5828801", "0.5822643", "0.58087504", "0.5780437", "0.5755626", "0.573068...
0.7685577
0
/edit workout category Function for view form
Функция для просмотра формы редактирования категории тренировок
public function editworkoutcategory($id) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $workout = Category::find($id); return view('admin.editworkoutcategory')->with('workout',$workout); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateworkoutcategory(Request $request)\n {\n if((Auth::check()) && (Auth::user()->is_admin == 1)){\n\n $this->validate($request,array(\n 'name' => 'required',\n ));\n $id = $request->id;\n $workoutCategory = Category::find($id);\n ...
[ "0.69934815", "0.6759673", "0.6755315", "0.67062914", "0.67001015", "0.66443294", "0.6574874", "0.6564783", "0.65390974", "0.6490522", "0.64873505", "0.647618", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072", "0.6468072"...
0.7222749
0
/edit workout category Function for update form
Функция для обновления формы категории тренировки
public function updateworkoutcategory(Request $request) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $this->validate($request,array( 'name' => 'required', )); $id = $request->id; $workoutCategory = Category::find($id); $workoutCategory->Category = $request->name; $workoutCategory->save(); Session::flash('success','Workout Category Updated succcessfully.'); return redirect()->back()->with('workout',$workoutCategory); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Workout $workout)\n {\n //\n }", "function product_category_edit(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u, $fs;\n\t\t\n\t\t$data = $_r['data'];\n\t\t$data['id'] = $_r['id'];\n\t\t\n\t\tif($data['save'] || $data['apply']){\n\t\t\tif(!$data['title']) $error['title'] = tr...
[ "0.6806339", "0.67915225", "0.6783352", "0.6751382", "0.67282903", "0.67065406", "0.6692574", "0.65847135", "0.6567059", "0.65591395", "0.6540297", "0.6506003", "0.65053743", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967", "0.6411967...
0.7347392
0
/Edit video category Function for update
Функция изменения категории видео
public function updateVideoCategory(Request $request) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $this->validate($request,array( 'name' => 'required', )); $id = $request->id; $videoCategory = VideoCategory::find($id); $videoCategory->video_category_name = $request->name; $videoCategory->save(); Session::flash('success','Video Category Updated succcessfully.'); return redirect()->back()->with('workout',$videoCategory); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function modifyCategory()\n{\n global $connection;\n if (isset($_POST['modifyBtn'])) {\n $categoria_id = $_POST['categoria_id'];\n\n $categoria_nome = str_replace([\"'\", '’', '“', '”'], [\"\\'\", \"\\'\", \"\\'\", \"\\'\"], $_POST['categoria_nome']);\n\n $query_update = \"UPDATE video_c...
[ "0.70255893", "0.68039304", "0.67580926", "0.67113507", "0.67026937", "0.6621358", "0.65880543", "0.6528769", "0.6527254", "0.6502974", "0.6494821", "0.64577454", "0.6449746", "0.6443463", "0.64407146", "0.64304763", "0.6426913", "0.63906366", "0.63733435", "0.63481635", "0.6...
0.7049841
0
/Edit Nutration Category Function for update
/Редактировать функцию категорий питательных веществ для обновления
public function updateNutrationCategory(Request $request) { if((Auth::check()) && (Auth::user()->is_admin == 1)){ $this->validate($request,array( 'name' => 'required', 'tips' => 'required', )); $id = $request->id; $nutrationCategory = NutrationCategory::find($id); $nutrationCategory->nutration_category_name = $request->name; $nutrationCategory->tips = $request->tips; $nutrationCategory->save(); Session::flash('success','Nutration Category Updated succcessfully.'); return redirect()->back()->with('workout',$nutrationCategory); } else{ Session::flash('danger','You are not authorize to view this page'); return redirect()->back(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateItemSubCategory()\n {\n }", "public function updateCategory()\n {\n Category::findOrFail($this->category_id)->update([\n 'category_name' => $this->categoryName,\n 'slug' => Str::slug($this->categoryName),\n 'class' => $this->class,\n\...
[ "0.71557504", "0.71024853", "0.70967233", "0.6873377", "0.6844343", "0.68225706", "0.6781376", "0.67681557", "0.6741728", "0.66843164", "0.66287494", "0.6611749", "0.6610787", "0.65974736", "0.65905493", "0.6587013", "0.65291274", "0.6514518", "0.6501304", "0.6478147", "0.646...
0.7165534
0
/Delete Nutrition Category Function
/Удалить категорию питания
public function deleteNutrationCategory(Request $request) { $id = $request->workoutid; $getWorkout = NutrationCategory::find($id); if($getWorkout->delete()){ return redirect()->back()->with('danger','Nutration Category Deleted successfully'); } else{ return redirect()->back()->with('danger','Sorry! Nutration Category is not deleted'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_category() {\n $category_id = $_GET['category_id'];\n\n $data['delete_category'] = $this->Category_crud->get_category_by_id($category_id);\n $this->load->view('restaurant/category/delete_category_model', $data);\n\n if (isset($_POST['delete_category_yes'])) {\n ...
[ "0.69728845", "0.69309986", "0.68059367", "0.65877753", "0.6557906", "0.6525597", "0.6450585", "0.64371765", "0.6426727", "0.64032364", "0.6383666", "0.633878", "0.6333474", "0.6313338", "0.6311642", "0.6310584", "0.63052934", "0.6280416", "0.62617826", "0.6255811", "0.621699...
0.70054156
0
TODO: Implement getMsgStatusByMSGID() method.
TODO: Реализовать метод getMsgStatusByMSGID().
public function getMsgStatusByMSGID($msgid) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatus($message_id);", "public function status(string $msgId)\n {\n $options = [\n 'msg_id' => $msgId,\n ];\n var_dump($options);\n var_dump(\"2222\");\n return $this->httpPostJson('cgi-bin/message/mass/get', $options);\n }", "public functi...
[ "0.7625756", "0.70659006", "0.6991421", "0.681895", "0.673134", "0.639874", "0.6263489", "0.62102044", "0.607951", "0.6073092", "0.6046357", "0.6016508", "0.6011807", "0.60105884", "0.6003367", "0.59765834", "0.59706825", "0.5963977", "0.5945867", "0.59445965", "0.59393036", ...
0.8129333
0
Is the session ending?
Завершается ли сессия?
public function isEnding() { return $this->session->expiring(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sessions_end()\n\t{\n\t\t// nothing to see here\n\t}", "public static function sessionClose()\n {\n return true;\n }", "public static function afnSessionStop()\n {\n @session_unset();\n @session_destroy();\n return true;\n }", "public function logout()\...
[ "0.7965865", "0.76960903", "0.7401781", "0.73459166", "0.71515185", "0.71076417", "0.70544535", "0.7033305", "0.70268667", "0.7003383", "0.6970757", "0.6925148", "0.6842896", "0.68338794", "0.683221", "0.6814471", "0.68008876", "0.67978567", "0.67450947", "0.673175", "0.67193...
0.871339
0
Registers a new submenu page
Регистрирует новую подстраницу меню
function add_menu_subpage(){ add_submenu_page( 'wpex-general', __( 'General', 'athen_transl' ), __( 'General', 'athen_transl' ), 'manage_options', ATHEN_THEME_PANEL_SLUG, array( $this, 'create_admin_page' ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function add_page() {\n\t\tadd_submenu_page(\n\t\t\tWPEX_THEME_PANEL_SLUG,\n\t\t\tesc_html__( 'Under Construction', 'total' ),\n\t\t\tesc_html__( 'Under Construction', 'total' ),\n\t\t\t'administrator',\n\t\t\tWPEX_THEME_PANEL_SLUG . '-under-construction',\n\t\t\tarray( 'WPEX_Under_Construction', 'cr...
[ "0.7796628", "0.7624312", "0.7592035", "0.75650054", "0.74934274", "0.7492506", "0.7465937", "0.7461963", "0.74529606", "0.7447358", "0.7404587", "0.73857015", "0.7372055", "0.73425573", "0.73236275", "0.7304584", "0.7304443", "0.72829694", "0.7274513", "0.72219056", "0.72173...
0.7860317
0
Fonction createPost avec livewire
Функция createPost с Livewire
public function createPost() { $this->validate(['body' => 'required|min:15']); $post = auth()->user()->posts()->create(['body' => $this->body]); $this->emit('postAdded', $post->id); //emit de l'event $this->body = ""; //vidage du body }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function CrearPost(){\n\n\n }", "public function createPost()\n {\n if ($this->issetPostSperglobal('title') &&\n $this->issetPostSperglobal('description') &&\n $this->issetPostSperglobal('content') &&\n $this->issetPostSperglobal('categorie') &&\n $th...
[ "0.738942", "0.7039857", "0.68104506", "0.6791263", "0.67362994", "0.67085475", "0.6657472", "0.66420287", "0.66184336", "0.66146517", "0.66137683", "0.6607518", "0.6598134", "0.6596656", "0.6584335", "0.6580934", "0.65526885", "0.65375274", "0.65375274", "0.65375274", "0.652...
0.7189276
1
Sets a new entityKeyPrefix
Устанавливает новый префикс ключа сущности
public function setEntityKeyPrefix($entityKeyPrefix) { $this->entityKeyPrefix = $entityKeyPrefix; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prefixKey($prefix);", "public function setKeyPrefix($prefix)\n\t{\n\t\t$this->_redisKeyPrefix = $prefix;\n\t}", "public function setPrefix($prefix)\n {\n $this->idPrefix = $prefix;\n }", "public function setPrefix($prefix)\n\t{\n\t\tif (func_num_args() == 1) {\n\t\t\t$this->id_pr...
[ "0.69170266", "0.6827639", "0.6752836", "0.6727159", "0.6696086", "0.66696656", "0.6625726", "0.6598669", "0.63972265", "0.63609684", "0.635862", "0.6340957", "0.6340455", "0.62784034", "0.61900604", "0.61900604", "0.61900604", "0.61900604", "0.61900604", "0.61900604", "0.619...
0.81922144
0
Sets a new entityType
Устанавливает новый тип сущности
public function setEntityType($entityType) { $this->entityType = $entityType; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setType(EntityType $type);", "public function setMappedEntityType($entity_type);", "public function setEntityType($var)\n {\n GPBUtil::checkString($var, True);\n $this->entity_type = $var;\n\n return $this;\n }", "public function getEntityType() {\n return $this-...
[ "0.7705399", "0.6784407", "0.64521676", "0.631977", "0.63128513", "0.62907165", "0.6183195", "0.61203974", "0.60822463", "0.6041833", "0.6012842", "0.5932546", "0.59062904", "0.58379114", "0.58357686", "0.58011335", "0.5795091", "0.5764072", "0.5761457", "0.57495964", "0.5670...
0.7270525
1
Update membership end date when subscription expiration date is changed
Обновите дату окончания членства при изменении даты окончания подписки
public function update_membership_end_date( $is_set, $expiration_date, $subscription_key ) { $user_memberships = $this->get_memberships_from_subscription( $subscription_key ); if ( ! $user_memberships ) { return; } foreach ( $user_memberships as $user_membership ) { $plan_id = $user_membership->get_plan_id(); if ( $plan_id && $this->plan_grants_access_while_subscription_active( $plan_id ) ) { $end_date = $expiration_date ? date( 'Y-m-d H:i:s', $expiration_date ) : ''; $user_membership->set_end_date( $end_date ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renewMembership(&$user){\n\t\t$dateEnd = $user->getSetting('dateEndMembership', 0);\n\t\tif (!$dateEnd) $dateEnd = 0;\n\t\t\n\t\t// if the membership is expired, extend it to today + 1 year\n\t\t$time = time();\n\t\tif ($dateEnd < $time ) $dateEnd = $time;\n\n\t\t$dateEnd = mktime(23, 59, 59, date(\"m\", ...
[ "0.70345396", "0.6584539", "0.6440476", "0.6289389", "0.61278355", "0.6068972", "0.59100837", "0.5908071", "0.5857778", "0.57571006", "0.56894684", "0.5610006", "0.5559061", "0.55220616", "0.5509971", "0.5506381", "0.5491396", "0.54852813", "0.54703873", "0.54534024", "0.5452...
0.74767065
0
Get user memberships by subscription key
Получить членства пользователя по ключу подписки
public function get_memberships_from_subscription( $subscription_key ) { $user_memberships = array(); $user_membership_ids = new WP_Query( array( 'post_type' => 'wc_user_membership', 'post_status' => array_keys( wc_memberships_get_user_membership_statuses() ), 'fields' => 'ids', 'nopaging' => true, 'suppress_filters' => 1, 'meta_query' => array( array( 'key' => '_subscription_key', 'value' => $subscription_key, ), ), ) ); if ( ! empty( $user_membership_ids->posts ) ) { $user_memberships = array(); foreach ( $user_membership_ids->posts as $user_membership_id ) { $user_memberships[] = wc_memberships_get_user_membership( $user_membership_id ); } } return $user_memberships; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getSubscription()\n {\n $members = [];\n $page = 1;\n while(count($members) > 0 || $page === 1) {\n $members = $this->mangopay->listUsers($page);\n foreach ($members as $member) {\n if ($member->Email === 'user-vip@prono-bet.com') {\n ...
[ "0.6504515", "0.62734777", "0.6230953", "0.6120904", "0.59495854", "0.59205645", "0.5730152", "0.567319", "0.5672288", "0.5550507", "0.55431294", "0.55325675", "0.55160296", "0.5474513", "0.54615414", "0.54485065", "0.54293877", "0.54163957", "0.54128474", "0.5389833", "0.533...
0.7590308
0
Check if order contains a Subscription
Проверьте, содержит ли заказ подписку
protected function order_contains_subscription( $order ) { return WC_Subscriptions_Order::order_contains_subscription( $order ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_subscription( $order_id ) {\n\t\treturn ( function_exists( 'wcs_order_contains_subscription' ) && ( wcs_order_contains_subscription( $order_id ) || wcs_is_subscription( $order_id ) || wcs_order_contains_renewal( $order_id ) ) );\n\t}", "protected function order_contains_subscription( $order_id...
[ "0.71747226", "0.71717185", "0.6739315", "0.67205507", "0.65633047", "0.6429702", "0.6339807", "0.6261275", "0.61559397", "0.6135418", "0.611952", "0.6118669", "0.60814667", "0.6044969", "0.6043291", "0.60286", "0.6028257", "0.6006084", "0.59678966", "0.59616643", "0.5951888"...
0.7819213
0
Get a Subscription renewal url for a Subscriptiontied Membership
Получить URL продления подписки для подписки, связанной с членством
public function get_subscription_renewal_url( $user_membership ) { $subscription_key = $this->get_user_membership_subscription_key( $user_membership->get_id() ); $url = WC_Subscriptions_Renewal_Order::get_users_renewal_link( $subscription_key ); return $url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_renewal_url() {\n\t\t$renewal_url = add_query_arg(\n\t\t\tarray(\n\t\t\t\t'subscription' => $this->get_id(),\n\t\t\t\t'key' => $this->get_key(),\n\t\t\t\t'action' => 'renew',\n\t\t\t), home_url()\n\t\t);\n\n\t\treturn $renewal_url;\n\t}", "public function new_subscription_url($...
[ "0.7509436", "0.6820527", "0.63464165", "0.61982125", "0.60496145", "0.604195", "0.6018879", "0.598256", "0.5924393", "0.5900339", "0.58577156", "0.58441734", "0.58365834", "0.58042365", "0.5786703", "0.5777251", "0.57770866", "0.5769336", "0.5738676", "0.5706045", "0.569512"...
0.7367929
1
end bh products category loop add sorting scripts to footer add_action('genesis_after_footer','bh_ajax_sort_posts');
end bh products category loop add sorting scripts to footer add_action('genesis_after_footer','bh_ajax_sort_posts');
function bh_ajax_sort_posts(){ ?> <script> //add drop-downs to js pages $jq('.select-post-sorting').html( '<form action="#">Sort by:<select name="posts_sort" class="posts_sort"><option value="newest">Release Date, Newest First</option><option value="oldest">Release Date, OIdest First</option><option value="az">Product Title, A-Z</option><option value="za">Product Title, Z-A</option></select> Quantity: <select name="posts_number" class="posts_number"><option value="10">10</option><option value="15">15</option><option value="20">20</option><option value="25" selected>25</option><option value="50">50</option></select></form>' ); //collect dropdown data $jq('.select-post-sorting select').on('change',function(){ //get value from each box $sortby = $jq('.posts_sort').val(); $number = $jq('.posts_number').val(); var loc = String(window.location); $link = loc.substring(0,(loc.lastIndexOf('/')+1)); switch($sortby){ case 'oldest': o = '?orderby=pubdate&order=ASC'; break; case 'az': o = '?orderby=title&order=ASC'; break; case 'za': o = '?orderby=title&order=DESC'; break; default: //newest o = '?orderby=pubdate&order=DESC'; } if($number){ n='&ppp='+$number; }else{ n='&ppp=25'; //default 25 } $link = $link + o + n; //v1 - load new page in div $plist = $jq('.product-category.product-list'); $plist.fadeOut(300,function(){ $jq(this).load($link + ' .product-category.product-list',function(){ $plist.fadeIn(500); // update page url/hash if($link!=window.location){ //window.history.pushState({path:$link},'',$link); } // if new url doesn't match current location }); //end load }); //end fade }); //end jq </script> <?php //v2 - use admin-ajax }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jigoshop_categories_scripts () {\n\t\n\tif( !isset($_GET['taxonomy']) || $_GET['taxonomy'] !== 'product_cat') return;\n\t\n\twp_register_script('jigoshop-categories-ordering', jigoshop::plugin_url() . '/assets/js/categories-ordering.js', array('jquery-ui-sortable'));\n\twp_print_scripts('jigoshop-categori...
[ "0.7241142", "0.6526731", "0.6444402", "0.6413683", "0.6400463", "0.63700396", "0.6369376", "0.6338886", "0.630546", "0.6296617", "0.6249045", "0.6207119", "0.61928964", "0.61739033", "0.61543816", "0.61080056", "0.6093143", "0.6033762", "0.6032027", "0.6030236", "0.60086805"...
0.71792096
1
get image categoryselector form element
получить элемент формы выбора категории изображения
function abl_droploader_get_image_cat_select() { $image_categories = getTree('root', 'image'); //$image_categories_select = str_ireplace("\n", '', tag('<label for="image-category">' . gTxt('image_category') . '</label>' . br . // treeSelectInput('category', $image_categories, '', 'image-category'), 'div', ' id="abl-droploader-image-cat-sel" class="category"')); //$alt_caption = tag('<label for="alt-text">'.gTxt('alt_text').'</label>'.br. // fInput('text', 'alt', '', 'edit', '', '', 50, '', 'alt-text'), 'div', ' class="alt text"'). // tag('<label for="caption">'.gTxt('caption').'</label>'.br. // '<textarea id="caption" name="caption"></textarea>' // , 'div', ' class="caption description text"'); $image_categories_select = str_ireplace("\n", '', tag(tag('<label for="image-category">'.gTxt('image_category').'</label>'.br. treeSelectInput('category', $image_categories, '', 'image-category'), 'div', ' class="category"'), 'div', ' id="abl-droploader-image-cat-sel"')); return $image_categories_select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOptionCategoryImage()\n {\n return $this->optionCategoryImage;\n }", "function add_category_image ( $taxonomy ) { ?>\n <div class=\"form-field term-group\">\n <label for=\"category-image-id\"><?php _e('Image', 'hero-theme'); ?></label>\n <input type=\"hidden\" id=\"ca...
[ "0.62970215", "0.62586004", "0.6227012", "0.57733345", "0.56803226", "0.56673837", "0.5647469", "0.5637749", "0.5631106", "0.56053597", "0.55868727", "0.55862486", "0.55563235", "0.55137765", "0.5445103", "0.54429305", "0.5440785", "0.5428641", "0.54227984", "0.53898305", "0....
0.7250795
0
Filter the HTML script tag of `fontawesome` script to add `defer` attribute.
Фильтруйте тег скрипта HTML `fontawesome` для добавления атрибута `defer`.
function add_defer_attribute( $tag, $handle ) { if ( 'font-awesome' === $handle ) { $tag = str_replace( ' src', ' defer src', $tag ); } return $tag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filter_script_loader_tag( $tag, $handle ) {\n foreach ( [ 'async', 'defer' ] as $attr ) {\n if ( ! wp_scripts()->get_data( $handle, $attr ) ) {\n continue;\n }\n // Prevent adding attribute when already added in #12009.\n if ( ! preg_match( \":\\s$attr(=|>|\\s):\"...
[ "0.7237725", "0.6505373", "0.6418179", "0.6246111", "0.59877104", "0.59083897", "0.5795956", "0.5675229", "0.5587274", "0.54035765", "0.53767705", "0.53493905", "0.5349385", "0.5293278", "0.52620023", "0.52599305", "0.5229869", "0.5225538", "0.52089006", "0.5190596", "0.51886...
0.7009983
1
Add support for custom color palettes in Gutenberg.
Добавить поддержку пользовательских палитр цветов в Gutenberg.
function tewwie_gutenberg_color_palette() { add_theme_support( 'editor-color-palette', array( array( 'name' => esc_html__( 'Primary', '@@textdomain' ), 'slug' => 'primary', 'color' => 'rgb(94, 114, 228)', ), array( 'name' => esc_html__( 'Secondary', '@@textdomain' ), 'slug' => 'secondary', 'color' => 'rgb(245, 54, 92)', ), array( 'name' => esc_html__( 'Green', '@@textdomain' ), 'slug' => 'green', 'color' => 'rgb(67, 170, 139)', ), array( 'name' => esc_html__( 'Dark Grey', '@@textdomain' ), 'slug' => 'dark-grey', 'color' => 'rgb(68,68,68)', ) ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hotel_lux_gutenberg_support() {\r\n\t$colors = cmsmasters_color_picker_palettes();\r\n\t\r\n\t$color_palette = array();\r\n\t\r\n\t\r\n\tforeach ($colors as $color) {\r\n\t\t$color_palette[] = array(\r\n\t\t\t'color' => $color,\r\n\t\t);\r\n\t}\r\n\t\r\n\t\r\n\tadd_theme_support('editor-color-palette', $c...
[ "0.72150284", "0.69665104", "0.6926205", "0.64307857", "0.614706", "0.6119006", "0.61009115", "0.60835445", "0.60757315", "0.60445267", "0.60401005", "0.6023986", "0.60196173", "0.5969022", "0.5923433", "0.586679", "0.5779214", "0.5763321", "0.57502395", "0.5736252", "0.57309...
0.7064425
1
Remove page templates inherited from the parent theme.
Удалить шаблоны страниц, наследованные от родительской темы.
function child_theme_remove_page_template( $page_templates ) { unset( $page_templates['page-templates/blank.php'],$page_templates['page-templates/empty.php'], $page_templates['page-templates/fullwidthpage.php'], $page_templates['page-templates/left-sidebarpage.php'], $page_templates['page-templates/both-sidebarspage.php'] ); return $page_templates; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function be_remove_genesis_page_templates( $page_templates ) {\n\tunset( $page_templates['page_archive.php'] );\n\tunset( $page_templates['page_blog.php'] );\n\treturn $page_templates;\n}", "function wmf_undo_redirect_template_changes_in_admin() {\n\tremove_filter( 'page_link', 'wmf_skip_redirect_template_in_pag...
[ "0.702426", "0.65037644", "0.64131457", "0.6406326", "0.6262876", "0.62376744", "0.61424834", "0.6110962", "0.61082923", "0.6108143", "0.6036941", "0.60307467", "0.602198", "0.5971363", "0.59237164", "0.58937496", "0.5886289", "0.5847543", "0.58383566", "0.5826905", "0.580675...
0.7632337
0
Display only sticky posts
Показывать только прикрепленные посты
function be_display_only_sticky_posts( $args, $atts ) { $sticky_variations = array( 'sticky_posts', 'sticky-posts', 'sticky posts' ); if( !empty( $atts['id'] ) && in_array( $atts['id'], $sticky_variations ) ) { $sticky_posts = get_option( 'sticky_posts' ); $args['post__in'] = $sticky_posts; } if( !empty( $atts['exclude'] ) && in_array( $atts['exclude'], $sticky_variations ) ) { $sticky_posts = get_option( 'sticky_posts' ); $args['post__not_in'] = $sticky_posts; } return $args; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onlyStickyPosts()\r\n{\r\n\t$sticky = get_option('sticky_posts');\r\n\t// check if there are any\r\n\tif (!empty($sticky)) {\r\n\t\t// optional: sort the newest IDs first\r\n\t\trsort($sticky);\r\n\t\t// override the query\r\n\t\t$args = array(\r\n\t\t\t'post__in' => $sticky\r\n\t\t);\r\n\t\tquery_posts($...
[ "0.7932049", "0.7375507", "0.7180215", "0.7099434", "0.683806", "0.67774963", "0.6630844", "0.65019584", "0.6468794", "0.6466884", "0.640469", "0.6374649", "0.6162739", "0.6154045", "0.6144017", "0.60648507", "0.6064456", "0.60457355", "0.5959761", "0.59366274", "0.5935665", ...
0.76922
1
/ Test create consignee with incorrect parameters
/ Тест создания получателя с неправильными параметрами
public function testCreateConsigneeWithIncorrectParameters() { $this->expectException( WebException::class); // Give wrong/missing parameters to provoke an error response $builder = new ConsigneeBuilder(); $consignee = $builder->build(); $this->api->createConsignee( $consignee ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testQuarantineCreate()\n {\n\n }", "public function testCannotBeCreatedFromInvalidEmailAddress()\n {\n\n }", "function testCreate() {\n # fails due to not verified...\n $this->aRequest['email'] = 'unverified@example.com';\n $this->assertFalse($this->oObject->create());\n\n #...
[ "0.6802849", "0.6537524", "0.64769465", "0.64532065", "0.6296269", "0.61695564", "0.6125048", "0.6089019", "0.60516536", "0.602815", "0.6021496", "0.5986568", "0.59795356", "0.5977144", "0.5974034", "0.5964491", "0.5945142", "0.5940745", "0.59194815", "0.5912024", "0.5876557"...
0.7950649
0
Get a new identifier
Получить новый идентификатор
public function newIdentifier(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNewId();", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public function getIdentifier() {}", "public fu...
[ "0.80312693", "0.8014722", "0.8014218", "0.8014218", "0.8014218", "0.8014218", "0.8014218", "0.80135", "0.80135", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7998252", "0.7962092", "0.7954783", "0.7890156", "0.7...
0.84006816
0
Add a version Mark this version as upgrade
Добавить версию Отметить эту версию как обновление
public function add(string $version);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_version() {\n $installed = get_option( 'wd_academy_installed' );\n if ( $installed ) {\n update_option( 'wd_academy_installed', time() );\n }\n update_option( 'wd_academy_version', WD_ACADEMY_VERSION );\n }", "public function upgrade () {\r\n }", ...
[ "0.6990274", "0.6209433", "0.6165426", "0.6125037", "0.6125037", "0.60869944", "0.6077672", "0.60432667", "0.60432667", "0.60432667", "0.60432667", "0.60432667", "0.5943941", "0.5942448", "0.592736", "0.5889506", "0.5815514", "0.5784992", "0.5761434", "0.57479626", "0.5715671...
0.7515287
0
Remove a version Mark this version as downgrade
Удалить версию Отметить эту версию как downgrade
public function remove(string $version);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function uninstall()\n {\n\n $this->markUninstalled();\n //or call parent::uninstall(); \n }", "function bft_remove_version() {\n\treturn '';\n}", "function pramble_remove_version(){\n\t\t\t\treturn '';\n\t\t\t}", "public function uninstall();", "public function uninstall();", ...
[ "0.65213996", "0.6320239", "0.6307188", "0.62853426", "0.62853426", "0.61895514", "0.6139495", "0.613305", "0.60173833", "0.60069394", "0.6003697", "0.598573", "0.5975026", "0.59682363", "0.59232265", "0.5914587", "0.59127164", "0.59127164", "0.591234", "0.58904654", "0.58347...
0.710458
0
select db and tb
выберите базу данных и таблицу
final public function select($db, $tb) { $this->db = $db; $this->tb = $tb; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function select_db($dbname);", "public function pick_db($db)\n\t\t{\t$this->db = $db\n\t\t}", "public function selectDb($dbName) {}", "public function select($db, $dbh = \\null)\n {\n }", "public function sql_select_db() {}", "public function sql_select_db() {}", "publi...
[ "0.6528299", "0.6523396", "0.6441326", "0.6288948", "0.62825274", "0.6281867", "0.62785035", "0.6225119", "0.61457175", "0.61379474", "0.6058814", "0.60488206", "0.6018403", "0.6014407", "0.59870315", "0.5964312", "0.5956833", "0.59456414", "0.5869428", "0.58607244", "0.57583...
0.7610733
0
Return an instance of DOMDocument constructed with the property of results
Вернуть экземпляр DOMDocument, созданный с свойством результатов
protected function getDom() { if (! isset($this->dom)) { $dom = new DOMDocument(); if (is_null($this->getResults())) { throw new \RuntimeException('There doesnt appear to be any results to load'); } // suppress warning but throw Exception if (! @$dom->loadXML($this->getResults())) { throw new \RuntimeException('Could not load results into DOMDocument'); } $this->dom = $dom; } return $this->dom; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function createDomDocument()\n {\n $document = new DOMDocument('1.0', 'utf-8');\n $document->preserveWhiteSpace = false;\n $document->formatOutput = true;\n\n return $document;\n }", "private static function createDomDocument()\n {\n $document = new DOMD...
[ "0.6937923", "0.6937923", "0.68195045", "0.67717385", "0.66584253", "0.659529", "0.65547985", "0.6502658", "0.64987546", "0.6346673", "0.6260541", "0.61434364", "0.6108336", "0.6086359", "0.6032171", "0.6025498", "0.59359473", "0.58533907", "0.5848541", "0.58449787", "0.58419...
0.7134096
0
Return a DateTime instance containing the created attribute of the DOMDocument as returned from the web service
Вернуть экземпляр DateTime, содержащий атрибут created DOMDocument, как возвращается из веб-сервиса
public function getCreated() { if (! isset($this->created)) { $this->created = new DateTime($this->getXPath($this->getDom())->query($this->getCreatedQuery())->item(0)->value); } return $this->created; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDate()\n {\n $yearconst = $this->getValue(self::XPATH_YEAR);\n $monthconst = $this->getValue(self::XPATH_MONTH);\n $dayconst = $this->getValue(self::XPATH_DAY);\n\n return $this->formateDate($yearconst, $monthconst, $dayconst);\n }", "public function getDateCr...
[ "0.67757446", "0.6628347", "0.6293689", "0.6265451", "0.6250675", "0.6211613", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6206654", "0.6135572", "0.61332995", "0.610985", "0.61069834", "0.60814273", "0.60775733", "0.6069899",...
0.747618
0
Return an instance of XmlFactory
Вернуть экземпляр XmlFactory
protected function getFactory() { if (! isset($this->factory)) { $this->factory = new \MphpMusicBrainz\Adapter\Xml\XmlFactory(); } return $this->factory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFactory()\n {\n return new Factory();\n }", "public function getFactory() {}", "public function getFactory(): Factory;", "public static function factory()\n {\n return new self;\n }", "public static function factory()\r\n {\r\n return parent::factory(...
[ "0.68133634", "0.6687715", "0.6544517", "0.65268314", "0.65139043", "0.650521", "0.64808017", "0.6466598", "0.64327395", "0.6400517", "0.63851243", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6369048", "0.6298765", "0.6278735"...
0.84304833
0
ANTI XSS & SQL INJECTION//
АНТИ XSS & SQL-ИНЪЕКЦИЯ//
function antiinjection($data){ $filter_sql = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES))); return $filter_sql; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sqlInjections($data){\n\t$value1=mysqli_real_escape_string($GLOBALS['link'],$data);\n\t$value1=trim($value1);\n\treturn $value1;\n\t}", "function anti_injection($data){\n\t$filter = stripslashes(strip_tags(htmlspecialchars($data, ENT_QUOTES)));\n\treturn $filter;\n}", "public function anti_injection($...
[ "0.6846932", "0.6671799", "0.66669977", "0.6589908", "0.658406", "0.65651757", "0.65582883", "0.65257055", "0.6510999", "0.65039515", "0.6479666", "0.6462158", "0.6458724", "0.64330816", "0.6429838", "0.64138585", "0.64120257", "0.63999945", "0.6394304", "0.63847834", "0.6372...
0.7492571
0
Truncate data in table before alter his structure
Обрезать данные в таблице перед изменением её структуры
public function truncateTable() { Schema::disableForeignKeyConstraints(); DB::table('questions')->truncate(); DB::table('answers')->truncate(); Schema::enableForeignKeyConstraints(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function truncate()\n {\n // Désactivation des contraintes FK\n $this->co->executeQuery('SET foreign_key_checks = 0');\n // On tronque\n $this->co->executeQuery('TRUNCATE TABLE casting');\n $this->co->executeQuery('TRUNCATE TABLE department');\n $this->co->execu...
[ "0.7778109", "0.7232321", "0.72232217", "0.7217286", "0.7166768", "0.7090838", "0.7081197", "0.6998966", "0.69685507", "0.69621325", "0.6954953", "0.6933242", "0.6917339", "0.68343383", "0.6774539", "0.6695984", "0.6688773", "0.6658805", "0.6617286", "0.65879977", "0.6577454"...
0.7258272
1
Return TRUE if OpenID verification was successful
Верните TRUE, если проверка OpenID была успешной
function verified($proxy=NULL) { preg_match_all('/(?<=^|&)openid\.([^=]+)=([^&]+)/', $_SERVER['QUERY_STRING'],$matches,PREG_SET_ORDER); foreach ($matches as $match) $this->args[$match[1]]=urldecode($match[2]); if (isset($this->args['mode']) && $this->args['mode']!='error' && $this->url=$this->discover($proxy)) { $this->args['mode']='check_authentication'; $var=[]; foreach ($this->args as $key=>$val) $var['openid.'.$key]=$val; $req=\Web::instance()->request( $this->url, [ 'method'=>'POST', 'content'=>http_build_query($var), 'proxy'=>$proxy ] ); return (bool)preg_match('/is_valid:true/i',$req['body']); } return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function simpleid_checkid_ok($request) {\n global $version;\n \n $message = array(\n 'openid.mode' => 'id_res',\n 'openid.op_endpoint' => simpleid_url(),\n 'openid.response_nonce' => openid_nonce()\n );\n \n if (isset($request['openid.assoc_handle'])) $message['openid.assoc_h...
[ "0.73925734", "0.69684803", "0.67869836", "0.6735506", "0.6664794", "0.66517764", "0.6561427", "0.65513575", "0.65010786", "0.6498432", "0.6449355", "0.6417599", "0.6397924", "0.6354561", "0.63356715", "0.63136905", "0.6278225", "0.6266145", "0.62433296", "0.62351215", "0.622...
0.76412565
0
/ This PHP file contains Cookie Ultilities Accessing Cookies with PHP
// Этот файл PHP содержит утилиты для работы с куками, доступ к кукам через PHP
function getCookiesInfo(){ echo "Cookies information: <br>"; if( isset($_COOKIE["name"])){ echo "_COOKIE[\"name\"]: " . $_COOKIE["name"] . "<br />"; } else{ echo "Sorry... _COOKIE[\"name\"] is not set yet !" . "<br />"; } //echo "HTTP_COOKIE_VARS[\"name\"]: " . $HTTP_COOKIE_VARS["name"]. "<br />"; //echo "_COOKIE[\"age\"]: " . $_COOKIE["age"] . "<br />"; //echo "HTTP_COOKIE_VARS[\"name\"]: " . $HTTP_COOKIE_VARS["name"] . "<br />"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_cookies()\n {\n }", "function doCookies() {\r\n setcookie(\"cli_num\", 123456789, time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_fname\", $_POST['first_name'], time() + (86400 * 1), \"/\");\r\n setcookie(\"cli_lname\", $_POST['last_name'], time() + (86400 * 1), \"/\"...
[ "0.7423709", "0.72413534", "0.7023248", "0.70126003", "0.6996902", "0.69403803", "0.6939797", "0.68988234", "0.68562573", "0.670981", "0.67063296", "0.66999906", "0.667409", "0.6648376", "0.66480535", "0.6637746", "0.6601291", "0.65902483", "0.658814", "0.658149", "0.65789473...
0.7251826
1
The only action of this controller. This action is used to rewrite the backend Config saveTemplateAction and save additional data.
Единственное действие этого контроллера. Это действие используется для переопределения заднего плана Config saveTemplateAction и сохранения дополнительных данных.
public function saveTemplateAction() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveAction() :void\n {\n $data = $this->request->getPost();\n $record = ModuleTemplate::findFirst();\n if ($record === null) {\n $record = new ModuleTemplate();\n }\n $this->db->begin();\n foreach ($record as $key => $value) {\n ...
[ "0.6807841", "0.6206388", "0.61593", "0.610639", "0.6096789", "0.6075421", "0.5825599", "0.5812048", "0.5737642", "0.56738055", "0.5637621", "0.5622439", "0.5603154", "0.5595343", "0.5590436", "0.55859154", "0.55521786", "0.5511519", "0.54491484", "0.54472715", "0.5446891", ...
0.74228793
0
Sets autorization header telling that you need to be authenticated
Устанавливает заголовок авторизации, указывающий, что требуется аутентификация
public function setAuthenticateHeader() { $response = \Yii::$app->response; $response->getHeaders()->set('WWW-Authenticate', "Basic realm=\"{$this->realm}\""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAuthorization()\n\t{\n\t\t// @TODO We don't deal with a case where during your session the token expires\n\t\tif (is_null($this->access_token))\n\t\t{\n\t\t\t$response = $this->getToken();\n\t\t\t$this->access_token = $response->access_token;\n\t\t\t$this->authorization = \"Bearer \" . $this->ac...
[ "0.702322", "0.7004076", "0.6986348", "0.6976852", "0.6959325", "0.675015", "0.6735196", "0.673283", "0.6685304", "0.66836655", "0.6605274", "0.6583517", "0.64165694", "0.64147997", "0.63940006", "0.6292193", "0.6210134", "0.617427", "0.61313754", "0.6114502", "0.60141236", ...
0.70890963
0
generate new user emails checks for generic password
проверка новых email-адресов пользователей для общего пароля
public function generate_new_passwords() { // all users added with "password" will be automatically sent a welcome message // and new password $resetpassword = 'password'; // get users $user_list = $this->get_user->get_all_users(); // go through users foreach($user_list as $user) { // check if password is "password" $user_id = $user->user_id; if ($this->get_user->check_password($user_id, $resetpassword) == 1) { // generate simple random password $newpassword = uniqid(); // write new password to database $data = array( 'password' => $newpassword ); $this->get_user->update('user_id', $user_id, $data); // email user new password $this->send_password_mail($user_id, $newpassword); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateNewPassword($mail);", "static function password_expired_email() {\n $model = \\Auth::$model;\n $user = $model::requested();\n\n if (!$user->nil()) {\n if ($user->validate()) {\n\n password_expired_email($user) ?\n ...
[ "0.709545", "0.68329805", "0.67693996", "0.6749227", "0.66979414", "0.6665304", "0.66307354", "0.656412", "0.64873266", "0.6419626", "0.6404173", "0.6376843", "0.6341731", "0.6314451", "0.62974715", "0.6284961", "0.6277273", "0.62592727", "0.62543994", "0.6230435", "0.62228",...
0.739786
0
Return the meter gain value earned by the dealer.
Верните значение коэффициента усиления метра, полученное дилером.
public function getMeterGain();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_deliveredEnergyMeter(): float\n {\n // $res is a double;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::DELIVEREDENERGYMETER_INVA...
[ "0.6608715", "0.63203067", "0.62981546", "0.62909436", "0.6197732", "0.61832464", "0.6118515", "0.6077072", "0.60670114", "0.60651124", "0.606058", "0.60189724", "0.59712094", "0.5930064", "0.59287155", "0.5925734", "0.59255564", "0.5923893", "0.5911628", "0.5908714", "0.5900...
0.8184569
0
Return the hit level on the target.
Верните уровень попадания на целевой объект.
public function getHitLevel();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLevel() {}", "public function getLevel();", "public function getLevel();", "public function GetLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level;\n }", "public function getLevel()\n {\n return $this->level...
[ "0.68071246", "0.6727809", "0.6727809", "0.6630325", "0.66138345", "0.66138345", "0.66138345", "0.66138345", "0.66138345", "0.66138345", "0.66138345", "0.6604302", "0.65856564", "0.65856564", "0.65646714", "0.6550286", "0.65243006", "0.65175945", "0.6508514", "0.64722013", "0...
0.8134625
0
Does the string end with the given ending?
Заканчивается ли строка заданным окончанием?
private function endsWith($string, $ending) { $length = strlen($ending); if ($length == 0) { return true; } return (substr($string, -$length) === $ending); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ends_with($string,...$end)\n{\n if(!$string)\n return false;\n foreach( $end as $e )\n if( substr($string,strlen($string)-strlen($e)) == $e )\n return true;\n return false;\n}", "function check_str_end(string $string, string $end, int $len, $endLength): bool\n{\n ret...
[ "0.8075019", "0.79937583", "0.783031", "0.77522296", "0.77446014", "0.77412206", "0.7707136", "0.7633017", "0.7626689", "0.7624749", "0.7588783", "0.7531934", "0.7489809", "0.74896574", "0.74605316", "0.73864275", "0.7373679", "0.73714787", "0.7369942", "0.7367351", "0.728408...
0.8063734
1
/ the constructor loads the necessary core files and classes, and creates a router instance
Конструктор загружает необходимые ядро файлы и классы, и создает экземпляр маршрутизатора
public function __construct() { $this->loadCoreClasses(); $this->router = new Router(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this->uri = Fly::app()->getUri();\n Fly::log('debug', \"Router Class Initialized\");\n $this->setRouting();\n }", "function __construct()\n {\n $routesPath = ROOT . '/core/config/routes.php';\n if (file_exists($routesPath)) {\n ...
[ "0.8297344", "0.788802", "0.7747912", "0.7725001", "0.77034354", "0.77000535", "0.76570654", "0.76074505", "0.7605644", "0.7557966", "0.7504764", "0.74951476", "0.7449673", "0.74465173", "0.7301544", "0.7273089", "0.7268058", "0.7231878", "0.72175306", "0.72009236", "0.718881...
0.88063747
0
/ validates if a controller path exists and is readable
Проверяет, существует ли путь контроллера и можно ли его прочитать
protected function validController($path) { return file_exists($path) && is_readable($path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function checkControllerIsExist () {\n\t\tif ( !isset(self::$url[0]))\n\t\t\treturn false ;\n\t\t$controller = trim(self::$url[0]);\n\t\tif ( !empty($controller)) {\n\t\t\t$controllerPatch = self::$appPatch.self::$app.DIRECTORY_SEPARATOR . 'controller' . DIRECTORY_SEPARATOR . $controller . '.php' ;\...
[ "0.7252334", "0.7035493", "0.68429124", "0.65190035", "0.6396005", "0.6281552", "0.626848", "0.62484044", "0.61569375", "0.60835975", "0.606851", "0.6057534", "0.6037909", "0.5993838", "0.5947583", "0.5947583", "0.5938197", "0.5896171", "0.5877429", "0.5872966", "0.5851458", ...
0.7996422
0
/ loads the core class files
Загружает основные классы файлов
protected function loadCoreClasses() { require __DIR__ . DIRECTORY_SEPARATOR . 'Config.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Router.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Loader.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Controller.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Database.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Model.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Library.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'View.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Request.php'; require __DIR__ . DIRECTORY_SEPARATOR . 'Response.php'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadClassFiles() {}", "private function loadClasses()\n\t\t{\n\t\t\t// foreach($GLOBALS['classes'] as $var => $class)\n\t\t\t// {\n\t\t\t\t// $this->$var = $class;\n\t\t\t// }\n\t\t\t\n\t\t\t// $this->load = _new('loader');\n\t\t\t\n\t\t\t/** Registramos todos os objetos que serão necessários ...
[ "0.78886384", "0.74368006", "0.7236141", "0.7230211", "0.71069735", "0.7071298", "0.70692074", "0.7036053", "0.6996384", "0.6929936", "0.6881678", "0.687795", "0.6813528", "0.68101895", "0.67888033", "0.6780812", "0.67777777", "0.6765415", "0.6741987", "0.673613", "0.6727286"...
0.84678334
0
Get an asset by its path
Получить актив по его пути
public static function path($path) { return Assets::all()->filter(function ($asset) use ($path) { return $asset->resolvedPath() === $path; })->first(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAsset($key, $path = null) {\n if (isset($path))\n return $this->m->Assets->getAsset($key, $path);\n return $this->info->getAsset($this->m->Assets, $key);\n }", "static function asset($path)\n {\n return Assets::src($path);\n }", "public function asset(string $path)\n...
[ "0.783336", "0.728482", "0.7275394", "0.71702605", "0.70674044", "0.6842171", "0.67996275", "0.66976744", "0.66391087", "0.6557754", "0.651351", "0.651351", "0.6472198", "0.6446784", "0.6430077", "0.6422105", "0.6416686", "0.6400945", "0.6394981", "0.6370265", "0.63701123", ...
0.7417017
1
Lists all Examination models.
Список всех моделей Examination.
public function actionIndex() { $userId = Yii::$app->user->id; $searchModel = new ExaminationSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); $dataProvider->query->AndWhere(['user_id' => $userId]); $dataProvider->query->orderBy('create_at DESC'); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n\t{\n\t\t$exams = Exam::with('course')->get(['id', 'name', 'type', 'course_id', 'class', 'campus_id', 'created_at']);\n\n\t\tforeach ($exams as $value) {\n\t\t\t$value['campus'] = Campus::find($value['campus_id'])->title;\n\t\t}\n\t\treturn $exams;\n\t}", "public function index()\n\t{\n\...
[ "0.6388559", "0.6354124", "0.62900794", "0.6183228", "0.61783564", "0.6168356", "0.6096302", "0.6082665", "0.607787", "0.6073956", "0.60720295", "0.60704064", "0.6067534", "0.6064393", "0.60572386", "0.5988476", "0.59781706", "0.5957731", "0.59494495", "0.5945963", "0.5942848...
0.70736754
0
Creates a new Examination model. If creation is successful, the browser will be redirected to the 'view' page.
Создаёт новый объект Examination. Если создание успешно, браузер будет перенаправлен на страницу 'view'.
public function actionCreate() { $model = new Examination(); if ($model->load(Yii::$app->request->post())) { $userId = \Yii::$app->user->id; $this->saveResult($model->result, $userId); return $this->redirect('index'); } return $this->render('create', [ 'model' => $model, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n\t{\n\t\t$model=new ElearningExam;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['ElearningExam']))\n\t\t{\n\t\t\t$model->attributes=$_POST['ElearningExam'];\n\t\t\tif($model->save())\n\t\t\t\...
[ "0.75224596", "0.70448494", "0.69286925", "0.6925248", "0.6869331", "0.6866634", "0.6846652", "0.68006235", "0.6791648", "0.67599225", "0.6747884", "0.67406905", "0.67236465", "0.67160517", "0.66948795", "0.6693164", "0.6677648", "0.6677507", "0.6677325", "0.667132", "0.66658...
0.84992194
0
cp_js_end This adds orig_cat_url_title field to capture and post the original value after submission
cp_js_end Это добавляет поле orig_cat_url_title для захвата и отправки исходного значения после отправки формы
function cp_js_end() { $data = ''; if ($this->EE->extensions->last_call !== FALSE) { $data = $this->EE->extensions->last_call; } $js = ' $(".pageContents form").has("input[name=cat_name]#cat_name").find("input[name=cat_url_title]#cat_url_title").each(function() { var $cat_url_title = $(this); if ($(".pageContents form").find("input[name=cat_id]").length > 0) { $cat_url_title.after( $("<input>") .attr("type", "hidden") .attr("name", "orig_cat_url_title") .val($cat_url_title.val()) ); } }); '; $js = ( ! empty($js)) ? NL . '(function($) {'.$js.'})(jQuery);' : ''; return $data . $js; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_ajax_press_this_add_category()\n {\n }", "private function getCategoryPostData()\n {\n // Get data from form fields\n $this->data['category_title'] = $this->input->post('category_title');\n }", "function product_category_edit(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, ...
[ "0.57493216", "0.5638515", "0.5587308", "0.5583835", "0.5576168", "0.5532479", "0.5492839", "0.5468453", "0.5453175", "0.5439546", "0.542789", "0.5405437", "0.53552526", "0.52939606", "0.5288841", "0.5271692", "0.5238602", "0.5228893", "0.52277046", "0.5167096", "0.5166725", ...
0.7567759
0
Query the Search API by a search term and location
Запросить Search API по поисковому запросу и расположению
function search($term, $location) { $url_params = array(); $url_params['term'] = $term; $url_params['location'] = $location; $url_params['limit'] = $GLOBALS['SEARCH_LIMIT']; return request($GLOBALS['API_HOST'], $GLOBALS['SEARCH_PATH'], $url_params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function search($term, $location, $price, $radius, $categories, $sort) {\n $url_params = array();\n \n $url_params['term'] = $term;\n $url_params['location'] = $location;\n $url_params['limit'] = $GLOBALS['SEARCH_LIMIT'];\n\t$url_params['open_now'] = true;\n $url_params['price'] = $price;\n $u...
[ "0.7596438", "0.74730897", "0.7405362", "0.7267051", "0.716777", "0.7147625", "0.6984506", "0.69432247", "0.6934082", "0.68978876", "0.6779909", "0.67794234", "0.6776836", "0.67475784", "0.67475784", "0.67432684", "0.67276835", "0.6668217", "0.6656132", "0.6567901", "0.655249...
0.7809321
0
Query the Business API by business_id
Запросить Business API по business_id
function get_business($business_id) { $business_path = $GLOBALS['BUSINESS_PATH'] . urlencode($business_id); return request($GLOBALS['API_HOST'], $business_path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_business($bearer_token, $business_id) {\n $business_path = $GLOBALS['BUSINESS_PATH'] . urlencode($business_id);\n \n return request($GLOBALS['API_HOST'], $business_path);\n}", "function GetBusiness($businessId)\n\t{\n\t\t$result = $this->sendRequest(\"GetBusiness\", array(\"BusinessId\"=>$b...
[ "0.72874045", "0.68762845", "0.6643683", "0.6613496", "0.64544404", "0.64544404", "0.64544404", "0.64544404", "0.64544404", "0.64386517", "0.6426751", "0.63784474", "0.6187909", "0.61160827", "0.60744554", "0.60321623", "0.60273176", "0.602034", "0.602034", "0.602034", "0.602...
0.7619095
0
Get the existing recommandation category list
Получить существующий список категорий рекомендаций
function getCategoryRecommandationList(){ global $wpdb; $query = $wpdb->prepare( "SELECT RECOMMANDATION_CAT.*, PIC.photo FROM " . TABLE_CATEGORIE_PRECONISATION . " AS RECOMMANDATION_CAT LEFT JOIN " . TABLE_PHOTO_LIAISON . " AS LINK_ELT_PIC ON ((LINK_ELT_PIC.idElement = RECOMMANDATION_CAT.id) AND (tableElement = '" . TABLE_CATEGORIE_PRECONISATION . "') AND (LINK_ELT_PIC.isMainPicture = 'yes')) LEFT JOIN " . TABLE_PHOTO . " AS PIC ON ((PIC.id = LINK_ELT_PIC.idPhoto)) WHERE RECOMMANDATION_CAT.status = 'valid' GROUP BY RECOMMANDATION_CAT.id", ""); $CategoryRecommandationList = $wpdb->get_results($query); return $CategoryRecommandationList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCategories();", "public function getCategories();", "public function getCategories(){\n\t\t$query = \"SELECT * FROM final_categoria\";\n\t\treturn $this->con->action($query);\n\t}", "public function getCategoryList()\n {\n// return $this->categoryList = DB::table('categories')->g...
[ "0.7073164", "0.7073164", "0.70191187", "0.6952801", "0.6952469", "0.6925243", "0.69237745", "0.691156", "0.6873652", "0.68731844", "0.68014926", "0.6720509", "0.67117107", "0.6695676", "0.6695676", "0.6617632", "0.66162014", "0.66094625", "0.65975153", "0.65836245", "0.65781...
0.76744723
0
Get Match Now Title
Получить матч сейчас
public function getMatchNowTitle() { return $this->getData('match_now_title'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function rep_title_callback($match) {\r\n\t\t\r\n\t\t$query = substr($match[0],3,-3);\t\t\r\n\t\t$title = '<h2>'.$query.'</h2>';\r\n\t\treturn $title;\r\n\t\t\r\n\t}", "private function titleGuess(): string {\n $collaboration = $this->containsCollaboration($this->title);\n return $collabora...
[ "0.73566365", "0.7144896", "0.670221", "0.66354424", "0.64411277", "0.64210975", "0.63641554", "0.63528347", "0.62879276", "0.627547", "0.6252517", "0.624463", "0.6240199", "0.6239946", "0.62379575", "0.62182564", "0.62112147", "0.6208389", "0.6202894", "0.6190242", "0.618897...
0.85028267
0
Get Match Now Url
Получить URL матча сейчас
public function getMatchNowUrl() { return $this->getData('match_now_url'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCurrentUrlFromRoutes()\n {\n $input = &SGL_Registry::singleton();\n $url = $input->getCurrentUrl();\n $currUrl = $url->toString();\n $baseUrl = $url->getBaseUrl($skipProto = false, $includeFc = false);\n return str_replace($baseUrl, '', $currUrl);\n }", ...
[ "0.6147555", "0.597051", "0.59636706", "0.5956001", "0.59448093", "0.58937925", "0.5831257", "0.5823231", "0.58090425", "0.57796514", "0.577795", "0.577617", "0.5774891", "0.5774891", "0.5774891", "0.5774891", "0.5774891", "0.5774891", "0.57267094", "0.5710036", "0.57099426",...
0.8403448
0
Get Shop Now Title
Получить магазин сейчас (заголовок)
public function getShopNowTitle() { return $this->getData('shop_now_title'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hestia_shop_title_callback() {\n\treturn get_theme_mod( 'hestia_shop_title' );\n}", "public function get_title () {\r\n\t\treturn $this->get_info()['title'];\r\n\t}", "protected function getTitle() {\r\n\t\treturn $this->newsItem->getTitle();\r\n\t}", "public function get_title(): string {\n\t\tretu...
[ "0.7708132", "0.753332", "0.7376903", "0.7373858", "0.7337966", "0.7273591", "0.716291", "0.7120857", "0.7113418", "0.71119654", "0.70995754", "0.70971644", "0.7095166", "0.7070589", "0.70700467", "0.7057545", "0.70480055", "0.70457923", "0.70331323", "0.70267814", "0.7011192...
0.86199474
0
Get Shop Now Url
Получить URL магазина сейчас
public function getShopNowUrl() { return $this->getData('show_now_url'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShopUri()\n {\n return sprintf(self::SHOP_URI, $this->getShopName());\n }", "function _getHellaspayUrl($method) {\r\n\r\n\t\t$url = $method->hellaspay_production == '1' ? $method->hellaspay_production_url : $method->hellaspay_test_url;\r\n\r\n\t\treturn $url;\r\n\t}", "public fu...
[ "0.7105449", "0.7083607", "0.6912421", "0.6779383", "0.67741054", "0.6689031", "0.66760945", "0.6673764", "0.65760225", "0.65040964", "0.65006465", "0.64723665", "0.64637905", "0.64625484", "0.64383256", "0.64369553", "0.6436007", "0.6433064", "0.64321524", "0.63954127", "0.6...
0.851698
0
Remove nonnumeric characters from $cc_no
Удалите немножечковые символы из $cc_no
function clean_no ($cc_no) { return ereg_replace ('[^0-9]+', '', $cc_no); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function cleanCCNumber($cc = '') {\n $cc = preg_replace('/[^0-9]/', '', trim($cc));\n return (string)$cc;\n }", "protected function strip_non_numeric($cardno) {\n return preg_replace('/[^0-9]/', null, $cardno);\n }", "function cardNumberClean($number)\n {\n return preg_replace(\...
[ "0.8084143", "0.7543891", "0.73490924", "0.70768434", "0.6868711", "0.64037097", "0.63835174", "0.6351201", "0.6348136", "0.6306462", "0.61999434", "0.6092688", "0.6074876", "0.6041102", "0.60364217", "0.59928334", "0.596019", "0.593639", "0.5930621", "0.5922269", "0.5916077"...
0.87696636
0
Get returned result keys
Получить ключи возвращенного результата
public static function getReturnedResultKeys() { return [ 'ip', 'ua', 'browser', 'language', 'platform', 'mobile', 'tablet', 'pc', 'page', 'open', 'close', 'location' ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getKeys();", "public function getKeys() {}", "static function getKeys();", "abstract public function getKeys();", "public function getKeys(): array;", "public function getKeys()\n {\n if ($this->_queryResult === null) {\n return [];\n }\n\n return $this-...
[ "0.77945185", "0.77771175", "0.7681449", "0.76676846", "0.75974745", "0.7347882", "0.729458", "0.729458", "0.729458", "0.7294162", "0.72029704", "0.71652776", "0.7152434", "0.7105446", "0.7105446", "0.7054161", "0.6992623", "0.69894123", "0.69894123", "0.69894123", "0.6989412...
0.7790886
1
Returns $dat encoded to UTF8
Возвращает $dat, закодированный в UTF8
protected static function utf8Encode($dat) { if (is_string($dat)) { if (mb_check_encoding($dat, 'UTF-8')) { return $dat; } else { return utf8_encode($dat); } } if (is_array($dat)) { $answer = array(); foreach ($dat as $i => $d) { $answer[$i] = self::utf8Encode($d); } return $answer; } return $dat; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function utf8Encode($dat)\n {\n if (is_string($dat)){\n return utf8_encode($dat);\n }\n if (!is_array($dat)){\n return $dat;\n }\n $ret = array();\n foreach ($dat as $i => $d){\n $ret[$i] = $this->utf8Encode($d);\n }\n ...
[ "0.70902044", "0.6691718", "0.6488349", "0.6484774", "0.63320524", "0.61628664", "0.6086392", "0.60392594", "0.60084146", "0.6004522", "0.5980297", "0.5915582", "0.59041953", "0.5881356", "0.5802224", "0.5793196", "0.575121", "0.573841", "0.573841", "0.573841", "0.5726693", ...
0.7488785
0
Get the books by id
Получить книги по идентификатору
public function book($id) { return $this->get("/books/{$id}"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBooks($id) {\n }", "public function getBookById($id) {\n\t\t$book = null;\n\n foreach ($this->db-> query(\"SELECT * FROM book WHERE id=$id\") as $row){\n \n $book = new Book($row['title'], $row['author'], $row['description'], $row['id']);\n }\n\n r...
[ "0.8623019", "0.81779176", "0.8146076", "0.7855995", "0.7847217", "0.7789382", "0.7778965", "0.77668166", "0.7707386", "0.7695172", "0.76458347", "0.7565044", "0.75385535", "0.7455013", "0.7394145", "0.73688716", "0.733261", "0.7307886", "0.73040533", "0.7281313", "0.7171885"...
0.8379085
1
Function replaces $name property on position $pos with $new value in string $str
Функция заменяет свойство $name на позиции $pos на значение $new в строке $str
function edit_property(&$str, $new_value, $pos, $name = 'keys') { $prop_str = $this->get_pos_str($new_value); $start = $this->get_start_pos($name) + $pos * ($this->pos_len + $this->d_len); $str = substr($str, 0, $start) . $prop_str . substr($str, $start + strlen($prop_str)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _replaceVariable($str, $pos, $var, $repl)\n {\n $expr = substr($str, $pos, strpos($str, ')', $pos + 1) - $pos + 1);\n $eqsign = strpos($expr, '=');\n if (false !== $eqsign)\n {\n $name = substr($expr, $eqsign + 1, strlen($expr) - $eqsign - 2);\n }\n return...
[ "0.59950745", "0.5923943", "0.58378243", "0.5704068", "0.5572111", "0.54351354", "0.5431104", "0.5281488", "0.52504885", "0.5223439", "0.52060515", "0.5193551", "0.5186991", "0.5161758", "0.5124974", "0.5110818", "0.5088579", "0.5080547", "0.50745887", "0.5071972", "0.5036922...
0.7856642
0
Register and load the widget
Зарегистрировать и загрузить виджет
function wpb_load_widget() { register_widget( 'dmv_widget' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpb_load_widget() {\n register_widget( 'lrq_widget' );\n }", "public static function register() {\n\t register_widget( __CLASS__ );\n\t}", "public function register_widget() {\n register_widget( 'WPP_Widget' );\n }", "function abc_load_widget()\n{\n register_widget('awesome...
[ "0.8110661", "0.7967675", "0.78804576", "0.7738934", "0.7702892", "0.7682854", "0.76820266", "0.76244855", "0.7621846", "0.76101273", "0.7574632", "0.74874914", "0.741399", "0.7409604", "0.7409604", "0.7344513", "0.731742", "0.729245", "0.726935", "0.72691077", "0.724296", ...
0.8054664
1
get list of rules
получить список правил
public function getRules();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRulesList(){\n return $this->_get(3);\n }", "public function getRules() {}", "abstract protected function getRules();", "public function getRules(): Collection;", "public static function getRules(): array;", "public function getRules(): array;", "public function getRules(): ar...
[ "0.8531926", "0.8500616", "0.83190566", "0.8303848", "0.8300871", "0.8227738", "0.8227738", "0.8100199", "0.80676585", "0.80380654", "0.80380654", "0.80380654", "0.79961723", "0.7965298", "0.7877579", "0.78692764", "0.7777388", "0.77557963", "0.77557963", "0.77471775", "0.771...
0.8726984
0
Get the value of Id_batiment
Получить значение Id_batiment
public function getId_batiment() { return $this->Id_batiment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBidId(){\n return $this->bidId; \n }", "public function getBid()\n {\n return $this->getAttribute()->getBid();\n }", "public function getId_Boisson()\n {\n return $this->Id_Boisson;\n }", "public function setId_batiment($Id_batiment)\n {\...
[ "0.6747695", "0.66339815", "0.66311955", "0.658652", "0.643237", "0.6398355", "0.6224411", "0.6188837", "0.6156267", "0.6151657", "0.6064528", "0.58263236", "0.5734558", "0.57297283", "0.57233727", "0.56914264", "0.5638607", "0.56230545", "0.5612167", "0.56011236", "0.5591568...
0.86391884
0
Set the value of Id_batiment
Задайте значение Id_batiment
public function setId_batiment($Id_batiment) { $this->Id_batiment = $Id_batiment; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getId_batiment()\n {\n return $this->Id_batiment;\n }", "public function setId($IDabbonamento)\n {\n $this->id = $IDabbonamento;\n }", "function setId($value) {\n $this->_id = intval($value);\n }", "public function setId($id)\r\n {\r\...
[ "0.76356494", "0.6097018", "0.58651775", "0.57700163", "0.5764101", "0.57294595", "0.5657558", "0.5611514", "0.5577207", "0.55523413", "0.5541761", "0.5527859", "0.55245644", "0.551988", "0.55164087", "0.55164087", "0.55164087", "0.55041605", "0.5477404", "0.5474623", "0.5471...
0.8076125
0
Returns the order mapper
Возвращает отображатель заказов
public function getOrderMapper() { if($this->orderMapper == null) { throw new \Exception('Please set the order mapper'); } return $this->orderMapper; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_order() {\n return $this->get_mapped_property('order');\n }", "public function generateOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder...
[ "0.6431113", "0.58484906", "0.58419657", "0.58419657", "0.58419657", "0.58419657", "0.58419657", "0.58419657", "0.58290136", "0.5786071", "0.5786071", "0.5786071", "0.5775523", "0.57736933", "0.5729906", "0.56842107", "0.56812525", "0.5652704", "0.5636372", "0.5636219", "0.56...
0.7406881
0
Add a boolean param
Добавьте булевский параметр
public function addBoolean(string $name, bool $default = false) { $this->add('boolean', $name, func_get_args()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _setBoolean($name, $value) {}", "public function set_add($param)\n\t{\n\t\t$this->add = (bool)$param;\n\t\treturn $this;\n\t}", "public function putBool(string $name, ?bool $value, bool $mandatory = false): string;", "public function setBoolean($trueFalse);", "function post_bool($boolean...
[ "0.6995609", "0.6974047", "0.6896783", "0.6663273", "0.6496533", "0.6441607", "0.641299", "0.63380754", "0.6304253", "0.6259438", "0.6259438", "0.6259438", "0.6259438", "0.6259438", "0.6253668", "0.6182342", "0.61822045", "0.6175959", "0.61320627", "0.6130263", "0.6117875", ...
0.70515066
0
Method returning list of attributes (data columns) in selected dataset
Метод, возвращающий список атрибутов (данных колонок) в выбранном наборе данных
public function getPpAttributes(PpDataset $ppDataset) { $query=$this->db->prepare('SHOW COLUMNS IN `'.$ppDataset->id.'`;'); $query->execute(); $columns=$query->fetchAll(PDO::FETCH_CLASS); $result=[]; foreach ($columns as $column){ $result[]=new PpAttribute($column->Field, $ppDataset->id, null, $column->Field, self::encodeDbDataType($column->Type), null); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getColumnsAttribute()\n {\n return $this->fetchData[self::COLUMNS];\n }", "public function getAttributesNames(){\n\t\t$this->_connect();\n\t\treturn ActiveRecordMetaData::getAttributes($this->_source, $this->_schema);\n\t}", "public function getData(){\n $values = array()...
[ "0.6912565", "0.67044073", "0.66587377", "0.6645676", "0.6625465", "0.6570991", "0.65597194", "0.6544039", "0.65066284", "0.64955425", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.6456338", "0.63712233", "0.6339038...
0.705272
0
Method returning list of available preprocessing types
Метод, возвращающий список доступных типов предварительной обработки
public static function getSupportedPreprocessingTypes() { return [Preprocessing::TYPE_EACHONE, Preprocessing::TYPE_EQUIDISTANT_INTERVALS, Preprocessing::TYPE_INTERVAL_ENUMERATION, Preprocessing::TYPE_NOMINAL_ENUMERATION]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_desired_types();", "function wp_get_ext_types()\n {\n }", "public static function getTypes();", "public static function getStandardTypes()\n {\n }", "public static function get_possible_types()\n {\n }", "public static function get_possible_types()\n ...
[ "0.6598652", "0.64527637", "0.64381003", "0.64247364", "0.6379551", "0.6379551", "0.6379551", "0.63713324", "0.63643444", "0.63504547", "0.6295311", "0.62837964", "0.6280552", "0.62575877", "0.62489337", "0.62489337", "0.62489337", "0.62489337", "0.62391174", "0.6199816", "0....
0.7659145
0
This part is save houses data from API
Этот раздел сохраняет данные о домах из API
public function saveHousesData($data) { $now = date('Y-m-d H:i:s'); $data['mdate'] = $now; file_put_contents('_save_house_model.txt', json_encode($data)); if (isset($data['id']) && intval($data['id'] <= 0)) { unset($data['id']); } if (!isset($data['id'])) { // if (empty($data['Housesname'])) { // return ['code' => -1, 'msg' => '请提供用户名']; // } // if (empty($data['password'])) { // return ['code' => -1, 'msg' => '请提供密码']; // } // if (self::get(['Housesname' => $data['Housesname']])) { // return ['code' => -1, 'msg' => '用户名已存在']; // } $data['cdate'] = $now; //添加房源编号new // $data['dsn'] = $this->gen_house_dsn($data['source'], $data['city']); $data['dsn'] = $this->gen_house_dsn_new(); $this->data = $data; //访问频繁 if (cache('add_house_'.$data['user_id'])) { $left_second = time() - cache('add_house_'.$data['user_id']); return ['code' => -1, 'msg' => '访问过于频繁,请'.$left_second.'s后再试']; } //防并发操作 解决ID重复的问题 #A# $fp = fopen(RUNTIME_PATH."lock.txt", "w+"); if(flock($fp,LOCK_EX | LOCK_NB)) { //..处理订单 flock($fp,LOCK_UN); $result = $this->save(); if ($result) { cache('add_house_'.$data['user_id'], time(),10); } }else{ fclose($fp); return ['code' => -1, 'msg' => '系统繁忙,请稍后再试']; } fclose($fp); //防并发操作 #A# if (false === $result) { return ['code' => -1, 'msg' => '添加数据失败']; } $data['id'] = $this->id; } else { $data['id'] = intval($data['id']); if ($data['id'] <= 0) { return ['code' => -1, 'msg' => 'id 必须大于0']; } // if (self::get(['Housesname' => $data['Housesname'], 'id' => ['neq', $data['id']]])) { // return ['code' => -1, 'msg' => '用户名已存在']; // } // if (isset($data['password']) && $data['password'] == '') { // unset($data['password']); // } $result = $this->save($data, ['id' => $data['id']]); if ($result === false) { return ['code' => -1, 'msg' => '修改数据失败']; } } //添加房源编号 //$this->set_house_dsn($data['id']); return ['code' => 0, 'msg' => 'ok', 'data' => $data]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(Request $request)\n {\n\t\t$request->validate([\n\t\t\t'title' => 'required|max:250',\n\t\t\t'nr_of_rooms' => 'required|integer|min:0',\n\t\t\t'nr_of_beds' => 'required|integer|min:0',\n\t\t\t'nr_of_bathrooms' => 'integer|min:0|nullable',\n\t\t\t'square_mt' => 'integer|min:1|nullable',\n\t...
[ "0.6158201", "0.61282796", "0.6126096", "0.6077741", "0.6012739", "0.59959525", "0.5984435", "0.59579444", "0.59231687", "0.588005", "0.58591515", "0.5828687", "0.5826385", "0.5815575", "0.57798016", "0.5759381", "0.57567835", "0.5684596", "0.56678474", "0.56493664", "0.56486...
0.7213015
0
Clear the list of booted models so they will be rebooted.
Очистите список загруженных моделей, чтобы они были перезагружены.
public static function clearBootedModels() { static::$booted = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function clearBootedModels();", "public function clearModels();", "protected static function booted(): void\n {\n static::deleting(function (Model $model) {\n $model->removeAllImages();\n });\n }", "protected function forgetAddedModels()\n {\n $this->qua...
[ "0.8700318", "0.72563404", "0.66823345", "0.66046894", "0.6544441", "0.63992864", "0.63572377", "0.6318385", "0.6299947", "0.62808114", "0.6279543", "0.6196935", "0.616978", "0.6148886", "0.6119523", "0.61061716", "0.6072173", "0.6064169", "0.6059776", "0.6058886", "0.6057026...
0.89517516
1