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
Sets an input variable.
Устанавливает входную переменную.
public function setInputVariable( $name, $value ) { $this->inputVariables[$name] = $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set($variable, $value);", "public function set(string $variableName, $value): void;", "private function setVar($var)\n {\n $this->var = $var;\n }", "public function setVar($key, $value);", "public function __set ($variableName, $value) {\n // write\n }", "public function ...
[ "0.7554084", "0.70510453", "0.6934816", "0.69043237", "0.68111247", "0.67263937", "0.66655946", "0.6639328", "0.6609219", "0.6598919", "0.65151674", "0.64801", "0.6432467", "0.6432467", "0.63971716", "0.6393627", "0.6378874", "0.6378874", "0.6352442", "0.6352442", "0.6352442"...
0.7421295
1
Sets an input variable for a sub workflow.
Устанавливает входную переменную для подпотока.
public function setInputVariableForSubWorkflow( $name, $value ) { $this->inputVariablesForSubWorkflow[$name] = $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setInput(Input $input): void {}", "public function setInputVariable( $name, $value )\n {\n $this->inputVariables[$name] = $value;\n }", "function setVar() {\n\t\t\n\t\t$_argv = func_get_args();\n\t\t$_argc = func_num_args();\n\t\t\n\t\t// load vars\n\t\t$vars = getVars();\n\t\tif (...
[ "0.5738213", "0.5673373", "0.530748", "0.5275159", "0.52625775", "0.5248188", "0.5178319", "0.50127566", "0.49680263", "0.4956521", "0.49547207", "0.49059066", "0.48885605", "0.48751074", "0.48538345", "0.48448732", "0.483485", "0.48252395", "0.48227847", "0.48227847", "0.481...
0.80149233
0
Delete an episode from a library.
Удалить эпизод из библиотеки.
public function delete_episode($episode_id) { //See if session exists already, if not start one. if (session_status() == PHP_SESSION_NONE) { session_start(); } if (isset($_SESSION['user_id'])) { $user_id = $_SESSION['user_id']; } if (isset($_SESSIO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($episode);", "public function destroy($id)\n {\n $episode = Episode::findOrFail($id);\n\n\n $episode->delete();\n }", "public function deleteByEpisodeId($episode_id)\n {\n if (!$this->isInt($episode_id)) {\n return false;\n }\n \n ...
[ "0.80443776", "0.6432929", "0.6150358", "0.60109985", "0.5950027", "0.5923056", "0.58868045", "0.5790547", "0.57894516", "0.5721739", "0.568712", "0.56807435", "0.56611794", "0.5568707", "0.5556143", "0.55341905", "0.5519879", "0.5497302", "0.547269", "0.5467715", "0.5448009"...
0.7254753
1
Retrieve uri for given code
Получить uri для заданного кода
public function getUri($code) { $config = $this->directoryList->getConfig($code); return isset($config['uri']) ? $config['uri'] : ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUri() {}", "public function getUri() {}", "public function getURI();", "public function getUri();", "public function getUri();", "public function getUri();", "public function getUri();", "public function get_uri()\n {\n }", "abstract public function getUri();", "p...
[ "0.70626485", "0.70626485", "0.7027031", "0.70232666", "0.70232666", "0.70232666", "0.70232666", "0.6989759", "0.6981706", "0.69464767", "0.6920993", "0.68478477", "0.68177307", "0.68177307", "0.68177307", "0.6782021", "0.6782021", "0.6602318", "0.656308", "0.65467215", "0.64...
0.86104256
0
Gets the subject iteration to go over. Falls back to the corpus subject iteration if an explicit one has not been provided.
Получает итерацию по теме. Если явная итерация не предоставлена, используется итерация по теме корпуса.
private function getSubjectIteration() { if (null !== $this->subjectIteration) { return $this->subjectIteration; } return $this->formIteratorFor($this->getCorpus()->getSubjectIteration()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function current()\n {\n $subject = $this->getInnerIterator()->current();\n\n $document = $this\n ->getDocumentGenerator()\n ->createDocumentForSubject($subject);\n\n ($this->perSubjectCallback)();\n\n return $document;\n }", "public function getSubj...
[ "0.5958159", "0.59260935", "0.59250236", "0.57153517", "0.54169613", "0.53819", "0.5379986", "0.53730625", "0.53419083", "0.5338304", "0.5338304", "0.5338304", "0.5338304", "0.5338304", "0.5338304", "0.5338304", "0.5338304", "0.5338304", "0.5338304", "0.5338304", "0.5338304",...
0.7851963
0
Get test case Return an instance of TestCase
Получить тестовый случай Возвращает экземпляр TestCase
protected abstract function getTestCase() : TestCase;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function &getTestCase() {\r\n return $this->_test_case;\r\n }", "function &getTestCase() {\r\n return $this->_test_case;\r\n }", "public function getTestCase($class);", "function &getTestCase() {\r\n return $this->_invoker->getTestCase();\r\n }", "funct...
[ "0.7537918", "0.7537918", "0.74936503", "0.73695165", "0.7202386", "0.7004204", "0.6329741", "0.6279121", "0.6279121", "0.62580657", "0.605169", "0.60361266", "0.60152864", "0.5962444", "0.59566814", "0.588945", "0.58602864", "0.5827197", "0.57045245", "0.5692924", "0.5680455...
0.79644614
1
Function to configure site and copy all the required files.
Функция для настройки сайта и копирования всех необходимых файлов.
private function configure_site() { $site_conf_dir = $this->site_root . '/config'; $site_docker_yml = $this->site_root . '/docker-compose.yml'; $site_conf_env = $this->site_root . '/.env'; $site_nginx_default_conf = $site_conf_dir . '/nginx/default.conf'; $site_php_ini ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setup() {\n // If .htaccess file or local settings file does not exit lets create them.\n if ((file_exists($this->getSiteRoot() . '.htaccess.default') && !file_exists($this->getSiteRoot() . '.htaccess')) || !file_exists($this->getSiteRoot() . 'sites/default/settings.local.php')) {\n $thi...
[ "0.71292883", "0.66180843", "0.6475599", "0.63309395", "0.629675", "0.6268641", "0.62184143", "0.61521655", "0.6129658", "0.6072996", "0.6048022", "0.5961693", "0.5956222", "0.59283906", "0.591179", "0.58933926", "0.5886709", "0.5876405", "0.58749783", "0.5861784", "0.5854209...
0.73253214
0
Creates site root directory if does not exist. Throws error if it does exist.
Создает корневую директорию сайта, если она не существует. Вызывает ошибку, если она уже существует.
private function create_site_root() { if ( is_dir( $this->site_root ) ) { EE::error( "Webroot directory for site $this->site_name already exists." ); } if ( ! \EE\Utils\default_launch( "mkdir $this->site_root" ) ) { EE::error( "Cannot create directory $this->site_root. Please check that folder permission ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createNecessaryDirectoriesInDocumentRoot() {}", "protected function createNecessaryDirectoriesInDocumentRoot() {}", "function createDirectoryIfNonExistent() {\n if (! file_exists($this->path)) {\n mkdir($this->path);\n }\n }", "public function cr...
[ "0.6662581", "0.6662581", "0.64252687", "0.62891394", "0.6079026", "0.58962816", "0.5892407", "0.5880375", "0.5870638", "0.5862871", "0.58401746", "0.58283985", "0.58195543", "0.57976", "0.576795", "0.5747397", "0.57466", "0.5743969", "0.5729837", "0.5710883", "0.5709381", ...
0.78950477
0
Function to delete the given site. $this>level: Level of deletion. Level 0: No need of cleanup. Level 1: Cleanup only the siteroot. Level 2: Try to remove network. The network may or may not have been created. Level 3: Disconnect & remove network and try to remove containers. The containers may not have been created. L...
Функция для удаления заданного сайта. $this>level: Уровень удаления. Уровень 0: Нет необходимости в очистке. Уровень 1: Очистка только корня сайта. Уровень 2: Попытаться удалить сеть. Сеть может или не может быть создана. Уровень 3: Отсоединить и удалить сеть, попытаться удалить контейнеры. Контейнеры могут не быть соз...
private function delete_site() { // Commented below block intentionally as they need change in DB // which should be discussed with the team if ( 'db' !== $this->db_host && $this->level >= 4 ) { chdir( $this->site_root ); $delete_db_command = "docker-compose exec php bash -c \"mysql --host=$this->db_host...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete( $args ) {\n\t\t\\EE\\Utils\\delem_log( 'site delete start' );\n\t\t$this->populate_site_info( $args );\n\t\t$this->level = 5;\n\t\t$this->delete_site();\n\t\t\\EE\\Utils\\delem_log( 'site delete end' );\n\t}", "public function delete_site($site) {\n $this->delete_blog($site->id);\n }"...
[ "0.6956001", "0.68841076", "0.6675145", "0.6629494", "0.63719016", "0.63719016", "0.63719016", "0.6279325", "0.6243826", "0.6208254", "0.6133373", "0.61221635", "0.603675", "0.5980314", "0.59678525", "0.5944324", "0.59035456", "0.58891743", "0.5870524", "0.58309215", "0.58286...
0.7278997
0
Function to setup site network.
Функция настройки сети сайта.
private function setup_site_network() { $this->level = 2; try { if ( $this->docker::create_network( $this->site_name ) ) { EE::success( 'Network started.' ); } else { throw new Exception( 'There was some error in starting the network.' ); } $this->level = 3; $this->docker::connect_site_net...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function network_config_page() {\n\t\trequire_once WPSEO_PATH . 'admin/pages/network.php';\n\t}", "protected function setUp()\n {\n $this->object = new CNetwork;\n $_SERVER['HTTP_HOST'] = 'www.creovel.org';\n $_SERVER['REMOTE_ADDR'] = '10.10.10.10';\n $_SERVER['REQUEST_URI']...
[ "0.688224", "0.6393713", "0.63840145", "0.6291135", "0.6261024", "0.6111792", "0.6038832", "0.59676236", "0.596679", "0.5894356", "0.58585453", "0.5855902", "0.5828463", "0.58002406", "0.57506746", "0.5686188", "0.5672707", "0.5662913", "0.5636131", "0.5631797", "0.5630316", ...
0.8277451
0
Function to create entry in /etc/hosts.
Функция для создания записи в /etc/hosts.
private function create_etc_hosts_entry() { $host_line = LOCALHOST_IP . "\t$this->site_name"; $etc_hosts = file_get_contents( '/etc/hosts' ); if ( ! preg_match( "/\s+$this->site_name\$/m", $etc_hosts ) ) { if ( \EE\Utils\default_launch( "/bin/bash -c 'echo \"$host_line\" >> /etc/hosts'" ) ) { EE::success(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function addNewHostToHostsFile()\n {\n shell_exec('sudo sh -c \\'echo \"\\n\\r\" >> '. $this->hostsPath .'\\'');\n shell_exec('sudo sh -c \\'echo \"'. $this->localIp .' '. $this->name .'\" >> '. $this->hostsPath .'\\'');\n }", "public function addToHosts()\n {\n $folders = [...
[ "0.734595", "0.6803051", "0.6570361", "0.59911907", "0.5960236", "0.5824039", "0.5715017", "0.5632217", "0.56195277", "0.555107", "0.5489383", "0.545994", "0.5442087", "0.54241216", "0.5338706", "0.53039014", "0.5303808", "0.5296824", "0.5287425", "0.52867347", "0.52606976", ...
0.83820957
0
Install wordpress with given credentials.
Установите WordPress с заданными учетными данными.
private function install_wp() { EE::log( "\nInstalling WordPress site." ); chdir( $this->site_root ); $wp_install_command = 'install'; $maybe_multisite_type = ''; if ( 'wpsubdom' === $this->site_type || 'wpsubdir' === $this->site_type ) { $wp_install_command = 'multisite-install'; $maybe_multisit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function installWordpressData() {\n }", "public function install( $args, $assoc_args ) {\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\n if ( is_blog_installed() ) {\n WP_CLI::error( 'WordPress is already installed.' );\n }\n\n\t\textract( wp_parse_args( $asso...
[ "0.69237095", "0.6583379", "0.6524245", "0.6431903", "0.640117", "0.6222173", "0.61751884", "0.6099775", "0.6074496", "0.60420483", "0.5988153", "0.5972532", "0.59724903", "0.595345", "0.58764327", "0.5837831", "0.5818815", "0.58036894", "0.58012164", "0.58012164", "0.5791102...
0.7075318
0
Scope a query to only include unique views.
Ограничьте запрос, чтобы он включал только уникальные представления.
public function scopeUniqueVisitor(Builder $query);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function scopeViewable($query)\n {\n return $query->where('is_closed', 0)->orWhere('is_pinned', 1)->orWhere(function ($query) {\n $query->archival();\n });\n }", "public function scopeOwned($query, $userId=null) {\n\t\tif(is_null($userId)) {\n\t\t\t$userId = user('id');\n\t\...
[ "0.61759657", "0.6009769", "0.5906203", "0.58808744", "0.5747821", "0.5745926", "0.5696362", "0.566224", "0.56587327", "0.5656492", "0.55902183", "0.5587061", "0.5530088", "0.55282533", "0.5510395", "0.5486568", "0.54663306", "0.5432715", "0.5424864", "0.5419958", "0.5418141"...
0.7052518
0
Returns an array of event names this subscriber wants to listen to. The array keys are event names and the value can be: The method name to call (priority defaults to 0) An array composed of the method name to call and the priority An array of arrays composed of the method names to call and respective priorities, or 0 ...
Возвращает массив имен событий, на которые этот подписчик хочет подписаться. Ключи массива — имена событий, а значение может быть: имя метода для вызова (приоритет по умолчанию равен 0), массив, состоящий из имени метода для вызова и приоритета, массив массивов, состоящий из имен методов для вызова и соответствующих пр...
public static function getSubscribedEvents() { return array( DefaultEvents::default_pre_index => 'onCustomListener', DefaultEvents::default_pre_index => 'onCustomListener', OtherEvents::other_pre_index => 'onCustomListener', OtherEvents::other_pox_index => 'on...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getSubscribedEvents()\n {\n return [NotificationEvent::NAME => ['handleNotificationEvent', self::getPriority()]];\n }", "public function getEventNames(){\n return array($this->getEventName() => array($this,'handle'));\n }", "public static function getSubscribedEvents()\n...
[ "0.74092686", "0.7041394", "0.7000565", "0.68970597", "0.68649846", "0.68298846", "0.68138343", "0.6795317", "0.6773641", "0.6757578", "0.67144316", "0.66603595", "0.6606079", "0.65984416", "0.6578544", "0.65723467", "0.6553814", "0.6549411", "0.65459", "0.65458626", "0.65035...
0.7193467
1
/ Add the member's risk level
/ Добавление уровня риска члена
public function addRiskLevel($riskLevel) { $this->riskLevel = $riskLevel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addpatientpainlevel()\n {\n $userid = $this->userInfo('user_id');\n $painlevel = $_REQUEST['painlevel'];\n $query = \"INSERT INTO patient_pain_level(patient_id,painlevel,creation_on,modification_on) VALUES('$userid','$painlevel',now(),now())\";\n $result = @mysql_query($que...
[ "0.5747237", "0.56807023", "0.5568869", "0.5517654", "0.5442341", "0.5406777", "0.5340054", "0.5323599", "0.52404964", "0.52277064", "0.5203568", "0.5199385", "0.51933426", "0.51621103", "0.5155904", "0.51416945", "0.5139164", "0.5119197", "0.5090204", "0.50857073", "0.507136...
0.72411203
0
/ Creation Date: 11 June 2012 Author: Ian O'Keeffe Modification History: 11062012 This code should parse HTML files so that soundtracks can be culturally adapted This function checks HTMLformat files for localespecific soundtrack data
/ Дата создания: 11 июня 2012 Автор: Иэн О'Киффе История изменений: 11062012 Этот код должен парсить HTML-файлы, чтобы можно было культурно адаптировать саундтреки Эта функция проверяет HTML-файлы на наличие локально-специфичных данных саундтреков
function checkS_HTM($file, $locale){ //Open HTML file using DOMDocument to access the tag information $htmlDom = new DOMDocument(); //To handle HTML format files $htmlDom->loadHTML($file); //Open $file as a DOMDocument XML file object echo $locale." is the locale passed in to checkS.php <br>"; //Find any <...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkLocaleWithUTF8filesystem() {}", "function parse_files_this_week() {\n\t$file_txt = get_transient('this_week_html');\n\n\tif( !$file_txt ) {\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"http://www.uvm.edu/~wruv/res/thisweek/\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER,...
[ "0.583244", "0.552711", "0.5523646", "0.5516744", "0.5475861", "0.5348142", "0.5224574", "0.51925844", "0.51750547", "0.5118653", "0.5112667", "0.50890875", "0.5087334", "0.5075652", "0.50738406", "0.5071553", "0.5060962", "0.50532115", "0.501652", "0.5013704", "0.50111663", ...
0.7004105
0
Get identifier from cookies
Получить идентификатор из куков
protected function _getIdentifier() { return $this->_getCookieValue(Df_PageCache_Model_Cookie::COOKIE_CUSTOMER, ''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSessionIdFromCookie();", "protected function _getIdentifier()\n {\n $cacheId = $this->_getCookieValue(Enterprise_PageCache_Model_Cookie::COOKIE_CUSTOMER, '')\n . '_'\n . $this->_getCookieValue(Enterprise_PageCache_Model_Cookie::COOKIE_FORM_KEY, '')\n ...
[ "0.77480185", "0.7211259", "0.715517", "0.69769156", "0.68458915", "0.68211454", "0.68200296", "0.67590344", "0.6679197", "0.6636901", "0.6569581", "0.65389526", "0.6531435", "0.6507149", "0.6481608", "0.64416105", "0.64148086", "0.64113915", "0.6329754", "0.63219607", "0.631...
0.74038076
1
Get container individual additional cache id
Получить индивидуальный идентификатор дополнительного кэша контейнера
protected function _getAdditionalCacheId() { return md5('CONTAINER_ORDERS_' . $this->_placeholder->getAttribute('cache_id')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getCacheId()\n\t{\n\t\treturn self::CACHE_ID_PREFIX . '_' . $this->exportId . '_' . $this->type;\n\t}", "function getCacheId() {\n return get_class($this).\"_\".$this->id;\n }", "protected function get_cache_id() {\n\t\treturn wponion_hash_string( $this->module() . '_' . $this->uniqu...
[ "0.743632", "0.7417303", "0.7382205", "0.7251221", "0.7158355", "0.7143724", "0.6916108", "0.6768604", "0.66799474", "0.65925825", "0.6528089", "0.6357815", "0.62685364", "0.62354755", "0.62022585", "0.6126806", "0.6126806", "0.6120933", "0.60931647", "0.60913527", "0.606827"...
0.7969362
0
Initializes repository in directory.
Инициализирует репозиторий в каталоге.
public function init() { $git_wrapper = new \GitWrapper\GitWrapper(); if (file_exists($this->directory)) { $this->git = $git_wrapper->workingCopy($this->directory); $this->git->checkout($this->branch); } else { $this->git = $git_wrapper->cloneRepository($this->getRepositoryURL(), $this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init_repo() {\n\n\t\t\t// we don't need to maintain local repos for slim deploys\n\t\t\tif ( SLIM ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// if the repo is already initialised, we don't need to\n\t\t\tif ( is_dir( \"wpd-repos/{$this->config->repo[ 'name' ]}/.git\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n...
[ "0.7440883", "0.7190995", "0.6986214", "0.67270553", "0.6588756", "0.65375566", "0.65213746", "0.63300306", "0.6300125", "0.6227771", "0.61572874", "0.6119463", "0.61060244", "0.6062188", "0.6059543", "0.60536504", "0.5984765", "0.59810036", "0.59756863", "0.5963675", "0.5951...
0.7668548
0
Creates instance from a timezone value
Создает экземпляр из значения часового пояса
public static function create($value): Timezone { return new static($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function timezone(?string $timezone): static;", "public function createInTimeZone($time, \\DateTimeZone $timezone);", "protected static function fromValidatedString($zone) {\n\t\t$timeZone = new static();\n\t\t$tmpDate = new \\DateTime($zone);\n\t\t$timeZone->dateTimeZone = $tmpDate->getTimezone();\n\t\...
[ "0.65407586", "0.65033466", "0.6356015", "0.6353981", "0.5976785", "0.59759736", "0.5910993", "0.5908045", "0.5857295", "0.57789934", "0.5772755", "0.5663849", "0.56227523", "0.5620938", "0.56061757", "0.55845", "0.55521375", "0.5461323", "0.54416734", "0.5432684", "0.5423437...
0.70917207
0
Get replacement for $VENDOR$.
Получить замену для $VENDOR$.
protected function getVendorReplacement() { return $this->theme->config('composer.vendor'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVendor()\n {\n return $this->_coreRegistry->registry('current_vendor');\n }", "public function getVendorName(): string;", "public function GetVendor()\n\t{\n\t\treturn $this->vendor;\n\t}", "public function getVendorName(): string\n {\n return 'local';\n }", "fu...
[ "0.73929614", "0.72675425", "0.70648766", "0.6959751", "0.68407124", "0.67473835", "0.66863304", "0.66825575", "0.6629881", "0.6619991", "0.6619991", "0.6507142", "0.6411519", "0.6334774", "0.6284649", "0.6246773", "0.6243515", "0.6104588", "0.60473216", "0.59805083", "0.5970...
0.74287647
0
Get replacement for $THEME_NAMESPACE$.
Получить замену для $THEME_NAMESPACE$.
protected function getThemeNamespaceReplacement() { return str_replace('\\', '\\\\', $this->theme->config('namespace')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getNamespaceReplacement()\n {\n if ($this->runningAsRootDir) {\n return Str::beforeLast($this->buildClassName, '\\\\');\n }\n\n $namespace = $this->theme->getClassNamespace();\n\n return str_replace('\\\\\\\\', '\\\\', $namespace);\n }", "public fun...
[ "0.6807054", "0.66228724", "0.6578451", "0.6499231", "0.64872843", "0.64378923", "0.64277387", "0.63877964", "0.6245711", "0.6216042", "0.62011737", "0.61759824", "0.61533767", "0.61516845", "0.6146676", "0.61243325", "0.6070425", "0.60660106", "0.60418826", "0.6037724", "0.6...
0.768817
0
/ Listado de Demarcaciones
/ Список демаркаций
public function listDemarcaciones() { $list_demarcaciones = \common\models\autenticacion\Demarcaciones::find()->all(); return $list_demarcaciones; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listerDemandes() {\n $q = $this->db->prepare('SELECT * FROM DemandeMain WHERE proj_id = :id AND datetime < NOW() - INTERVAL 30 SECOND LIMIT 1');\n $q->bindValue(':id', $this->id, PDO::PARAM_INT);\n $q->execute();\n $row = $q->fetch();\n if(!empty($row)) {\n ...
[ "0.7300028", "0.70059055", "0.67500657", "0.6600704", "0.6519812", "0.6493078", "0.64741343", "0.6420836", "0.6353512", "0.63510865", "0.6329807", "0.6309082", "0.62917244", "0.6285789", "0.62746614", "0.62658143", "0.6247228", "0.62393665", "0.62335885", "0.6228956", "0.6223...
0.78798115
0
get the number of doors on this instance
получить количество дверей на этом экземпляре
function getNumberOfDoors() { return $this->numberOfDoors; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNumberOfDoors(){\n return $this->doors;\n }", "public function getNumberOfDoors() {\n return $this->_numberOfDoors;\n }", "public function getNumberOfDoors() {\n if ($this->getStyle() == \"extndedcab\")\n return (4);\n else \n return (2); \n }", ...
[ "0.89993405", "0.8769258", "0.82575035", "0.75199944", "0.6927893", "0.6904039", "0.6904039", "0.6826948", "0.6706393", "0.665528", "0.6479635", "0.64092255", "0.640857", "0.640716", "0.6372366", "0.63684666", "0.63640726", "0.63540494", "0.63540494", "0.63540494", "0.6354049...
0.88752615
1
get the engine type for this instance
получить тип двигателя для этой инстанции
function getEngineType() { return $this->engineType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_engine_code(/* ... */)\n {\n return $this->_type;\n }", "public function getEngine() {\n return $this->engine;\n }", "public function getEngine() {\n return $this->engine;\n }", "public function getEngine()\n {\n return $this->engine;\n }", ...
[ "0.8197217", "0.748202", "0.748202", "0.7462389", "0.7462389", "0.7462389", "0.7462389", "0.7399819", "0.73710704", "0.7322762", "0.72918576", "0.71452326", "0.71009594", "0.71009594", "0.71009594", "0.6929384", "0.6917682", "0.68710923", "0.6820982", "0.6791778", "0.67500645...
0.8756475
0
Checks if the setup has already been ran by searching for the 'admins' table
Проверяет, был ли уже выполнен настройка, ищет таблицу 'admins'
public function checkIfSetupRan() { $select = $this->table_gateway->getAdapter() ->getDriver()->getConnection() ->execute("SHOW TABLES LIKE 'admins'"); if ($select->count() > 0) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function adminsAreAlreadySet()\n {\n return Cache::rememberForever('config:has-admin', function () {\n return User::where(\"admin\", true)->exists();\n });\n }", "public function hasAdmin() {\n\n return database::getInstance()->has(\"staff\",[\"Path[!]\" => nul...
[ "0.7241903", "0.67459476", "0.6671411", "0.6601037", "0.6568536", "0.6538359", "0.6452171", "0.6420304", "0.6387695", "0.6379941", "0.63494074", "0.6272393", "0.62110716", "0.6199543", "0.61746264", "0.61506265", "0.61482227", "0.6126111", "0.61253554", "0.61234754", "0.61017...
0.7593962
0
Returns the bind values.
Возвращает значения привязки.
public function bindValues() { $ret = []; if ($this->data) { $ret = \array_values($this->data); } if ($this->getWhereValues()) { $ret = \array_merge($ret, $this->getWhereValues()); } return Utils::arrayFlatten($ret); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBindValues();", "public function get_binds_values()\r\n {\r\n return array_values_recursive_with_keys($this->binds);\r\n }", "public function get_binds(){\n\t\treturn $this->binds;\n\t}", "public function getBinds(): array;", "public function getBindVars(): array\n {\n ...
[ "0.88593525", "0.7904368", "0.73245406", "0.7251446", "0.72323376", "0.72069687", "0.71835065", "0.70416325", "0.7028668", "0.7008572", "0.69182664", "0.6838812", "0.679622", "0.6779633", "0.6757391", "0.6753759", "0.6669899", "0.66667354", "0.66667354", "0.6638034", "0.66092...
0.8215341
1
Check if the JSON extension is enabled.
Проверьте, включен ли расширение JSON.
public function satisfiesJSONExtension(): bool { if (function_exists('extension_loaded') && extension_loaded('json')) { return true; } else if (function_exists('json_encode')) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isJsonAvailable()\n {\n if (!function_exists('json_decode') && !function_exists('json_encode')) {\n App::instance()->setNotification('E', App::instance()->t('error'), App::instance()->t('text_json_notice'), true, 'validator');\n\n return false;\n }\n\n ...
[ "0.77518255", "0.7424178", "0.7050922", "0.7021388", "0.6936958", "0.69295794", "0.6918058", "0.6904191", "0.6872977", "0.6774073", "0.672661", "0.6726443", "0.6708114", "0.6684045", "0.6668455", "0.664782", "0.66110206", "0.657793", "0.65440434", "0.65423965", "0.64668226", ...
0.8382217
0
Assert the CORS headers are set correctly
Убедитесь, что заголовки CORS установлены правильно
private function assertCorsHeadersSet(TestResponse $response, $origin = '*', $methods = null) { $methods = $methods ?? 'GET, POST, OPTIONS, PUT, PATCH, DELETE'; $response ->assertHeader('Access-Control-Allow-Origin', $origin) ->assertHeader('Access-Control-Allow-Methods', $me...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function corsHeaders(Request $request);", "public function testComplexCorsRequestPreFlightFail() {\r\n $app = $this->runAppPreFlight('cors', 'ComplexCorsRequestPreFlightFail');\r\n $this->assertEquals(404, $app->response()->status());\r\n $this->assertNull($app->response()->header(\"A...
[ "0.70464724", "0.69709855", "0.67551225", "0.6608442", "0.6552383", "0.6549802", "0.6543711", "0.6537792", "0.65334034", "0.6406815", "0.6404178", "0.63968545", "0.63756245", "0.6332494", "0.6328796", "0.6318403", "0.6295635", "0.62924266", "0.62914115", "0.62872994", "0.6283...
0.7059101
0
Builds a list of scripts.
Создаёт список скриптов.
public function build() : array { // Exclude "$PRELOAD$" phantom file $scripts = $this->excludePreloadVariable($this->list); // Exclude the files set by the developer $scripts = $this->exclude($scripts); // Sort the scripts by hit ratio $scripts = $this->sortScripts...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function \t\t\t\tbuild_script_tags() {\n\t\t$load=array(\n\t\t\t\"assets/js/jquery/jquery-3.3.1.min.js\",\n\t\t\t\"assets/js/bootstrap/bootstrap.min.js\",\n\t\t\t// \"assets/js/fontawesome/all.min.js\",\n\t\t\t\"assets/js/app/fetch.js\",\n\t\t\t\"assets/js/app/modal.js\",\n\t\t\t\"assets/js/app/common.js\"...
[ "0.6731479", "0.63355887", "0.6299844", "0.62755775", "0.6219525", "0.6057516", "0.6015281", "0.6003463", "0.5995105", "0.598661", "0.59748715", "0.5966264", "0.59407574", "0.59179205", "0.5906617", "0.5860311", "0.58586395", "0.5839687", "0.58313143", "0.5829948", "0.5815915...
0.7335405
0
Excludes de `$PRELOAD$` file key from the list.
Исключает ключ файла `$PRELOAD$` из списка.
protected function excludePreloadVariable(array $list) { unset($list['$PRELOAD$']); return $list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getExtensionsToExclude() {}", "public function remove_conflicting_asset_files() {\n\t\t$scripts = array(\n\t\t\t'jetpack-onboarding-vendor', // Jetpack Onboarding Bluehost.\n\t\t);\n\n\t\tif ( ! empty( $scripts ) ) {\n\t\t\tforeach ( $scripts as $script ) {\n\t\t\t\twp_dequeue_script( $script ...
[ "0.5638355", "0.5402293", "0.5395647", "0.5332338", "0.5305938", "0.5242476", "0.5229678", "0.5184975", "0.515944", "0.51540524", "0.511677", "0.5101164", "0.5060469", "0.50573885", "0.5038102", "0.5006776", "0.4975309", "0.497236", "0.4964956", "0.49234667", "0.49074915", ...
0.72414315
0
Get the list of files excluded for this package
Получить список исключенных файлов для этого пакета
protected function excludedPackageFiles() { if ($this->selfExclude) { return array_map(fn ($entry) => realpath($entry), glob(realpath(__DIR__) . DIRECTORY_SEPARATOR . '*.php')); } return []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExcludedFiles()\n {\n $includes = array();\n\n foreach ($this->files as $file) {\n $includes[] = $file->getName();\n }\n\n $this->directoryScanner->setIncludes($includes);\n $this->directoryScanner->scan();\n\n $files = $this->directoryScan...
[ "0.82230246", "0.76676476", "0.75979143", "0.7468077", "0.7364063", "0.7140177", "0.71390235", "0.70956457", "0.70550746", "0.68668526", "0.68296444", "0.67432725", "0.6724", "0.6695087", "0.669366", "0.66471606", "0.66139317", "0.6591929", "0.65830505", "0.65016556", "0.6493...
0.8259605
0
test_dispatchIndexAction() Tests the dispatching of the indexAction method of the ScalesController class
test_dispatchIndexAction() Проверяет передачу метода indexAction класса ScalesController
public function test_dispatchIndexAction ( ) { $params = array( 'action' => 'index', 'controller'=> 'scales', 'module' => 'default' ); $urlParams = $this->urlizeOptions($params); $url = $this->url($urlParams); $this->dispatch($url); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_indexAction ( )\n {\n $params = array(\n 'action' => 'index',\n 'controller'=> 'index',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($...
[ "0.79600143", "0.7644809", "0.7639414", "0.7366055", "0.7287697", "0.72644854", "0.7261482", "0.7173169", "0.70704085", "0.70387393", "0.70208013", "0.69785845", "0.69784707", "0.69540924", "0.6934651", "0.69014996", "0.6869068", "0.6861394", "0.6818012", "0.6805613", "0.6766...
0.8353534
0
END function test_dispatchIndexAction test_listIndexAction() Tests the dispatching of the listAction method of the ScalesController class
Функция тестирования test_dispatchIndexAction test_listIndexAction() Тестирование вызова метода listAction класса ScalesController
public function test_listIndexAction ( ) { $params = array( 'event_id' => 1, 'action' => 'list', 'controller'=> 'scales', 'module' => 'default' ); $urlParams = $this->urlizeOptions($params); $url = $this->url($urlParams); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listAction() {}", "public function listAction()\n {\n // some logic\n }", "public function test_dispatchIndexAction ( )\n {\n $params = array(\n 'action' => 'index',\n 'controller'=> 'scales',\n 'module' => 'default'\n );\n\n ...
[ "0.71465224", "0.71336186", "0.70217097", "0.70125204", "0.6922405", "0.6890512", "0.6856329", "0.6808552", "0.67426866", "0.67085105", "0.6696661", "0.66931796", "0.66884184", "0.66768813", "0.66532654", "0.66532654", "0.6607217", "0.65550816", "0.6548274", "0.65418184", "0....
0.8082284
0
TODO check user has privs to delete page
TODO проверить, имеет ли пользователь права на удаление страницы
public function sitePageDeleteAction () { $Page = Tg_Site::getInstance ()->getPageById($this->_getParam ('id')); if (!$Page) throw new Exception ("Page not found"); if ($Page->locked) throw new Exception ("Page is locked"); $Page->delete(); echo '{"success":true,"msg":"Delete success...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete() { // Page::destroy($this->pages()->select('id')->get());\n $this->pages()->detach();\n parent::delete();\n }", "public function destroy()\n {\n //build a \"are you sure you want to delete\" popup/page\n\n //get user id from session\n //user...
[ "0.7535444", "0.75162995", "0.7490709", "0.72948337", "0.7293525", "0.7191755", "0.71723926", "0.70750666", "0.7059455", "0.7051762", "0.7051678", "0.7035318", "0.69697917", "0.696768", "0.69423753", "0.69209313", "0.6918073", "0.6913721", "0.6903744", "0.684602", "0.6840266"...
0.771147
0
Creates a new ArrangementProgram entity.
Создает новую сущность ArrangementProgram.
public function createAction(Request $request) { $this->getPeriodService()->checkIsOpen(); $type = $request->get("type"); $associate = $request->get("associate"); $rol = null; $rolesByType = array( ArrangementProgram::TYPE_ARRANGEMENT_PROGRAM_TACTIC => array('ROLE_S...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createCreateForm(ArrangementProgram $entity, array $parameters) {\n $form = $this->createForm('arrangementprogram', $entity, array(\n 'action' => $this->generateUrl('pequiven_arrangementprogram_create', $parameters),\n 'method' => 'POST',\n ));\n\n return...
[ "0.64173484", "0.6328055", "0.62175786", "0.6017243", "0.5966363", "0.5903661", "0.58709544", "0.5776996", "0.5770303", "0.572925", "0.5728966", "0.5710033", "0.5685037", "0.5666767", "0.5624094", "0.56065136", "0.5599243", "0.5594241", "0.55669826", "0.5529564", "0.5525689",...
0.7610781
0
Displays a form to edit an existing ArrangementProgram entity.
Показывает форму для редактирования существующей сущности ArrangementProgram.
public function editAction($id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('PequivenArrangementProgramBundle:ArrangementProgram')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find ArrangementProgram entity.'); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createEditForm(ArrangementProgram $entity) {\n $form = $this->createForm('arrangementprogram', $entity, array(\n 'action' => $this->generateUrl('arrangementprogram_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n return $form;\n ...
[ "0.75294054", "0.7064661", "0.69707423", "0.6970364", "0.6945791", "0.6914603", "0.6888674", "0.6853605", "0.6834388", "0.67191076", "0.6703343", "0.6669168", "0.6612921", "0.6608126", "0.65840393", "0.657021", "0.6566143", "0.65369385", "0.6522036", "0.6522036", "0.6522036",...
0.7480644
1
Creates a form to edit a ArrangementProgram entity.
Создает форму для редактирования сущности ArrangementProgram.
private function createEditForm(ArrangementProgram $entity) { $form = $this->createForm('arrangementprogram', $entity, array( 'action' => $this->generateUrl('arrangementprogram_update', array('id' => $entity->getId())), 'method' => 'PUT', )); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('PequivenArrangementProgramBundle:ArrangementProgram')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find ArrangementProgram entity.');\...
[ "0.6984589", "0.67135954", "0.6231691", "0.62233955", "0.6199374", "0.61880106", "0.6160963", "0.6125364", "0.6117364", "0.61160773", "0.61111164", "0.6083465", "0.607245", "0.60720664", "0.6045559", "0.60234666", "0.59932214", "0.5988049", "0.5971122", "0.5955396", "0.595145...
0.83042663
0
Creates a form to delete a ArrangementProgram entity by id.
Создает форму для удаления сущности ArrangementProgram по идентификатору.
private function createDeleteForm($id) { return $this->createFormBuilder() ->setAction($this->generateUrl('arrangementprogram_delete', array('id' => $id))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function DeleteProgram($id) {\n\n $program = new Program($this->app[\"db\"]);\n\n // load the program and delete it\n $program->load($id);\n $program->remove();\n\n return $this->app->redirect('/programs.html');\n }", "private function createDeleteForm(ProgramKsztalce...
[ "0.6789618", "0.67013127", "0.6438605", "0.6435333", "0.6383546", "0.63541526", "0.6324983", "0.631778", "0.6305912", "0.62815654", "0.62760746", "0.6263315", "0.62553364", "0.6248056", "0.6240847", "0.6238331", "0.62350047", "0.62278783", "0.62118053", "0.6208926", "0.620564...
0.7626343
0
Creates a form to create a ArrangementProgram entity.
Создает форму для создания сущности ArrangementProgram.
private function createCreateForm(ArrangementProgram $entity, array $parameters) { $form = $this->createForm('arrangementprogram', $entity, array( 'action' => $this->generateUrl('pequiven_arrangementprogram_create', $parameters), 'method' => 'POST', )); return $form; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createAction(Request $request) {\n $this->getPeriodService()->checkIsOpen();\n\n $type = $request->get(\"type\");\n $associate = $request->get(\"associate\");\n\n $rol = null;\n $rolesByType = array(\n ArrangementProgram::TYPE_ARRANGEMENT_PROGRAM_TACTIC...
[ "0.72347754", "0.70360124", "0.6634545", "0.6552373", "0.64872015", "0.64364976", "0.6432615", "0.63422585", "0.6289026", "0.6277345", "0.6255698", "0.6113382", "0.60973775", "0.5996181", "0.5992618", "0.59906757", "0.5920895", "0.5920701", "0.58997244", "0.58848345", "0.5884...
0.7841062
0
Fetches all rows from Resultset into a mapping that has row value of $strColumnKeyName as key and row value of $strColumnValueName as value.
Извлекает все строки из Resultset в отображение, в котором значение строки $strColumnKeyName служит ключом, а значение строки $strColumnValueName — значением.
public function toMap($strColumnKeyName, $strColumnValueName) { $tblTMP = $this->PDOStatement->fetchAll(PDO::FETCH_ASSOC); if(!sizeof($tblTMP)) return array(); $tblOutput=array(); foreach($tblTMP as $tblRow) { $tblOutput[$tblRow[$strColumnKeyName]]=$tblRow[$strColumnValueName]; } return $tblOutput...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toMap(string $columnKeyName, string $columnValueName): array\n {\n $output=array();\n while ($row = $this->pdoStatement->fetch(\\PDO::FETCH_ASSOC)) {\n $output[$row[$columnKeyName]]=$row[$columnValueName];\n }\n return $output;\n }", "public function f...
[ "0.59632164", "0.5717907", "0.5670707", "0.560489", "0.55934274", "0.55144334", "0.5444069", "0.5411795", "0.5358733", "0.53527373", "0.5327664", "0.5229785", "0.5183364", "0.5144176", "0.51408404", "0.51027435", "0.5084229", "0.50497067", "0.50357306", "0.5020268", "0.497957...
0.7054739
0
UserPermission Create Store a newly created resource in storage.
Пользовательские разрешения Создать Сохранить только что созданный ресурс в хранилище.
public function store(StoreUserPermissionRequest $request) { $data = $request->only([ "entity", "label", "user_type_id", ]); $userPermission = UserPermission::create($data); return $this->item($userPermission, $this->transformer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n\t{\n\t\t//Permissions are created via code\n\t}", "public function store(CreatePermissionRequest $request)\n {\n Permission::create([\n 'name' => str_slug($request->input('display_name'), '-'),\n 'display_name' => $request->input('display_name'),\n ...
[ "0.7219344", "0.68694735", "0.68149495", "0.6786196", "0.67692566", "0.6715094", "0.6667449", "0.6666401", "0.6652877", "0.6644205", "0.6603916", "0.6593308", "0.65686136", "0.6565488", "0.6565488", "0.6558628", "0.65392804", "0.6515977", "0.64268565", "0.6339334", "0.6334815...
0.704838
1
Merge all defaults into the $settings array.
Объедините все значения по умолчанию в массив $settings.
protected function mergeDefaults($settings, $defaultSettings) { foreach ($defaultSettings as $id => $defaultSetting) { // Do not merge the defaults for group filters, if this widget already had group filters. // Merging would prevent the user from deleting a default option. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function mergeDefaultSettings(){\n\t\t//Get a copy of the default configuration.\n\t\t$defaultConfig = $this->getDefaultConfig();\n\t\t//Check for a 'general' section\n\t\tif(array_key_exists('general', $this->configuration)){\n\t\t\t//If it exists, compare the default keys to the loaded config for missing...
[ "0.70786023", "0.67838883", "0.6648027", "0.66020113", "0.652453", "0.64519304", "0.6396829", "0.6395275", "0.62864256", "0.61854196", "0.61547345", "0.6078359", "0.5976738", "0.5962118", "0.59592146", "0.5904755", "0.5900739", "0.5896264", "0.58797944", "0.5876597", "0.58649...
0.7070933
1
Test it can collect permissions.
Тест может собирать разрешения.
public function testItCanCollectPermissions(): void { $this->prepare(); $this->artisan('dluwang-auth:collect-permissions') ->expectsOutput('Registering abilities...') ->expectsOutput('Registering permission-test ability...') ->expectsOutput('Registering dluwan...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAllPermissions()\n {\n }", "public function testPermissionSet()\n {\n }", "public function testAllPermissionSets()\n {\n }", "public function checkPermissions();", "public static function uses_permissions(): bool;", "public function permissions();", "public functio...
[ "0.8122305", "0.7972382", "0.7799065", "0.76328725", "0.74437845", "0.73662037", "0.73662037", "0.73662037", "0.73662037", "0.73662037", "0.72986835", "0.72771", "0.7268436", "0.71954226", "0.7172691", "0.7147502", "0.7147502", "0.7147502", "0.71471673", "0.71471673", "0.7147...
0.80984
1
Test it won't register permission twice.
Тестирование не зарегистрирует разрешение дважды.
public function testItWontRegisterPermissionTwice(): void { $this->prepare(); $this->artisan('dluwang-auth:collect-permissions'); $this->artisan('dluwang-auth:collect-permissions') ->expectsOutput('Registering abilities...') ->expectsOutput('Permission "permission-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPermissionSet()\n {\n }", "protected function isPermissionCorrect() {}", "public function testCreatePermissionSet()\n {\n }", "public function testAllPermissions()\n {\n }", "public function testAllPermissionSets()\n {\n }", "public function testAddPermissionFa...
[ "0.7482581", "0.71572775", "0.6902538", "0.6866079", "0.6845544", "0.68252933", "0.66430825", "0.6591354", "0.65784633", "0.65733135", "0.6546106", "0.64816195", "0.6335351", "0.6334692", "0.6330451", "0.6324762", "0.63150877", "0.6281964", "0.62706655", "0.62641543", "0.6260...
0.789962
0
Injects the system logger
Вставляет системный логгер
public function injectSystemLogger(\TYPO3\Flow\Log\SystemLoggerInterface $systemLogger) { $this->systemLogger = $systemLogger; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initLogger(): void\n {\n $customPath = $this->context->getConfigurationService()->getLogPath();\n $severity = $this->context->getConfigurationService()->getLogSeverity();\n\n Logger::resetErrors();\n $this->logger = Logger::getInstance(__CLASS__, $customPath, $seve...
[ "0.7105468", "0.6788823", "0.675296", "0.6728273", "0.6518978", "0.64945084", "0.64410996", "0.6404461", "0.63937575", "0.63634455", "0.63516575", "0.63479286", "0.63316107", "0.6323318", "0.62996405", "0.6289701", "0.6266326", "0.6237561", "0.62049747", "0.61852306", "0.6157...
0.72788423
1
Echoes an exception for the command line.
Отражает исключение для командной строки.
abstract protected function echoExceptionCli($exception);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function usage_and_die($message=false)\n{\n\tif ($message) {\n\t\techo $message.\"\\n\";\n\t}\n\n\techo 'Usage: '.$_SERVER['argv'][0].' /starting/path'.\"\\n\";\n\n\texit(1);\n}", "protected function handleCLI($e) {\n $this->console->write('<eb>Uncaught ' . get_class($e) . ': </>')\n ...
[ "0.6769703", "0.65251946", "0.64078087", "0.63670695", "0.6281242", "0.6141077", "0.6086553", "0.60284597", "0.59695596", "0.5965773", "0.5965045", "0.593757", "0.59299785", "0.59189546", "0.59154606", "0.58945835", "0.58702844", "0.58291817", "0.5801072", "0.5787639", "0.578...
0.73215383
0
Echoes an exception for the web.
Отражает исключение для веба.
abstract protected function echoExceptionWeb($exception);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionException()\n {\n $this->render('exception');\n }", "public function show404() {\n header(\"HTTP/1.0 404 Not Found\");\n throw new Exception('404 Not Found');\n }", "function ExceptionHandler($e)\n{\n\theader('HTTP/1.1 500 Internal Server Error');\n\tob_get_c...
[ "0.7460982", "0.69156545", "0.69078004", "0.68927354", "0.67610925", "0.6710069", "0.6660405", "0.6647484", "0.66240007", "0.6600767", "0.6475314", "0.64381784", "0.64258033", "0.63013405", "0.62921834", "0.62919694", "0.6290601", "0.62614995", "0.62518007", "0.6239451", "0.6...
0.75378335
0
Checks if custom rendering rules apply to the given $exception and returns those.
Проверяет, применяются ли к заданному $exception пользовательские правила рендеринга, и возвращает их.
protected function resolveCustomRenderingOptions($exception) { $renderingOptions = array(); if (isset($this->options['defaultRenderingOptions'])) { $renderingOptions = $this->options['defaultRenderingOptions']; } if (!isset($this->options['renderingGroups'])) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render($request, Exception $exception)\n {\n\n $TraceException = [\n 'class' => get_class($exception),\n 'file' => $exception->getFile(),\n 'line_of_code' => $exception->getLine(),\n 'code' => $exception->getCode(),\n 'trace' => $exce...
[ "0.6122481", "0.599734", "0.5923407", "0.5907704", "0.5870447", "0.5805836", "0.5805836", "0.5805836", "0.5805836", "0.574214", "0.5732265", "0.5731399", "0.57291365", "0.57244974", "0.57177037", "0.57042545", "0.5701558", "0.5673726", "0.5669694", "0.5669694", "0.5664515", ...
0.72624034
0
Sets HTTP response code.
Устанавливает код HTTP-ответа.
public function setResponseCode($code);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setResponseCode($code) {}", "public function setStatusCode($code)\r\n {\r\n http_response_code($code);\r\n }", "protected function setHttpCode(Int $code = 200)\n {\n http_response_code($code);\n }", "public function setResponseCode(HttpStatusCode|int|null $code = 200...
[ "0.8717307", "0.84782934", "0.83457565", "0.8334254", "0.8302673", "0.8266685", "0.80674297", "0.8066483", "0.8065381", "0.8018216", "0.792622", "0.7906286", "0.78788316", "0.7861207", "0.7860026", "0.7817679", "0.77405626", "0.7732796", "0.7654222", "0.7654183", "0.75922", ...
0.86062324
1
Check existed trophy title return Bool
Проверить существующий титул трофея, возвратить Bool
public function checkTrophyTitle($title) { $model = new Ynidea_Model_DbTable_Trophies; $select = $model -> select()->where('title = ?',$title); $row = $model->fetchRow($select); if($row) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasTitle(){\n return $this->_has(37);\n }", "public function checkUniqueTitle()\n {\n $this->viewBuilder()->layout(false);\n if($this->request->is('post')) {\n $data = $this->request->data;\n $result = $this->Titles->isTitleExist($data['name']);\n ...
[ "0.7576347", "0.7436844", "0.73372376", "0.7216626", "0.7194785", "0.7191607", "0.7122622", "0.7108841", "0.709812", "0.70389175", "0.7022409", "0.69221973", "0.690334", "0.6816699", "0.6801848", "0.67682743", "0.6676655", "0.6647455", "0.6633933", "0.659563", "0.65890485", ...
0.79123384
0
Check trophy vote enable return Bool
Проверить включение голосования за трофеи, вернуть Bool
public function checkTrophyVote($trophy_id) { $model = new Ynidea_Model_DbTable_Trophies; $select = $model -> select()->where('trophy_id = ?',$trophy_id); $row = $model->fetchRow($select); if($row->status == 'voting') return true; else ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function vote_active() { \n\n\t\t/* Going to do a little more here later */\n\t\tif ($this->type == 'vote') { return true; } \n\n\t\treturn false;\n\n\t}", "public function testvote()\n {\n $this->vote_answer = Vote::vote($this->user->id, $this->answer->id, 1, 'answer_id');\n if (!$this->...
[ "0.7030297", "0.6703101", "0.6428532", "0.6401074", "0.60964996", "0.60300744", "0.60007215", "0.5955616", "0.5941392", "0.5926658", "0.5906957", "0.59043926", "0.5850183", "0.5847097", "0.58182216", "0.577861", "0.5761608", "0.5742842", "0.57355964", "0.5731593", "0.572365",...
0.70434475
0
Check user vote idea return Bool
Проверить идею голоса пользователя, вернуть Bool
public function checkVote($idea_id,$user_id) { $model = new Ynidea_Model_DbTable_Ideavotes; $select = $model -> select()->where('user_id = ?',$user_id)->where('idea_id=?',$idea_id); $row = $model->fetchRow($select); if($row) return true; else ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testvote()\n {\n $this->vote_answer = Vote::vote($this->user->id, $this->answer->id, 1, 'answer_id');\n if (!$this->answer) return false;\n }", "private function voteIdea(): bool\n {\n try {\n $this->idea->voters()->attach(auth()->user());\n ret...
[ "0.80400443", "0.7380724", "0.7266341", "0.7258953", "0.7206339", "0.71220326", "0.71028465", "0.70558316", "0.6963576", "0.69294757", "0.6927208", "0.6841199", "0.68185955", "0.68013674", "0.6791643", "0.6761403", "0.6729316", "0.671142", "0.6681224", "0.6681158", "0.6665955...
0.7570747
1
Count Judge vote return int
Count Judge vote return int
public function getCountJudgeVote($trophy_id,$idea_id) { $model = new Ynidea_Model_DbTable_Trophyvotes; $select = $model->select() ->from('engine4_ynidea_trophyvotes',array('count(user_id) AS total_judge')) ->where('trophy_id = ?',$trophy_id)->where('idea_id=?',$...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countPollOptionVotes() {\n\t\t$sql = \"SELECT\tCOUNT(*) AS count\n\t\t\tFROM\t\".$this->databasePrefix.\"poll_votes\n\t\t\tWHERE\tvote_user_id <> ?\";\n\t\t$statement = $this->database->prepareStatement($sql);\n\t\t$statement->execute(array(0));\n\t\t$row = $statement->fetchArray();\n\t\treturn $ro...
[ "0.6843338", "0.6824992", "0.6818008", "0.67166376", "0.6635631", "0.65617585", "0.6481354", "0.645923", "0.6302804", "0.62248796", "0.6176007", "0.6115909", "0.60992897", "0.6086038", "0.6045596", "0.5959125", "0.59571", "0.5954895", "0.5942361", "0.5930175", "0.5922772", ...
0.72301394
0
Determines if current product has chosen shipments
Определяет, выбраны ли текущие отправки товара
public function hasShippingOptions() { $product = $this->getProduct(); return strlen($product->getMdlShipments()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIsRequiredShipping()\n {\n $model = $this->_coreRegistry->registry('sales_subscription');\n $productId = $model->getSubProductId();\n $product = $this->productRepository->getById($productId);\n $productTypes = ['virtual', 'downloadable'];\n\n if ($product) {...
[ "0.69502956", "0.68921196", "0.6876919", "0.6815921", "0.6641856", "0.6550652", "0.65031606", "0.64853317", "0.647796", "0.6466501", "0.64626354", "0.64572066", "0.64572066", "0.64572066", "0.64572066", "0.64572066", "0.6390508", "0.6366076", "0.6342062", "0.6328053", "0.6283...
0.70942605
0
Get Recommended job duration
Получить рекомендуемую продолжительность работы
public function actionGetRecommendedJobDuration(){ if (!isset($_POST['video_lenght']) || !isset($_POST['job_type_id'])) return false; $qc = isset($_POST['qc']) ? $_POST['qc'] : ProjectJob::QC_TYPE_NONE; $recommendedJobDurationInterval = ProjectVideo::getDurationInHours($_PO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_duration() {\n\t\t$duration = $this->get_product_meta( 'job_listing_duration' );\n\t\treturn absint( $duration ? $duration : mylisting_get_setting( 'submission_default_duration' ) );\n\t}", "public function get_duration() {\n\t\t$job_listing_duration = $this->get_job_listing_duration();\n\t\t...
[ "0.761976", "0.75223774", "0.7252058", "0.65670556", "0.6450907", "0.63500535", "0.6343721", "0.62989753", "0.6269034", "0.6260771", "0.6256779", "0.6248292", "0.61913735", "0.61833787", "0.6170206", "0.6156036", "0.61085886", "0.61021084", "0.609535", "0.60675466", "0.605841...
0.7799757
0
This method is a service for job approval/disapproval
Этот метод служит для одобрения/отказа в работе
public function actionApprove(){ // Set no waiting limit set_time_limit(0); // REST client is flash app $this->restFlashClient = true; if (!isset($_POST['userJobId']) || !isset($_POST['approved'])){ $this->_sendResponse("Approval workflow has failed. Missing userJobId or approval st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function approve() {\n\n }", "public function startjobrequestAction(){\n\t\ttry{\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$identity = $sm->get('AuthService')->getIdentity();\n\t\t\t\n\t\t\t$config = $sm->get('Config');\n\t\t\t\n\t\t\t$request = $this->getRequest();\n\t\t\tif($request->isPos...
[ "0.6921051", "0.6691728", "0.66163754", "0.6477747", "0.64711034", "0.63914925", "0.6384833", "0.6308633", "0.62559295", "0.625236", "0.61841166", "0.6154119", "0.6052215", "0.60069734", "0.59964055", "0.5980397", "0.5973125", "0.5947326", "0.592788", "0.5915354", "0.58729106...
0.7229903
0
Get children jobs webservice
Получить веб-сервис для дочерних задач
public function actionGetChildrenJobs($projectJobId){ $this->format = 'json'; $projectJob = PProjectJob::model()->findByPk($projectJobId); $childrenJobs = $projectJob->getChildrenJobs(false); return $this->sendResponse(200, $this->getObjectEncoded(array( 'jobs' => array_map...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getJobs();", "public function getJobs();", "public function getJobsInfo(){ return $this->APICallSub( '/jobs', '', \"Couldn't lookup the job list\" ); }", "public function getAllJobs()\n {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new J...
[ "0.729934", "0.729934", "0.7188059", "0.68075794", "0.6604135", "0.6554102", "0.6554102", "0.64806455", "0.63755226", "0.6245015", "0.624208", "0.6206879", "0.61934304", "0.6148055", "0.6146057", "0.6144799", "0.6109882", "0.61069256", "0.61059767", "0.6084008", "0.6072629", ...
0.73388207
0
Verifies the input filename against the 'fileDenyPattern' Filenames are not allowed to contain control characters. Therefore we always filter on [[:cntrl:]].
Проверяет имя входного файла на соответствие 'fileDenyPattern'. Имена файлов не могут содержать управляющие символы. Поэтому мы всегда фильтруем по [[:cntrl:]].
public function isValid(string $fileName): bool { $pattern = '/[[:cntrl:]]/'; if ($fileName !== '' && $this->fileDenyPattern !== '') { $pattern = '/(?:[[:cntrl:]]|' . $this->fileDenyPattern . ')/iu'; } return preg_match($pattern, $fileName) === 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getFileDenyPatternStatus() {}", "public function fileDenyPatternMatchesPhpExtensionDataProvider() {}", "function sa_sanitize_chars($filename) {\n return strtolower(preg_replace('/[^a-zA-Z0-9-_\\.]/', '', $filename));\n}", "public function sanitizeFileNameNonUTF8FilesystemDataProvider() ...
[ "0.65403104", "0.64227533", "0.6339588", "0.62087446", "0.6136111", "0.59254843", "0.58994085", "0.58982295", "0.5803465", "0.57880527", "0.57442963", "0.5716215", "0.57100004", "0.5679316", "0.5609443", "0.5603794", "0.5599953", "0.5599075", "0.5595702", "0.55864537", "0.553...
0.7029691
0
Find out if there is a custom file deny pattern configured.
Установите, настроен ли пользовательский шаблон отказа от файла.
public function customFileDenyPatternConfigured(): bool { return $this->fileDenyPattern !== self::DEFAULT_FILE_DENY_PATTERN; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getFileDenyPatternStatus() {}", "public function fileDenyPatternMatchesPhpExtensionDataProvider() {}", "public function missingImportantPatterns(): bool\n {\n $defaultParts = explode('|', self::DEFAULT_FILE_DENY_PATTERN);\n $givenParts = explode('|', $this->fileDenyPattern);...
[ "0.7393713", "0.7230475", "0.6876285", "0.6448833", "0.6308489", "0.6157242", "0.5852165", "0.561215", "0.56050485", "0.55510664", "0.55096143", "0.54774064", "0.5446574", "0.54270494", "0.5415079", "0.5391726", "0.53849375", "0.5383046", "0.53466636", "0.5317405", "0.5315609...
0.84905654
0
Checks if the given file deny pattern does not have parts that the default pattern should recommend. Used in status overview.
Проверяет, не содержит ли заданный шаблон файла запрещенных частей, которые должен рекомендовать шаблон по умолчанию. Используется в обзоре статуса.
public function missingImportantPatterns(): bool { $defaultParts = explode('|', self::DEFAULT_FILE_DENY_PATTERN); $givenParts = explode('|', $this->fileDenyPattern); $missingParts = array_diff($defaultParts, $givenParts); return !empty($missingParts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function customFileDenyPatternConfigured(): bool\n {\n return $this->fileDenyPattern !== self::DEFAULT_FILE_DENY_PATTERN;\n }", "protected function getFileDenyPatternStatus() {}", "public function fileDenyPatternMatchesPhpExtensionDataProvider() {}", "function check_excl_list($matches)\r\...
[ "0.75889057", "0.7174525", "0.6538084", "0.5898615", "0.5747154", "0.56110406", "0.5475959", "0.5366293", "0.52850944", "0.52140325", "0.5187774", "0.5157666", "0.51475257", "0.51412463", "0.5139174", "0.51363325", "0.5122281", "0.5062335", "0.50515926", "0.50442225", "0.5002...
0.75989336
0
// DisplayLoginPopup // DisplayLoginPopup() Displays the login popup Displays the login popup
// DisplayLoginPopup // DisplayLoginPopup() Отображает попап с логином Отображает попап с логином
function DisplayLoginPopup() { $this->LoadPage('generic_popup'); $this->Page->SetName("Login"); $this->Page->AddObject('UserLogin', COLUMN_ONE, HTML_CONTEXT_POPUP); return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function casano_login_modal() {\r\n\t\tif ( ! shortcode_exists( 'woocommerce_my_account' ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif ( is_user_logged_in() ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// Don't load login popup on real mobile when header mobile is enabled\r\n\t\t$enable_header_mobile = casano_...
[ "0.56785846", "0.55018604", "0.5299169", "0.52930015", "0.52911955", "0.52795327", "0.51751494", "0.50757444", "0.50665677", "0.5043355", "0.50261056", "0.5020148", "0.50142384", "0.49886963", "0.4951168", "0.49499223", "0.49371", "0.4927814", "0.485141", "0.48487705", "0.483...
0.73522437
0
Joins the elements of the given array so that the results of calling prepare() on each element is surronded with single quotes and separated with commas.
Объединяет элементы заданного массива так, чтобы результаты вызова prepare() для каждого элемента были заключены в одинарные кавычки и разделены запятыми.
private function implodeWithPrepare($arr) { $result=''; $first=true; foreach($arr as $tr) { //separate with commas if(!$first) $result.=","; else $first=false; //every entry in single quotes $result.="'"; $result.=$this->prepare($tr); $result.="'"; } ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function quoteArray(array $literals)\n {\n return implode(',', array_map(array($this, 'quote'), $literals));\n }", "function arrayToSQLString ($arr) {\r\n $sql = \"\";\r\n foreach ($arr as $key => $value) {\r\n $sql = $sql . $value . ',';\r\n }\r\n $sql = rtrim($sql,',');\r\n retur...
[ "0.6984856", "0.69602907", "0.6942188", "0.6869382", "0.67058504", "0.66996825", "0.64696956", "0.6458437", "0.6369633", "0.6316628", "0.6291206", "0.6215666", "0.6200012", "0.6194994", "0.6193154", "0.6167694", "0.6127413", "0.61179435", "0.61156756", "0.6113788", "0.6076452...
0.80609554
0
This will return an fa for testing
Это вернет fa для тестирования
private function getFa() { $allStates = [ 'S0' => 0, 'S1' => 1, 'S2' => 2, ]; $initialState = 'S0'; $allowableInputAlphabets = range('0','9'); $acceptableFinalStates = ['S0', 'S1', 'S2']; $fa = new fa($allState...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getF() {}", "public function getXfa() {}", "public function getFi() {\n\t\treturn $this->container['fi'];\n\t}", "function isFallo();", "public function getFax() {}", "function oferta($a,$b,$c,$d,$e,$f){\r\n\t\t$fOferta= new fachada_oferta();\r\n\t\t$oOferta=$fOferta->oferta($a,$b,$c,$d,$...
[ "0.6587847", "0.6129991", "0.58271253", "0.56811684", "0.56484544", "0.5583525", "0.55636823", "0.5379144", "0.52836376", "0.524077", "0.52135694", "0.5210788", "0.5184655", "0.51720756", "0.5159898", "0.51149833", "0.5104384", "0.50777566", "0.5077623", "0.50720286", "0.5046...
0.7534399
0
Creates an attachment from string
Создает прикрепление из строки
public static function createFromString($filename, $string, $mime) { return new MailAttachment( $filename, $mime, $string, strlen($string) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addStringAttachment($string, $filename, $encoding = self::ENCODING_BASE64, $type = '', $disposition = 'attachment')\n {\n }", "public static function fromString($string) {\n\t\treturn fromFile('data://;base64,' . base64_encode($string));\n\t}", "public function AddImageStringAttac...
[ "0.7030813", "0.6769846", "0.6515103", "0.64968425", "0.59240353", "0.58419156", "0.5826274", "0.5794587", "0.5746108", "0.57130533", "0.5644768", "0.5625494", "0.5508214", "0.5467632", "0.54533875", "0.5425491", "0.54188174", "0.5380396", "0.5363932", "0.53531504", "0.531923...
0.72983515
0
/ $name = Admin::all(); $m = Moderator::all(); $value = $req>session()>get('username'); $userlist = Admin::where('username','=',$value)>get(); return view('home.list')>with('list', $userlist)>with('name',$name)>with('m',$m);
$name = Admin::all(); $m = Moderator::all(); $value = $req>session()>get('username'); $userlist = Admin::where('username','=',$value)>get(); return view('home.list')>with('list', $userlist)>with('name',$name)>with('m',$m);
public function userlist(Request $req){ $name = Moderator::all(); return view('home.list')->with('list', $name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserList()\n {\n// return view('admin.module.user.list', ['data' => $data]);\n $userCurrentLogin = Auth::user()->id;\n $user = User::find($userCurrentLogin);\n if ($userCurrentLogin == 2) {\n $data = User::select('id', 'username', 'level')->get()->toArra...
[ "0.7446957", "0.74340475", "0.73097664", "0.7289356", "0.7224095", "0.72080266", "0.7177949", "0.7132769", "0.7111017", "0.7087918", "0.7069098", "0.70474595", "0.70415586", "0.7029396", "0.70261157", "0.70154434", "0.70117015", "0.7008325", "0.69824654", "0.6975143", "0.6971...
0.7579751
0
Return a list of following ids
Верните список следующих идентификаторов
function get_following_ids() { $user = $this->ion_auth->get_user(); $query_string = "SELECT follow_id FROM friend_relationships WHERE user_id = ?"; $query = $this->db->query($query_string, array($user->id)); $return_array = array(); foreach ($query->result() as $row) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFriendIds(){\r\n\t\treturn $this->callGraph(array(\r\n\t\t\t'method' => 'friends_get'\r\n\t\t), 'get_friend_ids');\r\n\t}", "public function getIds();", "public function getIds();", "public static function getFollowers(){\n\n\t}", "function getFollowers($referral_id) {\n\t\t$ids = array(...
[ "0.6520569", "0.6453496", "0.6453496", "0.6437493", "0.6435678", "0.6422029", "0.6407428", "0.6396566", "0.63455576", "0.6301402", "0.6250551", "0.6218643", "0.6168384", "0.61681014", "0.6140026", "0.6140026", "0.6140026", "0.6140026", "0.6140026", "0.6140026", "0.6140026", ...
0.7953499
0
Returns (id, name) pairs of the user's followers
Возвращает пары (id, name) подписчиков пользователя
function get_followers_tuples() { $query_string = "SELECT user_meta.user_id, user_meta.first_name, user_meta.last_name FROM friend_relationships LEFT JOIN user_meta ON friend_relationships.user_id = user_meta.user_id WHERE friend_relationships.follow_id = ? ORDER BY user_meta.last_na...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFollowers()\n {\n return $this->followers;\n }", "public static function getFollowers(){\n\n\t}", "public function get_followers() {\n $profile_data = $this->_api_call('https://api.twitter.com/1.1/followers/ids.json',\n array(\n 'screen_name' => ...
[ "0.7512314", "0.7413577", "0.7399826", "0.7359591", "0.734782", "0.7306128", "0.7038528", "0.7018179", "0.69570935", "0.6906095", "0.6905372", "0.6870119", "0.6862911", "0.6859228", "0.68294245", "0.6807582", "0.68029535", "0.6776826", "0.67392325", "0.6646518", "0.6552094", ...
0.78299755
0
Returns true if $user_id is following $follow_id
Возвращает true, если $user_id следует за $follow_id
function is_following($user_id, $follow_id) { $query_string = "SELECT * FROM friend_relationships WHERE user_id = ? AND follow_id = ?"; $query = $this->db->query($query_string, array($user_id, $follow_id)); return $query->num_rows() > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function following ($user, $following_id)\n\t{\n\t\t$Statement = $this->Database->prepare(\"SELECT id FROM following WHERE user = ? AND follower = ?\");\n\t\t$Statement->execute(array($user, $following_id));\n\t\t$count = $Statement->rowCount();\n\t\t\n\t\treturn ($count == 0) ? false : true;\n\t}", "publ...
[ "0.8252435", "0.76927197", "0.76870704", "0.7683409", "0.7633529", "0.76317084", "0.75992554", "0.75115913", "0.7471813", "0.74486005", "0.74206823", "0.7406082", "0.73923934", "0.72948974", "0.7276393", "0.72267216", "0.72186744", "0.71536124", "0.7044296", "0.70042056", "0....
0.852299
0
Adds the specified user to the user's following list
Добавляет указанного пользователя в список подписчиков пользователя
function add_user_following($following_id, $skip_notif_check = false) { if (!$skip_notif_check) { // See if the user has any follow notifications $query_string = "SELECT id FROM notifications WHERE user_id = ? AND type= ? AND subject_id = ?"; $query = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function follows($username)\n {\n $user = User::where('username', $username)->firstOrFail();\n $id = Auth::id();\n $me = User::find($id);\n $me->following()->attach($user->id);\n\n return redirect('/home')->with('success','Vous suivez cette personne');\n\n }", "pub...
[ "0.71551406", "0.70676553", "0.70483565", "0.70377856", "0.70272535", "0.6984178", "0.6977023", "0.6868565", "0.6687366", "0.66715914", "0.6636758", "0.6610229", "0.6609198", "0.6580541", "0.65427923", "0.6531134", "0.6512568", "0.64609504", "0.64530605", "0.64059234", "0.638...
0.71044344
1
Retrieve the base dashboard URL based on api mode
Получить базовый URL дашборда в зависимости от режима API
public function get_dashboard_url( $api_mode = 'live' ) { return 'live' === $api_mode ? self::LIVE_DASHBOARD_URL : self::SANDBOX_DASHBOARD_URL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getBaseApiUrl()\n {\n if (Configuration::get(self::TEST_MODE)) {\n return self::TEST_API;\n }\n\n return self::API;\n }", "protected function getUrl(){\n\t\treturn $this->apiUrl . $this->apiVersion . '/';\n\t}", "public function getApiUrl()\n {\n ...
[ "0.76477563", "0.7249697", "0.7078886", "0.701707", "0.70054823", "0.7003599", "0.6961316", "0.6913853", "0.6904048", "0.6891019", "0.6881748", "0.6851575", "0.6847598", "0.67896014", "0.67649275", "0.6732799", "0.67193854", "0.67171633", "0.6705701", "0.6692665", "0.66745514...
0.8009462
0
Checks if ref transactions are enabled Saves the the related option and outputs error / success messages
Проверяет, включены ли транзакции ref, сохраняет связанный параметр и выводит сообщения об ошибке / успехе
public function check_reference_transactions() { $req = new LLMS_PayPal_Request( $this ); $r = $req->check_reference_transactions(); // errorrrrrrr if ( is_wp_error( $r ) ) { // this is the not enabled message, we'll make the message a little more instructive for our purposes if ( 11452 == $r->get_erro...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function transaction_approved() {\n\n\t\t$errors = $this->get_errors()->get_error_codes();\n\n\t\treturn empty( $errors );\n\t}", "function checkReference() {\n\t\t$arrRecord = BackendUtility::getRecord($this->arrWizardParameters['table'], $this->arrWizardParameters['uid']);\n\t\tif (!is_array($arrRecord)...
[ "0.56415284", "0.5548177", "0.5543092", "0.5454081", "0.5451973", "0.5443364", "0.53932005", "0.534904", "0.5287254", "0.5241202", "0.5239116", "0.51927644", "0.5154458", "0.51494837", "0.51363873", "0.5101497", "0.50978976", "0.50941914", "0.5089722", "0.50894684", "0.508691...
0.74470264
0
function gentitle($fields = array('track', 'artist', 'title', 'album'), $maxlength = 256)
function gentitle($fields = array('track', 'artist', 'title', 'album'), $maxlength = 256)
function gentitle($fields = array('artist', 'title'), $maxlength = 256) { $title = ''; foreach ($fields as $name) if (isset($this->origrow[$name]) && !empty($this->origrow[$name])) checkcharadd($title, ' - ', $this->origrow[$name]); if (kp_strlen($title) == 0) { if (UTF8MODE) $title = $this->free; else $tit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTitle() ;", "function getTitle();", "function getTitle();", "public function getTitle(){\n\n $title = $this->getField('title', '');\n if(empty($title)){ return $title; }//if\n\n if($title_prefix = $this->getTitlePrefix()){\n $title = $title_prefix.$this->getTitleSep().$title;\n }...
[ "0.69448256", "0.6839479", "0.6839479", "0.66653", "0.66551167", "0.66463625", "0.66463625", "0.6532648", "0.64759946", "0.6468505", "0.6388718", "0.6388718", "0.6388718", "0.6388718", "0.6388718", "0.6388718", "0.6388718", "0.6388718", "0.6388718", "0.6388718", "0.6388718", ...
0.87581706
0
Flags a given attribute as "modified"
Маркирует заданный атрибут как "измененный"
protected function _flagAttributeAsModified($attribute) { if (!in_array($attribute, $this->_modifiedAttributes)) { $this->_modifiedAttributes[] = $attribute; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isModified();", "public function setModified($value) {}", "public function hasDirtyValueOfAttribute($attributeName);", "public function getDirtyValueOfAttribute($attributeName);", "public function setModified($modified);", "function modified() { $this->_modified=1; }", "func...
[ "0.6685442", "0.66057724", "0.65568936", "0.64980006", "0.6423037", "0.63908786", "0.63908786", "0.63827044", "0.63827044", "0.6357004", "0.63083595", "0.6300135", "0.6297195", "0.6219741", "0.60905796", "0.6072216", "0.6067799", "0.6065903", "0.6064779", "0.6018311", "0.5979...
0.7971981
0
Resets the modified attributes list
Сбрасывает список измененных атрибутов
protected function _resetModifiedAttributesFlags() { $this->_modifiedAttributes = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearAttributes ()\n {\n\n $this->attributes = null;\n $this->attributes = array();\n\n }", "public function removeAllAttributes()\n {\n $this->attr = [];\n }", "public function resetAttributeEdit()\n {\n $this->attributeCreateGroupId = null;\n ...
[ "0.79025674", "0.76750225", "0.7405196", "0.7291436", "0.71927214", "0.6887458", "0.6811087", "0.67563397", "0.6744596", "0.66296923", "0.65871406", "0.6578222", "0.65335023", "0.6513248", "0.6513248", "0.64940643", "0.6458239", "0.64396495", "0.64375824", "0.6404755", "0.638...
0.78329045
1
Output the body content
Выведите содержимое тела
public function outputBody() { if (is_object($this->_body)) { $this->_body->outputBody(); } elseif (!is_null($this->_body)) { echo $this->_body; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function outputBody()\n {\n $body = implode('', $this->_body);\n echo $body;\n }", "function body()\n {\n print($this->_body);\n }", "public function sendBody()\n {\n echo $this->body;\n }", "public function sendBody()\n {\n echo $this->body;\n ...
[ "0.8047646", "0.75777215", "0.74418557", "0.74418557", "0.7425451", "0.72557694", "0.7028477", "0.6979708", "0.6944952", "0.692994", "0.69278955", "0.69205374", "0.687732", "0.6847348", "0.6827271", "0.68124795", "0.68124795", "0.68124795", "0.68124795", "0.68124795", "0.6812...
0.7718565
1
Removes a lock from a uri
Удаляет блокировку с uri
public function unlock($uri,Sabre_DAV_Lock $lockInfo) { $locks = $this->getLocks($uri); foreach($locks as $k=>$lock) { if ($lock->token == $lockInfo->token) { unset($locks[$k]); $this->putData($uri,$locks); return true; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unlock($uri, Sabre_DAV_Locks_LockInfo $lockInfo)\n {\n $query = 'DELETE FROM '. $this->DB->Tbl['core_lock'].' WHERE `uri`=\"'.$this->DB->esc($uri).'\" AND `token`=\"'.$this->DB->esc($lockInfo->token).'\"';\n return $this->DB->query($query);\n }", "public function unlockNode($u...
[ "0.76058406", "0.6752534", "0.6252045", "0.6119464", "0.60196644", "0.59858567", "0.5958504", "0.59371376", "0.5885111", "0.58679354", "0.58032817", "0.5743974", "0.57124364", "0.56915057", "0.564059", "0.5578543", "0.5541805", "0.5528196", "0.5522667", "0.5516588", "0.551328...
0.7184814
1
Update process start date
Дата начала процесса обновления
public function updateProcessStartDate(Mage_Index_Model_Process $process) { $this->_updateProcessData($process->getId(), array('started_at' => $this->formatDate(time()))); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function set_process_start_time()\n {\n $timer = &self::$timer;\n $session_start = $timer->__set('process_start');\n }", "public function setStartTime() {\n\t\t$this->pg_start = $this->getStartTime();\n\t}", "public function setStartDate(DrupalDateTime $start_date);", "publi...
[ "0.7212934", "0.66738796", "0.6364019", "0.63559693", "0.6287032", "0.6216926", "0.62125766", "0.61944515", "0.6116247", "0.60046834", "0.597994", "0.5973974", "0.5947208", "0.5945079", "0.5938579", "0.5918895", "0.58781487", "0.585941", "0.58460855", "0.5844372", "0.5832904"...
0.74020517
0
Update process end date
Дата окончания процесса обновления
public function updateProcessEndDate(Mage_Index_Model_Process $process) { $this->_updateProcessData($process->getId(), array('ended_at' => $this->formatDate(time()))); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function set_process_end_time()\n {\n $timer = &self::$timer;\n $session_start = $timer->__set('process_end');\n }", "public function setEndDate(DrupalDateTime $end_date = NULL);", "private function _retrieveEndDate()\n {\n global $preferences;\n\n $bdate = ne...
[ "0.71587944", "0.6229902", "0.6139484", "0.60937876", "0.59951943", "0.592441", "0.58868617", "0.5871348", "0.5833622", "0.58224094", "0.58084637", "0.57800716", "0.57786524", "0.57786524", "0.57786524", "0.57786524", "0.57786524", "0.5741729", "0.572197", "0.56900316", "0.56...
0.7427864
0
Return the relevant Item Form
Вернуть соответствующую форму элемента
public function getItemForm() { if (!$this->itemForm) { $this->setItemForm($this->getServiceLocator()->get('bidsite_item_form')); } return $this->itemForm; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ItemEditForm() {\n $form = parent::ItemEditForm();\n\n return $form;\n }", "abstract protected function getForm();", "abstract function getForm();", "public function formItem(): HtmlString\n {\n return $this->formItem;\n }", "public function getForm();", "pu...
[ "0.75439715", "0.7103228", "0.70711243", "0.6860628", "0.685973", "0.67569196", "0.6752941", "0.6701231", "0.6662458", "0.65849066", "0.65713036", "0.6565857", "0.65381503", "0.6526594", "0.65157014", "0.65049094", "0.6503188", "0.6483938", "0.6481013", "0.6459659", "0.643986...
0.8252204
0
Return the Item Service object
Верните объект службы элементов
public function getItemService() { if (!$this->itemService) { $this->itemService = $this->getServiceLocator()->get('bidsite_item_service'); } return $this->itemService; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getServiceItemUser()\n {\n return $this->container->get('app_service_item_user');\n }", "public function setItemService(ItemServiceInterface $itemService);", "protected function service()\n {\n return new Service();\n }", "public function service()\r\n {\r\n ...
[ "0.64308274", "0.6388553", "0.6341491", "0.61460257", "0.61456394", "0.60991764", "0.60974145", "0.60668117", "0.6059701", "0.6018941", "0.60124624", "0.5959067", "0.5929394", "0.59278655", "0.5923238", "0.58958155", "0.5887821", "0.5882942", "0.5882942", "0.5876567", "0.5848...
0.78584695
0
define values for dbAttributes
определяет значения для dbAttributes
protected function defineAttributes() { $this->dbAttributes = (object) [ 'safe' => [ 'fk_documento', 'fk_funcionario', 'accion', 'fecha', 'descripcion', 'titulo' ], 'date' => [...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'nombre',\n 'estado',\n 'pais_idpais'\n ],\n 'date' => []\n ];\n }", "protected function attributes() {\n $attributes =...
[ "0.80595183", "0.6664265", "0.6643426", "0.6621024", "0.6569033", "0.65622663", "0.6533415", "0.64563596", "0.64434624", "0.6419734", "0.6399909", "0.6338836", "0.63040006", "0.62830603", "0.62428916", "0.62068874", "0.6199552", "0.6188577", "0.6169053", "0.6154525", "0.61502...
0.8044928
1
Creates a new DetailsProduits entity.
Создает новую сущность DetailsProduits.
public function createAction(Request $request) { $entity = new DetailsProduits(); $form = $this->createCreateForm($entity); $form->handleRequest($request); if ($form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($entity); $em->f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newAction() {\n $entity = new DetailsProduits();\n $form = $this->createCreateForm($entity);\n\n return $this->render('VentesBundle:DetailsProduits:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\...
[ "0.6860291", "0.6462632", "0.62618256", "0.6201091", "0.6168951", "0.61385834", "0.6089008", "0.6065729", "0.6021026", "0.59870154", "0.5889205", "0.5884253", "0.5850964", "0.5823482", "0.58056545", "0.57672477", "0.57631546", "0.5761634", "0.57284766", "0.5716729", "0.571624...
0.7235298
0
Creates a form to create a DetailsProduits entity.
Создает форму для создания сущности DetailsProduits.
private function createCreateForm(DetailsProduits $entity) { $form = $this->createForm(new DetailsProduitsType(), $entity, array( 'action' => $this->generateUrl('detailsproduits_create'), 'method' => 'POST', )); $form->add('submit', 'submit', array('label' => 'Create'));...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newAction() {\n $entity = new DetailsProduits();\n $form = $this->createCreateForm($entity);\n\n return $this->render('VentesBundle:DetailsProduits:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\...
[ "0.78074604", "0.72018325", "0.70548236", "0.6685023", "0.6571212", "0.65353", "0.65105134", "0.6508671", "0.6503747", "0.6457206", "0.642471", "0.6419901", "0.64191014", "0.63839334", "0.6375048", "0.63725716", "0.63513875", "0.6348145", "0.6342444", "0.63308996", "0.6318764...
0.7794595
1
Displays a form to create a new DetailsProduits entity.
Показывает форму для создания новой сущности DetailsProduits.
public function newAction() { $entity = new DetailsProduits(); $form = $this->createCreateForm($entity); return $this->render('VentesBundle:DetailsProduits:new.html.twig', array( 'entity' => $entity, 'form' => $form->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return view('produits.create');\n }", "public function createAction(Request $request) {\n $entity = new DetailsProduits();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n ...
[ "0.750907", "0.74524176", "0.73575324", "0.7331594", "0.71372026", "0.7097961", "0.69950473", "0.6986663", "0.6971554", "0.69607675", "0.6920918", "0.69076985", "0.69055784", "0.68955594", "0.6894034", "0.68733805", "0.68380994", "0.6836559", "0.68333626", "0.6825817", "0.681...
0.85397315
0
Finds and displays a DetailsProduits entity.
Находит и отображает сущность DetailsProduits.
public function showAction($id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('VentesBundle:DetailsProduits')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find DetailsProduits entity.'); } $deleteForm = $thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('VentesBundle:DetailsProduits')->findAll();\n\n return $this->render('VentesBundle:DetailsProduits:index.html.twig', array(\n 'entities' => $entities,\n ));\...
[ "0.677204", "0.646445", "0.6424263", "0.6365759", "0.63382035", "0.6214141", "0.618927", "0.6166755", "0.6166755", "0.61363053", "0.5985111", "0.5925382", "0.59102786", "0.58830863", "0.5804206", "0.57900876", "0.5788045", "0.57573575", "0.5734165", "0.57141864", "0.5683716",...
0.7194515
0
Displays a form to edit an existing DetailsProduits entity.
Показывает форму для редактирования существующей сущности DetailsProduits.
public function editAction($id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('VentesBundle:DetailsProduits')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find DetailsProduits entity.'); } $editForm = $this-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Pro $pro)\n {\n //\n }", "public function edit(Produits $produit)\n {\n //\n }", "public function editAction()\n {\n $profileRepoFactory = new Application_Factory_ProfileRepository();\n $profileModelFactory = new Application_Factory_ProfileModel(...
[ "0.7172769", "0.7172075", "0.70176107", "0.70129806", "0.6977968", "0.695726", "0.69397056", "0.6936969", "0.69348955", "0.69044054", "0.6864959", "0.6860662", "0.68569404", "0.68336576", "0.68306756", "0.6822892", "0.6815015", "0.6806474", "0.6788967", "0.6788967", "0.678537...
0.7849994
0
Creates a form to edit a DetailsProduits entity.
Создает форму для редактирования сущности DetailsProduits.
private function createEditForm(DetailsProduits $entity) { $form = $this->createForm(new DetailsProduitsType(), $entity, array( 'action' => $this->generateUrl('detailsproduits_update', array('id' => $entity->getId())), 'method' => 'PUT', )); $form->add('submit', 'submit'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('VentesBundle:DetailsProduits')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find DetailsProduits entity.');\n }\n\n $edi...
[ "0.71059537", "0.70698315", "0.6559527", "0.65343386", "0.65222174", "0.6457591", "0.64161587", "0.63277036", "0.61713386", "0.616286", "0.6160672", "0.61339766", "0.6120312", "0.6120312", "0.61191314", "0.61178064", "0.61048794", "0.6104216", "0.609378", "0.6064793", "0.6057...
0.76990616
0
Creates a form to delete a DetailsProduits entity by id.
Создает форму для удаления сущности DetailsProduits по идентификатору.
private function createDeleteForm($id) { return $this->createFormBuilder() ->setAction($this->generateUrl('detailsproduits_delete', array('id' => $id))) ->setMethod('DELETE') ->add('submit', 'submit', array('label' => 'Delete')) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteAction(Request $request, $id) {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('VentesBundle:DetailsProduits')->find($id...
[ "0.6965544", "0.68320477", "0.679936", "0.679772", "0.6795846", "0.6701925", "0.6698355", "0.6623962", "0.6615949", "0.6608332", "0.6606354", "0.6590059", "0.65885913", "0.6569089", "0.6538704", "0.65312046", "0.65305346", "0.6515364", "0.65073156", "0.6492713", "0.64878374",...
0.7189541
0
Select modules for developer module
Выбор модулей для разработческого модуля
public function selectDev() { $sql = "Select id, module_name, is_system From #modules Order By module_name"; return $this->_select($sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getModules(){\n global $adb;\n $query=\"select vtiger_tab.tabid,vtiger_tab.tablabel as modulename,linklabel from vtiger_tab left join vtiger_links on vtiger_tab.tabid=vtiger_links.tabid and linklabel='WYSIWYG'\nwhere isentitytype=1 and tablabel!='Comments'\";\n $result=$adb->pquery($query,array()...
[ "0.6118563", "0.6000982", "0.59847176", "0.59847176", "0.5968279", "0.594434", "0.5881021", "0.58641636", "0.58303684", "0.58131754", "0.580156", "0.5792314", "0.5791391", "0.5782766", "0.5767118", "0.5767032", "0.5761004", "0.5753069", "0.5747581", "0.57423514", "0.57402974"...
0.7040557
0
Get Lead Id From Request
Получить Id Lead из запроса
public function getLeadIdFromRequest() { return isset($_POST['id']) ? $_POST['id'] : $_GET['id']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLeadId() {\n\t\treturn $this->container['lead_id'];\n\t}", "public function getLeadFromRequest()\n {\n $leadId = $this->getLeadIdFromRequest();\n $lead = $this->getLeadFromId($leadId);\n $this->validateLead($lead);\n return $lead;\n }", "public function getR...
[ "0.6965713", "0.6811791", "0.6617793", "0.6600065", "0.63967025", "0.60650766", "0.58900446", "0.58432376", "0.56987137", "0.567532", "0.567532", "0.5616702", "0.55819887", "0.5571759", "0.55707765", "0.5545808", "0.55408984", "0.5534353", "0.5525736", "0.5521802", "0.5514083...
0.82449645
0
Get Lead From Id
Получить ведущий по идентификатору
public function getLeadFromId($id) { $lead = Backend_Lead::load($id); return $lead; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getLead()\n {\n $lead_id = isset($_POST['id']) ? $_POST['id'] : $_GET['id'];\n\n // Make Sure Lead Exists With Provided ID\n try {\n $lead = $this->db->fetch(sprintf(\"SELECT * FROM `%s` WHERE `id` = :id;\", LM_TABLE_LEADS), ['id' => $lead_id]);\n } catc...
[ "0.6980691", "0.67505574", "0.652713", "0.65154016", "0.6421482", "0.63758624", "0.6284701", "0.61988926", "0.6066129", "0.5915443", "0.58759785", "0.5872092", "0.5839834", "0.58281124", "0.5790989", "0.57680917", "0.5756042", "0.57077736", "0.56847864", "0.5629814", "0.56199...
0.71532434
0
/ group search results together by entry
Сгруппируйте результаты поиска по группам
function ydgdict_group_search_results_by_entry( $groupby, $wp_query ) { if ( ! $wp_query->is_archive( 'entry' ) || ! $wp_query->is_search() || is_admin() ) return $groupby; // unchanged global $wpdb; return " {$wpdb->posts}.ID "; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function ldap_get_entries($conn, $searchresult) {\n $i = 0;\n $fresult=array();\n $entry = ldap_first_entry($conn, $searchresult);\n do {\n $attributes = @ldap_get_attributes($conn, $entry);\n for ($j = 0; $j<$attributes['count']; $j++) {\n $...
[ "0.5950012", "0.5807793", "0.5725802", "0.5587264", "0.55735886", "0.54865396", "0.5469502", "0.5465949", "0.5438225", "0.5422617", "0.5413552", "0.5400932", "0.5398069", "0.5398069", "0.53966564", "0.53524894", "0.5342478", "0.5335816", "0.5332782", "0.5273443", "0.5270403",...
0.7159891
0
FREE USE FUNCTION CALL THIS FUNCTOIN FROM WHEREVER YOUD LIKE TO DISPLAY THE GLOSSARY THIS FUNCTION ASSUMES THE WP_Query EXISTS AND CONTAINS POSTS OF TYPE 'entry' THIS FUNTION IS CALLED BY THE SHORTCODE ydgdict_short_display_ful_glossary
ФУНКЦИЯ ДЛЯ СВОБОДНОГО ИСПОЛЬЗОВАНИЯ ЗАПУСКАЙТЕ ЭТУ ФУНКЦИЮ ТОГДА, КОГДА ХОТИТЕ ПОКАЗАТЬ СЛОВАРЬ ЭТА ФУНКЦИЯ ПРЕДПОЛАГАЕТ, ЧТО WP_Query СУЩЕСТВУЕТ И СОДЕРЖИТ ПОСТЫ ТИПА 'entry' ЭТА ФУНКЦИЯ ИСПОЛЬЗУЕТСЯ СОКРОШКОДом ydgdict_short_display_ful_glossary
function ydgdict_display_full_glossary() { global $wp_query; // error_log( print_r( $wp_query->request, true ) ); ob_start(); ?> <div id="ydgdict_glossary_container"> <?php include( YDGDICT_PLUGIN_DIR . 'public/ydgdict_x_glossary_part_the_search.php' ); ?> <ul id="ydgdict_gloss...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ydgdict_glossary_get_more_entries()\n{\n if ( !check_ajax_referer( 'glossary_nonce' ) ) die();\n \n $my_post = stripslashes_deep( $_POST );\n\n // error_log( '$_POST: ' . print_r( $my_post, true ) );\n\n $args = array(\n 'post_type' => 'entry',\n 'posts_per_page' => YDGDICT_E...
[ "0.7257672", "0.627621", "0.5902562", "0.5829995", "0.5807791", "0.575248", "0.56484157", "0.5628971", "0.5612794", "0.5603176", "0.5560842", "0.55604", "0.5553037", "0.55470765", "0.5543933", "0.5541306", "0.5526241", "0.5514713", "0.55122596", "0.5499764", "0.5479572", "0...
0.77115035
0
returns the openstreetmap ytile number, given the latitude, longitude, and zoom
возвращает номер плитки OpenStreetMap по y, заданный широтой, долготой и уровнем масштабирования
function getYTile( $lat, $lon, $zoom ) { return floor((1 - log(tan(deg2rad($lat)) + 1 / cos(deg2rad($lat))) / pi()) /2 * pow(2, $zoom)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function latToYTile(float $lat, int $zoom, int $tileSize): array\n {\n $y = (1 - \\log(\\tan(\\deg2rad($lat)) + 1 / \\cos(\\deg2rad($lat))) / M_PI) / 2 * \\pow(2, $zoom);\n $tile = \\floor($y);\n return [\n 'id' => $tile,\n 'position' => \\round($tileSize...
[ "0.62273586", "0.5886846", "0.58298", "0.5679697", "0.5677007", "0.5409347", "0.53888553", "0.528754", "0.5266421", "0.52224106", "0.50744563", "0.50530857", "0.49842575", "0.49831715", "0.494641", "0.49109796", "0.4881639", "0.4881639", "0.47848105", "0.4782919", "0.47238988...
0.79070693
0
if the image for $xtile, $ytile, $zoom is cached, returns the filename of the cached image. if it is not cached, fetches and caches the given image from opencyclemap.
если изображение для $xtile, $ytile, $zoom кэшировано, возвращает имя файла кэшированного изображения. если его нет в кэше, извлекает и кэширует заданное изображение из opencyclemap.
function getCachedFname( $xtile, $ytile, $zoom ) { $remoteImageFilename = "http://a.tile.opencyclemap.org/cycle/$zoom/$xtile/$ytile.png"; // strip away everything except for /14/4944/6053 $localImageFilename = preg_replace( "/(http:\/\/)(.*?)(cycle\/)(.*?)(.png)/","\\4", $remoteImageFilename); // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cacheThisImage($img)\n{\n\trequire_once 'externalLibraries/ImageCache.php';\n\t$baseurl=base_url();\n\t$imagecache = new ImageCache();\n\t//$imagecache->cached_image_directory = $baseurl. 'entreprenity/api/cachedImages/';\n\t$imagecache->cached_image_directory = dirname(__FILE__) . '/cachedImages';\n\n\t$...
[ "0.5914269", "0.5787185", "0.5720912", "0.5696491", "0.568091", "0.5672404", "0.5618683", "0.55316395", "0.5517485", "0.5446826", "0.5433786", "0.5382373", "0.53811157", "0.5380667", "0.535775", "0.5352679", "0.52911496", "0.5276643", "0.5264368", "0.52356756", "0.52353466", ...
0.844592
0
Removes the Vip discount option from the vehicle stored in the session
Удаляет опцию скидки Vip для автомобиля, хранящегося в сессии
public function removeVipDiscountAction(Request $request){ $session = $request->getSession(); $vipDiscount = $this->get('VipDiscount'); $vehicle = $session->get('automobileSession'); $vehicle->removeDiscountOption($vipDiscount); $session->set("automobileSession", $vehicle); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteDiscount();", "function unset_discount($discount_id = FALSE)\n\t\t{\n\t\t\t// The 'unset_discount()' function can accept an array of either discount ids or codes to delete more than one discount at a time.\n\t\t\t// Alternatively, if no data is submitted, the function will delete all discou...
[ "0.61360985", "0.5975176", "0.5666782", "0.56661123", "0.56146574", "0.5528228", "0.55224097", "0.5517038", "0.5512063", "0.54584366", "0.5427635", "0.5418517", "0.5409211", "0.53677684", "0.536745", "0.5347078", "0.53456646", "0.53454244", "0.5310458", "0.53035057", "0.52978...
0.76317817
0
Return list of category ids that already in events
Вернуть список идентификаторов категорий, которые уже есть в событиях
public function getInEventCategoryIds() { if ($this->_inEventCategoryIds === null) { /** @var Collection $collection */ $collection = $this->_eventCollectionFactory->create(); $this->_inEventCategoryIds = $collection->getColumnValues('category_id'); } retu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_all_category_ids()\n {\n }", "function attendance_existing_calendar_events_ids($sessionsids) {\n global $DB;\n $caleventsids = array_keys($DB->get_records_list('attendance_sessions', 'id', $sessionsids, '', 'DISTINCT caleventid'));\n $existingcaleventsids = array_filter($caleventsids)...
[ "0.6342918", "0.62144214", "0.60379463", "0.6015885", "0.60063016", "0.59764856", "0.5942445", "0.573158", "0.5679573", "0.5625733", "0.5600519", "0.5572702", "0.5536306", "0.55006623", "0.5381297", "0.531335", "0.5312677", "0.5303776", "0.5280244", "0.52437145", "0.5229432",...
0.79768336
0
Private helper function to quick add Relation to a Stack
Приватная вспомогательная функция для быстрого добавления отношения в стек
private function addRelation(Stack $stack, $from, $relation, $to) { $stack->push('MATCH (a:test {roId: "'.$from.'"}) MATCH (b:test {roId: "'.$to.'"}) MERGE (a)-[:'.$relation.']->(b)', [ 'from' => $from, 'to' => $to, 'relation' => $relation ]); return $stac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addRelation(RelationInterface $relation);", "private function addRelations($stack, $payload)\n {\n foreach ($payload as $relation) {\n $stack = $this->addRelation($stack, $relation[0], $relation[1], $relation[2]);\n }\n return $stack;\n }", "protected funct...
[ "0.651526", "0.63047105", "0.59279716", "0.58235353", "0.5744235", "0.5565067", "0.55116266", "0.54817843", "0.54483396", "0.5444816", "0.5443518", "0.543603", "0.54026735", "0.5399151", "0.5380282", "0.53460836", "0.53448194", "0.53448194", "0.53280187", "0.5313836", "0.5296...
0.7168029
0
Render whatever the data is as a link to the record. Data should be made XSS safe prior to calling this function.
Отобразите данные в виде ссылки на запись. Данные должны быть сделаны безопасными против XSS перед вызовом этой функции.
function render_link($data, $values) { if (!empty($this->options['link_to_record'])) { $fieldval = NULL; if (isset($this->definition['id field']) && isset($this->view->field[$this->definition['id field']])) { $deffieldname = $this->view->field[$this->definition['id field']]->field_alias; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render_link($data, $values) {\n if (!empty($this->options['link_to_file']) && $data !== NULL && $data !== '') {\n return l($data, file_create_url($values->filepath), array('html' => TRUE));\n }\n return $data;\n }", "function render_link($data, $values) {\n if (!empty($this->options['l...
[ "0.68146795", "0.67842335", "0.65981525", "0.6485227", "0.6327109", "0.6269234", "0.62288076", "0.6221099", "0.6119045", "0.60890317", "0.6066356", "0.6034347", "0.6024838", "0.6019336", "0.5937965", "0.59007347", "0.5899479", "0.5899479", "0.58972627", "0.58671427", "0.58574...
0.7419447
0