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
Finds index of station in the array
Находит индекс станции в массиве
function findStationIndex($checkStationName, $dataArray) { foreach($dataArray as $key => $station) if ($checkStationName == $station["stationName"]) return $key; return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findArray($array,$item){\n for ($i=0;$i<count($array);$i++){\n if($array[$i]==$item)\n return $i;\n }\n return -1;\n }", "function getIndexOfRegistry($registryNumber, $array) {\n $i = 0;\n\t$index = -1;\n\tfor ($i = 0; $i < sizeof($array); $i++...
[ "0.63796544", "0.62801325", "0.5961767", "0.5904147", "0.5861937", "0.5849601", "0.582228", "0.5756937", "0.5708686", "0.5703343", "0.5696692", "0.5637787", "0.55793285", "0.5578864", "0.55673933", "0.5535584", "0.5534612", "0.55225575", "0.54975885", "0.54793376", "0.5464482...
0.80100924
0
Get Nice Recipe URL
Получить URL приятного рецепта
public function niceUrl() { return '/' . $this->recipe_id . '/' . $this->url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function url()\n {\n return '/recipe/' . $this->recipe->getKey();\n }", "public function get_url();", "public function getURL();", "public function getURL();", "public function getURL ();", "function get_url()\n {\n }", "public function get_url()\n {\n }", "pub...
[ "0.8005495", "0.6684302", "0.66728646", "0.66728646", "0.66376525", "0.6599835", "0.65327835", "0.6515474", "0.6506297", "0.649406", "0.646237", "0.64425784", "0.6424262", "0.6366747", "0.6355705", "0.6354239", "0.63503903", "0.6322692", "0.6319833", "0.6304408", "0.6288087",...
0.7425859
1
Gets the value from the specified key
Получает значение из указанного ключа
public function getValue($key);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get($key);", "public static function get($key);", "public function get( $key );", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public function get(string $key);", "public f...
[ "0.82606524", "0.82606524", "0.81740165", "0.81134725", "0.81134725", "0.81134725", "0.81134725", "0.81134725", "0.81134725", "0.81134725", "0.81134725", "0.8084556", "0.8084556", "0.8084556", "0.8084556", "0.8084556", "0.8084556", "0.8084556", "0.8084556", "0.8084556", "0.80...
0.85932136
0
Get values from the specified keys
Получить значения из указанных ключей
public function getValues(array $keys);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final public function gets(...$keys)\n {\n return $this->onPrepareReturns(Base\\Arrs::gets($this->prepareKeys(...$keys),$this->arr(),$this->isSensitive()));\n }", "function get_multi($keys) {\n\t\t$out = array();\n\t\tforeach($keys as $key)\n\t\t\t$out[$key] = $this->get($key);\n\t\treturn $out;\n\t...
[ "0.7525767", "0.7384867", "0.7322216", "0.711976", "0.7067325", "0.6959175", "0.69160396", "0.69054425", "0.68865305", "0.684577", "0.6799544", "0.6787443", "0.67829895", "0.6650181", "0.6595405", "0.6522173", "0.6469433", "0.6445572", "0.6443387", "0.64412165", "0.63946754",...
0.82206994
0
Sets a value attached to the specified key
Устанавливает значение, связанное с указанным ключом
public function setValue($key, $value);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set( $key , $value ) {\n\t\teval( '$this->items' . $this->nodelize( $key ) . ' = $value;' );\n\t}", "public function set( $key, $value );", "public function set( $key, $value );", "public function set ($key, $value);", "public function set ($key, $value) {\r\n\t\t$this->_data[$key] = $value...
[ "0.8039327", "0.799483", "0.799483", "0.79846686", "0.79632014", "0.7939078", "0.7939078", "0.7939078", "0.7939078", "0.7939078", "0.7939078", "0.7939078", "0.7939078", "0.7939078", "0.7939078", "0.7939078", "0.7939078", "0.7939078", "0.7939078", "0.7939078", "0.7939078", "...
0.8491142
0
Remove the specified keys
Удалить указанные ключи
public function unsetValues($keys);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removekeys($src, $keys){\n return array_diff_key($src, array_flip($keys));\n}", "final public function unset(...$keys):Main\\Map\n {\n $this->checkAllowed('unset');\n $return = $this->onPrepareThis('unset');\n Base\\Arrs::unsetsRef($return->prepareKeys(...$keys),$return->arr()...
[ "0.7571214", "0.7452452", "0.7195923", "0.7117254", "0.70979214", "0.70221794", "0.6965189", "0.6965189", "0.69491464", "0.6922035", "0.69086903", "0.6907789", "0.6907789", "0.6866263", "0.6823514", "0.6787255", "0.6738699", "0.6729358", "0.67291266", "0.6713101", "0.6653947"...
0.7654068
0
Disable the current plugin from the specified target
Отключить текущий плагин от указанной цели
function disable($target = 'core');
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function disable();", "function disable()\n{\n\t$args = func_get_args();\n\tif (is_array($args[0])) $args = $args[0];\n\t$this->enable($args, false);\n}", "public function hookDisable(): void\n {\n $this->say(\"Executing the Plugin's disable hook...\");\n $this->_exec(\"php ./src/hook_d...
[ "0.6849664", "0.6794527", "0.66730446", "0.6635169", "0.6602413", "0.6591144", "0.6584679", "0.65350246", "0.64985204", "0.6464987", "0.64152795", "0.6355722", "0.63463825", "0.6325659", "0.62966573", "0.6193167", "0.61840236", "0.6132527", "0.60985464", "0.6062782", "0.60082...
0.83290714
0
Gets a list of enabled plugins
Получает список включенных плагинов
function getEnabledPlugins();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEnabledPlugins() {\n if ( is_null($this->_enabled) ) {\n $this->_enabled = array();\n foreach( $this->getPlugins() as $name => $plugin ) {\n if ( $plugin->isEnabled() ) {\n $this->_enabled[ $name ] = $plugin;\n }\n ...
[ "0.82479465", "0.80223155", "0.7908184", "0.7756952", "0.7712163", "0.7712163", "0.77100235", "0.7684768", "0.76756185", "0.7659897", "0.7606471", "0.76046383", "0.75356615", "0.7509681", "0.7472184", "0.74697685", "0.74507105", "0.74476135", "0.74257755", "0.74103165", "0.74...
0.87014973
0
Check if the specified parameter is defined
Проверьте, определено ли указанное параметр
public function hasParameter($name);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasParam($name);", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", "public function hasParam(){\n return $this->_has(2);\n }", ...
[ "0.80165577", "0.78514326", "0.78514326", "0.78514326", "0.78514326", "0.78514326", "0.77363604", "0.77131563", "0.7612693", "0.7603801", "0.7590044", "0.75522417", "0.7532681", "0.7447304", "0.741078", "0.74092716", "0.7383242", "0.7349386", "0.7344325", "0.73358464", "0.732...
0.8020747
1
Check if the specified configuration key is defined
Проверьте, определено ли указанное ключевое слово конфигурации
public function hasConfig($key);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasConfig(string $key): bool;", "public function has($configKey, $key);", "public function has($key)\n {\n if(array_key_exists($key,$this->config_arr))\n return true;\n else\n return false;\n }", "public function is_api_key_in_config() {\n\t\treturn d...
[ "0.83128804", "0.78871", "0.77189046", "0.7514252", "0.749829", "0.73914665", "0.7366664", "0.7339544", "0.7339544", "0.7300253", "0.7256063", "0.7245127", "0.7241233", "0.71758795", "0.71379906", "0.7088905", "0.7073178", "0.7046484", "0.7013935", "0.7006623", "0.69946253", ...
0.83470756
0
Retrieves a list of routes from the configuration
Получает список маршрутов из конфигурации
public function getRoutes();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRoutes() {}", "public static function getRoutes();", "public static function getRoutes();", "public static function getRoutes() {\n return self::$instance->getRouteList();\n }", "public function getRouteList() {\n return $this->routes;\n }", "public static function routes()\n ...
[ "0.8112833", "0.81005996", "0.81005996", "0.78083193", "0.7688392", "0.7659955", "0.76549745", "0.7652547", "0.761148", "0.761148", "0.75968593", "0.75691354", "0.75691354", "0.7551015", "0.7546803", "0.7545471", "0.7545471", "0.75180453", "0.7514486", "0.7514486", "0.7514486...
0.81995606
1
Initialize the layout data
Инициализация данных размещения
public function initLayout();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initLayout()\n {\n $showLabels = $this->hasLabels();\n $showErrors = $this->getConfigParam('showErrors');\n $this->mergeSettings($showLabels, $showErrors);\n $this->buildLayoutParts($showLabels, $showErrors);\n }", "public function init() {\n $this->_ren...
[ "0.74784905", "0.7352771", "0.72447485", "0.7179165", "0.70187014", "0.6937582", "0.6933395", "0.68277776", "0.6744103", "0.6673735", "0.6659935", "0.6653137", "0.66503954", "0.66187465", "0.6605295", "0.66037834", "0.66037834", "0.66037834", "0.66037834", "0.66037834", "0.66...
0.7988071
0
Sets the templating file
Устанавливает файл шаблона
public function setTemplate($file);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setTemplate(){\n if (isset($this->data['template']) && !empty($this->data['template'])){\n $template = APP_ROOT.'/app/templates/'.trim($this->data['template']).'.tpl';\n if (file_exists($template)){\n $this->template = $template;\n return;...
[ "0.79774344", "0.75542116", "0.7224734", "0.7034816", "0.70116067", "0.699214", "0.6981164", "0.6966653", "0.69508386", "0.6935955", "0.69028425", "0.688402", "0.6855792", "0.68525285", "0.68309224", "0.6800215", "0.67743325", "0.67334545", "0.6725747", "0.6717871", "0.671644...
0.7650752
1
Renders the current layout
Отображает текущий макет
public function renderLayout();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render_screen_layout()\n {\n }", "public function render()\n {\n $content = $this->__layoutContent();\n\n extract($this->getViewData());\n ob_start();\n include $content;\n ob_get_flush();\n }", "protected function render()\n {\n ...
[ "0.78251404", "0.7820134", "0.7524449", "0.73031497", "0.72716683", "0.72287303", "0.72287303", "0.7223757", "0.69539994", "0.68959033", "0.6871749", "0.6863259", "0.68605965", "0.6784333", "0.6766792", "0.67660457", "0.67544264", "0.6742559", "0.67278874", "0.67198277", "0.6...
0.8236504
0
Check if the specified package is defined
Проверьте, определен ли указанный пакет
public function hasConfig($package);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_package_installed($package_name) {\n\treturn (get_package_id($package_name) != -1);\n}", "public function providesPackage($package) {\n $this->cat->debug('Provides package:', $package);\n return FALSE;\n }", "public function shouldRun(string $package): bool;", "function isPackageInst...
[ "0.7064956", "0.69058865", "0.683608", "0.66459346", "0.65284795", "0.64034563", "0.6288972", "0.62416685", "0.62255186", "0.62251943", "0.62071484", "0.6179173", "0.6178118", "0.6177836", "0.6173065", "0.6144382", "0.6127692", "0.6113306", "0.61126256", "0.6055814", "0.60414...
0.71680105
0
Gets the specified package configuration
Получает указанную конфигурацию пакета
public function getConfig($package);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConfig($package)\n {\n $this->requirePackage($package);\n return $this->_config[$package];\n }", "function read_package_configurationfile($package_name) {\n\t$pkg_config = array();\n\t$id = get_package_id($package_name);\n\t$pkg_data = config_get_path(\"installedpackages/pa...
[ "0.7676505", "0.74666166", "0.716535", "0.70634085", "0.6972135", "0.6905367", "0.6905367", "0.6905367", "0.6905367", "0.6905367", "0.6905367", "0.6905367", "0.6905367", "0.68190837", "0.68174106", "0.6808387", "0.68015826", "0.67640966", "0.6706287", "0.6695867", "0.66290444...
0.8375832
0
Attach a package to the current app
Привязать пакет к текущему приложению
public function attach($package);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setupApplication()\n {\n $this->call('publish:assets', ['package' => 'antares/foundation']);\n }", "public function attach($package)\n {\n $config = $this->getConfig($package);\n if (!in_array($package, $this->_packages)) {\n if (!empty($config['depends...
[ "0.5426096", "0.54190946", "0.53529376", "0.5242404", "0.52017766", "0.51311", "0.5119502", "0.5117796", "0.5117796", "0.5112254", "0.5111909", "0.5104101", "0.5102355", "0.50645405", "0.5060541", "0.5007857", "0.49526468", "0.49481705", "0.49430543", "0.4942909", "0.49337164...
0.7527348
0
Write a new line with the specified message
Запишите новую строку с указанным сообщением
public function writeLine($message);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function line($message)\n {\n if (!$this->output) {\n return;\n }\n\n $this->output->writeln('<comment>'.$message.'</comment>');\n }", "public function writeln($message, $type = self::OUTPUT_NORMAL);", "protected function doWrite($message, $newline)\n {\n }", ...
[ "0.77565855", "0.70670754", "0.70101196", "0.69325584", "0.6917182", "0.691411", "0.69133765", "0.6912606", "0.68599546", "0.6769", "0.6764861", "0.6736047", "0.67350155", "0.6723698", "0.6723425", "0.67175967", "0.6713011", "0.66564965", "0.66382396", "0.65873873", "0.649964...
0.8572327
0
Fix the auto increment for the content_page table Ticket 1070 in bug tracker The last content page have been deleted and the website was moved to another server, in this case the auto increment does not match the log's last object_id. This will cause a duplicate primary key.
Исправьте автоматическое увеличение для таблицы content_page Тикет 1070 в баг-трекере. Последняя страница содержимого была удалена, и сайт был перенесен на другой сервер, в этом случае автоматическое увеличение не совпадает с последним объектом_id в журнале. Это приведет к дублированию первичного ключа.
private function fixAutoIncrement() { $database = \Env::get('db'); $result = $database->Execute("SELECT MAX(CONVERT(`object_id`, UNSIGNED)) AS `oldAutoIncrement` FROM `" . DBPREFIX . "log_entry` WHERE `object_class` = 'Cx\\\...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNewContentId()\n {\n\t $row = db::fetch(\"SELECT MAX(id) AS id FROM content\");\n\t return $row['id']+1;\n }", "private function resetInsertID() {\n $this->setInsertID(0);\n }", "private function getNewID()\n\t{\n\t\t$ids = array_keys($this->metadata['posts']);\n\t\t$lastId = (...
[ "0.6191497", "0.5767585", "0.5607199", "0.5572042", "0.55339754", "0.550124", "0.5476622", "0.5453601", "0.54496634", "0.5424661", "0.5394438", "0.5284311", "0.5271356", "0.52697486", "0.52685416", "0.5267947", "0.5227927", "0.52231306", "0.51884216", "0.5182833", "0.518078",...
0.8811373
0
Generates the database and inserts dummy data.
Создает базу данных и вставляет тестовые данные.
public function generateDatabase() { $this->generateUserTable(); $this->generateEmployerTable(); $this->generateCandidateTable(); $this->generateGuidTable(); $this->generateWorkExperienceTable(); $this->generateShortListTable(); $this->generateQualTypeTable();...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function seed()\n\t{\n\t\t$this->createDataType();\n\t\t$this->createDataRowForColumns();\n\t}", "protected function createDatabaseStructure() {}", "private function createMainDatabaseRecords()\n {\n // get the .sql file\n $sql = (string) @file_get_contents( $this->plugin->getPath() . \...
[ "0.7133806", "0.70929074", "0.7031884", "0.6937879", "0.6908523", "0.68656486", "0.683179", "0.681498", "0.68135667", "0.6809421", "0.6793708", "0.67638826", "0.6758844", "0.67451596", "0.6736322", "0.67323965", "0.6732012", "0.6719655", "0.6712371", "0.6712051", "0.66944695"...
0.74469066
0
Theme files model initialization
Инициализация модели файлов темы
protected function _construct() { $this->_init(\Magento\Theme\Model\ResourceModel\Theme\File::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function init_theme() {\r\n\r\n\t\t$possible_names = self::get_theme_name();\r\n\r\n\t\tforeach( $possible_names as $type => $name ){\r\n\r\n\t\t\t$theme_class = \"WP_Job_Manager_Field_Editor_Themes_\" . ucfirst( $name );\r\n\r\n\t\t\tif( class_exists( $theme_class ) ) {\r\n\t\t\t\t$theme = new $theme_class();\r\n...
[ "0.6800195", "0.6731695", "0.67305124", "0.67175525", "0.6597495", "0.6528827", "0.6504817", "0.6497808", "0.64037544", "0.63582635", "0.6344182", "0.6338255", "0.6320793", "0.6295597", "0.6273367", "0.6236512", "0.6214242", "0.6148983", "0.613683", "0.6130994", "0.61259943",...
0.7487144
0
Custom hooks (like excerpt length etc) Programatically create pages
Собственные хуки (например, длина выдержки и т.д.) Программное создание страниц
function create_custom_pages() { $custom_pages = array( 'issues' => 'Issues', 'weeklies' => 'Weeklies', 'artists' => 'Artists', 'contributors' => 'Contributors', 'incubator' => 'Incubator', 'about' => 'About', 'shop' => 'Shop', 'contribute' => 'How to Contribute', 'contact' => 'Con...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prePageContent();", "function createPage();", "abstract protected function view_generatePageContent();", "static public function createPages() {\n\t\treturn false;\n\t}", "function create_custom_pages() {\n $custom_pages = array(\n 'home' => 'Home',\n );\n foreach($custom_pages as $pa...
[ "0.69990826", "0.6873259", "0.6805698", "0.67635626", "0.67450964", "0.66911846", "0.66292787", "0.6522234", "0.65204996", "0.6502909", "0.6502162", "0.6467448", "0.6464114", "0.64301103", "0.6421911", "0.6421154", "0.63817465", "0.6369027", "0.635663", "0.6353419", "0.633241...
0.715312
0
Get value a field by PrimaryKey (routerId) Example getValueByPrimaryKey('routerName', 1) Get value of filed routerName in table router where routerId = 1
Получить значение поля по PrimaryKey (routerId) Пример getValueByPrimaryKey('routerName', 1) Получить значение поля routerName в таблице router где routerId = 1
public function getValueByPrimaryKey($fieldName, $primaryValue){ //debug LogUtil::sql('(getValueByPrimaryKey) ... primaryValue = ' . $primaryValue); $routerVo = $this->selectByPrimaryKey($primaryValue); if($routerVo){ return $routerVo->$fieldName; } else{ return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValueByPrimaryKey($fieldName, $primaryValue){\n\t //debug\n LogUtil::sql('(getValueByPrimaryKey) ... primaryValue = ' . $primaryValue);\n\t\t\n\t\t$orderDataVo = $this->selectByPrimaryKey($primaryValue);\n\t\tif($orderDataVo){\n\t\t\treturn $orderDataVo->$fieldName;\n\t\t}\n\t\telse{\n...
[ "0.6869985", "0.6859942", "0.66671616", "0.66411173", "0.6569145", "0.64739686", "0.64556205", "0.629257", "0.624263", "0.6237822", "0.6176706", "0.6176706", "0.6176706", "0.61532664", "0.61532664", "0.6141538", "0.61303204", "0.6111565", "0.60566956", "0.6048704", "0.6034055...
0.7555657
0
deleteByPrimaryKey from table router
deleteByPrimaryKey из таблицы router
public function deleteByPrimaryKey($routerId){ try { $sql = "DELETE FROM `router` where `router_id` = :routerId"; $params = array(); $params[] = array(':routerId', $routerId, PDO::PARAM_INT); //debug LogUtil::sql('(deleteByPrimaryKey) '. DataBaseHelper::renderQuery($sql, $params))...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}", "function delete() {\n\t\n\t\t$this->getMapper()->delete($this);\n\t\t\n\t}", "public function delete()\n {\n $class = strtolower(get_called_class());\n $table = self::$_table_name != null ? self::$_table_name : $class . 's';\...
[ "0.6783657", "0.67601335", "0.6634717", "0.65407693", "0.6536913", "0.64822155", "0.63653404", "0.63531494", "0.6335252", "0.63145304", "0.63145304", "0.63145304", "0.63145304", "0.63145304", "0.63145304", "0.63145304", "0.63145304", "0.63145304", "0.63145304", "0.63145304", ...
0.702577
0
print options descriptions to stdout
описания параметров печати в stdout
function printOptions() { $lines = $this->outputOptions(); echo join( "\n" , $lines ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function print_options(){\n\t\tforeach ($this->options as $value) {\n\t\t\t$this->print_option($value);\n\t\t}\n\t}", "public function describe_debug_options() {\n echo '<p>The following options control logging of the plugin actions for debugging purposes.</p>';\n }", "public function show_options( a...
[ "0.7849274", "0.7490152", "0.7015235", "0.68278784", "0.6696799", "0.65354073", "0.65354073", "0.65354073", "0.65354073", "0.65354073", "0.653008", "0.6460849", "0.64299494", "0.63143253", "0.62900513", "0.62900424", "0.6269769", "0.62693894", "0.62645644", "0.62310714", "0.6...
0.81963897
0
Checks with this function if a received value matchs with a item on a ENUM field on a table
Проверяет с помощью этой функции, соответствует ли получаемое значение элементу перечисления (ENUM) в таблице
function check_enum_value_type($received_value, $table_name, $table_field, \PDO $db) { $options = \k1lib\sql\get_db_table_enum_values($db, $table_name, $table_field); $options_fliped = array_flip($options); if (!isset($options_fliped[$received_value])) { $error_type = print_r($options_fliped, TRUE)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testEnumField()\n {\n $field = $this->table->getField('yeahnay'); // An enum column\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Enumerated',\n $field);\n $enumValues = $field->getValues();\n $this->assertCount(2, $enum...
[ "0.7060546", "0.6680646", "0.65644604", "0.6361918", "0.6262062", "0.6207098", "0.6184239", "0.59848225", "0.5960027", "0.5918518", "0.5864401", "0.5653974", "0.5652215", "0.5639529", "0.5626257", "0.55962676", "0.5573999", "0.5549936", "0.5548334", "0.55311066", "0.55299455"...
0.77748305
0
Add Subtitle in admin post
Добавить подзаголовок в административную публикацию
function subtitle( $post ) { if ( ! in_array( $post->post_type, [ 'post', 'page' ], true ) ) { return; } // The subtitle field. $_stitle = sanitize_text_field( get_post_meta( $post->ID, '_subtitle', true ) ); echo '<div class="inside">'; echo '<div id="edit-slug-box" class="hide-if-no-js">'; echo '<labe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ts_set_custom_title( $title ) {\r\n \r\n\tif (is_single() || is_page())\r\n\t{\r\n\t\t$subtitle = get_post_meta (get_the_ID(), 'subtitle', true);\r\n\t\tif (!empty($subtitle))\r\n\t\t{\r\n\t\t\t$title .= $subtitle.' | ';\r\n\t\t}\r\n\t}\r\n return $title;\r\n}", "function slb_custom_admin_titles($ti...
[ "0.70356274", "0.68737257", "0.687299", "0.6710484", "0.6686851", "0.6658795", "0.6658795", "0.663832", "0.6634327", "0.6602547", "0.6562135", "0.65276784", "0.6512621", "0.65029126", "0.6478026", "0.6423363", "0.641111", "0.6393536", "0.63674873", "0.6332532", "0.63076013", ...
0.7302767
0
Returns a Crawler instance for the given html
Возвращает экземпляр Crawler для заданного html
public function getCrawler($html) { return new Crawler($html); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newCrawler()\n {\n return new Crawler;\n }", "public static function create(): CrawlerInterface;", "public function parse() : self\n {\n $this->parsed = new Crawler($this->html);\n\n return $this;\n }", "protected function getCrawler(string $body) : Crawler\n ...
[ "0.73360854", "0.7096998", "0.70868254", "0.70169264", "0.6963565", "0.68020976", "0.673131", "0.66502386", "0.6409645", "0.6311036", "0.6147224", "0.6035871", "0.6006924", "0.5957782", "0.5822971", "0.57692397", "0.57500994", "0.5697311", "0.5643459", "0.5616252", "0.5611346...
0.8848025
0
Saves inmemory state to the persistent storage. It is used to flush inmemory changes to the database between requests/actions.
Сохраняет состояние в памяти в постоянное хранилище. Используется для сброса изменений в памяти в базу данных между запросами/действиями.
protected function saveState(): void { $em = $this->getEntityManager(); $em->flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save()\n {\n $this->persist($this->state);\n }", "public function store()\n {\n if( $this->isPersistent() )\n {\n $this->update();\n }\n else\n {\n $this->insert();\n }\n }", "public function persist() {}", "pu...
[ "0.80036056", "0.70927566", "0.69049233", "0.67950064", "0.668239", "0.666752", "0.66617435", "0.66009516", "0.6598909", "0.6588894", "0.65590644", "0.6544981", "0.65260375", "0.6491668", "0.648954", "0.64518416", "0.64183927", "0.6407187", "0.63682103", "0.63417727", "0.6340...
0.75336987
1
Retrieve the database table column => post_meta mapping.
Получить сопоставление столбцов таблицы базы данных => post_meta.
public function get_postmeta_mapping() { return $this->postmeta_mapping; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPostColumns()\n {\n return array(\n 'post' => 'post', \n 'prefecture' => 'prefecture', \n 'address1' => 'address1', \n 'address2' => 'address2', \n 'tel' => 'tel', \n 'fax' => 'fax',\n...
[ "0.6630238", "0.63588476", "0.624645", "0.59931535", "0.59918094", "0.59838206", "0.59522116", "0.59407735", "0.59362483", "0.5935924", "0.5913532", "0.5907472", "0.5904582", "0.58867764", "0.5882605", "0.58741844", "0.5874088", "0.5861811", "0.5849968", "0.5849872", "0.58446...
0.70662725
0
Helper method that updates all the post meta for an order based on its settings in the WC_Order class.
Помощь метод, который обновляет все метаданные поста для заказа на основе его настроек в классе WC_Order.
protected function update_post_meta( &$order ) { global $wpdb; $edit_data = array( 'order_key' => $order->get_order_key( 'edit' ), 'customer_id' => $order->get_customer_id( 'edit' ), 'payment_method' => $order->get_payment_method( 'edit' ), 'payment_method_title' => $order->ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function backfill_postmeta( &$order ) {\n\t\t$data = $this->get_order_data_from_table( $order );\n\n\t\tif ( is_null( $data ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $this->get_postmeta_mapping() as $column => $meta_key ) {\n\t\t\tif ( isset( $data->$column ) ) {\n\t\t\t\tupdate_post_meta( $order->get_id...
[ "0.7477523", "0.6846129", "0.67944044", "0.67478037", "0.6576126", "0.65583384", "0.6493488", "0.644619", "0.6434062", "0.6425109", "0.63788086", "0.6378417", "0.63032913", "0.6291431", "0.6273514", "0.6257501", "0.62316877", "0.62316763", "0.6047204", "0.6029002", "0.6000137...
0.7783935
0
Finds an order ID based on its order key.
Находит идентификатор заказа на основе его ключа заказа.
public function get_order_id_by_order_key( $order_key ) { global $wpdb; return $wpdb->get_var( $wpdb->prepare( "SELECT order_id FROM {$wpdb->prefix}woocommerce_orders WHERE order_key = %s", $order_key ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findById($orderId);", "public static function get_order_id() {\n\t\tglobal $order;\n\n\t\tif ( is_a( $order, 'WC_Order' ) ) {\n\t\t\treturn $order->get_id();\n\t\t}\n\n\t\t$order_id = absint( filter_input( INPUT_GET, 'order_id', FILTER_SANITIZE_NUMBER_INT ) );\n\n\t\tif ( $order_id ) {\n\t\t\treturn $or...
[ "0.62854606", "0.6282295", "0.61924064", "0.61667967", "0.6154146", "0.61028945", "0.6093918", "0.60818785", "0.6077686", "0.6061905", "0.59744024", "0.59649515", "0.59232247", "0.5911671", "0.5907587", "0.5889618", "0.5881896", "0.58385384", "0.57953554", "0.57846344", "0.57...
0.7677417
0
Return count of orders with a specific status.
Вернуть количество заказов с определенным статусом.
public function get_order_count( $status ) { global $wpdb; return absint( $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_type = 'shop_order' AND post_status = %s", $status ) ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function check_commission_status( $order, $status ) { \n\n\t\tglobal $wpdb; \n\n\t\t$table_name \t= $wpdb->prefix . \"pv_commission\";\n\n\t\t$order_id \t\t= $order[ 'order_id' ]; \n\t\t$vendor_id \t\t= $order[ 'vendor_id' ]; \n \t$product_id\t\t= $order[ 'product_id' ]; \n\n\t\t$query = \"SELECT ...
[ "0.7232755", "0.7017634", "0.69810367", "0.6761564", "0.67516303", "0.6727714", "0.6505145", "0.6405812", "0.63512236", "0.62337416", "0.62201345", "0.6212407", "0.61802846", "0.61389464", "0.61317515", "0.6085192", "0.605804", "0.60483867", "0.6044908", "0.60436994", "0.6037...
0.80535203
0
Get unpaid orders after a certain date.
Получить непогашенные заказы после определенной даты.
public function get_unpaid_orders( $date ) { global $wpdb; $unpaid_orders = $wpdb->get_col( $wpdb->prepare( " SELECT posts.ID FROM {$wpdb->posts} AS posts WHERE posts.post_type IN ('" . implode( "','", wc_get_order_types() ) . "') AND posts.post_status = 'wc-pending' AND posts.post_modif...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getoverdue() {\r\n $today = new DateTime(); \r\n $dueDate = date_modify($today, '-11 months');\r\n $date = $dueDate->format('Y-m-d');\r\n \r\n $db = static::getDB();\r\n $stmt = $db->query(\r\n \"SELECT * FROM lifts \"\r\n ...
[ "0.610975", "0.59874517", "0.5729414", "0.5727679", "0.55674666", "0.5560314", "0.5531941", "0.5531653", "0.54981416", "0.54607594", "0.546021", "0.5448515", "0.54480505", "0.5447236", "0.5440886", "0.5432344", "0.54214364", "0.54068923", "0.5382415", "0.5366837", "0.53535074...
0.7650482
0
Search order data for a term and return ids.
Данные о порядке поиска для термина и возврат идентификаторов.
public function search_orders( $term ) { global $wpdb; $order_ids = array(); if ( is_numeric( $term ) ) { $order_ids[] = absint( $term ); } /** * Searches on meta data can be slow - this lets you choose what fields to search. * * WooCommerce 2.7.0 added _billing_address and _shipping_address me...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find(string $term, string $namespace) : array;", "public function loadArrayByCreatedByAgentID($searchTerm) {\n global $connection;\n $returnvalue = array();\n $operator = \"=\";\n // change to a like search if a wildcard character is present\n if (!(strpos($sear...
[ "0.6233762", "0.5996679", "0.59806424", "0.5860475", "0.5846695", "0.58376443", "0.58057004", "0.5802774", "0.578627", "0.578199", "0.5660996", "0.5659146", "0.56335175", "0.558993", "0.55708325", "0.55706227", "0.5568678", "0.5564585", "0.54941046", "0.54929745", "0.5466665"...
0.73761
0
Get the order type based on Order ID.
Получить тип заказа на основе идентификатора заказа.
public function get_order_type( $order_id ) { return get_post_type( $order_id ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOrderType();", "public function getOrderType()\n {\n return $this->hasOne(OrderType::className(), ['id' => 'order_type_id']);\n }", "public function getOrderType()\n {\n return $this->order_type;\n }", "public function getOrderType()\n {\n return $this->...
[ "0.753765", "0.7151509", "0.71004546", "0.6984836", "0.68438804", "0.66166794", "0.65854627", "0.6551378", "0.6312523", "0.6275656", "0.6257056", "0.61352444", "0.61197394", "0.6093863", "0.60849905", "0.60683113", "0.6027052", "0.6024699", "0.6021583", "0.6018339", "0.598647...
0.80038726
0
Populate order postmeta from a custom table, for rolling back.
Заполните метаданные заказа из пользовательской таблицы для отката.
public function backfill_postmeta( &$order ) { $data = $this->get_order_data_from_table( $order ); if ( is_null( $data ) ) { return; } foreach ( $this->get_postmeta_mapping() as $column => $meta_key ) { if ( isset( $data->$column ) ) { update_post_meta( $order->get_id(), $meta_key, $data->$column );...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function carton_taxonomy_metadata_wpdbfix() {\n\tglobal $wpdb;\n\t$termmeta_name = 'carton_termmeta';\n\t$itemmeta_name = 'carton_order_itemmeta';\n\n\t$wpdb->carton_termmeta = $wpdb->prefix . $termmeta_name;\n\t$wpdb->order_itemmeta = $wpdb->prefix . $itemmeta_name;\n\n\t$wpdb->tables[] = 'carton_termmeta';\n\t$w...
[ "0.63789815", "0.6131994", "0.5977993", "0.5956847", "0.5905463", "0.5741529", "0.5707109", "0.55659497", "0.55400807", "0.55282634", "0.55242443", "0.55106556", "0.5493574", "0.54497427", "0.5447556", "0.5441842", "0.5371397", "0.53396004", "0.5289406", "0.5258317", "0.52580...
0.7320626
0
Creates a blank cell/object for the tables/excell
Создаёт пустую ячейку/объект для таблиц/эксель
protected function set_up_blank_object() { return $this->create_cell(array('content'=>'','colCount'=>1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateCell()\n {\n $object = new \\stdClass();\n $object->title = 'barfoo';\n $cell = $this->createFactory()->createCell('title', PropertyColumn::class, $object, []);\n\n $this->assertInstanceOf(Cell::class, $cell);\n $this->assertEquals('barfoo', $cell->va...
[ "0.661955", "0.6579929", "0.6475878", "0.64359766", "0.64234424", "0.6166463", "0.6143382", "0.61267924", "0.5845498", "0.579732", "0.5758643", "0.57569206", "0.57472616", "0.5743905", "0.57292324", "0.5712072", "0.5679854", "0.5667306", "0.55989164", "0.5590504", "0.5588566"...
0.84076047
0
Mock azureassets disk in storage.
Мокирование диска azureassets в хранилище.
private function mockAssetsDisk() { Storage::fake('azure-assets'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function mockAvatarsDisk()\n {\n Storage::fake('azure-avatars');\n }", "public function test_set_filesystem_storage()\n {\n\n $payumBuilder = m::spy('Payum\\Core\\PayumBuilder');\n $config = [\n 'path' => 'foo.path',\n ];\n $app = m::spy('Illuminate\...
[ "0.7531237", "0.65851057", "0.6464738", "0.63184667", "0.6141862", "0.6118849", "0.6097894", "0.60931945", "0.606725", "0.6021426", "0.60103804", "0.60101384", "0.6009104", "0.5972697", "0.59649944", "0.59539366", "0.5885538", "0.5866736", "0.58376765", "0.58345586", "0.58337...
0.903851
0
Hooks AffiliateWP actions, when present in the $_REQUEST superglobal. Every affwp_action present in $_REQUEST is called using WordPress's do_action function. These functions are called on init.
Запускает действия AffiliateWP, если они присутствуют в суперглобальном $_REQUEST. Каждое действие affwp_action, присутствующее в $_REQUEST, вызывается с помощью функции WordPress do_action. Эти функции вызываются на этапе init.
function affwp_do_actions() { if ( isset( $_REQUEST['affwp_action'] ) ) { do_action( 'affwp_' . $_REQUEST['affwp_action'], $_REQUEST ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setup_actions() {\n\n\t\tadd_action( 'init', array( $this, 'action_init' ) );\n\n\t\tadd_action( 'p2p_init', array( $this, 'action_p2p_init' ) );\n\n\t\tadd_action( 'pre_get_posts', array( $this, 'action_pre_get_posts' ) );\n\n\t\tadd_action( 'add_attachment', array( $this, 'action_add_attachment'...
[ "0.68253124", "0.67946905", "0.6756562", "0.665636", "0.66399944", "0.6612909", "0.65904397", "0.65555596", "0.65499276", "0.6539073", "0.6471485", "0.6468248", "0.6442953", "0.6366544", "0.63421196", "0.62977135", "0.62970406", "0.62890166", "0.62856317", "0.6274619", "0.626...
0.8669002
0
An function to return PDO connection to a Realm Database
Функция для возврата соединения PDO с базой данных Realm
function newRealmPDO($realmid) { global $realm, $db_host, $db_user, $db_pass, $db_encoding; //if the realms config is array and the realm is set if (is_array($realm) and isset($realm[$realmid])) { //make the connection $config = $realm[$realmid]; try { //Construct PDO $obj = new ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getPdoConnection();", "public static function getDatabaseConnexion() {\n return new pdo('mysql:host=' . static::$server . ';dbname=' . static::$databaseName, static::$username, static::$password);\n }", "static function getConnection(): PDO;", "private static function _g...
[ "0.773748", "0.7445421", "0.7412885", "0.7325755", "0.72818315", "0.7266408", "0.72560245", "0.7243207", "0.7239472", "0.720256", "0.71850926", "0.71736634", "0.7169013", "0.7162356", "0.7145894", "0.7136501", "0.71326596", "0.7132319", "0.7131957", "0.71175975", "0.7107037",...
0.77992713
0
/ Get tbl_profile by id
/ Получить tbl_profile по id
function get_tbl_profile($id) { return $this->db->get_where('tbl_profile',array('id'=>$id))->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProfile($id){\n return $this->activity_model->fetchProfile($id)->row();;\n }", "static function getProfile($profile_id)\n\t{\n\t\t$profile = ORM::for_table('PROFILE')->where('profile_id', $profile_id)->find_array();\n\n\t\treturn $profile;\n\t}", "public function get_profile($id = 0)\n ...
[ "0.8309197", "0.78029966", "0.76439685", "0.75531864", "0.74296355", "0.73587483", "0.7348501", "0.73132044", "0.73040885", "0.7291109", "0.7283996", "0.7257986", "0.72333616", "0.72224724", "0.71910715", "0.7182308", "0.71462905", "0.71113545", "0.70995766", "0.7086595", "0....
0.8483205
0
/ Get all tbl_profile
/ Получить все tbl_profile
function get_all_tbl_profile() { $this->db->order_by('id', 'desc'); return $this->db->get('tbl_profile')->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function profiles()\n {\n $sql = \"SELECT *\n FROM profile\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n return $query->fetchAll();\n }", "function get_tbl_profile($id)\n {\n return $this->db->get_where('tbl_profile',array('id'=>$id))->row_array();\n ...
[ "0.7905382", "0.754322", "0.7535075", "0.7394679", "0.70595264", "0.70172006", "0.69880956", "0.6941404", "0.69393814", "0.68937546", "0.6831819", "0.6826809", "0.67640704", "0.6703007", "0.6698439", "0.6666057", "0.6665972", "0.66654676", "0.6622703", "0.66214246", "0.658756...
0.8138483
0
/ function to add new tbl_profile
Функция для добавления нового tbl_profile
function add_tbl_profile($params) { $this->db->insert('tbl_profile',$params); return $this->db->insert_id(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_profile(array $profile)\n\t{\n\t\t$data = $this->get_sql($profile);\n\t\t$data['created_date'] = date('Y-m-d H:i:s');\n\t\t$data['created_by'] = $this->session->userdata['member_id'];\n\t\tif($this->db->insert($this->_table, $data))\n\t\t{\n\t\t\treturn $this->db->insert_id();\n\t\t}\n\t}", "...
[ "0.6914028", "0.6839872", "0.66222626", "0.6430503", "0.63997155", "0.6363501", "0.6216616", "0.6182064", "0.6165317", "0.61257213", "0.611204", "0.6106658", "0.6105668", "0.6103305", "0.6073185", "0.6066992", "0.60594356", "0.6050925", "0.60364395", "0.60092205", "0.59703094...
0.74826384
0
/ function to delete tbl_profile
Функция для удаления tbl_profile
function delete_tbl_profile($id) { return $this->db->delete('tbl_profile',array('id'=>$id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteProfile($profile);", "public static function delete($profile_id) {\n $db = Db::instance(); // create db connection\n $q = sprintf(\"DELETE FROM members WHERE `profile_id` = %d;\",\n $profile_id\n );\n $result = $db->query($q); // execute query\n }", ...
[ "0.7924491", "0.73469967", "0.733278", "0.7254338", "0.7113629", "0.69907385", "0.6927425", "0.6923687", "0.6888034", "0.6862368", "0.6862368", "0.6862368", "0.6862368", "0.6862368", "0.6862368", "0.6862368", "0.6862368", "0.6862368", "0.6862368", "0.68112236", "0.68033016", ...
0.82366323
0
exports the businesses in a csv file
экспортирует бизнесы в файл csv
public function export() { $options['conditions'] = $this->_buildQueryString(); $options['fields'] = [ 'Business.id', 'Business.firm', 'Business.business', 'Business.phone_one', 'Business.phone_two', 'State.name', 'City.name', 'Business.address', 'Taxoffice.name', 'Business.afm', ]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionExportToCsv()\n {\n if ($this->models) {\n $this->models = HArray::explode(',', $this->models);\n }\n HBackup::exportDbToCsv($this->csvFile, $this->models);\n }", "public function saleListCsv()\n {\n return Excel::download(new allInvoiceExport...
[ "0.6678882", "0.66477245", "0.6627465", "0.660704", "0.65880644", "0.6519902", "0.64779216", "0.64684284", "0.6461064", "0.64521736", "0.6445313", "0.6419356", "0.64063704", "0.6403767", "0.6399406", "0.63842106", "0.6363932", "0.63458914", "0.63414806", "0.632778", "0.632624...
0.71358943
0
gets the order line items using order Model Class
получает элементы заказа с использованием класса модели заказа
public function getOrderLineItems($orderID) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function orderLineItems() {\n return $this->hasMany('OrderLineItem', 'order_id');\n }", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public function getOrder();", "public fu...
[ "0.7524505", "0.7199828", "0.7199828", "0.7199828", "0.7199828", "0.7199828", "0.7199828", "0.71225864", "0.70510954", "0.7049868", "0.6995907", "0.69289315", "0.68786603", "0.67866886", "0.6779537", "0.6775843", "0.67511237", "0.6750167", "0.67071635", "0.6695906", "0.666446...
0.7426013
1
Connect to cassandra database
Подключиться к базе данных Cassandra
protected function connect(): void { if ($this->connection) { return; } $builder = \Cassandra::cluster(); if ($this->host) { $builder->withContactPoints($this->host); } if ($this->port) { $builder->withPort($this->port); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function connect()\n {\n //Since we're trying to hide thrift and expose CQL, should we\n //be catching this? Or should it still be left for users to catch\n //and handle...I think we should catch thrift errors TBH and only\n //through exceptions for the client to handle when ...
[ "0.78178984", "0.6823267", "0.6507481", "0.6371588", "0.6319474", "0.61616796", "0.61048806", "0.6004449", "0.60027087", "0.59799993", "0.59160364", "0.58849776", "0.58844644", "0.58747226", "0.5850441", "0.58494604", "0.5846791", "0.58466446", "0.58421445", "0.5817553", "0.5...
0.7702971
1
Media directory name for the temporary file storage pub/media/tmp
Имя каталога для хранения временных файлов pub/media/tmp
protected function getMediaDirTmpDir() { return $this->directoryList->getPath(DirectoryList::MEDIA) . DIRECTORY_SEPARATOR . 'tmp'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getMediaDirTmpDir(): string\n {\n return $this->directoryList->getPath(DirectoryList::MEDIA) . DIRECTORY_SEPARATOR . 'tmp';\n }", "protected function getMediaDirTmpDir()\n {\n\n return $this->directoryList->getPath(DirectoryList::MEDIA) . DIRECTORY_SEPARATOR . 'tmp' . DIRE...
[ "0.8226373", "0.76243424", "0.74499583", "0.71775013", "0.69972575", "0.69781417", "0.696569", "0.69578516", "0.6893036", "0.6839111", "0.6647789", "0.6609496", "0.65994817", "0.6598445", "0.6573535", "0.65480673", "0.65370804", "0.65277344", "0.64595276", "0.6451007", "0.644...
0.77039665
1
Get list of image for product with $prouctId Id
Получить список изображений для продукта с идентификатором $prouctId
public static function get_product_images($productId) { $db = new Db(); $sql = "SELECT image_filename FROM image i , product_image pi WHERE i.image_id = pi.image_id AND WHERE pi.product_id= '".$productId."'"; $res = $db->select_to_array($sql); return $res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getProductImages($productID) {\n $queryImages = $queryImages = DB::table('media_resized_new as mrn')\n ->leftJoin('product_media_map as pmm','pmm.media_id','=','mrn.media_id')\n ->where('pmm.product_id',$productID)\n ->where('pmm.media_type','gallery')\n ...
[ "0.7591349", "0.7321786", "0.73125374", "0.7183037", "0.7077811", "0.70682657", "0.70141846", "0.697586", "0.6957812", "0.6870888", "0.6841335", "0.6825725", "0.67605495", "0.6759211", "0.671176", "0.6704896", "0.6696143", "0.66766536", "0.66631764", "0.66525304", "0.6640796"...
0.74688447
1
Get 1 Image for product with $productId Id
Получить 1 Изображение для продукта с Id $productId
public static function get_one_product_image($productId) { $db = new Db(); $sql = "SELECT image_filename FROM image i , product_image pi WHERE i.image_id = pi.image_id AND pi.product_id= '".$productId."' ORDER BY pi.image_id"; $res = $db->select_to_array($sql); reset($res); return $res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getImgByProduct($id){\n $this->db->select('*');\n $this->db->where('id_product', $id);\n $this->db->from($this->product_img); \n return $this->db->get();\n }", "function getProductImage($product_id = null) {\n\t\t// import the country DB\n\t\t$productImages = array();\n\t\tApp::impor...
[ "0.7394751", "0.7316074", "0.7253252", "0.7248972", "0.7237327", "0.71235687", "0.6958963", "0.69546825", "0.69057494", "0.6882614", "0.68437636", "0.6834396", "0.6783436", "0.6724491", "0.6724491", "0.66734403", "0.6656533", "0.6654538", "0.6653169", "0.66339725", "0.6600022...
0.80041885
0
Service creation factory for account specific services
Фабрика создания сервисов для учетных записей
public function createService(AccountServiceManagerInterface $sl);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createService($serviceClass);", "public function creating(Service $Service)\n {\n //code...\n }", "public function createFSService();", "public function testCreateService()\n {\n\n }", "abstract protected function getService();", "private function factoryService($classN...
[ "0.67400885", "0.635582", "0.6266852", "0.62095356", "0.6159425", "0.61408997", "0.611359", "0.60801786", "0.6040614", "0.59865403", "0.59734666", "0.5932202", "0.59268624", "0.5901588", "0.58998924", "0.5882614", "0.58703804", "0.5867874", "0.5837563", "0.5816014", "0.579177...
0.7271261
0
Add the search module/page
Добавить модуль/страницу поиска
public function addSearchPageAction() { $firstLanguageDocument = $this->getFirstLanguageDocument(); // Create document in tree for search $document = $this->createDocument('search', 'search', 'search', '', $firstLanguageDocument, 'Zoeken', true); // Add Document to website config $this->addWebsiteS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scribbles_add_search_form() {\n\n\tget_template_part( 'templates/parts/search' );\n\n}", "public function search() {\n include 'views/search-form.php';\n }", "function techmarket_navbar_search() {\n\t\ttechmarket_get_template( 'sections/navbar-search.php' );\n\t}", "public function searchA...
[ "0.68198735", "0.6757424", "0.6515544", "0.6497498", "0.6451936", "0.644547", "0.644219", "0.63745344", "0.63576907", "0.6334323", "0.62550443", "0.6211756", "0.6207447", "0.6202643", "0.6200637", "0.6187696", "0.6169214", "0.6147388", "0.6089164", "0.60746753", "0.605699", ...
0.7819061
0
/$groupUrlRule = new GroupUrlRule([ 'prefix' => $this>id, 'rules' => [ '/page//perpage/' => 'default/view', '/page/' => 'default/view', '' => 'default/view', 'page//perpage/' => 'default/index', 'page/' => 'default/index', 'tag/' => 'default/index', '' => 'default/index', ], ]); $app>getUrlManager()>addRules($groupUrlR...
/$groupUrlRule = new GroupUrlRule([ 'prefix' => $this>id, 'rules' => [ '/page//perpage/' => 'default/view', '/page/' => 'default/view', '' => 'default/view', 'page//perpage/' => 'default/index', 'page/' => 'default/index', 'tag/' => 'default/index', '' => 'default/index', ], ]); $app>getUrlManager()>addRules($groupUrlR...
public function bootstrap($app) { $rules = []; if ($this->enableCategory) { $rules['<category:[0-9a-zA-Z_\-]+>/<slug:[0-9a-zA-Z_\-]+>/page/<page:\d+>/per-page/<per-page:\d+>'] = 'default/view'; $rules['<category:[0-9a-zA-Z_\-]+>/<slug:[0-9a-zA-Z_\-]+>/page/<page:\d+>'] = 'd...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetRuleGroups()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function page_rewrite_rules()\n {\n }", "protected function initUrlRoutes(WebApplication $app)\n {\n /** @var $module Module */\n $module...
[ "0.5603681", "0.5563892", "0.5488838", "0.54341954", "0.54168695", "0.53877616", "0.53383106", "0.53188986", "0.53132933", "0.530293", "0.52744985", "0.5258449", "0.52527934", "0.52520317", "0.5245188", "0.5239999", "0.5226779", "0.52024406", "0.5194182", "0.5144318", "0.5139...
0.7011668
0
The Picard theme build version. Called like so:
Версия темы Picard. Вызывается следующим образом:
function rooney_build() { return '/picard/prod/0.1.0/20131217/1'; // Edit this string to update theme across site. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wap8_version_cache() {\n\t// Theme version number for caching purposes\n\treturn '1.1.0';\n}", "public function get_test_theme_version()\n {\n }", "public function getBuildVersion()\n {\n return $this->build_version;\n }", "function theme_version()\n{\n $version = get_b...
[ "0.7328545", "0.70839804", "0.6798215", "0.67975736", "0.6765681", "0.6714915", "0.6670192", "0.66479987", "0.6640104", "0.65880156", "0.65852386", "0.65804535", "0.65742564", "0.656523", "0.65507257", "0.6536268", "0.6491471", "0.6491471", "0.64758295", "0.64455736", "0.6439...
0.7409011
0
Note that this function is hooked into the `after_setup_theme` hook, which runs before the `init` hook. The `init` hook is too late for some features, such as indicating support post thumbnails. To override `rooney_setup()` in a child theme, add your own `rooney_setup` to your child theme's functions.php file.
Обратите внимание, что эта функция привязана к хуку `after_setup_theme`, который запускается до хука `init`. Хук `init` слишком поздний для некоторых функций, таких как указание поддержки постов с превью. Чтобы переопределить `rooney_setup()` в дочерней теме, добавьте свою собственную `rooney_setup` в файл functions.ph...
function rooney_theme_setup() { // Clean up the head: remove_action('wp_head','wp_generator'); remove_action('wp_head', 'rsd_link'); remove_action('wp_head', 'wlwmanifest_link'); // http://wordpress.org/support/topic/wlwmanifestxml-what-is-it remove_action('begin_fetch_post_thumbnail_html', '_wp_post_thumb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init()\n {\n add_action('after_setup_theme', [$this, 'themeSetup']);\n }", "function jardiwinery_theme_setup() {\n\t\tadd_theme_support( 'automatic-feed-links' );\n\n\t\t// Enable support for Post Thumbnails\n\t\tadd_theme_support( 'post-thumbnails' );\n\n\t\t// Custom header setup\n...
[ "0.6615929", "0.6598472", "0.6578015", "0.6539739", "0.6529491", "0.6520381", "0.6399512", "0.638186", "0.6368698", "0.63446194", "0.6344492", "0.63432056", "0.6329854", "0.6329715", "0.63103867", "0.63034195", "0.6291193", "0.6287687", "0.6263285", "0.6255185", "0.62317526",...
0.7492702
0
Display home page (existing projects list)
Показать домашнюю страницу (список существующих проектов)
public function homeAction() { $em = $this->get('doctrine')->getManager(); // get user and his/her projects list $user = $this->get('security.context')->getToken()->getUser(); if ($user->hasRole('ROLE_SUPER_ADMIN')) { $project_entities = $em->getRepository('FFN\MonBundle\Entity\Project')->findAll(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n\t{\n\t\t$module = Module::get('Projects');\n\t\t\n\t\tif(Module::hasAccess($module->id)) {\n\t\t\treturn View('la.projects.index', [\n\t\t\t\t'show_actions' => $this->show_action,\n\t\t\t\t'listing_cols' => $this->listing_cols,\n\t\t\t\t'module' => $module\n\t\t\t]);\n\t\t} else {\n ...
[ "0.7807743", "0.780357", "0.77118313", "0.75863683", "0.7537732", "0.7527592", "0.7526623", "0.751976", "0.7498529", "0.74762726", "0.7472273", "0.74527764", "0.7442039", "0.7403359", "0.73888934", "0.73765254", "0.73584783", "0.73544323", "0.7351149", "0.73367554", "0.732568...
0.8323192
0
/ insert_textbook: inserts a textbook into the textbooks table input: title,isbn,author,seller_email,description(strings) price must be in the form of "333.33" maximum 5 digits CONSTRAINT: $seller_email MUST exist the USERS table or it will be an error
/ insert_textbook: вставляет учебник в таблицу textbooks input: title,isbn,author,seller_email,description (строки) цена должна быть в формате "333.33" максимальное количество знаков — 5 CONSTRAINT: $seller_email ДОЛЖЕН существовать в таблице USERS, иначе возникнет ошибка
function insert_textbook($db, $title, $isbn, $author, $seller_id, $description, $price) { /* Create the query */ $sql = "INSERT INTO textbooks (title, isbn, author, seller_id, description, price, date_time, removed) VALUES (:title, :isbn, :author, :seller_id, :description, :price, NOW(), 0)"; /* Execute the query...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fill_sample_data()\n{\n /* \n insert_user(db, email, password, display_name) \n insert_textbook(db, title, isbn, author, seller_id, description, price)\n insert_message(db, from_id, to_id, subject, message_body)\n insert_purchase_request(db, buyer_id, seller_id, bookid)\n */\n\n $db = c...
[ "0.6493393", "0.6153362", "0.6016045", "0.57582587", "0.570231", "0.56631815", "0.56438667", "0.56332713", "0.5601483", "0.5483925", "0.5478952", "0.5447814", "0.5402256", "0.53435594", "0.53385633", "0.5324766", "0.5320006", "0.5297755", "0.5281589", "0.5273817", "0.52588844...
0.7313635
0
/ user_id_exists: takes a user ID and returns true iff it exists in the user's table
user_id_exists: принимает идентификатор пользователя и возвращает true, если он существует в таблице пользователей
function user_id_exists($db, $user_id) { $sql = 'SELECT * FROM users where id=:id'; $st = $db->prepare($sql); $st->execute(array(':id'=>$user_id)); $us = $st->fetchAll(); return (count($us) >= 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function user_id_exists($user_id) {\n $db = connectDB();\n $stmt = $db->prepare('\n SELECT\n COUNT(*)\n FROM\n users\n WHERE\n user_id = :user_id\n ;\n ');\n $stmt->execute([':user_id' => $user_id]);\n $row = $stmt->fetch(PDO::FETCH_ASSOC)...
[ "0.84756845", "0.82000864", "0.79383034", "0.78868866", "0.78118694", "0.77087504", "0.762432", "0.7582334", "0.7553873", "0.7544747", "0.74885505", "0.7485799", "0.74555427", "0.74523056", "0.7442684", "0.74377614", "0.7436098", "0.73917836", "0.7380718", "0.7369792", "0.735...
0.82447964
1
/ textbooks_exits: returns true iff the texbook id exists in the database (useful for validation checking)
/ textbooks_exits: возвращает true, если идентификатор учебника существует в базе данных (полезно для проверки валидации)
function textbook_exists($db, $id) { $sql = 'SELECT * FROM textbooks where id=:id'; $st = $db->prepare($sql); $st->execute(array(':id'=>$id)); $us = $st->fetchAll(); return (count($us) >=1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tflash_id_exits($id) {\n return TFLASH::id_exists($id);\n}", "function doesBookExist($bookName)\n{\n\tglobal $UTILS_TABLE_NAME;\n\n\t// Construct & execute MySQL query to detect duplicate.\n\t// Look in table $tableName for entries called $bookName.\n\t$sql = \"SELECT * FROM $UTILS_TABLE_NAME WHERE...
[ "0.60677713", "0.5661726", "0.56596327", "0.5539125", "0.54378283", "0.5391935", "0.53544277", "0.5321565", "0.531881", "0.5291335", "0.5282403", "0.52068645", "0.5173497", "0.5158912", "0.51332176", "0.5125443", "0.5097989", "0.509205", "0.50869966", "0.50869966", "0.5068612...
0.74949527
0
/ exists_email_and_password: takes an email and password combination and checks it exists in the database (useful for log in validation)
/ exists_email_and_password: принимает комбинацию электронной почты и пароля и проверяет, существует ли она в базе данных (полезно для проверки при входе в систему)
function email_and_password_exists($db, $email, $password) { $password = md5($password); $sql = "SELECT * FROM users where email=:email and password=:password"; $st = $db->prepare($sql); $st->execute(array(':email'=>$email, ':password'=>$password)); $us = $st->fetchAll(); return (count($us) >= 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function exists($email, $password){\n\t\t$query = $this->_db->prepare('SELECT COUNT(*) FROM utilisateur WHERE email=:email AND password=:password');\n\t\t$query->execute(array(':email' => $email, ':password' => sha1($password)));\n\t\t//get result\n\t\treturn (bool) $query->fetchColumn();\n\t}", "function...
[ "0.7456319", "0.7453705", "0.74224013", "0.73879564", "0.7348342", "0.733878", "0.7325831", "0.72867954", "0.7268841", "0.72226596", "0.72070265", "0.71742845", "0.7169228", "0.7099556", "0.7070361", "0.7058699", "0.7003948", "0.6997117", "0.6979259", "0.69732916", "0.6955633...
0.83322495
0
/ get_all_textbooks_not_removed: Returns an array of all textbooks that have not been removed
/ get_all_textbooks_not_removed: Возвращает массив всех учебников, которые не были удалены
function get_all_textbooks_not_removed($db) { $sql = 'SELECT * FROM textbooks where removed=0 ORDER BY date_time DESC'; $st = $db->prepare($sql); $st->execute(); $us = $st->fetchAll(); return $us; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_list_of_not_new_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE newfile = 0 AND flaggedfile = 0 ORDER BY date DESC');\n return $result;\n }", "function get_list_of_non_published_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE publishedfil...
[ "0.5891124", "0.5811749", "0.57269806", "0.5702688", "0.558904", "0.5531385", "0.5502158", "0.5490552", "0.547634", "0.5469878", "0.5419323", "0.54090214", "0.53872323", "0.53253376", "0.53238124", "0.5247368", "0.52344435", "0.52318704", "0.521941", "0.518827", "0.5130979", ...
0.81617886
0
/ search_textbooks: returns a 2D array of textbooks with each row representing one textbook. Note: If title,isbn and/or author are not included in the search, supply them with empty strings and they won't be included in the query. If all 3 strings are empty, this query returns nothing. See "get all textbooks" for getti...
/ search_textbooks: возвращает двумерный массив учебников, при этом каждая строка представляет один учебник. Примечание: если title, isbn и/или author не указаны в поиске, их следует указать пустыми строками, и они не будут включены в запрос. Если все три строки пустые, этот запрос вернет ничего. См. "get all textbooks...
function search_textbooks($db, $title, $isbn, $author) { $titlekey = ""; //sql colomn name $isbnkey = ""; //sql column name $authorkey = ""; //sql column name $titlevalue = ""; // sql column value $isbnvalue = ""; // sql column value $authorvalue = ""; // sql column value /* All empty strings returns nothing *...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function search_textbook_range($db, $title, $isbn, $author, $numstart, $numresults)\n{\n\t$titlekey = \"\"; //sql colomn name\n\t$isbnkey = \"\"; //sql column name \n\t$authorkey = \"\"; //sql column name\n\t$titlevalue = \"\"; // sql column value\n\t$isbnvalue = \"\"; // sql column value\n\t$authorvalue = \"\"; /...
[ "0.60878325", "0.60156834", "0.58707505", "0.5864606", "0.56532663", "0.55359566", "0.5534769", "0.5519892", "0.54039997", "0.5388586", "0.5386989", "0.5374771", "0.5366583", "0.5359995", "0.53365207", "0.5334167", "0.53220767", "0.530982", "0.52894557", "0.52244693", "0.5214...
0.7121506
0
/ search_textbook_range: returns a 2D array of textbooks with each row representing one textbook. Returns a range of results. Example (3040) useful for breaking apart long results. If you want to display results 3040 then youd pass in 30, 10 for $numstart and $numresults
/ search_textbook_range: возвращает двумерный массив учебников, при этом каждая строка представляет один учебник. Возвращает диапазон результатов. Пример (3040) полезен для разделения длинных результатов. Если вы хотите отобразить результаты 3040, то передайте 30 и 10 для $numstart и $numresults
function search_textbook_range($db, $title, $isbn, $author, $numstart, $numresults) { $titlekey = ""; //sql colomn name $isbnkey = ""; //sql column name $authorkey = ""; //sql column name $titlevalue = ""; // sql column value $isbnvalue = ""; // sql column value $authorvalue = ""; // sql column value /* All em...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSearchRange() {}", "public function getSearchRange() {}", "public function getGlossaryByRange($book, $chapter, $start_verse, $end_verse)\n\t{\n\t\t$sql = sprintf(\"\n\t\t\tSELECT g.chinese AS chinese, g.english AS english, g.kind AS kind, v.book, v.chapter, v.start_verse, v.end_verse, p.name...
[ "0.62910104", "0.6289996", "0.54742336", "0.539556", "0.5195375", "0.5137985", "0.51248515", "0.5013186", "0.49527684", "0.49359852", "0.48796913", "0.48467934", "0.48402098", "0.4797571", "0.4782476", "0.4759462", "0.47467378", "0.47342816", "0.47342816", "0.4730584", "0.472...
0.7010381
0
/ get_message_inbox: returns and array of message records that are associated with a user.
/ get_message_inbox: возвращает массив записей сообщений, связанных с пользователем.
function get_message_inbox($db, $user_id) { $sql = "SELECT * FROM messages where to_id= :to_id ORDER BY date_time DESC"; $st = $db->prepare($sql); $st->execute(array(':to_id'=>$user_id)); $us = $st->fetchAll(); return $us; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findInboxByUser($user)\n {\n return $this->getEntityManager()\n ->createQuery(\n 'SELECT m\n FROM WHAAMPrivateApplicationNotificationBundle:Message m\n JOIN m.recipientUsers r\n WHERE r = :user\n ORDER B...
[ "0.707488", "0.7053745", "0.6857768", "0.6653979", "0.6648986", "0.6538729", "0.6520564", "0.64238125", "0.6419589", "0.63453835", "0.6323402", "0.63189006", "0.6292558", "0.6289247", "0.62594396", "0.62202203", "0.62114084", "0.61960834", "0.61253774", "0.6089389", "0.607838...
0.70797
0
/ remove_book: removes a book by it's id
/ remove_book: удаляет книгу по её id
function remove_book($db, $bookid) { $sql = "UPDATE textbooks SET removed = 1 where id = :id"; $st = $db->prepare($sql); $st->execute(array(':id'=>$bookid)); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteFromBook(Book $book);", "public function deleteBook($id)\n {\n MyLogger::info(\"Entering OwnedBookBusinessService.deleteBook\");\n //creates a connection\n $db = new Connection();\n $conn = $db->open();\n \n //calls the data service\n $ser...
[ "0.7321427", "0.7192881", "0.7186981", "0.7172877", "0.7118792", "0.70581", "0.69076556", "0.6901053", "0.69007015", "0.68185097", "0.68055737", "0.67794275", "0.67530435", "0.67530435", "0.6749105", "0.67399174", "0.6685761", "0.6677873", "0.6672676", "0.6666551", "0.6657567...
0.78322184
0
/ modify_user: takes a user id, and updates it with a new email, password and display name.
/ modify_user: принимает идентификатор пользователя и обновляет его новым электронным адресом, паролем и именем для отображения.
function modify_user($db, $user_id, $new_email, $new_password, $new_display_name) { $new_password = md5($new_password); $sql = "UPDATE users SET email=:new_email, password=:new_password, display_name=:new_display_name WHERE id = :user_id"; $st = $db->prepare($sql); $st->execute(array(':new_email'=>$new_email, ':new...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function modify_user($user);", "function admin_modify_user($id)\n{\n global $app;\n\n // parameter checking\n if (!is_numeric($id)) {\n $app->getLog()->warn('admin_modify_user: invalid user id ' . $id);\n $app->halt(400, \"Bad parameter\");\n }\n\n $user_data = $app->request()...
[ "0.82501185", "0.7879941", "0.7457829", "0.7386032", "0.7122544", "0.7100527", "0.70706975", "0.70399845", "0.7007254", "0.69977796", "0.6986978", "0.6860683", "0.68495345", "0.6808602", "0.68033755", "0.68027395", "0.6802556", "0.6785823", "0.67542595", "0.6742459", "0.67325...
0.8165828
1
Get all the viruses
Получить все вирусы
public function getAllViruses() { return $this->selectAll('VIRUSES'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountVirusBy() {\n\t\treturn $this->getCountBy('VIRUSES', 'name');\n\t}", "public function getCountVirus() {\n\t\treturn $this->getCount('VIRUSES', 'name');\n\t}", "public function getVirusesOnComputer($computerid)\n\t\t{\n\n\t\t\treturn self::$database->getTypeOnComputer(Settings::setting('...
[ "0.68286383", "0.6376907", "0.62314326", "0.5824036", "0.57941246", "0.5788213", "0.5679018", "0.5477061", "0.5468979", "0.5415643", "0.5409313", "0.5405528", "0.53787196", "0.53449076", "0.5335248", "0.5329145", "0.5285081", "0.5281867", "0.5258363", "0.5246321", "0.52439815...
0.84438014
0
Recover the total number of viruses by name
Восстановить общее количество вирусов по названию
public function getCountVirus() { return $this->getCount('VIRUSES', 'name'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountVirusBy() {\n\t\treturn $this->getCountBy('VIRUSES', 'name');\n\t}", "public function getCountVirusId() {\n\t\treturn $this->getCount('VIRUSES', 'id');\n\t}", "public static function countOccurences($name)\n {\n $session = self::getSession();\n\n if (! isset($session->c...
[ "0.77930135", "0.6778709", "0.5804429", "0.5520062", "0.5477595", "0.5468212", "0.54637015", "0.54510194", "0.5384852", "0.5327596", "0.532125", "0.5303181", "0.52912396", "0.52766085", "0.52672887", "0.52452993", "0.52140504", "0.5207936", "0.52041584", "0.5203091", "0.51873...
0.7909123
0
Retrieve the number of times each virus was detected
Получить количество раз, когда каждый вирус был обнаружен
public function getCountVirusBy() { return $this->getCountBy('VIRUSES', 'name'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountVirus() {\n\t\treturn $this->getCount('VIRUSES', 'name');\n\t}", "public function getCountVirusId() {\n\t\treturn $this->getCount('VIRUSES', 'id');\n\t}", "function getCount() {\n $this->putCount();\n //opens countlog.data to read the number of hits\n $datei = fopen...
[ "0.78493", "0.73544276", "0.6004679", "0.5939721", "0.59321404", "0.5896587", "0.58024746", "0.5744334", "0.57226354", "0.5705141", "0.56638485", "0.5610544", "0.56093466", "0.55940825", "0.55922985", "0.55792344", "0.5572401", "0.5563391", "0.55546135", "0.55546135", "0.5554...
0.75359917
1
Recover the total number of viruses by id
Восстановить общее количество вирусов по идентификатору
public function getCountVirusId() { return $this->getCount('VIRUSES', 'id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTotalnventory($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud -> sql(\"select *, COUNT(mortality_status) from pigs_tbl where mortality_status='alive' \");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['COUNT(mortality_status)'];\n\t}\n\n\t$crud->disconnect();\n}", "p...
[ "0.685187", "0.67090595", "0.6562469", "0.64864653", "0.6359972", "0.62702894", "0.62613034", "0.6137624", "0.6110519", "0.604311", "0.6001232", "0.5933323", "0.59167963", "0.59153324", "0.5888431", "0.5870624", "0.5854248", "0.58107436", "0.579014", "0.5769571", "0.57181203"...
0.7643925
0
Data provider for alpha values.
Поставщик данных для значений альфа.
public function providerAlpha(): \Generator { // alpha, exception yield [64, false, false]; yield [0, false, false]; yield [127, false, false]; yield [-1, true, false]; yield [128, true, false]; yield [64.0, false, true]; yield ['64', false, true...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getAlpha() {\n\t\treturn $this->alpha;\n\t}", "public function getAlpha(): int\n {\n return $this->alpha;\n }", "public function setAlpha($alpha = 40) {\n\t\t$this->alpha = $alpha;\n\t}", "protected function parseAlpha()\n {\n if (!$this->matchString('(opacity=')) {\n ...
[ "0.68276244", "0.6300852", "0.613455", "0.5861539", "0.556578", "0.54387826", "0.5427365", "0.5409376", "0.54020447", "0.5388614", "0.5257902", "0.52430624", "0.5201882", "0.5140231", "0.5114709", "0.5105672", "0.50661224", "0.5065393", "0.50644565", "0.50623447", "0.5061345"...
0.7023818
0
If one of the canvas dimensions is omitted, calculate it and complement it in $this>params Requirement: Needs sourceWidth and sourceHeight to be present, so can only be called after analyzing the image.
Если один из размеров холста опущен, рассчитайте его и дополните его в $this>params. Требование: необходимо наличие sourceWidth и sourceHeight, поэтому вызов возможен только после анализа изображения.
private function _addOmittedCanvasDimension() { $sourceWidth = $this->params['sourceWidth']; $sourceHeight = $this->params['sourceHeight']; $sourceRatio = $sourceWidth / $sourceHeight; if ( empty($this->params['w']) && empty($this->params['h']) ) { $this->params['w'] = $sourceWidth; $this->params...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _getProjectionSize() {\n\t\t$sourceWidth = $this->params['sourceWidth'];\n\t\t$sourceHeight = $this->params['sourceHeight'];\n\t\t$sourceRatio = $sourceWidth / $sourceHeight;\n\n\t\t$canvasWidth = $this->params['w'];\n\t\t$canvasHeight = $this->params['h'];\n\t\t$canvasRatio = $canvasWidth / $canv...
[ "0.5935662", "0.58573115", "0.5662739", "0.55336946", "0.55255026", "0.5448929", "0.538716", "0.53802663", "0.5368557", "0.53425324", "0.533961", "0.52804875", "0.52388597", "0.5222566", "0.5215349", "0.51861775", "0.51854885", "0.51797783", "0.51371247", "0.5130908", "0.5126...
0.74329525
0
Performs the actual projection of the source onto the canvas.
Выполняет фактическую проекцию источника на холст.
private function _projectSourceOnCanvas(&$source, &$canvas) { $srcX = 0; $srcY = 0; list($projectionWidth, $projectionHeight) = $this->_getProjectionSize(); list($destX, $destY) = $this->_getLeftUpperCoordinateOnCanvas($projectionWidth, $projectionHeight); imagecopyresampled($canvas, $source, $destX, $destY, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function execute()\n {\n $this->_loadProjection();\n $this->_loadShapes();\n $this->_loadSymbols();\n $this->_setWebConfig();\n $this->_setResolution();\n $this->_setUnits();\n $this->_setMapColor();\n $this->_setOutputFormat();\n $this->_set...
[ "0.5165557", "0.5083971", "0.48546487", "0.4785309", "0.47584483", "0.47312027", "0.45633852", "0.45289192", "0.45289192", "0.44930074", "0.44896773", "0.43907428", "0.43907428", "0.4387824", "0.43251786", "0.43057728", "0.42746568", "0.42746568", "0.42426994", "0.42317322", ...
0.70185035
0
Calculate projection size of source image on canvas. The resulting projection might be larger than the canvas; this function does not consider cutoff by means of cropping.
Вычислите размер проекции исходного изображения на холст. Результатирующая проекция может быть больше холста; эта функция не учитывает обрезку.
private function _getProjectionSize() { $sourceWidth = $this->params['sourceWidth']; $sourceHeight = $this->params['sourceHeight']; $sourceRatio = $sourceWidth / $sourceHeight; $canvasWidth = $this->params['w']; $canvasHeight = $this->params['h']; $canvasRatio = $canvasWidth / $canvasHeight; // the ima...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCropWidth()\n {\n return $this->_daImage->getCropWidth( $this->getId() );\n }", "abstract public function calculateCropBoxSize();", "public function getCropHeight()\n {\n return $this->_daImage->getCropHeight( $this->getId() );\n }", "private function _projectSour...
[ "0.57293326", "0.5340515", "0.52046746", "0.5099397", "0.5029074", "0.4978582", "0.4871412", "0.4766708", "0.4755078", "0.47048938", "0.46771646", "0.46687528", "0.46630624", "0.4653845", "0.46502748", "0.46243185", "0.46205023", "0.45872632", "0.45673963", "0.45664427", "0.4...
0.7326923
0
/Paso 1: Se analiza la variable $param. si es un entero suponemos que es el id del blog. si es una cadena suponemos que es el nombre del blog,por lo que obtendremos el blog a partir de su nombre. Se obtiene el id del blog
Шаг 1: Анализируется переменная $param. Если она целое число, считаем, что это идентификатор блога. Если же это строка, считаем, что это название блога, и получаем блог по его названию. Получаем идентификатор блога.
private function getBlogFromParam($param){ // P 1 if (is_numeric($param) ){ $blog_id=$param; $blogs= $this->getDoctrine()->getEntityManager() ->createQuery('SELECT b FROM AcmeBlogBundle:Blog b WHERE b.blog_id=:blog_id') ->setParameter('blog_id', $blog_id) ->getResul...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_blog_post($blog_id, $post_id)\n {\n }", "public function for_blog($blog_id = '')\n {\n }", "public function article()\n\t{\n//\t\t$this->load->database();\n//\t\t$this->load->library(\"vendor/FluentPDO/FluentPDO\", array(\"pdo\"=>$this->db->conn_id));\n//\t\t//$query = $this->f...
[ "0.64192086", "0.6385089", "0.6243699", "0.61947244", "0.6075175", "0.606344", "0.6032463", "0.6031012", "0.59944624", "0.5955123", "0.5897971", "0.5868819", "0.5804248", "0.5778227", "0.57528985", "0.5746672", "0.5736558", "0.57284915", "0.57063586", "0.570587", "0.5699835",...
0.81319106
0
Saves new password after match validation
Сохраняет новый пароль после проверки соответствия
public function savepasswordAction(){ $request = $this->_request->getParams(); $error = false; $oValidationHelper = new Helpers_Usermanagement_Validate(); if(!$oValidationHelper->ifPasswordMatch($request['user_password'],$request['password2'])){ $error = true; $this->_messages->setMessage('Passwords...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPassword($newPassword);", "function savePassword()\n {\n // get real current password from database\n $realPassword = null;\n $dataReturn = $this->model->khachhang->getCustomerPassword($_SESSION['idUser']);\n if (!empty($dataReturn)) {\n $realPassword ...
[ "0.708261", "0.70323414", "0.70190877", "0.6993437", "0.6918978", "0.69044703", "0.68955225", "0.68760085", "0.68589246", "0.6848455", "0.68049973", "0.6799025", "0.67777383", "0.677607", "0.6745533", "0.6722055", "0.6696917", "0.66587484", "0.6650261", "0.6624472", "0.662025...
0.7256017
0
Get all events grouped by year from the main site.
Получить все события, сгруппированные по году, с главного сайта.
public function get_events_by_year() { switch_to_blog( get_network()->site_id ); $years = array(); foreach ($this->get_events() as $event) { $start = get_field( 'event_start', $event->ID ); if ( $start ) { $year = date( 'Y', strtotime( $start ) ); $years[ $year ][] = $event; } } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getYearsOfEvents()\n {\n $qb = $this->entityManager->getRepository('Event\\Entity\\Event')\n ->createQueryBuilder('e')\n ->select('YEAR(e.eventStartDate) AS eYear')\n ->where('e.deleted = 0')\n ->groupBy('eYear')\n ->orderBy('eYear', ...
[ "0.6634203", "0.6416047", "0.62959236", "0.6189904", "0.6116527", "0.6100796", "0.60418874", "0.6010047", "0.59350014", "0.59234107", "0.58710515", "0.5830806", "0.5779693", "0.5731799", "0.5724064", "0.57094616", "0.56512785", "0.56471294", "0.5624089", "0.5600589", "0.55955...
0.77518725
0
Generated from protobuf field string BatchID = 1;
Сгенерировано из поля protobuf string BatchID = 1;
public function getBatchID() { return $this->BatchID; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setBatchID($var)\n {\n GPBUtil::checkString($var, True);\n $this->BatchID = $var;\n\n return $this;\n }", "function getBatchID()\n\t\t{\n\t\t\treturn $this->BatchID;\n\t\t}", "public function get_batch_id()\n {\n $results = $this->results();\n\n retur...
[ "0.7591301", "0.7506304", "0.72075903", "0.67298156", "0.64076585", "0.6348025", "0.59486574", "0.58121145", "0.58113956", "0.57880896", "0.5721433", "0.5570651", "0.55528086", "0.55322933", "0.55178195", "0.5318432", "0.5308517", "0.5267166", "0.52521724", "0.52351195", "0.5...
0.75993687
0
Generated from protobuf field string BatchID = 1;
Сгенерировано из поля protobuf string BatchID = 1;
public function setBatchID($var) { GPBUtil::checkString($var, True); $this->BatchID = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBatchID()\n {\n return $this->BatchID;\n }", "function getBatchID()\n\t\t{\n\t\t\treturn $this->BatchID;\n\t\t}", "public function get_batch_id()\n {\n $results = $this->results();\n\n return $results['SubmitNotificationBatchResult']->BatchID;\n }", "functi...
[ "0.7600266", "0.7507258", "0.7207866", "0.673229", "0.64077014", "0.63488173", "0.59483385", "0.5812637", "0.5812263", "0.57884437", "0.5721678", "0.55684054", "0.55529034", "0.5532456", "0.5518264", "0.53182745", "0.5309306", "0.52660006", "0.5252119", "0.5234759", "0.522152...
0.75942975
1
Generated from protobuf field repeated .kubemq.SendQueueMessageResult Results = 2;
Сгенерировано из поля protobuf repeated .kubemq.SendQueueMessageResult Results = 2;
public function setResults($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Kubemq\SendQueueMessageResult::class); $this->Results = $arr; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function send(){\n\t\t\n\t\t$database = new Database();\n\t\t$query = $database->selectOne('message_queues', array('id',\n\t\t\t\t\t\t\t\t\t 'is_executed','executed_at','message','cellphone'), \n\t\t\t\t\t\t\t\t\t ' is_executed=0 ');\n\t\t$exec = $database->query($query);\n\t\tif ($exec) {\n\t\t\t$record ...
[ "0.6040951", "0.56192476", "0.5537163", "0.55119437", "0.5408537", "0.53977305", "0.53054947", "0.5264364", "0.5251886", "0.5233471", "0.5219818", "0.5163005", "0.5141143", "0.5122098", "0.5097336", "0.50799805", "0.50676286", "0.5051978", "0.50303143", "0.49821743", "0.49724...
0.76263034
0
Get the value of Codigo Producto
Получить значение Codigo Producto
public function getCodigoProducto() { return $this->codigoProducto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCodigoProducto()\n {\n return $this->CodigoProducto;\n }", "public function getCodProducto()\n {\n return $this->codProducto;\n }", "public function getProducte()\n {\n return $this->producte;\n }", "public function getOneProducto()\n {\n $sql = \"...
[ "0.7543214", "0.7257408", "0.7175672", "0.7009522", "0.70019805", "0.6991427", "0.69376636", "0.6918813", "0.6918813", "0.68695515", "0.68563527", "0.6836596", "0.68336266", "0.68281275", "0.6752512", "0.674717", "0.67102736", "0.6692392", "0.6653594", "0.6647063", "0.6632632...
0.7268723
1
Gets the transaction_history (and agent first/last name) for a single transaction
Получает transaction_history (и имя и фамилию агента) для одной транзакции
public function getHistory($transaction_id) { $query = "SELECT h.*, a.name_last, a.name_first FROM transaction_history h JOIN agent a on a.agent_id = h.agent_id WHERE h.transaction_id = ? ORDER BY h.date_created DESC"; $result = DB_Util_1::queryPrepared( $this->db, $query, arr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getCallsLogByTransaction($transaction_id) {\r\r\n $criteria = new CDbCriteria;\r\r\n $criteria->compare('t.transaction_id', $transaction_id);\r\r\n $criteria->compare('t.status', STATUS_ACTIVE);\r\r\n $criteria->order = 'date ASC';\r\r\n\r\r\n $models = sel...
[ "0.65027875", "0.6466763", "0.625794", "0.62398183", "0.62250084", "0.61974525", "0.6170981", "0.6164785", "0.6164785", "0.6164785", "0.6151405", "0.6137095", "0.61225694", "0.6108571", "0.60953087", "0.60938996", "0.60662717", "0.60387385", "0.60361505", "0.6023784", "0.5976...
0.7644228
0
/! \brief Let the user choose the new service to create.
/! \brief Позвольте пользователю выбрать новый сервис для создания.
function newService($action = "") { $this->closeDialogs(); $serv = preg_replace('/^new_/', '', $action); $this->plugins[$serv]->is_account = TRUE; $this->dialogObject = $this->plugins[$serv]; $this->current = $serv; $this->dialog = TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function creating(Service $Service)\n {\n //code...\n }", "public function addService()\n {\n $option = 'submitnewservice';\n return view('cmsServicesAdd', ['title'=>'Add Service','option'=>$option]);\n }", "public function create()\n {\n if (Gate::denies('service.cr...
[ "0.7282651", "0.70714736", "0.68964577", "0.67849046", "0.6778415", "0.67771006", "0.67576385", "0.67561036", "0.67430365", "0.66446334", "0.6635683", "0.6629972", "0.6595493", "0.6584084", "0.6574064", "0.655998", "0.65472806", "0.6525126", "0.6498041", "0.6491219", "0.64813...
0.7298347
0
/!\brief Close all opened dialogs And reset "dialog open" flags to display bottom buttons again.
/!\brief Закрыть все открытые диалоги и сбросить флаги "диалог открыт", чтобы снова отобразить нижние кнопки.
function closeDialogs() { management::closeDialogs(); $this->dialog = FALSE; /* Get our dn back */ $this->dn = $this->last_dn; set_object_info($this->dn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function closeModal()\n {\n $this->isOpen = false;\n }", "public function closeModal()\n {\n $this->isOpen = false;\n }", "public function closeModal()\n {\n $this->isOpen = false;\n }", "public function closeModal()\n {\n $this->isOpen = false;\n }"...
[ "0.5628627", "0.5628627", "0.5628627", "0.5628627", "0.5427189", "0.5297497", "0.52536917", "0.5211063", "0.5165551", "0.5128363", "0.51225746", "0.5067337", "0.5041713", "0.49300697", "0.49270236", "0.49194652", "0.49063772", "0.48965254", "0.48965254", "0.47861335", "0.4740...
0.7388481
0
/! \brief Returns the list of of services, active services. Used in the filter class for services. class_filterServerService.inc
/! \brief Возвращает список сервисов, активных сервисов. Используется в классе фильтра для сервисов. class_filterServerService.inc
static function getServiceList() { return session::get('ServerService'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getListServices () {\n return self::findByStatus(self::STATUS_ACTIVE);\n }", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n return $this->services;\n }", "public function getServices()\n {\n...
[ "0.8080548", "0.75776476", "0.75776476", "0.75776476", "0.75444704", "0.75444704", "0.74481744", "0.7399029", "0.736209", "0.7200411", "0.71679336", "0.7080594", "0.70667094", "0.6993931", "0.69681054", "0.69099975", "0.6899074", "0.6889862", "0.6847158", "0.67877805", "0.673...
0.76281357
1
/! \brief Updates the status for a list of services.
/! \brief Обновляет статус для списка служб.
function updateServiceStatus($action, $target, $all) { /* Skip if this is a new server */ if ($this->dn == "new") { msg_dialog::display(_("Information"), _("Cannot update service status until it has been saved!"), INFO_DIALOG); return; } /* Is this an existing action */ if (!isset(sel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateStatus(array $jobs);", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tif(!empty($data['t']) && !empty($data['list'])) $result = $this->_bid->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t$data['msg'] = !empty($result['boolean']) && $resul...
[ "0.6621634", "0.6532585", "0.6461127", "0.64142805", "0.639287", "0.6369591", "0.63390523", "0.6298918", "0.62922907", "0.6215053", "0.619058", "0.619058", "0.6136992", "0.6097271", "0.6083418", "0.60473", "0.60130614", "0.5994864", "0.5939064", "0.59371185", "0.5877184", "...
0.7052105
0
/! \brief Returns a list of all used services CLASSNAME => _($this>plugins[]>DisplayName);
/! \brief Возвращает список всех используемых служб CLASSNAME => _($this>plugins[]>DisplayName);
function getAllUsedServices() { $ret = array(); foreach ($this->plugins as $name => $obj) { if ($obj->is_account) { if (isset($obj->DisplayName)) { $ret[$name] = $obj->DisplayName; } else { $ret[$name] = $name; } } } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_services() {\n\t\treturn [\n\t\t\tServices\\Language_Loader::class,\n\t\t\tServices\\Setup_Database::class,\n\t\t\tServices\\Scripts_And_Templates::class,\n\t\t\tServices\\Admin_Pages::class,\n\t\t\tServices\\Setup_Settings_Page::class,\n\t\t\tServices\\Loggers_Loader::class,\n\t\t\tServices\\...
[ "0.7040355", "0.6973125", "0.6946765", "0.6926431", "0.691777", "0.6877789", "0.6796921", "0.67913777", "0.6765748", "0.6726817", "0.6630286", "0.6595965", "0.6578168", "0.6510909", "0.6510546", "0.6507702", "0.64790314", "0.64664596", "0.6432358", "0.6424015", "0.6406699", ...
0.83596385
0
/! \brief Returns a list of all unused services.
/! \brief Возвращает список всех неиспользуемых служб.
function getAllUnusedServices() { $tmp = $this->getAllUsedServices(); $pool_of_ocs = array(); foreach ($tmp as $name => $value) { $pool_of_ocs[] = get_class($this->plugins[$name]); if (isset($this->plugins[$name]->conflicts)) { $pool_of_ocs = array_merge($pool_of_ocs, $this->plugins[$n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listAllAvailableServices()\n {\n\t\t$data = $this->call(array(), \"GET\", \"sensors/services/available.json\");\n\t\t$data = $data->{'services'};\n\t\t$serviceArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$serviceArray->append(new Service($data[$i], $this));\n\t\t}\n\...
[ "0.73377377", "0.722843", "0.69160146", "0.6892129", "0.6772187", "0.66971886", "0.65814096", "0.63706046", "0.63466865", "0.633627", "0.6324876", "0.63051397", "0.63051397", "0.63051397", "0.630276", "0.6280854", "0.6279807", "0.62582827", "0.62582827", "0.6201976", "0.61896...
0.77746826
0
__construct() Get this object CSprite instance.
__construct() Получает этот объект CSprite.
public function getCSprite() { return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n\t{\n\t\t$this->game = new BowlingGame;\n\t}", "public function __construct()\n {\n $this->cpu = new CPU();\n $this->player = new Player();\n }", "public function construct()\n {\n return $this->object;\n }", "public function getCSprite()\n {\n...
[ "0.65402466", "0.6528637", "0.62953895", "0.6264603", "0.6146216", "0.6129432", "0.6119235", "0.6110909", "0.6062796", "0.606225", "0.6047425", "0.6018409", "0.59744364", "0.59674585", "0.59674585", "0.59620947", "0.5959209", "0.5950519", "0.59475416", "0.590886", "0.5896933"...
0.719942
0
getCSprite() Get this instance configuration.
getCSprite() Получает конфигурацию этого экземпляра.
public function getSpriteConfig() { return $this->spriteConfig; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCSprite()\n {\n return $this->spriteImageRegistry->getCSprite();\n }", "public function getSpriteConfig()\n {\n return $this->spriteImageRegistry->getSpriteConfig();\n }", "public function getCSprite()\n {\n return $this;\n }", "public function getSpriteCache()\n {\n ret...
[ "0.73720866", "0.7350156", "0.7312734", "0.5723863", "0.57031745", "0.560343", "0.56013554", "0.55858415", "0.5556608", "0.5545413", "0.55231106", "0.5475459", "0.5456261", "0.54552394", "0.5450682", "0.54487634", "0.5442738", "0.54408145", "0.5425102", "0.5394908", "0.538206...
0.75944084
0
getImageRegistry() Get the style registry.
getImageRegistry() Получает реестр стилей.
public function getStyleRegistry() { return $this->spriteStyleRegistry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getImageRegistry()\n {\n return $this->spriteImageRegistry;\n }", "public function getSpriteImageRegistry()\n {\n return $this->spriteImageRegistry;\n }", "public function getTemplateRegistry()\n {\n return $this->spriteTemplateRegistry;\n }", "public function getRegistryArray(...
[ "0.7306808", "0.6684028", "0.6571037", "0.6259464", "0.618814", "0.600374", "0.59624726", "0.5875376", "0.5873722", "0.5839037", "0.5703135", "0.5633389", "0.5621689", "0.54181725", "0.53901887", "0.53840905", "0.53783303", "0.5371194", "0.5368176", "0.5363021", "0.53401476",...
0.8072847
0
Returns a new instance of TimeTracker
Возвращает новый экземпляр TimeTracker
protected function getTimeTrackerInstance() { return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TimeTracker\\TimeTracker'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getTimeTracker() {}", "protected function initializeTimeTracker() {}", "public function create(array $values = array()) {\n // Add values that are specific to our timetracking\n $values += array( \n 'timetracking_id' => '',\n 'is_new' => true,\n 'type' => 'timetracking',...
[ "0.6842531", "0.67228603", "0.63513404", "0.6069141", "0.60221213", "0.6018472", "0.6001118", "0.5845434", "0.5842843", "0.58261526", "0.57741", "0.5714983", "0.5706969", "0.56792456", "0.5652791", "0.5652356", "0.55930454", "0.5590635", "0.55813164", "0.55407757", "0.5514445...
0.8074251
0
Returns an object manager mock that is capable of returning one or more documents for find(). $documents should be an associative array of searchString => document (mock object)
Возвращает объект-мок менеджера объектов, способный возвращать один или несколько документов для find(). $documents должен быть ассоциативным массивом searchString => документ (мок-объект)
protected function getObjectManager(array $documents) { $objectManager = $this->getMock('Doctrine\Common\Persistence\ObjectManager'); $objectManager ->expects($this->any()) ->method('find') ->will( $this->returnCallback( functio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createMongoDBMock()\n {\n return m::mock(\\MongoDB\\Database::class);\n }", "abstract public function getDocuments();", "public function getDocuments();", "public function get_documents()\n {\n $this->validate_query_key();\n\n $objDocuments = $this\n ...
[ "0.59144634", "0.5902094", "0.5843777", "0.57373106", "0.5725653", "0.555542", "0.5534641", "0.5527029", "0.5469903", "0.54365957", "0.5423823", "0.5379411", "0.53657925", "0.5352716", "0.5317109", "0.529315", "0.52746946", "0.52632755", "0.52503985", "0.52421135", "0.5240509...
0.82971185
0
Returns a manager registry mock that is capable of returning one or more object managers for getManager(). $objectManagers should be an associative array of managerName => manager (mock object)
Возвращает регистр менеджеров, который может возвращать один или несколько объектов менеджеров для getManager(). $objectManagers должен быть ассоциативным массивом managerName => менеджер (объект-мок)
protected function getManagerRegistry(array $objectManagers) { $managerRegistry = $this->getMock('Doctrine\Common\Persistence\ManagerRegistry'); $managerRegistry ->expects($this->any()) ->method('getManager') ->will( $this->returnCallback( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getObjectManager()\n {\n return $this->managerRegistry->getManager($this->managerName);\n }", "public function getManagers()\n {\n // TODO: Implement getManagers() method.\n }", "public function getObjectManager() {}", "protected function getObjectManager(array $d...
[ "0.6343053", "0.6185559", "0.60922706", "0.60772777", "0.6070378", "0.6070378", "0.5949157", "0.5914144", "0.59079576", "0.59040743", "0.5897192", "0.588894", "0.588894", "0.588894", "0.588894", "0.5882814", "0.5822005", "0.5812113", "0.5764868", "0.57554394", "0.57025963", ...
0.86300325
0
Set the calendar title Add the title string to the calendar (if any)
Установите заголовок календаря Добавьте строку заголовка в календарь (если она есть)
private function makeCalendarTitle() { if(strlen($this->headerTitle) > 0) { $this->calWeekDays .= "\t<tr>\n\t\t<th class=\"headerTitle\" colspan=\"7\">".$this->headerTitle."</th>\n\t</tr>"; $this->outArray['title'] = $this->headerTitle; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setTitle()\n {\n $this->title = $this->start_date;\n\n if ($this->start_date != $this->end_date) {\n $this->title .= ' - '.$this->end_date;\n }\n }", "protected function setTitle()\n\t{\n\t\tglobal $APPLICATION;\n\n\t\tif ($this->arParams[\"SET_TITLE\"] == '...
[ "0.7708907", "0.71849394", "0.7106481", "0.7106481", "0.70784795", "0.70748097", "0.7068428", "0.70663095", "0.7042291", "0.70176363", "0.700437", "0.7003127", "0.69973695", "0.69973695", "0.69933873", "0.6986058", "0.6975316", "0.6974538", "0.6966417", "0.6966417", "0.696641...
0.7574304
1
Make Day Column Headings Build the row of day headings using the $daysArray array.
Создайте заголовки столбцов дней, используя массив $daysArray.
private function makeDayHeadings() { $this->outArray['dayheadings'] = array(); $this->dayHeadings .= "\t<tr>\n"; foreach($this->daysArray as $day) { $this->dayHeadings .= "\t\t<th class=\"dayHeading\">$day</th>\n"; array_push($this->outArray['dayheadings'], $day); } $this->dayHeadings .= "\t</tr>\n"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function makeCalendarHead()\n\t{\n\t\tif(strlen($this->headerStr) < 1) {\n\t\t\t$head = \"\\t<tr>\\n\\t\\t<th colspan=\\\"7\\\" class=\\\"headerString\\\">\";\n\t\t\tif(!is_null($this->curDay)) {\n\t\t\t\t$head .= $this->curDayName.' the '.$this->curDayS.' of '.$this->curMonthName.', '.$this->curYear;\n\t\...
[ "0.6407736", "0.59913987", "0.59694207", "0.5830636", "0.580982", "0.5785261", "0.57791615", "0.5628445", "0.5607434", "0.551453", "0.55088216", "0.5440747", "0.54331005", "0.54277366", "0.5427073", "0.54121625", "0.539174", "0.5388485", "0.53517675", "0.5342108", "0.53218204...
0.8538074
0
Set start of month spacers Create a spacer cell that adds blank space for the start of the month before the first day of the month.
Создание спейсеров для начала месяца Создайте ячейку-спейсер, которая добавляет пустое пространство в начале месяца перед первым днем месяца.
private function startMonthSpacers() { if($this->firstDayOfTheMonth != '0') { $this->calWeekDays .= "\t\t<td colspan=\"".$this->firstDayOfTheMonth."\" class=\"spacerDays\">&nbsp;</td>\n"; $this->outArray['firstday'] = $this->firstDayOfTheMonth; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function endMonthSpacers()\n\t{\n\t\tif((8 - $this->weekDayNum) >= '1') {\n\t\t\t$this->calWeekDays .= \"\\t\\t<td colspan=\\\"\".(8 - $this->weekDayNum).\"\\\" class=\\\"spacerDays\\\">&nbsp;</td>\\n\";\n\t\t\t$this->outArray['lastday'] = (8 - $this->weekDayNum);\t\t\t\n\t\t}\n\t}", "private function Wr...
[ "0.5999289", "0.5799576", "0.55208194", "0.5462961", "0.54257184", "0.5403874", "0.53747106", "0.5319116", "0.52447367", "0.5152501", "0.5072927", "0.5065767", "0.49980766", "0.49827915", "0.49784622", "0.4928414", "0.49255168", "0.49203742", "0.4913131", "0.49100062", "0.490...
0.834585
0
Set end of month spacers Create a spacer cell that adds blank space for the end of the month after the last day of the month.
Создание маркеров конца месяца Создайте ячейку-маркер, которая добавляет пустое пространство в конце месяца после последнего дня месяца.
private function endMonthSpacers() { if((8 - $this->weekDayNum) >= '1') { $this->calWeekDays .= "\t\t<td colspan=\"".(8 - $this->weekDayNum)."\" class=\"spacerDays\">&nbsp;</td>\n"; $this->outArray['lastday'] = (8 - $this->weekDayNum); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function startMonthSpacers()\n\t{\n\t\tif($this->firstDayOfTheMonth != '0') {\n\t\t\t$this->calWeekDays .= \"\\t\\t<td colspan=\\\"\".$this->firstDayOfTheMonth.\"\\\" class=\\\"spacerDays\\\">&nbsp;</td>\\n\";\n\t\t\t$this->outArray['firstday'] = $this->firstDayOfTheMonth;\n\t\t}\n\t}", "function Footer(...
[ "0.66103333", "0.5805584", "0.5805584", "0.58004963", "0.5792688", "0.5748435", "0.5729793", "0.5726929", "0.57091856", "0.55485076", "0.54882425", "0.5455331", "0.54490894", "0.5418281", "0.54126287", "0.5407858", "0.53825533", "0.5380916", "0.53771776", "0.53756195", "0.537...
0.78970635
0
Create a listing of events for HTML display Creates a listing of events occuring on the given day as items. These items are added into the cell of the calendar for the given day.
Создать список событий для отображения в HTML. Создает список событий, происходящих в данный день, как элементы. Эти элементы добавляются в ячейку календаря для данного дня.
private function makeDayEventListHTML() { $showtext = ""; foreach($this->eventItems as $item) { if($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) { $category = (strlen($item['cat']) > 0 ? 'Category: '.$item['cat'].' - ' : ''); $outevents[$n]['category'] = $item['cat']; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function makeHTMLIterator()\n\t{\n\t\t$this->weekDayNum = $this->firstDayOfTheMonth+1;\n\t\tfor($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) {\n\t\t\t// Set the default style\n\t\t\t$style = 'class=\"normalDay\"';\n\t\t\t\n\t\t\t// Set the style to a weekend day style\n\...
[ "0.6988883", "0.691454", "0.68001527", "0.6761365", "0.6699765", "0.6596786", "0.65746707", "0.6560422", "0.64417326", "0.63765466", "0.6351477", "0.6351217", "0.6314671", "0.62700576", "0.6258939", "0.6229247", "0.6220041", "0.6211291", "0.618858", "0.61027926", "0.6087735",...
0.78295594
0