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
getTitleCase() takes the given string and returns it in TitleCase format (sometimes called UpperCamelCase), with underscores removed. Example input: db_column_name Example output: DbColumnName
getTitleCase() преобразует заданный строку и возвращает её в формате TitleCase (иногда называемом UpperCamelCase), удаляя подчёркивания. Пример входных данных: db_column_name Пример выходных данных: DbColumnName
public function getTitleCase($value) { $value = str_replace('_', ' ', $value); $value = ucwords($value); $value = str_replace(' ', '', $value); return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function title_case($value)\n {\n return Str::title($value);\n }", "public static function titleCase($string) \n\t{\n\t\tif (function_exists(\"mb_convert_case\"))\n\t\t\treturn mb_convert_case($string, MB_CASE_TITLE, self::ENCODING);\n\t\telse\n\t\t\treturn ucfirst(strtolower($string));\n\t}", "fu...
[ "0.7306425", "0.7300078", "0.72279114", "0.7020524", "0.6989254", "0.69823277", "0.6976875", "0.69407624", "0.69179523", "0.6906882", "0.6888904", "0.6865207", "0.6821418", "0.6748256", "0.67397374", "0.67052376", "0.6694781", "0.667908", "0.66754264", "0.66658646", "0.665360...
0.7569752
0
Write data to unique file, without overwriting existing files. This is useful if you want to write a ".bak" file or something similar, but want to make sure you don't overwrite something already on disk. This function will add a number to the filename if the base name already exists, e.g. "example.bak", "example.bak.1"...
Записать данные в уникальный файл, без перезаписи существующих файлов. Это полезно, если вы хотите записать файл ".bak" или что-то подобное, но хотите убедиться, что вы не перезапишете уже существующий файл на диске. Эта функция добавит число в имя файла, если базовое имя уже существует, например, "example.bak", "examp...
public static function writeUniqueFile($base, $data) { $full_path = self::resolvePath($base); $sequence = 0; assert_stringlike($data); // Try 'file', 'file.1', 'file.2', etc., until something doesn't exist. while (true) { $try_path = $full_path; if ($sequence) { $try_path .= '.'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "private function generateUni...
[ "0.62817746", "0.6267362", "0.6267362", "0.6267362", "0.6267362", "0.6267362", "0.6267362", "0.61226726", "0.61041695", "0.6100781", "0.606806", "0.6046511", "0.5962525", "0.59565324", "0.5932375", "0.5891689", "0.58892447", "0.5883147", "0.57838905", "0.5771407", "0.57539296...
0.7385852
0
Return all directories between a path and the specified root directory (defaulting to "/"). Iterating over them walks from the path to the root.
Вернуть все директории между путем и заданным корневым каталогом (по умолчанию "/"). Итерация по ним осуществляется от пути к корню.
public static function walkToRoot($path, $root = null) { $path = self::resolvePath($path); if (is_link($path)) { $path = realpath($path); } // NOTE: On Windows, paths start like "C:\", so "/" does not contain // every other path. We could possibly special case "/" to have the same // mea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function list_directories_in_path( array $path, $root ) {\n\t\tif ( 0 === count( $path ) ) {\n\t\t\treturn API_Facade::list_directories(\n\t\t\t\t$root,\n\t\t\t\tnew API_Fields( array( 'name' ) ),\n\t\t\t\tnew Single_Page_Pagination_Helper()\n\t\t\t)->then(\n\t\t\t\tstatic function ( $directories ) ...
[ "0.7601708", "0.6645552", "0.6565891", "0.6449229", "0.622567", "0.61943763", "0.61892337", "0.61839545", "0.6182145", "0.6178354", "0.6174666", "0.6111816", "0.6090537", "0.60501754", "0.5858182", "0.5824165", "0.5821083", "0.5802808", "0.57910025", "0.5713791", "0.5667185",...
0.7087718
1
Determine whether or not a path exists in the filesystem. This differs from file_exists() in that it returns true for symlinks. This method does not attempt to resolve paths before testing them.
Определите, существует ли путь в файловой системе. Это отличается от file_exists() тем, что возвращает true для символьных ссылок. Этот метод не пытается разрешать пути перед их проверкой.
public static function pathExists($path) { return file_exists($path) || is_link($path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isValidPathReturnsTrueIfPathExists() {}", "public function checkIsPathExists($path);", "public function pathExists($path);", "public function checkPathExists($path);", "function pathExists($path);", "public function exists(string $path): bool;", "public function exists(string $path): bo...
[ "0.831396", "0.79828197", "0.78921676", "0.7811525", "0.779962", "0.77655125", "0.77655125", "0.76721925", "0.7535142", "0.75299317", "0.75010794", "0.7460427", "0.7444381", "0.7395678", "0.7390619", "0.73712975", "0.733522", "0.7329095", "0.732764", "0.732764", "0.72542715",...
0.7996183
1
Assert that a path represents a file, strictly (i.e., not a directory).
Утверждать, что путь представляет собой файл, строго (т.е. не директорию).
public static function assertIsFile($path) { if (!is_file($path)) { throw new FilesystemException( $path, pht("Requested path '%s' is not a file.", $path)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assertIsFile($path);", "public function checkIsFile($path);", "public function assertIsDirectory($path);", "public function isFile(string $path): bool;", "public function isFile(string $path): bool;", "function isFile($path);", "public function assertReadable($path);", "private functi...
[ "0.82049763", "0.73671114", "0.70848775", "0.6957223", "0.6957223", "0.6858501", "0.64501953", "0.64075613", "0.6361256", "0.6355065", "0.6353333", "0.63403356", "0.63400835", "0.63317007", "0.6293898", "0.6271758", "0.6235179", "0.6200372", "0.6195687", "0.6188306", "0.61519...
0.7864507
1
Assert that a path represents a directory, strictly (i.e., not a file).
Утверждать, что путь представляет собой директорию, строго (т.е. не файл).
public static function assertIsDirectory($path) { if (!is_dir($path)) { throw new FilesystemException( $path, pht("Requested path '%s' is not a directory.", $path)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assertIsDirectory($path);", "public function checkIsDirectory($path);", "function isDir($path);", "public function isDirectory(string $path): bool;", "public function isDirectory(string $path): bool;", "private function _is_valid_dir($path)\n\t{\n\t\treturn (is_dir($path) || (is_link($pat...
[ "0.84503037", "0.78434575", "0.73700744", "0.733534", "0.733534", "0.72720534", "0.70074564", "0.6962412", "0.68251145", "0.68145275", "0.676408", "0.676408", "0.676408", "0.676408", "0.6761887", "0.65982133", "0.6589411", "0.6586429", "0.6572983", "0.65193415", "0.6466373", ...
0.8040772
1
/ method ini digunakan untuk mendapatkan detail dari item yang direquest dari RFQ parameter: id_request_item return value : nama_produk, jumlah_produk, notes_produk, file
Метод ini используется для получения деталей товара, запрошенного в RFQ параметре: id_request_item return value: nama_produk, jumlah_produk, notes_produk, file
public function getDetailRequestItem($id_request_item){ $this->session->id_request_item = $id_request_item; /*untuk ngeset harga vendor butuh id_request_item*/ $where = array( "id_request_item" => $id_request_item ); $field = array( "nama_produk","jumlah_produk","...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function requestToItem ()\n\t\t{\n\t\t\t\t//die (print_r ($_POST));\n\t\t\t$itemId = $this->getFromPost ('itemId', 0);\n\t\t\t$parentId = $this->getFromPost ('parentId', 0);\n\t\t\t$isParent = $this->getFromPost ('isParent', 0);\n\t\t\t$name = $this->getFromPost ('name', null);\n\t\t\t$when_created = $this->getFro...
[ "0.6183642", "0.60943633", "0.60563123", "0.6048397", "0.60389537", "0.6031837", "0.5947238", "0.5915825", "0.59111387", "0.5879187", "0.58358186", "0.58063036", "0.5772093", "0.5738202", "0.5724614", "0.5704827", "0.57033926", "0.56663084", "0.56313354", "0.56265295", "0.560...
0.75284326
0
Get a list from allowed doktypes for pages
Получить список разрешенных doktypes для страниц
protected function allowedDoktypeList() { if (TRUE === isset($this->arguments['doktypes']) && FALSE === empty($this->arguments['doktypes'])) { if (TRUE === is_array($this->arguments['doktypes'])) { $types = $this->arguments['doktypes']; } else { $types = GeneralUtility::trimExplode(',', $this->argument...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPageTypes() {}", "public function __fetchAvailablePageTypes(){\n\t\t\t$system_types = array('index', 'XML', 'admin', '404', '403');\n\n\t\t\tif(!$types = Symphony::Database()->fetchCol('type', \"SELECT `type` FROM `tbl_pages_types` ORDER BY `type` ASC\")) return $system_types;\n\n\t\t\treturn ...
[ "0.7755793", "0.73034674", "0.7068089", "0.6963563", "0.6830491", "0.66156447", "0.6595548", "0.6571594", "0.64980936", "0.644945", "0.6446693", "0.63207906", "0.6320594", "0.63071007", "0.62968004", "0.62895536", "0.62895536", "0.62895536", "0.62895536", "0.62777394", "0.627...
0.7663306
1
Returns array of page UIDs from provided pages argument or NULL if not processable
Возвращает массив идентификаторов страниц (UID) из предоставленного аргумента pages или NULL, если данные не могут быть обработаны
public function processPagesArgument() { $pages = $this->arguments['pages']; if ($pages instanceof Traversable) { $pages = iterator_to_array($pages); } elseif (is_string($pages)) { $pages = GeneralUtility::trimExplode(',', $pages, TRUE); } if (FALSE === is_array($pages)) { return array(); } ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getPageIds()\n {\n return (array)explode(',', $this->getData('pages'));\n }", "public function getUserPages($ids)\n\t{\n \t$query = \"SELECT pageId FROM \".$this->_name.\" WHERE identifier = '\".$ids.\"'\";\n\t\tif(($result = $this->getQuery($query,false)) != NULL)\n {\n...
[ "0.63582456", "0.62510407", "0.618063", "0.61795425", "0.6156541", "0.61113983", "0.6069647", "0.5988071", "0.596569", "0.5952458", "0.5863266", "0.5788935", "0.57767546", "0.5725965", "0.5693336", "0.567407", "0.56253105", "0.5624264", "0.56056374", "0.5555138", "0.55072516"...
0.7020626
0
Load hosts from ssh config file
Загрузить хосты из файла ssh-конфигурации
public function load() { $configFilePath = $this->configFilePath(); if (!file_exists($configFilePath)) { $this->hosts = []; } else { $this->hosts = $this->parser->parse(file_get_contents($configFilePath)); } return $this->hosts(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function load()\n {\n if ($this->sites) {\n return;\n }\n $data = Yaml::parse(file_get_contents($this->file));\n $this->sites = $data['sites'];\n }", "public function loadHosts(string $hosts): bool {}", "private function readHostsFile()\n\t{\n\t\t$lines = @f...
[ "0.6206849", "0.6197307", "0.5980714", "0.56870145", "0.5661156", "0.56024915", "0.5593354", "0.54747057", "0.5453768", "0.5444335", "0.5365143", "0.53590864", "0.53446877", "0.5331303", "0.5294869", "0.5268562", "0.52621865", "0.52621865", "0.5248617", "0.52292114", "0.52235...
0.7602316
0
Remove host by index
Удалить хост по индексу
public function remove($index) { unset($this->hosts[$index]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove($index);", "public function remove(int $index);", "public function remove(int $index);", "function deleteByIndex($p_index)\n {\n }", "public function remove($index)\r\n\t{\r\n\t}", "abstract public function wipeIndex();", "public function dropIndex(): void;", "pub...
[ "0.6867634", "0.6781314", "0.6781314", "0.65199137", "0.63552374", "0.63234055", "0.628295", "0.6143021", "0.603194", "0.59559286", "0.5937009", "0.59155154", "0.5852754", "0.58471596", "0.5845557", "0.58360755", "0.58023155", "0.579165", "0.57357186", "0.5734784", "0.5708526...
0.81450635
0
Enqueue a IEspecific style sheet. Add a style sheet for everyone, then mark it as conditional to IE7 or below.
Добавьте специальный для IE стиль. Добавьте стиль для всех, затем отметьте его как условный для IE7 или ниже.
function child_add_ie8_style_sheet() { global $wp_styles; wp_enqueue_style( 'child-ie8', get_stylesheet_directory_uri() . '/barjeel-old-ie.css', array(), '1.0' ); $wp_styles->add_data( 'child-ie8', 'conditional', 'lte IE 8' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reactor_ie_styles() {\n\t\n\t// load css for IE8\n\twp_enqueue_style('ie8-style', get_template_directory_uri() . '/library/css/ie8.css');\n\tglobal $wp_styles;\n\t$wp_styles->add_data('ie8-style', 'conditional', 'lte IE 8');\n\t\n}", "function egg_styles()\n{\n\tglobal $wp_styles; // call global $wp_sty...
[ "0.7392074", "0.6669807", "0.6373151", "0.62301177", "0.61387706", "0.59987897", "0.59284353", "0.59022665", "0.5894542", "0.5852369", "0.58315206", "0.57921976", "0.5772337", "0.57120055", "0.5686145", "0.5685826", "0.5661002", "0.560109", "0.5555304", "0.5529217", "0.551773...
0.7480072
0
/ | | Revising Default Excerpt | | Adding filter to post excerpts to contain ...Continue Reading link |
| | Редактирование стандартного выдержки | | Добавление фильтра для выдержек постов, чтобы они содержали ... Ссылка на продолжение чтения |
function barjeel_excerpt($more) { global $post; return '&nbsp; &nbsp;<a href="'. get_permalink($post->ID) . '">...Continue Reading</a>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rw_custom_excerpt_more( $output )\n{\n if( has_excerpt() && !is_attachment() )\n {\n $output .= rw_continue_reading_link();\n }\n return $output;\n}", "function new_excerpt_more($more) {\n global $post;\n\treturn ' <a href=\"'. get_permalink($post->ID) . '\"><em>(Continue Readin...
[ "0.7466784", "0.71269995", "0.7081835", "0.7002121", "0.6999002", "0.69949156", "0.69753784", "0.69604754", "0.69490135", "0.6933614", "0.6910449", "0.6903124", "0.689946", "0.6897648", "0.6892708", "0.6874609", "0.6866205", "0.6865841", "0.68298215", "0.68149495", "0.6811265...
0.7149294
1
/ | | Checking for Post Thumbnail | | |
| | | Проверка пост-миниатюры | | |
function barjeel_post_thumbnail_check() { global $post; if (get_the_post_thumbnail()) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bootstrapwp_is_post_thumbnail_set()\n{\n global $post;\n if (get_the_post_thumbnail()) {\n return true;\n } else {\n return false;\n }\n}", "function has_post_thumbnail( $post = null ) {\n\treturn (bool) get_post_thumbnail_id( $post );\n}", "function checkThumbnail($book)\n{\...
[ "0.75470454", "0.72922343", "0.7187267", "0.7086953", "0.708471", "0.70431745", "0.7030732", "0.69719994", "0.6957831", "0.6916045", "0.68746924", "0.6858561", "0.6758994", "0.6705255", "0.668674", "0.66374016", "0.64706993", "0.6460793", "0.64559966", "0.644812", "0.64383024...
0.8230449
0
Remove empty paragraphs created by wpautop()
Удалите пустые абзацы, созданные wpautop()
function remove_empty_p( $content ) { $content = force_balance_tags( $content ); $content = preg_replace( '#<p>\s*+(<br\s*/*>)?\s*</p>#i', '', $content ); $content = preg_replace( '~\s?<p>(\s|&nbsp;)+</p>\s?~', '', $content ); return $content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ois_empty_paragraph_fix($content)\r\n{\r\n $content = force_balance_tags($content);\r\n return preg_replace('#<p>\\s*+(<br\\s*/*>)?\\s*</p>#i', '', $content);\r\n}", "public function remove_empty_paragraphs( $content ) {\n\t\t// $content = preg_replace( '~\\s?<p>(\\s|&nbsp;)+</p>\\s?~', '', $conte...
[ "0.7705146", "0.75815725", "0.74941915", "0.7431297", "0.7323622", "0.73134184", "0.7298538", "0.7239805", "0.6971437", "0.6830629", "0.67076445", "0.6647331", "0.663083", "0.6464861", "0.6408136", "0.625192", "0.6210618", "0.6180132", "0.60829", "0.6058346", "0.5980441", "...
0.78528047
0
Adds the identifier and ID of the given object to the fixtures map.
Добавляет идентификатор и ID заданного объекта в карту фикстур.
public function addFixture($object, $identifier) { if (!isset($this->fixtures[get_class($object)])) { $this->fixtures[get_class($object)] = []; } $this->fixtures[get_class($object)][$identifier] = $object->ID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static private function _add($object) {\n $object->_className = get_class($object);\n $exists = self::doesExist($object);\n if ($exists) {\n return self::update($object);\n }\n $fileName = self::getFileNameByObject($object);\n if (!file_exists($fileName)) {\n ...
[ "0.5779584", "0.57366735", "0.55296195", "0.5474427", "0.5435979", "0.5216846", "0.5165124", "0.5152216", "0.5149189", "0.51401293", "0.5121081", "0.51128423", "0.5065639", "0.50471026", "0.5045092", "0.50431097", "0.50398844", "0.5011443", "0.50103813", "0.49466717", "0.4945...
0.74301845
0
Answers true if a fixture exists with the given class and identifier.
Возвращает true, если существует фикстура с заданным классом и идентификатором.
public function hasFixture($class, $identifier) { return isset($this->fixtures[$class][$identifier]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function has($identifier);", "public function has($id): bool\n { \n if(class_exists($id)){\n return true;\n }else{\n return false;\n }\n }", "public function has_fixture($name, $type)\n {\n return $this->hasFixture($name, $type);\n }", "p...
[ "0.6719857", "0.67185116", "0.64333045", "0.6362061", "0.6361913", "0.6293999", "0.6172029", "0.6147162", "0.6123022", "0.6123022", "0.609707", "0.6003303", "0.60022104", "0.59955144", "0.59953487", "0.5989572", "0.59891576", "0.59831715", "0.59811", "0.59774065", "0.5968425"...
0.84318703
0
Display the specified resource. SurveyGroup $surveyGroup
Показать указанный ресурс. SurveyGroup $surveyGroup
public function show(SurveyGroup $surveyGroup) { $this->authorize('show', [SurveyGroup::class]); return $this->success($surveyGroup); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Survey $survey)\n {\n \n }", "public function show(Group $group)\n {\n //\n }", "public function show(Group $group)\n {\n //\n }", "public function show(Group $group)\n {\n //\n }", "public function show(Group $group) {\n //\n ...
[ "0.6980729", "0.6659153", "0.6659153", "0.6659153", "0.6645253", "0.64378065", "0.63826483", "0.6364134", "0.62937164", "0.62301266", "0.6185753", "0.600209", "0.5988622", "0.5965765", "0.5916812", "0.5898574", "0.58185256", "0.5803939", "0.5771254", "0.5767874", "0.57667285"...
0.7292324
0
Get abuse logs Return logs with an optional offset and limit
Получить журналы злоупотреблений Возвращение журналов с необязательным смещением и ограничением
public function getLogs(?int $offset = null, ?int $limit = 25): array { /** @var array<Document> $results */ $results = Authorization::skip(function () use ($offset, $limit) { $queries = []; $queries[] = Query::orderDesc(''); if (! \is_null($offset)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLogs()\n\t{\n $start = $_GET['_start'] ?: 0;\n $limit = $_GET['_limit'] ?: $this->defaults['logs_per_page'];\n $logger = new Logger($this->module);\n $response = $logger->getList($start, $limit);\n $this->printJSON($response);\n }", "public function getLog...
[ "0.71738505", "0.7065284", "0.6371775", "0.6316985", "0.62810796", "0.6268265", "0.62164783", "0.620685", "0.61069804", "0.60981935", "0.6046134", "0.5901658", "0.58781964", "0.5856144", "0.57969564", "0.5780978", "0.57604426", "0.57366467", "0.5732998", "0.57108915", "0.5708...
0.7159563
1
Remaining Returns the number of current remaining counts
Остаток Возвращает количество оставшихся текущих счетчиков
public function remaining(): int { $left = $this->limit - ($this->count($this->parseKey(), $this->time) + 1); // Add one because we need to say how many left not how many done return (0 > $left) ? 0 : $left; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remaining(): int {\n $alert = $this->alert();\n return is_null($alert) ? 1 : ($alert['created'] + $alert['expiry'] * 60) - time();\n }", "public function remaining() {\n\t\treturn count( $this->pending_util_records() );\n\t}", "public function getCreditsRemaining()\n\t{\n\t\tre...
[ "0.73926336", "0.7374238", "0.72720325", "0.72534966", "0.72534966", "0.72534966", "0.72534966", "0.72534966", "0.69305456", "0.69140315", "0.68992317", "0.6871225", "0.6840034", "0.67463785", "0.6713792", "0.66733015", "0.6615982", "0.66025573", "0.6602053", "0.65567726", "0...
0.7824933
0
Clear all the factories
Очистить все фабрики
public function clearFactories() { $this->_factories = array(); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function resetAll(): void\n {\n static::getFacadeRoot()->resetAll();\n }", "public final function destroy_all()\n {\n }", "public static function clear(): void\n {\n self::$dialects = [];\n self::$definitions = [];\n self::$loaded = [];\n }", ...
[ "0.6966598", "0.696252", "0.68609685", "0.6851314", "0.6802965", "0.6802965", "0.67705154", "0.67118317", "0.66507334", "0.66207665", "0.6601675", "0.65479827", "0.6511374", "0.6463939", "0.64507824", "0.6433655", "0.64331114", "0.64285684", "0.6418478", "0.6414156", "0.63984...
0.8082526
0
Get a factory by name
Получить фабрику по имени
public function getFactory($name) { if (!isset($this->_factories[$name])) { /** Rend_Factory_Exception */ require_once "Rend/Factory/Exception.php"; throw new Rend_FactoryLoader_Exception( "Could not find a factory named '{$name}'" ); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFactory() {}", "public function getFactory($name)\n {\n if (!array_key_exists($name, $this->factories)) {\n throw new NotFoundException(\"No factory available for: $name\");\n }\n\n return $this->factories[$name];\n }", "public function getFactory(): Fac...
[ "0.7355668", "0.72491837", "0.7245589", "0.7226587", "0.7097933", "0.693927", "0.69165653", "0.68335855", "0.67117596", "0.67117596", "0.67117596", "0.67117596", "0.67117596", "0.67117596", "0.67117596", "0.67117596", "0.6687998", "0.66609055", "0.66604793", "0.6628912", "0.6...
0.74436086
0
Install the PageMenu for all Modules.
Установите PageMenu для всех модулей.
public static function installPageMenu() { $pagemenulinks = self::parseModules(GWF_ModuleLoader::loadModulesFS()); return self::installPageMenu2($pagemenulinks); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Install() {\n $modules = new CMModules();\n $results = $modules->Install();\n $allModules = $modules->ReadAndAnalyse();\n $this->views->SetTitle('Install Modules')\n ->AddInclude(__DIR__ . '/install.tpl.php', array('modules'=>$results), 'primary')\n ->AddIn...
[ "0.6821238", "0.6714253", "0.66604584", "0.65139407", "0.65139407", "0.6489368", "0.6488322", "0.6476624", "0.6431406", "0.63750327", "0.6293088", "0.62819207", "0.62806344", "0.62806344", "0.6173675", "0.61694574", "0.61338425", "0.61152756", "0.60920745", "0.6091254", "0.60...
0.81352115
0
Set cache duration and key
Установите продолжительность кэша и ключ
public function setCache($duration = 60, $key = "workable-feed") { $this->cacheKey = $key; $this->caching = $duration; if ($duration < 1) { $this->clearCache(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set($key, $value, $duration = 0): void;", "public function setObjToCache($key, $value, $timeToCache = 0);", "public function setValToCache($key, $value, $timeToCache = 0);", "function cache() {\n\n if ( func_num_args() == 0 ) {\n return $this->expireTime;\n } elseif (...
[ "0.678563", "0.6781039", "0.6740769", "0.6633857", "0.6617303", "0.6554451", "0.65444595", "0.6489289", "0.6482758", "0.642844", "0.64187866", "0.6374414", "0.6358487", "0.634402", "0.6332243", "0.6329402", "0.63154316", "0.63077664", "0.6289239", "0.6286909", "0.6254213", ...
0.7920678
0
Get Dependency container instance. Create empty SimpleContainer if container is missing
Получить экземпляр контейнера зависимостей. Создать пустой SimpleContainer, если контейнер отсутствует
public static function getContainer() : ContainerInterface { if (!self::$container) { self::$container = new SimpleContainer(); } return self::$container; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_container()\n{\n static $container = null;\n if (!$container) {\n $builder = new \\DI\\ContainerBuilder();\n $builder->addDefinitions(get_config()['di']);\n \n $container = $builder->build();\n }\n \n return $container;\n}", "public static function getConta...
[ "0.7159115", "0.7059486", "0.69497293", "0.6932701", "0.6894533", "0.68740684", "0.6848421", "0.68453777", "0.67693156", "0.6746369", "0.67457587", "0.6741203", "0.6739348", "0.6716796", "0.6665312", "0.6657711", "0.6648561", "0.6619666", "0.65885574", "0.6580247", "0.6577432...
0.72911435
0
Admin hook, integrate_admin_areas, called from Admin.php Adds the external authentication button under admin menu members > registration
Admin-хук, integrate_admin_areas, вызывается из Admin.php. Добавляет кнопку внешней аутентификации под меню администратора Members > Registration
function iaa_extauth(&$admin_areas) { global $txt; loadLanguage('Extauth'); $admin_areas['members']['areas']['regcenter']['subsections']['extauth'] = array($txt['provider_services']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function iarb_extauth()\n{\n\tglobal $context, $modSettings;\n\n\tif (empty($modSettings['extauth_master']))\n\t{\n\t\treturn;\n\t}\n\n\t// Registration Screen ?\n\tif ((!empty($context['site_action']) && $context['site_action'] === 'register')\n\t\t&& (isset($_GET['action']) && $_GET['action'] === 'register'))\n\...
[ "0.6677267", "0.6482621", "0.641785", "0.6398264", "0.6293892", "0.6191472", "0.6155073", "0.61080146", "0.6106758", "0.61046696", "0.61036533", "0.60904026", "0.60864216", "0.60825354", "0.6079241", "0.6052819", "0.6051752", "0.6021966", "0.6009015", "0.599768", "0.5997402",...
0.72898644
0
Creates a new Course model. If creation is successful, the browser will be redirected to the 'view' page.
Создает новый модель Course. Если создание успешно, браузер будет перенаправлен на страницу 'view'.
public function actionCreate() { $model = new Course(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect('index'); } return $this->render('create', [ 'model' => $model, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate() {\n $model = new Course();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }...
[ "0.8853537", "0.7848904", "0.77405405", "0.7702669", "0.7565838", "0.75080377", "0.745164", "0.7438134", "0.7429527", "0.74170023", "0.7365519", "0.73538125", "0.73538125", "0.73380834", "0.72936404", "0.7282106", "0.7260754", "0.7247169", "0.72461706", "0.7211986", "0.720694...
0.8768556
1
Description of the command 'btrprojectdiffget'.
Описание команды 'btrprojectdiffget'.
function _btr_project_diff_get_drush_command() { return array( 'description' => "Get the content of the specified diff.", 'arguments' => array( 'origin' => 'The origin of the project.', 'project' => 'The name of the project', 'lng' => 'The language of translations.', 'nr' => 'The numbe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _btr_project_diff_get_drush_help() {\n return dt(\"Get the content of the specified diff.\");\n}", "function drush_btranslator_btr_project_diff_get($origin, $project, $lng, $nr) {\n // Check parameters $origin, $project, $lng.\n _btranslator_drush_check_params($origin, $project, $lng);\n\n // Get th...
[ "0.6968691", "0.6441795", "0.5950479", "0.566754", "0.56618166", "0.53531325", "0.53140867", "0.5281447", "0.51769483", "0.5140638", "0.50655085", "0.50502014", "0.50278986", "0.50124687", "0.49763978", "0.49695185", "0.49273497", "0.4923731", "0.49179184", "0.48995057", "0.4...
0.7663084
0
Help text for the command 'btrprojectdiffget'.
Помощь по команде 'btrprojectdiffget'.
function _btr_project_diff_get_drush_help() { return dt("Get the content of the specified diff."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _btr_project_diff_get_drush_command() {\n return array(\n 'description' => \"Get the content of the specified diff.\",\n 'arguments' => array(\n 'origin' => 'The origin of the project.',\n 'project' => 'The name of the project',\n 'lng' => 'The language of translations.',\n 'nr'...
[ "0.71192735", "0.601697", "0.58857524", "0.58263767", "0.57093173", "0.54574364", "0.5382492", "0.53793365", "0.5323393", "0.5307364", "0.5302314", "0.5264266", "0.52397096", "0.52153194", "0.5209254", "0.5199663", "0.5195467", "0.51898897", "0.5180875", "0.51761776", "0.5174...
0.7313121
0
Callback function for the command 'btrprojectdiffget'.
Функция обратного вызова для команды 'btrprojectdiffget'.
function drush_btranslator_btr_project_diff_get($origin, $project, $lng, $nr) { // Check parameters $origin, $project, $lng. _btranslator_drush_check_params($origin, $project, $lng); // Get the options. $format = drush_get_option('format'); $format = ($format == 'ediff' ? 'ediff' : 'diff'); $file = drush_g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _btr_project_diff_get_drush_command() {\n return array(\n 'description' => \"Get the content of the specified diff.\",\n 'arguments' => array(\n 'origin' => 'The origin of the project.',\n 'project' => 'The name of the project',\n 'lng' => 'The language of translations.',\n 'nr'...
[ "0.7028709", "0.61526906", "0.6024333", "0.60060745", "0.5921552", "0.58873594", "0.5865492", "0.58050287", "0.5709995", "0.5414107", "0.5360289", "0.53504187", "0.5164687", "0.51637673", "0.51400566", "0.5137381", "0.51250684", "0.5101971", "0.50580764", "0.50448054", "0.503...
0.73927146
0
After save listener. Manages updating level of descendants of currently saved entity.
После сохранения слушателя. Управляет обновлением уровня потомков текущей сохраненной сущности.
public function afterSave(EventInterface $event, EntityInterface $entity): void { if (!$this->_config['level'] || $entity->isNew()) { return; } $this->_setChildrenLevel($entity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function beforeSave()\n {\n $this->rebuildTree();\n }", "public function afterUpdate(): void\n {\n if ($this->oldParentId != $this->owner->getAttribute($this->ownerParentIdAttribute)) {\n $this->rebuildTreePath();\n }\n }", "protected function hook_afterSave()...
[ "0.6800448", "0.66101706", "0.6303909", "0.61374104", "0.6112289", "0.60864496", "0.60679924", "0.5999366", "0.59802455", "0.5978863", "0.59636676", "0.59482044", "0.5890356", "0.5864888", "0.5850034", "0.58074474", "0.5797119", "0.5793897", "0.57756805", "0.57546127", "0.572...
0.7067393
0
Returns a single string value representing the primary key of the attached table
Возвращает однострочное значение, представляющее первичный ключ прикрепленной таблицы
protected function _getPrimaryKey(): string { if (!$this->_primaryKey) { $primaryKey = (array)$this->_table->getPrimaryKey(); $this->_primaryKey = $primaryKey[0]; } return $this->_primaryKey; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrimaryKey() {\n\t\treturn $this->_key_primary->name;\n\t}", "public function primary_key(){\n $table_columns = $this->meta();\n\n $primary_key_column = NULL;\n foreach ($table_columns as $col) :\n if($col->primary_key):\n $primary_key_column = $c...
[ "0.8201784", "0.79650885", "0.7958475", "0.7936644", "0.7930561", "0.78568923", "0.78487384", "0.7836608", "0.7822984", "0.7807826", "0.77661246", "0.77607846", "0.7749444", "0.7731237", "0.7702723", "0.7601863", "0.7585855", "0.7581449", "0.7581449", "0.757437", "0.757437", ...
0.83828294
0
Accepts a container of objects, the method name to use for the value, and the method name to use for the display. It returns a string of option tags. NOTE: Only the option tags are returned, you have to wrap this call in a regular HTML select tag.
Принимает контейнер объектов, имя метода для использования в значении и имя метода для отображения. Возвращает строку с тегами option. ЗАМЕЧАНИЕ: Возвращаются только теги option, вы должны обернуть этот вызов в обычный HTML-тег select.
function objects_for_select($options = array(), $value_method, $text_method = null, $selected = null, $html_options = array()) { $select_options = array(); foreach ($options as $option) { // text method exists? if ($text_method && !is_callable(array($option, $text_method))) { $error = sp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function object_select_tag($object, $method, $options = array(), $default_value = null)\r\n{\r\n $options = _parse_attributes($options);\r\n\r\n $related_class = _get_option($options, 'related_class', false);\r\n if (false === $related_class && preg_match('/^get(.+?)Id$/', $method, $match))\r\n {\r\n $relat...
[ "0.6693768", "0.6454871", "0.6149323", "0.6128848", "0.61225814", "0.60964346", "0.60631955", "0.60254973", "0.6019043", "0.60029936", "0.60003096", "0.5948701", "0.5944535", "0.5917393", "0.5895883", "0.5857801", "0.5848484", "0.584199", "0.5841825", "0.58381176", "0.5823194...
0.753664
0
returns default_value if object value is null method is either a string or: array('method',array('param1','param2'))
возвращает default_value, если значение объекта равно null, метод является либо строкой, либо: array('method',array('param1','param2'))
function _get_object_value($object, $method, $default_value = null, $param = null) { // compatibility with the array syntax if (is_string($method)) { $param = ($param == null ? array() : array($param)); $method = array($method, $param); } // method exists? if (!is_callable(array($object...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPropertyValueByMethod(object $object, string $method)\n {\n if (is_callable([$object, $method])) {\n return $object->$method();\n }\n\n return null;\n }", "private static function get($key = null, $default = null) {\r\n\r\n if(null !== $key && isset...
[ "0.5799113", "0.5774495", "0.57313937", "0.5698507", "0.5564386", "0.5554366", "0.55143636", "0.54995716", "0.53436255", "0.5322868", "0.52735555", "0.52547777", "0.52497435", "0.51909286", "0.51887643", "0.51545864", "0.5107319", "0.51039135", "0.50987166", "0.50833416", "0....
0.73947763
0
Returns the name of the class of an decorated object
Возвращает имя класса декорированного объекта
function _get_class_decorated($object) { if ($object instanceof sfOutputEscaperObjectDecorator) { return sprintf('%s (decorated with %s)', get_class($object->getRawValue()), get_class($object)); } else { return get_class($object); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getName()\n {\n return __CLASS__;\n }", "public function getClass() {}", "public function getClass() {}", "public function getClass() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getClassName() {}", "public function getCl...
[ "0.70080066", "0.6906709", "0.6906709", "0.69061273", "0.6903679", "0.6903679", "0.6903679", "0.6903679", "0.6902962", "0.6902962", "0.6902962", "0.6902962", "0.6902962", "0.6902962", "0.6902962", "0.6902962", "0.6902962", "0.6902962", "0.6902962", "0.6902962", "0.6902962", ...
0.76617473
0
Create span instances from calls
Создание экземпляров span из вызовов
private function createSpans(): array { $spans = []; foreach ($this->calls as $call) { $span = new Span(); $span->setName($call['name']); $span->setTimestamp(intval(round($call['start']))); $span->setType(self::SPAN_TYPE); $span->setDurati...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function span ( $arguments = \"\" ) {\n $arguments = func_get_args();\n $rc = new ReflectionClass('tspan');\n return $rc->newInstanceArgs( $arguments ); \n}", "function callSample(): void\n{\n $name = '[NAME]';\n $spanId = '[SPAN_ID]';\n\n create_span_sample($name, $spanId);\n}", "function create_s...
[ "0.6659368", "0.6256204", "0.5768798", "0.5544466", "0.52661633", "0.5216447", "0.52133167", "0.51241946", "0.5096161", "0.50675344", "0.5027853", "0.49504533", "0.49476317", "0.49377108", "0.49120358", "0.4840161", "0.48066193", "0.48048076", "0.47809744", "0.47748107", "0.4...
0.7113787
0
Find all backend users starting with _CLI_ that are not deleted yet.
Найдите всех бэкенд-пользователей, начинающихся с _CLI_, которые еще не удалены.
protected function getUnneededCommandLineUsers() { $commandLineUsers = []; $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class) ->getQueryBuilderForTable('be_users'); $queryBuilder->getRestrictions() ->removeAll() ->add(GeneralUtility::make...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function getNonRegisteredUsers();", "Public Function getAllNonDeletedUsers()\n\t{\n\t\t$Output = array();\n\t\t$Users = $this->_db->fetchAll('SELECT * FROM bevomedia_user WHERE deleted = 0');\n\t\tforeach($Users as $User)\n\t\t\t$Output[] = new User($User->id);\n\t\t\t\n\t\treturn $Output;\n\t}", "pub...
[ "0.6139545", "0.60780543", "0.5944519", "0.59187144", "0.5881118", "0.5757784", "0.57116693", "0.5659346", "0.5654909", "0.560772", "0.55737823", "0.55734885", "0.5539981", "0.5530332", "0.55221546", "0.551399", "0.55074155", "0.5485508", "0.5481928", "0.54444337", "0.5427657...
0.72686034
0
Serialize context into a string representation.
Сериализовать контекст в строковое представление.
public function serialize(Context $context = null);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function serialize(Context $context = null)\n {\n return serialize($context);\n }", "private function contextToString($context) {\n $export = '';\n foreach ($context as $key => $value) {\n $export .= \"{$key}: \";\n $export .= preg_replace(array(\n ...
[ "0.77496094", "0.73564357", "0.7352285", "0.7113846", "0.6850581", "0.68058354", "0.6647296", "0.6629758", "0.64151424", "0.6215121", "0.6161738", "0.61230737", "0.6094405", "0.60615116", "0.602345", "0.601227", "0.59546655", "0.59468913", "0.59468913", "0.59468913", "0.59346...
0.7761308
0
This is called by searchAction once the search has been initiated and again by javascript via ajaxstatusAction once the search has ended Uses parent (SearchController) resultsAction
Это вызывается searchAction сразу после запуска поиска и снова через javascript via ajaxstatusAction после окончания поиска. Использует результаты из действия (SearchController) resultsAction.
public function resultsAction() { //Debug::dump($this->query); $sid = $_SESSION[$this->id]['sid']; try { $status = $this->engine->getSearchStatus($sid); } catch( \Exception $e ) { // Exception probably a session timeout; go back to fro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchAction() {\n parent::searchAction();\n }", "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( Invoices::grid() )->search ();\n\t}", "public function indexAction()\n {\n $this->View()->loadTemplate('frontend/search/ajax.tpl');\n\n ...
[ "0.7022027", "0.6809658", "0.6775323", "0.67604584", "0.6700788", "0.6501149", "0.6453229", "0.6434289", "0.6432948", "0.64233977", "0.64111096", "0.64077455", "0.64057094", "0.63728875", "0.63405997", "0.6331622", "0.63199955", "0.6316049", "0.63075614", "0.6288856", "0.6269...
0.75070584
0
/ this way it works well only for orthogonal lines imagesetthickness($image, $thick); return imageline($image, $x1, $y1, $x2, $y2, $color);
Таким образом, это работает хорошо только для ортогональных линий imagesetthickness($image, $thick); return imageline($image, $x1, $y1, $x2, $y2, $color);
function imagelinethick($image, $x1, $y1, $x2, $y2, $color, $thick = 1) { if ($thick == 1) { return imageline($image, $x1, $y1, $x2, $y2, $color); } $t = $thick / 2 - 0.5; if ($x1 == $x2 || $y1 == $y2) { return imagefilledrectangle(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function imagelinethick($image, $x1, $y1, $x2, $y2, $color, $thick = 1)\n{\n if ($thick == 1) {\n return imageline($image, $x1, $y1, $x2, $y2, $color);\n }\n $t = $thick / 2 - 0.5;\n if ($x1 == $x2 || $y1 == $y2) {\n return imagefilledrectangle($image, round(min($x1, $x2) - $t), round(min($y1, ...
[ "0.8550813", "0.85013294", "0.79356337", "0.75022584", "0.72321224", "0.71101326", "0.68026423", "0.6609929", "0.65544975", "0.6373329", "0.6059497", "0.6057871", "0.58794886", "0.585668", "0.58228433", "0.5817794", "0.5757286", "0.5642984", "0.5636478", "0.56053793", "0.5581...
0.8573658
0
Set states for pre and postprocess command running.
Установите состояния для команд предварительной и последующей обработки.
protected function setCommandState(bool $pre = false, bool $post = false): void { $this->setAttribute('running_pre_command', $pre); $this->setAttribute('running_post_command', $post); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function set_process_state($state)\n\t{\n\t\t$action = $state === true ? 'lock' : 'unlock';\n\n\t\techo $this->_nl, \"{$action}ing $this->_dbtype $this->_object.\", $this->_nl;\n\n\t\ttry\n\t\t{\n\t\t\t$q_string = \"update sandbox.dbo.daemon set in_process = :state\";\n\n\t\t\tif ($state === true)\n\t\t\t\...
[ "0.59439737", "0.5911813", "0.57918274", "0.57918274", "0.5677078", "0.56626725", "0.55126125", "0.5253572", "0.5148326", "0.5117736", "0.51010764", "0.5096328", "0.50523263", "0.5046548", "0.50073665", "0.49951118", "0.49869072", "0.49745122", "0.49561143", "0.49526522", "0....
0.78549016
0
Check start conditions for worker.
Проверьте начальные условия для рабочего.
protected function checkStartConditions(): void { if (!$this->exists) { throw new WorkerException('Worker must be properly created before start.'); } if ($this->getAttribute('pid') !== null) { throw new WorkerException('Worker is running already.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function requireStarted() {\n $status = $this->getStatus(TRUE);\n if ($this->isEnabled() && (is_null($status) || !$status->running)) {\n $this->run('start');\n $this->updateStatus();\n }\n }", "public function preExecuteCheck()\n {\n return true;\n }", "public function i...
[ "0.6385085", "0.60505617", "0.5984385", "0.5966714", "0.58761173", "0.5853307", "0.5853307", "0.5853307", "0.5841918", "0.57940215", "0.5742919", "0.5680426", "0.5629395", "0.5574155", "0.55566466", "0.55428714", "0.5537304", "0.5492669", "0.54815996", "0.54803777", "0.547183...
0.80996984
0
Kill process if it is running.
Убить процесс, если он запущен.
protected function killProcess(): void { if (($pid = $this->getAttribute('pid')) === null) { return; } if ($this->systemCommands()->isProcessRunning($pid)) { $this->systemCommands()->killProcess($pid); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function kill()\n {\n $this->log(\"Killing process {$this->pid}\");\n $command = \"kill {$this->pid}\";\n exec($command, $output);\n\n if ($this->processIsRunning()) {\n $this->log(\"Process {$this->pid} cannot die!\");\n return false;\n }\n\n ...
[ "0.79416853", "0.7065453", "0.6974918", "0.6927367", "0.6820375", "0.68128484", "0.6722057", "0.6615234", "0.64788544", "0.6455674", "0.6386886", "0.6306479", "0.62634945", "0.6139205", "0.61121774", "0.60973525", "0.6073313", "0.60722077", "0.60257286", "0.6025678", "0.59507...
0.7420866
1
Finalize worker. Make events for phase 5 is done and worker finished the job.
Завершить работу с рабочим процессом. Создать события для фазы 5, выполненной и рабочий завершил задание.
protected function finalize(): void { $this->fire(WorkerDoneEvent::class); Log::debug(sprintf('Worker [%s] finalized.', $this->getAttribute('id'))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function finished()\n {\n }", "protected function _finalize()\n\t{\n\t\t$this->_engine->callStage('_finalize');\n\t\t$this->setState($this->_engine->getState());\n\t}", "public function finishJob()\r\n {\r\n $this->done = true;\r\n }", "public function onFinished(Step $step)...
[ "0.60354036", "0.59921074", "0.5901358", "0.59002525", "0.5811942", "0.5764111", "0.57623535", "0.5762134", "0.57617825", "0.57610565", "0.57610565", "0.57610565", "0.57610565", "0.57610565", "0.57425296", "0.5714223", "0.5631109", "0.5600593", "0.55960536", "0.5594948", "0.5...
0.7762326
0
Return structured data for current article
Вернуть структурированные данные для текущей статьи
public function getStructuredDataForCurrentArticle() { $result = ''; $currentArticle = $this->pageInstanceCreator->getCurrentArticle(); $currentStore = (int) $this->storeManager->getStore()->getId(); if ($currentArticle) { $data = $this->dataProvider->getData($currentAr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showProductStructuredData()\n\t{\n\n\t\tif ($currentProduct = $this->getProduct()) {\n\t\t\ttry {\n\t\t\t\t$productId = $currentProduct->getId() ? $currentProduct->getId() : $this->request->getParam('id');\n\n\t\t\t\t$product = $this->product->load($productId);\n\t\t\t\t$availability = $produc...
[ "0.6118024", "0.6026702", "0.60036284", "0.59940076", "0.5959943", "0.59505117", "0.59158146", "0.5905627", "0.5903788", "0.58694994", "0.5853821", "0.58301044", "0.5818596", "0.5816032", "0.58117723", "0.5810524", "0.5809865", "0.5801043", "0.58006924", "0.57876146", "0.5765...
0.7733348
0
Set the attachment name and try to decode it
Установите имя приложения и попытайтесь его декодировать
public function setName($name) { $decoder = $this->config['decoder']['attachment']; if ($name !== null) { if($decoder === 'utf-8' && extension_loaded('imap')) { $this->name = \imap_utf8($name); }else{ $this->name = mb_decode_mimeheader($name); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setName(string $name): Attachment;", "private function setFileName() {\n $FileName = Uteis::Name($this->Name) . strrchr($this->File->name, '.');\n if (file_exists(self::$BaseDir . $this->Send . $FileName)):\n $FileName = Uteis::Name($this->Name) . '-' . time() . strrchr($...
[ "0.6701647", "0.6197728", "0.61966133", "0.5991909", "0.58194166", "0.5813749", "0.57833034", "0.5766853", "0.5733412", "0.5539952", "0.55380136", "0.5534897", "0.5522632", "0.5441911", "0.54009813", "0.53729004", "0.53727007", "0.53419924", "0.5332877", "0.5327366", "0.53259...
0.7896997
0
Get a masked instance by providing a mask name
Получите маскированный экземпляр, указав имя маски
public function mask($mask = null){ $mask = $mask !== null ? $mask : $this->mask; if(class_exists($mask)){ return new $mask($this); } throw new MaskNotFoundException("Unknown mask provided: ".$mask); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMaskBuilder()\n {\n return new MaskBuilder();\n }", "public function setMask($mask)\n {\n $this->mask = $mask;\n return $this;\n }", "public function createMaskBuilder()\n {\n return new MaskBuilder();\n }", "public function setMask($mask): Att...
[ "0.57892144", "0.5698611", "0.56667787", "0.55671185", "0.5538033", "0.54446685", "0.54446685", "0.54446685", "0.54178673", "0.5368368", "0.52638745", "0.5242368", "0.5217972", "0.5202813", "0.50950885", "0.5088655", "0.50838023", "0.50810415", "0.49734178", "0.49635088", "0....
0.7031676
0
un query que obtiene las ventas
запрос, который получает продажи
public function getVentas() { $query = $this->db->query(' SELECT v.idVenta as idVenta, u.nombre_usuario as usuario, c.nombre as cliente, v.fecha_venta as fecha, v.total as total FROM ventas as v INNER JOIN usuarios as u on u.idUsuario = v.idUsuario INNER JOIN clien...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listaVentas()\n {\n $conexion = conexion::conectar();\n $sql = \"SELECT * FROM movimientos WHERE compra_venta ='v' order by id_producto asc;\";\n $stmt = $conexion->prepare($sql);\n $stmt->execute();\n $array = $stmt->fetchAll(PDO::FETCH_ASSOC);\n $stmt ...
[ "0.7303557", "0.70728225", "0.657035", "0.6531323", "0.647057", "0.6469289", "0.63089806", "0.6253568", "0.6212535", "0.6198336", "0.61861366", "0.6166364", "0.6146911", "0.61346805", "0.60666114", "0.60371786", "0.598335", "0.59748864", "0.5964857", "0.59097457", "0.5896536"...
0.75676095
0
esta funcion modifica la cantidad de productos despues de entregar un producto por producto caducado
Эта функция изменяет количество продуктов после передачи одного истекшего продукта
public function modificarCantidadMerma($idProducto,$cantidadNueva){ //obtenermos el producto caducado del inventario $this->db->where('idProducto',$idProducto); $query =$this->db->query("Select * from productos where idProducto = ". $idProducto ." "); $canActual = 0; $query2 = ""; if($query -> num_rows...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add($product) {\n $ajout = false;\n if ($this->products_id) {\n if (array_key_exists($product->id,$this->products_id)) {\n if ($product->quantity >= $this->products_id[\"$product->id\"]++){\n $this->products_id[\"$product->id\"]++;\n $ajout = t...
[ "0.7082291", "0.68522644", "0.65943766", "0.6543601", "0.6494808", "0.6466395", "0.64299804", "0.63671446", "0.63589627", "0.63471234", "0.6276302", "0.6269382", "0.62544256", "0.6233874", "0.62291133", "0.62214136", "0.6210965", "0.61757106", "0.617281", "0.61643595", "0.616...
0.70734614
1
If no custom logo, return the original content.
Если нет пользовательского логотипа, верните оригинальный контент.
function mai_custom_logo( $content ) { if ( ! ( function_exists( 'has_custom_logo' ) && has_custom_logo() ) ) { return $content; } return get_custom_logo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLogo();", "public function getLogo()\n {\n return $this->logo;\n }", "public function getLogo()\n {\n return $this->logo;\n }", "public function getLogo() {\n return $this->logo;\n }", "public function getLogo()\n {\n return $this->logo;\n }", "fu...
[ "0.7337691", "0.707603", "0.707603", "0.70707554", "0.70679337", "0.6997045", "0.6927934", "0.69176036", "0.68691605", "0.67830765", "0.67743", "0.6702282", "0.6687047", "0.6647672", "0.6634182", "0.66336334", "0.66080165", "0.65917104", "0.6571605", "0.6556498", "0.6533261",...
0.7795156
0
Use Genesis header menu filter (taken from G)
Используйте фильтр меню заголовка Genesis (взят из G)
function _mai_add_widget_header_menu_args() { add_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' ); add_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register_header_menu() {\r\n register_nav_menu('header-menu',__( 'Header Menu' ));\r\n}", "function erp_get_menu_headers() {\n $menu = [];\n return apply_filters( 'erp_menu_headers', $menu );\n}", "function erp_add_menu_header( $component, $title, $icon = \"\" ) {\n add_filter('erp_menu_head...
[ "0.7055385", "0.6861928", "0.68446124", "0.6781851", "0.67307556", "0.6719581", "0.6714684", "0.6692508", "0.6691295", "0.6691295", "0.6634492", "0.6620817", "0.6616811", "0.6553519", "0.6551057", "0.6545848", "0.6542033", "0.652378", "0.65210235", "0.6519937", "0.65198797", ...
0.73627484
0
Remove Genesis header menu filter (taken from G)
Удалить фильтр меню заголовка Genesis (взят из G)
function _mai_remove_widget_header_menu_args() { remove_filter( 'wp_nav_menu_args', 'genesis_header_menu_args' ); remove_filter( 'wp_nav_menu', 'genesis_header_menu_wrap' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_branding() {\n\n\t\tremove_action('thematic_header','thematic_brandingopen',1);\n\n\t\tremove_action('thematic_header','thematic_access',9);\n\n}", "function bethel_stop_filtering_menu_items() {\n\tremove_filter ('walker_nav_menu_start_el', 'bethel_add_menu_subtitles');\n}", "function hide_menu...
[ "0.7236841", "0.7001789", "0.6942997", "0.69210833", "0.688926", "0.6882698", "0.68791467", "0.68323773", "0.6780212", "0.6777328", "0.67080724", "0.6700009", "0.6694299", "0.6684406", "0.66793257", "0.66793257", "0.6673857", "0.6669461", "0.6640316", "0.66334534", "0.6626203...
0.7912118
0
Throws an exception when the given campaign contains a product that's already in a running campaign
Выбрасывает исключение, когда заданная кампания содержит продукт, который уже находится в запущенной кампании
private function validateOverlappingCampaigns(Campaign $campaign){ $conflictingCampaigns = []; foreach ($campaign->products as $product){ $runningCampaignsWithThisProduct = $product->campaigns->where('is_active', true)->where('id', '<>', $campaign->id); foreach ($runningCampaign...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _alreadyInstalled()\r\n\t{\r\n\t\t$select\t\t= $this->_db->select()->from('Cron_Jobs', array('id'))->where('name = ?', $this->_name);\r\n\t\t$results\t= $this->_db->fetchAll($select);\r\n\t\t\r\n\t\tif(count($results)) {\r\n\t\t\tthrow new Exception('Cron job ' . $this->_name . 'is already insta...
[ "0.5479134", "0.5453562", "0.5452496", "0.54405963", "0.5309344", "0.52321786", "0.5115219", "0.51099694", "0.5042452", "0.5031095", "0.5015137", "0.50028485", "0.50018555", "0.49263424", "0.49230093", "0.49151683", "0.4884879", "0.48399106", "0.4820044", "0.4812027", "0.4778...
0.7017004
0
index Untuk menampilkan data kategori Pada method ini, kita akan mengambil data dari model dengan memanggil method product_model>getAll(). Lalu kita merendernya ke dalam view admin/kategori/list.
index Для отображения данных категории В этом методе мы возьмем данные из модели, вызвав метод product_model>getAll(). Затем мы отрендерим их в представление admin/kategori/list.
public function index() { $data["title"] = 'Kategori'; $data["kategori"] = $this->kategori_model->getAll(); $this->load->view("admin/kategori/list", $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionIndex(){\r\n $model = new kategori;\r\n $data= $model->findAll();\r\n $this->render('index',array('data'=>$data));\r\n }", "public function index()\n {\n return Kategori::latest()->paginate();\n }", "public function index()\n {\n ...
[ "0.81961757", "0.76907486", "0.75913984", "0.7508943", "0.7483687", "0.7470434", "0.7421065", "0.7335112", "0.73349345", "0.73250455", "0.7313267", "0.72770035", "0.7272864", "0.72467977", "0.7226574", "0.72075444", "0.7203617", "0.7194082", "0.7182728", "0.71522284", "0.7148...
0.7944245
1
add untuk menyimpan data kategori, jika validasi berhasil maka method ini akan berfungsi sebagai method untuk menyimpan data Method ini bertugas untuk menampilkan form add dan menyimpan data ke database. Tentunya dengan memanggil method save() yang ada pada model. Namun, sebelum memanggil method save(), kita lakukan va...
add для сохранения данных категории, если валидация успешна, то этот метод будет выполнять функцию метода для сохранения данных. Этот метод отвечает за отображение формы добавления и сохранение данных в базу данных. Конечно, с вызовом метода save(), который находится в модели. Однако перед вызовом метода save(), мы сна...
public function add() { $data["icons"] = $this->M_Icon->getAll(); $data["title"] = 'Tambah Kategori'; $validation = $this->form_validation; $rules = [ [ 'field' => 'kategori', 'rules' => 'required' ], [ 'field' => 'deskripsi', 'rules' => 'required' ] ]; $validation->set_rules...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_kategori(){\r\n $nama_kategori = $this->input->post(\"nama_kategori\");\r\n $replace = str_replace(\" \", \"-\", $nama_kategori);\r\n $lower = strtolower($replace);\r\n $data = array(\r\n 'id_kategori' => NULL,\r\n 'nama_kategori' => $nama_kategori,\r\n 'slu...
[ "0.74708915", "0.7370815", "0.73412967", "0.72471887", "0.72136706", "0.71753234", "0.71025354", "0.70994025", "0.70421916", "0.7030842", "0.69921726", "0.6986934", "0.6980997", "0.6970234", "0.69117975", "0.689033", "0.6820362", "0.6815184", "0.6815074", "0.6782693", "0.6772...
0.8204139
0
/ Adding a new commission_tech
/ Добавление нового commission_tech
function add() { $this->load->library('form_validation'); $this->form_validation->set_rules('nom_commission','Nom Commission','max_length[100]|required'); $this->form_validation->set_rules('description','Description','max_length[255]'); if($this->form_validation->run()) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_commission_tech($params)\n {\n $this->db->insert('commission_tech',$params);\n return $this->db->insert_id();\n }", "public function addNewHospital()\n {\n }", "function add()\n\t{\n\t\t$companies = $this->company_model->get_many_by(array('active_status' => 1));\n\t\t$vio...
[ "0.6688713", "0.634134", "0.6333703", "0.59176916", "0.5912005", "0.5874675", "0.5864881", "0.5826227", "0.58203095", "0.5816038", "0.580953", "0.58086216", "0.579994", "0.5790854", "0.5779398", "0.57578677", "0.574327", "0.5742095", "0.5741545", "0.5723733", "0.5719629", "...
0.7112116
0
Determine if log contains the given text after the last mark.
Определите, содержит ли журнал заданный текст после последней метки.
public function assertLogContainsTextAfterLastMarker($text) { $this->assertStringContainsString($text, $this->getLogContentsAfterLastMarker()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assertLogNotContainsTextAfterLastMarker($text)\n {\n $this->assertStringNotContainsString($text, $this->getLogContentsAfterLastMarker());\n }", "public function isLastPartOfStringReturnsFalseForNotMatchingFirstPartDataProvider() {}", "public function isLastPartOfStringReturnsTrueFo...
[ "0.72433347", "0.6310511", "0.62557733", "0.61694527", "0.6033563", "0.59401286", "0.5690679", "0.5655703", "0.5548847", "0.54557276", "0.5426824", "0.54239243", "0.54239243", "0.54024756", "0.53671384", "0.53616977", "0.53352517", "0.53189903", "0.53110445", "0.53104746", "0...
0.80095756
0
Determine if log does not contains the given text after the last mark.
Определите, содержит ли журнал заданный текст после последней метки.
public function assertLogNotContainsTextAfterLastMarker($text) { $this->assertStringNotContainsString($text, $this->getLogContentsAfterLastMarker()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assertLogContainsTextAfterLastMarker($text)\n {\n $this->assertStringContainsString($text, $this->getLogContentsAfterLastMarker());\n }", "public function isLastPartOfStringReturnsFalseForNotMatchingFirstPartDataProvider() {}", "public function endsWithReturnsFalseForNotMatchingLas...
[ "0.77117425", "0.6660792", "0.62684035", "0.61184484", "0.59831244", "0.581126", "0.5531051", "0.5502181", "0.5345916", "0.526381", "0.525753", "0.5242996", "0.52261823", "0.51971626", "0.5180228", "0.5166437", "0.5160185", "0.5160185", "0.51525223", "0.50974405", "0.5093789"...
0.7937076
0
Get the contents of the log after the last marker.
Получите содержимое журнала после последнего маркера.
protected function getLogContentsAfterLastMarker() { $startTestMarker = 'test marker'; $logContents = file_get_contents($this->findNewestLocalLogfile()); $lastMarkerPosition = strrpos($logContents, $startTestMarker); $contentsAfterLastMarker = substr($logContents, $lastMarkerPosit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLastLog () {\n return end($this->log);\n }", "public function get_lastLogs(): string\n {\n // $content is a bin;\n\n $content = $this->_download('logs.txt');\n return $content;\n }", "protected function getLastLogEntryMessage() {}",...
[ "0.7281162", "0.6693856", "0.665836", "0.64173007", "0.60583687", "0.60432523", "0.60095435", "0.5961799", "0.5942277", "0.5933776", "0.5913653", "0.5891799", "0.58595806", "0.58474207", "0.58152324", "0.58037907", "0.57974136", "0.5741124", "0.57137346", "0.56900316", "0.565...
0.83775496
0
/ Display the menu as a table
Отобразить меню в виде таблицы
function display_menu() { global $avalaible_config; foreach ($avalaible_config as $choice) { echo "<tr><td>" . $choice['name'] . "</td><td>"; display_choice($choice); echo "</td></tr>\n"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Logs_Tables_Menu()\n {\n return \"\"; #disabled\n $tables=$this->Logs_Sql_Tables_Get();\n \n $args=$this->CGI_URI2Hash();\n \n $html=\"\";\n foreach ($tables as $year => $months)\n {\n $hrefs=array();\n $args[ \"Year\" ]=$yea...
[ "0.74565244", "0.71079135", "0.6911289", "0.6876079", "0.67520416", "0.66602504", "0.6621429", "0.6552635", "0.6469085", "0.6465169", "0.645637", "0.64116967", "0.6397853", "0.63749117", "0.6348541", "0.63415194", "0.6334258", "0.63201773", "0.6309669", "0.6299676", "0.629801...
0.72629184
1
/ Replace the value of the variable $name_var by $value in includes/config.php Return true if operation is a success, false otherwise
Замените значение переменной $name_var на $value в includes/config.php Верните true, если операция выполнена успешно, и false в противном случае
function replace_in_config($name_var, $value) { $source = file_get_contents('includes/config.php'); $value_formatted = var_export($value, true); $replace = "\n\$" . $name_var . " = " . $value_formatted . ";"; $new_source = preg_replace('#\n\$' . $name_var . '(.*?)\;#s', "$replace", $source); if ($hand...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sloodle_set_config($name, $value)\n {\n // If in debug mode, ensure the name is prefixed appropriately for Sloodle\n if (defined('SLOODLE_DEBUG') && SLOODLE_DEBUG) {\n if (substr_count($name, 'sloodle_') < 1) {\n exit (\"ERROR: sloodle_set_config(..) called with ...
[ "0.66289777", "0.6562506", "0.65464175", "0.6439855", "0.6406312", "0.63436276", "0.6333272", "0.6312324", "0.63113135", "0.6300595", "0.6290024", "0.6271981", "0.6264749", "0.626241", "0.62306994", "0.6201432", "0.6199969", "0.61748457", "0.6168577", "0.61545897", "0.6152929...
0.80673677
0
/ If $condition, add $result_true in $test_result In addition, if not $recommend_condition, add $recommend_true to $recommendation Else $result_false and $recommend_false
Если $condition, добавить $result_true в $test_result. Кроме того, если не $recommend_condition, добавить $recommend_true в $recommendation. Иначе $result_false и $recommend_false
function add_test($condition, $result_true, $recommend_true, $result_false, $recommend_false, $recommend_condition = FALSE) { global $recommendation, $test_result; if ($condition) { $test_result[] = "<span style='color: green;'>" . $result_true . "</span>"; if (!$recommend_condition) $recommendation[] = $re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function recommendLogic($review = null, $requestQuery = null)\n {\n // $positive_recommendation = $recommend ? $recommend : false;\n\n $recommend = false;\n $positive_recommendation = false;\n if (isset($requestQuery['recommend'])) {\n $recommend = true;\n ...
[ "0.53812355", "0.5105052", "0.5055952", "0.5020428", "0.49529648", "0.49519867", "0.4839084", "0.4833107", "0.47782102", "0.47587892", "0.47382647", "0.47011045", "0.46598345", "0.46549717", "0.46285635", "0.46175075", "0.46137384", "0.4608278", "0.45875493", "0.4576176", "0....
0.828652
0
/ Return true if $command is avalaible False otherwise Warning: this function launch the command
Возвращает true, если $command доступен, иначе false. Предупреждение: эта функция запускает команду
function test_command($command) { $return = explode(':', trim(exec('whereis ' . $command))); if (isset($return[1]) and trim($return[1]) != '') return TRUE; else return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasCommand(string $command = NULL): bool;", "public function executeCommand(string $command)\n {\n if ($this->checkIfEnoughBatteryForCommand($command)) {\n switch ($command) {\n case 'TL':\n case 'TR':\n $this->changeDirection(...
[ "0.7332483", "0.7178207", "0.7011099", "0.6941778", "0.68815094", "0.6805365", "0.6805365", "0.6805365", "0.6805365", "0.6805365", "0.67742795", "0.67574674", "0.67514", "0.66644204", "0.66639465", "0.6660135", "0.66112167", "0.6604956", "0.6600015", "0.65694577", "0.65527296...
0.72811675
1
/ Test the existence of command apertium, apertiumunformat, apertiumre and apertiumdes Return true if all of these commands are accessible, false otherwise
Проверить существование команды apertium, apertiumunformat, apertiumre и apertiumdes Возвращать истину, если все эти команды доступны, иначе ложь
function test_apertium_command() { global $config; $command_to_test = array($config['apertium_command'], $config['apertium_unformat_command']); $return = TRUE; foreach ($command_to_test as $command) { if (!test_command($command)) { echo $command; $return = FALSE; break; } } return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $this->_has(1);\n }", "public function hasCmd(){\n return $th...
[ "0.6782335", "0.6782335", "0.6782335", "0.6782335", "0.6782335", "0.6709843", "0.6459233", "0.62040603", "0.5927277", "0.5848604", "0.5807756", "0.5750559", "0.56794125", "0.56781733", "0.5654221", "0.5635328", "0.5625495", "0.56184965", "0.5588143", "0.5576597", "0.556172", ...
0.7219895
0
/ Return true if the temp directory is writable, false otherwise
Вернуть true, если временная директория доступна для записи, иначе false
function test_temp_dir() { global $config; return is_writable($config['temp_dir']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isWriteable()\n {\n $this->is_writable = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $w = substr($this->temp_files[$this->path]->perm...
[ "0.77987933", "0.76514554", "0.73836803", "0.73456705", "0.72081906", "0.71758574", "0.71626556", "0.71572554", "0.7097613", "0.70901924", "0.7083343", "0.7078589", "0.70628315", "0.7033963", "0.6974683", "0.6959086", "0.6920604", "0.6894542", "0.6886127", "0.68756205", "0.67...
0.825002
0
/ Return true if externTM_url is achievable
Возвращать истину, если externTM_url достижимо
function test_externTM() { global $config; return (@file_get_contents($config['externTM_url']) != ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getUrl(){\r\n\t\tif ($GLOBALS['TSFE']->absRefPrefix) {\r\n\t\t\t$this->url = $GLOBALS['TSFE']->absRefPrefix;\r\n\t\t\treturn true;\r\n\t\t} else if ($GLOBALS['TSFE']->config['config']['baseURL']) {\r\n\t\t\t$this->url = $GLOBALS['TSFE']->config['config']['baseURL'];\r\n\t\t\treturn true;\r\n\t\t} ...
[ "0.6945235", "0.68054366", "0.66411287", "0.6511362", "0.645758", "0.6445976", "0.63378173", "0.62548745", "0.6252437", "0.62354463", "0.6225727", "0.61757046", "0.61336905", "0.61107534", "0.60979", "0.6079476", "0.6077251", "0.6072931", "0.6052789", "0.6022719", "0.6010724"...
0.8200643
0
/ Return true if includes/config.php is writable
Возвращает true, если includes/config.php доступен для записи
function test_config() { return is_writable('includes/config.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function configfile_writeable() {\n\t\treturn is_writeable( CLASSPATH.\"payment/\".__CLASS__.\".cfg.php\" );\n\t}", "public function canWriteFiles()\n {\n return is_writable(__FILE__);\n }", "function configfile_readable() {\n\t\treturn is_readable(CLASSPATH . \"payment/\".__CLASS__.\".cfg.php\");...
[ "0.8348201", "0.7378057", "0.736932", "0.7330136", "0.71451265", "0.7083445", "0.7055616", "0.69437253", "0.69337314", "0.68698186", "0.68160653", "0.6810314", "0.6802319", "0.6722824", "0.6678278", "0.66721916", "0.66639537", "0.6663277", "0.6599761", "0.6589136", "0.6558709...
0.8551734
0
/ Return true if languagetool is runnable
Возвращает true, если languagetool можно запустить
function test_languagetool() { global $config; return (exec($config['languagetool_command']) != ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_runnable()\n\t{\n\t\treturn $this->ext_config->cleanup_titania;\n\t}", "final protected static function canRun() : bool\n\t{\n\t\t$bCanRun = parent::canRun();\n\n\t\tif ($bCanRun) {\n\t\t\t$aeFiles = \\MarkNotes\\Files::getInstance();\n\t\t\t// Be sure the library is there\n\t\t\t$lib=__DIR__....
[ "0.7076049", "0.63694674", "0.63553965", "0.6269278", "0.624501", "0.6198381", "0.6100743", "0.6094222", "0.6094222", "0.6094222", "0.6093563", "0.6093563", "0.6048664", "0.60055345", "0.59855", "0.5985047", "0.59652585", "0.595375", "0.5945161", "0.5864206", "0.58423454", ...
0.70722693
1
Indicate if the module provides an option group.
Укажите, предоставляет ли модуль группу параметров.
public function hasOptionGroup() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasGroup()\n {\n return isset($this->arrConfig['group']);\n }", "public function hasOption(){\n return $this->_has(35);\n }", "public function has_option() {\n return false;\n }", "public function hasGroup()\n {\n return $this->_has('_group');\n }",...
[ "0.7218967", "0.6826858", "0.6812246", "0.6740467", "0.6733742", "0.6721992", "0.67024624", "0.6662649", "0.6540292", "0.6520219", "0.6520219", "0.65116954", "0.6499165", "0.6470954", "0.64364666", "0.6334773", "0.6313339", "0.63049775", "0.62597114", "0.62487274", "0.6242225...
0.85431474
0
Return the title for the option group representing this module.
Верните заголовок для группы опций, представляющей этот модуль.
public function getOptionGroupTitle() { return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOptionTitle()\n {\n return $this->optionTitle;\n }", "public function getTabTitle()\r\n {\r\n return __('General Group');\r\n }", "public function get_module_title()\n {\n return \"LC__DIALOG_ADMIN\";\n }", "private function _getTitle()\r\n\t{\r\n\t\t...
[ "0.78116626", "0.724162", "0.70016575", "0.68952954", "0.6892446", "0.68848807", "0.67782265", "0.67486286", "0.67468005", "0.673938", "0.66776586", "0.6656248", "0.664219", "0.66297793", "0.6629148", "0.6628399", "0.66283685", "0.6593359", "0.6590131", "0.658615", "0.6582054...
0.8399312
0
Return the description for the option group representing this module.
Верните описание для группы параметров, представляющих этот модуль.
public function getOptionGroupDescription() { return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGroupDescription() : string\n {\n return $this->groupDescription;\n }", "public function getGroupDescription()\n {\n return $this->__get(self::FIELD_GROUP_DESCRIPTION);\n }", "public function getDescription() {\n\t\t\treturn $this->MODULE_DESCRIPTION;\t\n\t\t}", "...
[ "0.7530338", "0.7524006", "0.7265398", "0.71685666", "0.69225186", "0.6854205", "0.6660836", "0.66060275", "0.6585564", "0.6553173", "0.6518015", "0.6494479", "0.6479347", "0.6461363", "0.6427197", "0.6419492", "0.64073014", "0.6401945", "0.638657", "0.63815176", "0.6360618",...
0.83729595
0
function for apartment deletion
функция для удаления квартиры
public function delete_apartment($token){ $apartment_id = $this->fetch_single($token); $delete_sql = "DELETE FROM `apartments` WHERE `id`='$apartment_id'"; $this->query($delete_sql); $delete_sql_i = "DELETE FROM `update_delete_requests` WHERE `apartment_id`='$apartment_id'"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleted(Apartment $apartment)\n {\n //\n }", "public function testDeleteAppartment() {\n $newAcc = My_Houseshare_Factory::accommodation(4);\n $newAcc->delete();\n\n $accRowAfter = $this->_model->find(4)->current();\n $this->assertTrue(null === $accRowAfte...
[ "0.7926613", "0.7427239", "0.7201357", "0.7141625", "0.67809254", "0.6773398", "0.6697746", "0.66752744", "0.66752744", "0.66053444", "0.65734184", "0.656275", "0.6548287", "0.654639", "0.65305597", "0.6528943", "0.6524275", "0.65115976", "0.64995164", "0.64890385", "0.648903...
0.7508065
1
get apartment id from token
получить идентификатор квартиры из токена
public function fetch_single($token){ $sql = "SELECT `apartment_id` FROM `update_delete_requests` WHERE `token`='$token'"; $sql_exec = $this->query($sql); $fetch_id = $this->fetch_assoc($sql_exec); return ($fetch_id['apartment_id']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function id() {\n\n if (!isset($_SERVER['HTTP_TRONGATETOKEN'])) {\n http_response_code(422);\n echo 'no token'; die();\n } else {\n $token = $_SERVER['HTTP_TRONGATETOKEN'];\n $result = $this->model->get_one_where('token', $token, 'trongate_tokens');\n\n ...
[ "0.66805786", "0.6374802", "0.6333661", "0.63120323", "0.6239685", "0.6230316", "0.61956584", "0.6154206", "0.61395764", "0.60396165", "0.60396165", "0.60396165", "0.5964235", "0.5947374", "0.5927995", "0.5919236", "0.5897955", "0.58225715", "0.58142275", "0.58079535", "0.580...
0.7102757
0
Formats the table for detected files
Форматирует таблицу для обнаруженных файлов
private function formatTable (array $detectedFiles) : array { $rows = []; foreach ($detectedFiles as $type => $data) { $rows[] = [ "<fg=yellow>{$type}</>", $data["fileName"], $data["digest"], ]; } retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MyMod_Handle_Files_Table($path,$table=array(),$prencells=0)\n {\n return\n array_merge\n (\n $this->MyMod_Handle_Files_Subdir_Rows($path),\n $this->MyMod_Handle_Files_Subdirs_Table($path,$prencells),\n $this->MyMod_Handle_Files_P...
[ "0.6121503", "0.60994977", "0.586375", "0.58517736", "0.5841146", "0.5740446", "0.5706961", "0.56818396", "0.56618685", "0.56173295", "0.56098664", "0.556983", "0.55518717", "0.5491279", "0.5485064", "0.54747576", "0.54522896", "0.5448624", "0.54241383", "0.54144776", "0.5404...
0.74341196
0
restore all the TRASHED row for the given model
восстановить все удаленные строки для заданной модели
public function restoreAllTrashed() { return $this->model->withTrashed()->restore(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restoring($model)\n\t{\n\t}", "public function restored($model)\n {\n $this->whileForcingUpdate(function () use ($model) {\n $this->saved($model);\n });\n }", "public function restored(Auditable $model)\n {\n Auditor::execute($model->setAuditEvent('resto...
[ "0.67247903", "0.67219174", "0.67001235", "0.65504974", "0.6460385", "0.6344884", "0.62214667", "0.61682475", "0.6156345", "0.6003035", "0.5987713", "0.58860564", "0.5847282", "0.5829868", "0.5765701", "0.5721244", "0.57151115", "0.56391263", "0.5632352", "0.5612026", "0.5594...
0.7240671
0
retrieve count of rows of the given model
получить количество строк заданной модели
public function getCount() { return $this->model->count(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count() {\n return $this->model->all()->count();\n }", "public function count()\n {\n return $this->model->count();\n }", "public function count()\n {\n return $this->model->count();\n }", "public static function getCountret($model,$status)\n { \n ...
[ "0.7744316", "0.76634336", "0.76634336", "0.7532042", "0.74937594", "0.74673545", "0.7375397", "0.7298618", "0.7298618", "0.7273625", "0.7260927", "0.7248666", "0.72414494", "0.720698", "0.7191763", "0.71691364", "0.7147703", "0.7107534", "0.710362", "0.7099553", "0.7079524",...
0.7672332
1
Get tenant status list
Получить список статусов клиента
function getTenantStatuses() { $status = array(1 => array('name' => 'Created', 'class' => 'primary'), 2 => array('name' => 'Running', 'class' => 'success'), 3 => array('name' => 'Suspend', 'class' => 'danger'), 4 => array('name' => 'Resume', 'class' => 'info') ); return $status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrieveTenants()\n {\n return $this->start()->uri(\"/api/tenant\")\n ->get()\n ->go();\n }", "public function getStatusesList(){\n return $this->_get(1);\n }", "public function lists()\n {\n return $this->statuses;\n }", "public function listsstatusget(...
[ "0.7160482", "0.714123", "0.69337326", "0.689532", "0.6783062", "0.6778122", "0.67457396", "0.6734318", "0.6633624", "0.6609277", "0.6478228", "0.6451735", "0.64399385", "0.6433431", "0.64280576", "0.6405979", "0.63910335", "0.6380135", "0.6375382", "0.63728696", "0.6365399",...
0.7533308
0
Return class for given tenant status id
Возвращение класса для заданного идентификатора статуса арендатора
function getClassForTenantStatus($status_id) { $status_list = getTenantStatuses(); return $status_list[$status_id]['class']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatus(Status $id){\n \n return $id ;\n }", "function getTenantStatuses()\n{\n $status = array(1 => array('name' => 'Created', 'class' => 'primary'),\n 2 => array('name' => 'Running', 'class' => 'success'),\n 3 => array('name' => 'Suspend', 'class' => 'danger'...
[ "0.60672855", "0.60442924", "0.5886781", "0.5854636", "0.5644132", "0.56327826", "0.5590758", "0.5564021", "0.555631", "0.554495", "0.5539837", "0.5522824", "0.5478071", "0.54414314", "0.5427064", "0.5407776", "0.5405389", "0.53542405", "0.53326637", "0.5312093", "0.52955526"...
0.86868066
0
Sets the Workday_Common_Header SoapHeader param
Устанавливает параметр SoapHeader Workday_Common_Header
public function setSoapHeaderWorkday_Common_Header(\WorkdayWsdl\\StructType\Workday_Common_HeaderType $workday_Common_Header, $nameSpace = 'urn:com.workday/bsvc', $mustUnderstand = false, $actor = null) { return $this->setSoapHeader($nameSpace, 'Workday_Common_Header', $workday_Common_Header, $mustUnderstan...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setSoapHeader()\n {\n $headerXML =<<<XML\n<ROClientIDHeader xmlns=\"http://tempuri.org/\">\n <ID>$this->loginID</ID>\n</ROClientIDHeader>\nXML;\n $sHeaderVar = new SoapVar($headerXML, XSD_ANYXML);\n $this->soapHeader = new SoapHeader('http://tempuri.org/'...
[ "0.7149846", "0.6208261", "0.6029402", "0.5966939", "0.59557885", "0.59230566", "0.5890067", "0.5830003", "0.58151263", "0.57568043", "0.5740557", "0.57298267", "0.56745374", "0.56695974", "0.5668706", "0.565033", "0.5623002", "0.5614971", "0.5605102", "0.55837744", "0.556933...
0.7405892
0
Get fake instance of UserVerificationCode
Получить фейковый экземпляр UserVerificationCode
public function fakeUserVerificationCode($userVerificationCodeFields = []) { return new UserVerificationCode($this->fakeUserVerificationCodeData($userVerificationCodeFields)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getVerificationCodeInstance()\r\n {\r\n return $this->vCodeInstance;\r\n }", "public function getUserByVerificationCode($userCode) {\n global $sql_prefix;\n\n if (strlen(trim($userCode)) < 1)\n return null;\n\n $user = null;\n $result = db_qu...
[ "0.7402823", "0.6886878", "0.67598593", "0.6678953", "0.662604", "0.6605027", "0.6538699", "0.6455469", "0.6414923", "0.6345304", "0.63337874", "0.6333015", "0.6329814", "0.6268278", "0.6239094", "0.6158752", "0.6155838", "0.6154679", "0.61346954", "0.61217904", "0.6113347", ...
0.7434107
0
function to clean a filename string so it is a valid filename
функция для очистки строки имени файла, чтобы она стала допустимым именем файла
function clean_filename($filename) { //replaces all characters that are not alphanumeric with the exception of the . for filename usage $realname = preg_replace("/[^a-zA-Z0-9\.]/", "", strtolower($filename)); return $realname; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cleanFileName($filename) {\n\t\t//$name = preg_replace('/[^a-zA-Z0-9.]/', '', $name);\n\t\t//$name = substr($name,0,9);\n\t\t$filename_raw = $filename;\n\t\t$special_chars = array(\"?\", \"[\", \"]\", \"/\", \"\\\\\", \"=\", \"<\", \">\", \":\", \";\", \",\", \"'\", \"\\\"\", \"&\", \"$\", \"#\", \"*\", \...
[ "0.8153103", "0.8094549", "0.80537874", "0.8030111", "0.79090154", "0.78866047", "0.78831565", "0.7865357", "0.785492", "0.77872473", "0.778502", "0.77657104", "0.77626365", "0.77359456", "0.76330024", "0.7630069", "0.7628188", "0.75973684", "0.7593104", "0.75702924", "0.7543...
0.83048826
0
Test case for aggregateEvents Aggregate events for customer.
Тестовый случай для агрегации событий. Агрегация событий для клиента.
public function testAggregateEvents() { // TODO: implement $this->markTestIncomplete('Not implemented'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function givenAnAggregateWhenAnEventIsAddedToEventStreamThenItShouldBeReturnedOnPullEventsMethodCall()\n {\n $aggregate = new class(Uuid::fromString('03ad41b9-25f2-4f1b-8104-74e99f5b9096')) extends AggregateRoot {\n public function __construct(Uuid $id)\n {\n p...
[ "0.586997", "0.58103967", "0.5691684", "0.5685904", "0.5685732", "0.5561707", "0.5554053", "0.54652995", "0.5359135", "0.53489137", "0.5346641", "0.52640504", "0.5263298", "0.5229246", "0.5216745", "0.5203517", "0.52027607", "0.5164785", "0.5155715", "0.5134621", "0.51281786"...
0.7225277
0
Test case for aggregatePolicyRules Aggregate rules within a policy for customer.
Тест-кейс для aggregatePolicyRules Сбор правил политики в рамках политики для клиента.
public function testAggregatePolicyRules() { // TODO: implement $this->markTestIncomplete('Not implemented'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAggregateRules()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testAggregateRuleGroups()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testQueryPolicyR...
[ "0.64734393", "0.5435358", "0.51603466", "0.50925726", "0.50755376", "0.49765936", "0.4724009", "0.46728498", "0.46662182", "0.46359846", "0.4614803", "0.45847076", "0.45821995", "0.4489061", "0.44815502", "0.43935126", "0.4314454", "0.4288429", "0.4281889", "0.4256723", "0.4...
0.7815481
0
Test case for aggregateRuleGroups Aggregate rule groups for customer.
Тест-кейс для объединения правил групп Объединение правил групп для клиента.
public function testAggregateRuleGroups() { // TODO: implement $this->markTestIncomplete('Not implemented'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAggregateRules()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function testGroupings()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$cust = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\r\n\t\t// Test add new category\r\n\t\t$...
[ "0.6562801", "0.6158599", "0.6069528", "0.5864601", "0.5677024", "0.5623351", "0.5617187", "0.55683976", "0.55283034", "0.54735273", "0.54701716", "0.54691327", "0.5465473", "0.5459042", "0.5234913", "0.5193246", "0.5184752", "0.51746404", "0.5149084", "0.51372606", "0.511044...
0.74517024
0
Test case for aggregateRules Aggregate rules for customer.
Тест-кейс для aggregateRules Агрегатные правила для клиента.
public function testAggregateRules() { // TODO: implement $this->markTestIncomplete('Not implemented'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAggregatePolicyRules()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testAggregateRuleGroups()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testAggreg...
[ "0.6531232", "0.6049324", "0.5824676", "0.56829774", "0.5594583", "0.51723367", "0.5042828", "0.5015919", "0.49542037", "0.4817427", "0.46948722", "0.4689425", "0.46482867", "0.46421868", "0.4608117", "0.4607605", "0.46039027", "0.45901236", "0.45882905", "0.45799184", "0.457...
0.71471244
0
Test case for deleteRuleGroups Delete rule group entities by ID.
Тестовый случай для deleteRuleGroups Удаление сущностей группы правил по ID.
public function testDeleteRuleGroups() { // TODO: implement $this->markTestIncomplete('Not implemented'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDeleteById()\n {\n $groupId = 42;\n $groupMock = $this->createMock(\\Magento\\Eav\\Model\\Entity\\Attribute\\Group::class);\n $this->groupFactoryMock->expects($this->once())->method('create')->willReturn($groupMock);\n $this->groupResourceMock->expects($this->once...
[ "0.7143066", "0.6982827", "0.67217803", "0.6684265", "0.66107994", "0.6601535", "0.6591751", "0.65912265", "0.6542302", "0.6532719", "0.64584464", "0.64536214", "0.64315456", "0.64117724", "0.6379825", "0.6354812", "0.63265705", "0.6271678", "0.6258186", "0.6241594", "0.62414...
0.79844415
0
Test case for queryEvents Find all event IDs matching the query with filter.
Тестовый случай для queryEvents Найти все идентификаторы событий, соответствующие запросу с фильтром.
public function testQueryEvents() { // TODO: implement $this->markTestIncomplete('Not implemented'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEvents(array $filters = array());", "public function get_events($args = [])\n {\n global $db, $system;\n /* initialize arguments */\n $user_id = !isset($args['user_id']) ? null : $args['user_id'];\n $offset = !isset($args['offset']) ? 0 : $args['offset'];\n ...
[ "0.69306016", "0.6839206", "0.62415123", "0.61289525", "0.61219645", "0.608064", "0.6080147", "0.6073041", "0.60528415", "0.6045407", "0.6035837", "0.6017504", "0.59980077", "0.59957063", "0.59896076", "0.59895223", "0.59857666", "0.5977693", "0.5974783", "0.5933214", "0.5921...
0.71264714
0
Test case for queryRuleGroups Find all rule group IDs matching the query with filter.
Тестовый случай для queryRuleGroups Найти все идентификаторы групп правил, соответствующих запросу с фильтром.
public function testQueryRuleGroups() { // TODO: implement $this->markTestIncomplete('Not implemented'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetQueryGroups()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testGetRuleGroups()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function queryGroups( $idArea, ...
[ "0.6124704", "0.58412397", "0.5566455", "0.54666114", "0.541076", "0.5381379", "0.5379039", "0.5378681", "0.53485614", "0.53472924", "0.5307081", "0.5295395", "0.52577055", "0.52344036", "0.5225069", "0.52071416", "0.5207098", "0.5207086", "0.52022845", "0.51903605", "0.51599...
0.7363239
0
Test case for updatePolicyContainer Update an identified policy container.
Тест-кейс для updatePolicyContainer Обновление идентифицированного контейнера политик.
public function testUpdatePolicyContainer() { // TODO: implement $this->markTestIncomplete('Not implemented'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function doUpdateTests()\n {\n $this->objectRepository->setClassName(TestPolicy::class);\n $policy = $this->objectRepository->find(19071974);\n $policy->policyNo = 'TESTPOLICY UPDATED';\n $policy->contact->lastName = 'ChildUpdate';\n $recordsAffected = $this->objectR...
[ "0.5898421", "0.5343952", "0.51544476", "0.51501846", "0.5112655", "0.49844038", "0.49492583", "0.49251896", "0.49251896", "0.48905608", "0.4879632", "0.485182", "0.47971612", "0.4790781", "0.47728816", "0.47696188", "0.4764022", "0.4724658", "0.46914548", "0.46628767", "0.46...
0.789797
0
Test case for updateRuleGroup Update name, description, or enabled status of a rule group, or create, edit, delete, or reorder rules.
Тестовый случай для updateRuleGroup Обновление имени, описания или статуса включения группы правил, или создание, редактирование, удаление или изменение порядка правил.
public function testUpdateRuleGroup() { // TODO: implement $this->markTestIncomplete('Not implemented'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateLanguageGroup() {\n foreach ($this->testCases['LanguageGroup'] as $key => $testCase) {\n $langGroup = new LanguageGroup();\n $langGroup->setGroupName($testCase['group_name']);\n\n $this->localizationDao = $this->getMock('LocalizationDao');\n ...
[ "0.68573713", "0.6781827", "0.64479244", "0.6211194", "0.6084388", "0.6076922", "0.60640883", "0.6022434", "0.5968351", "0.5951004", "0.59469837", "0.59368575", "0.5893147", "0.5816751", "0.5807778", "0.58014303", "0.5765585", "0.57609063", "0.5737139", "0.57287014", "0.57143...
0.78591913
0
To hook custom actions and filters for wpcd_team post type
Для привязки пользовательских действий и фильтров для типа поста wpcd_team
private function hooks() { // Filter hook to add custom meta box. add_filter( 'rwmb_meta_boxes', array( $this, 'wpcd_team_register_meta_boxes' ), 10, 1 ); // Load up css and js scripts used for managing this cpt data screens. add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ), 10, 1 ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ve_team_post_type_func() {\n\n\t$labels = array(\n\t\t'name' => __( 'Team', 'ss_framework' ),\n\t\t'singular_name' => __( 'Member', 'ss_framework' ),\n\t\t'add_new' => __( 'Add New', 'ss_framework' ),\n\t\t'add_new_item' => __( 'Add New Member', 'ss_framework' ),\n\t\t'...
[ "0.748832", "0.74111825", "0.70103806", "0.6956215", "0.6820995", "0.67925054", "0.67891353", "0.67559034", "0.6736856", "0.6736275", "0.6683377", "0.64606357", "0.6351706", "0.6268364", "0.61786914", "0.6171017", "0.61635864", "0.6135297", "0.61276966", "0.60622394", "0.6026...
0.76354915
0
Checks if user has permission to edit the team Action hook: loadpost.php
Проверяет, имеет ли пользователь право редактировать действие команды Action hook: loadpost.php
public function wpcd_team_load_post() { global $post; $screen = get_current_screen(); if ( $screen->post_type == 'wpcd_team' && isset( $_GET['action'] ) && $_GET['action'] == 'edit' && ! wpcd_is_admin() ) { if ( ! current_user_can( 'wpcd_manage_teams' ) ) { wp_die( esc_html( __( 'You don\'t have access...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function wpcd_team_load_edit_post_new() {\n\t\t$screen = get_current_screen();\n\n\t\tif ( 'wpcd_team' === $screen->post_type && ! wpcd_is_admin() ) {\n\t\t\tif ( ! current_user_can( 'wpcd_manage_teams' ) ) {\n\t\t\t\twp_die( esc_html( __( 'You don\\'t have access to this page.', 'wpcd' ) ) );\n\t\t\t}\n\t\...
[ "0.7168437", "0.7164696", "0.68885595", "0.6832006", "0.6783941", "0.6699089", "0.66547084", "0.6563328", "0.654908", "0.6495255", "0.64147437", "0.63941836", "0.63373244", "0.633102", "0.6317866", "0.6300158", "0.6286649", "0.62743586", "0.6272511", "0.62632376", "0.62556666...
0.73165834
0
Adds custom back to list button for team post type
Добавляет кастомную кнопку "Вернуться к списку" для типа записей "команда"
public function wpcd_team_backtolist_btn() { $screen = get_current_screen(); $post_type = 'wpcd_team'; if ( $screen->id === $post_type ) { $query = sprintf( 'edit.php?post_type=%s', $post_type ); $backtolist_url = admin_url( $query ); $backtolist_txt = __( 'Back To List', 'wpcd' ); ?> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Team() {\n\n $labels = array(\n 'name' => _x( 'Team', 'Post Type General Name', 'Teams' ),\n 'singular_name' => _x( 'Team', 'Post Type Singular Name', 'Teams' ),\n 'menu_name' => __( 'Team', 'Teams' ),\n 'name_admin_bar' => __( 'Team', 'Team...
[ "0.65802056", "0.6415141", "0.6369389", "0.6264012", "0.6210806", "0.6063355", "0.6004507", "0.5938669", "0.5888452", "0.5882796", "0.58819264", "0.5768102", "0.5739836", "0.57350653", "0.57327163", "0.56810975", "0.56124616", "0.56109387", "0.5573115", "0.55494297", "0.55313...
0.810246
0
Register meta box(es) for post type wpcd_team. Action hook: add_meta_boxes
Регистрация метабоксов для типа записи wpcd_team. Действие: add_meta_boxes
public function meta_boxes() { // Add TEAM Assignemtns meta box into Team custom post type. add_meta_box( 'wpcd_team_detail', __( 'Team Assignments', 'wpcd' ), array( $this, 'render_team_details_meta_box' ), 'wpcd_team', 'advanced', 'low' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wck_settings_page_add_meta_boxes() {\r\n global $post;\r\n\t\tdo_action( 'add_meta_boxes', $this->hookname, $post );\r\n\t}", "function add_meta_boxes($post_type, $post)\n {\n }", "function register_and_do_post_meta_boxes($post)\n {\n }", "public function register_meta_boxes()\n ...
[ "0.82702124", "0.80769265", "0.80538416", "0.8036305", "0.7998242", "0.7982511", "0.7903307", "0.78719145", "0.7831157", "0.7819974", "0.7806374", "0.77811885", "0.77809244", "0.77653134", "0.77059114", "0.76958704", "0.76437247", "0.7636255", "0.76319754", "0.7619606", "0.75...
0.8395559
0
Removes entries related to team in the custom table for permissions and remove the team from assigned teams for server and app. Action hook: wp_trash_post
Удаляет записи, связанные с командой, в пользовательской таблице для разрешений и удаляет команду из назначенных команд для сервера и приложения. Действие: wp_trash_post
public function wpcd_team_delete_post( $post_id ) { global $wpdb; if ( is_admin() && 'wpcd_team' === get_post_type( $post_id ) ) { $posts = get_posts( array( 'post_type' => array( 'wpcd_app_server', 'wpcd_app' ), 'post_status' => 'private', 'meta_key' => 'wpcd_assigned_teams', 'm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function wpcd_team_untrashed_post( $post_id ) {\n\t\tif ( is_admin() && 'wpcd_team' === get_post_type( $post_id ) ) {\n\t\t\t$wpcd_permission_rules = get_post_meta( $post_id, 'wpcd_permission_rule', true );\n\n\t\t\tforeach ( $wpcd_permission_rules as $rule ) {\n\t\t\t\t$user_id = (int) sanitize_...
[ "0.65973794", "0.60835785", "0.57393837", "0.565843", "0.5555428", "0.55428225", "0.55022484", "0.5474994", "0.5461849", "0.5454021", "0.5438436", "0.54217535", "0.5398521", "0.53670263", "0.5356287", "0.53293926", "0.5322822", "0.530884", "0.53084564", "0.5275537", "0.527553...
0.7135918
0
Checks for the wpcd_team_permissions meta box rules before saving the team and updates the permissions in custom table for the team member Action hook: rwmb_wpcd_team_permissions_before_save_post
Проверяет правила метабокса wpcd_team_permissions перед сохранением команды и обновляет разрешения в пользовательской таблице для члена команды. Хук действия: rwmb_wpcd_team_permissions_before_save_post
public function wpcd_team_permissions_before_save_post( $post_id ) { global $wpdb; $wpcd_permission_rules = get_post_meta( $post_id, 'wpcd_permission_rule', true ); if ( $wpcd_permission_rules ) { $new_wpcd_permission_rules = wpcd_filter_input_numeric_array( $_POST['wpcd_permission_rule'] ); $team_members ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function wpcd_team_save_post( $post_id ) {\n\t\tif ( isset( $_POST['post_type'] ) && 'wpcd_team' == $_POST['post_type'] ) {\n\t\t\t$wpcd_permission_rules = wpcd_filter_input_numeric_array( $_POST['wpcd_permission_rule'] );\n\n\t\t\t$team_id = filter_input( INPUT_POST, 'post_ID', FILTER_SANITIZE_NUMBER_INT )...
[ "0.711915", "0.5964975", "0.5937619", "0.58369863", "0.5694016", "0.55910105", "0.55694693", "0.55375564", "0.5473404", "0.5471497", "0.5411064", "0.53821266", "0.5334763", "0.529307", "0.5287671", "0.52771103", "0.5271833", "0.52701074", "0.5262828", "0.5248935", "0.52442396...
0.76342696
0
funcion para comprobar si existe el mismo dato en la tabla
функция для проверки наличия такого же данных в таблице
function func_existeDato($dato, $tabla, $columna){ selectConexion('onmworkflow'); $query = "select * from $tabla where $columna = '$dato' ;"; $result = pg_query($query) or die ("Error al realizar la consulta"); if (pg_num_rows($result)>0) { retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function existe($tabla,$campo,$where){\n\treturn (count(CON::getRow(\"SELECT $campo FROM $tabla $where\"))>0)?true:false;\n}", "function row_exist($table, $data) {\n\n global $devel, $tablas;\n\n $ids = array(\n 'PRIMARY_KEYS' => false,\n 'UNIQUES_KEYS' => false,\n 'INDEXES_KEYS' => false,\n 'COLUM...
[ "0.7231747", "0.7027951", "0.6968094", "0.69395345", "0.69033754", "0.69033736", "0.6880252", "0.6813495", "0.6793829", "0.6602964", "0.65480775", "0.65458894", "0.65066385", "0.63962334", "0.6355564", "0.6339487", "0.6330107", "0.62803346", "0.6274996", "0.626567", "0.625276...
0.7600161
0
Return id of instruction.
Вернуть идентификатор инструкции.
public function getId() { return $this->getData(self::INSTRUCTION_ID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInstruction();", "public function getId() {\n\t\treturn $this->i_id;\n\t}", "public function getId()\n {\n // TODO: Implement getId() method.\n return $this->nip;\n }", "public function getId()\n {\n return $this->generateId($this->_active_controller, $this->_...
[ "0.6708658", "0.6469915", "0.6408781", "0.64082474", "0.6353139", "0.63494664", "0.63394344", "0.63210946", "0.62601316", "0.6235299", "0.6223991", "0.6223991", "0.62144655", "0.6195574", "0.6192045", "0.6189069", "0.6181303", "0.6179696", "0.6179696", "0.6164464", "0.6157952...
0.81539965
0
Set id of instruction.
Установить идентификатор инструкции.
public function setId($id) { return $this->setData(self::INSTRUCTION_ID, $id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetId($value) { $this->id=$value; }", "public function setId($id){\n\t\tself::$_id[get_class($this)] = $id;\n\t}", "public function SetId ($id);", "private function setId($id)\n {\n $this->id = $id;\n }", "function setId($id) {\n $this->id = $id;\n }", "function setId($id)...
[ "0.74651426", "0.718155", "0.7161091", "0.7138126", "0.71157104", "0.71157104", "0.7108863", "0.7079328", "0.7074297", "0.7057449", "0.70526576", "0.7045237", "0.7044654", "0.70424974", "0.70424974", "0.70424974", "0.70424974", "0.70424974", "0.7038213", "0.70189273", "0.7018...
0.74900585
0
Displays a form to create a new Inspection entity.
Показывает форму для создания новой сущности Inspection.
public function newAction() { $entity = new Inspection(); $form = $this->createCreateForm($entity); return array( 'entity' => $entity, 'form' => $form->createView(), 'headerTitle' => 'Inspections' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createAction(Request $request)\n {\n $entity = new Inspection();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $this->get('InspectionManager')->persistAndFlush($entity); \n return $t...
[ "0.67408645", "0.6653241", "0.66045207", "0.6581076", "0.6556558", "0.650884", "0.64436734", "0.63919795", "0.63652325", "0.6351086", "0.63431555", "0.63417214", "0.6325712", "0.63037986", "0.63018143", "0.6286861", "0.62830806", "0.6240862", "0.6237774", "0.6220456", "0.6197...
0.80160195
0