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
load header and asean countries's records from base file
загрузить заголовок и записи стран АСЕАН из файла базы данных
public function loadBaseFileData() { if (!empty($this->getBaseFileHeader()) && !empty($this->getBaseFileRecords())) { return; } //load the CSV document from a file path $baseFileCsv = Reader::createFromPath(self::BASE_FILE_PATH, 'r'); $baseFileCsv->setHeaderOffset(0);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function loadDataFile() \n {\n if (self::$cities) {\n return;\n }\n \n self::$cities = json_decode(file_get_contents(self::dataFile()), true);\n }", "function loadHeader($fields)\r\n\t\t{\r\n\t\t\t//open up the file real quick to read in the header\r\...
[ "0.6005112", "0.5822189", "0.57960606", "0.56993574", "0.5646772", "0.56083655", "0.55717367", "0.54975307", "0.54504037", "0.543681", "0.543654", "0.5427255", "0.54230464", "0.5411629", "0.53942746", "0.5364858", "0.5363583", "0.534849", "0.52919334", "0.5287727", "0.5282722...
0.744196
0
load records from target file
загрузить записи из целевого файла
public function loadTargetFileData() { if (!empty($this->getTargetFileRecords())) { return; } //load the CSV document from a file path $csv = Reader::createFromPath(self::TARGET_FILE_PATH, 'r'); $csv->setHeaderOffset(0); $stmt = new Statement(); $this...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load()\n {\n $data_array = file_to_array($this->file_name);\n $this->data = $data_array ? $data_array : [];\n }", "public function loadBaseFileData() {\n if (!empty($this->getBaseFileHeader()) && !empty($this->getBaseFileRecords())) {\n return;\n }\n ...
[ "0.6282936", "0.62676305", "0.61887974", "0.60197175", "0.5954651", "0.59305906", "0.590024", "0.590024", "0.590024", "0.590024", "0.590024", "0.5835119", "0.5835119", "0.5835119", "0.5835119", "0.5814611", "0.5793656", "0.57739854", "0.5771705", "0.57693535", "0.57481027", ...
0.77607274
0
Retrieves the list of persistent disk snapshot resources contained within the specified project. (snapshots.listSnapshots)
Получает список ресурсов постоянных дисков снимков, содержащихся в указанном проекте. (snapshots.listSnapshots)
public function listSnapshots($project, $optParams = array()) { $params = array('project' => $project); $params = array_merge($params, $optParams); return $this->call('list', array($params), 'Google\Service\Compute\SnapshotList'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSnapshots($volume = null) {\n global $ec2;\n\n $filter = array();\n $filter[] = array('Name' => 'description', 'Value' => DESCRIPTION_PREFIX . '*');\n\n if (!empty($volume)) {\n $filter[] = array('Name' => 'volume-id', 'Value' => $volume->volumeId);\n }\n\n $result = $ec2->describe_snapshots(a...
[ "0.63610065", "0.6321348", "0.5857713", "0.5721214", "0.5539988", "0.53201675", "0.52332383", "0.5200244", "0.51275605", "0.49979687", "0.49886438", "0.49808833", "0.4933609", "0.49149442", "0.48305592", "0.4812861", "0.47990027", "0.47971985", "0.47764215", "0.4770205", "0.4...
0.8438881
0
Retrieve current store id
Получить текущий идентификатор магазина
public function getCurrentStoreId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getCurrentStoreId()\r\n {\r\n return Mage::app()->getStore()->getId();\r\n }", "public function getStoreId();", "public function getStoreId();", "public function getStoreId();", "public function getStore_Id()\n {\n return $this->getData(self::STORE_ID);\n }", ...
[ "0.87997204", "0.8771263", "0.8771263", "0.8771263", "0.8730069", "0.8726752", "0.8708097", "0.86978996", "0.86531276", "0.85821044", "0.85821044", "0.85821044", "0.85821044", "0.85821044", "0.85236275", "0.85236275", "0.8500344", "0.8463443", "0.84581053", "0.8425065", "0.84...
0.9178863
0
Get a random GIF
Получить случайный GIF
public function random() { $url = 'http://api.giphy.com/v1/gifs/random?api_key=' . urlencode($this->api_key); $response = $this->sendRequest($url); return new Gif($response->data->image_url); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function randomGif()\n{\n $url = 'http://api.giphy.com/v1/gifs/random?api_key=' . urlencode(GIPHY_API_KEY);\n $response = makeRequest($url);\n\n return $response->data->image_url;\n}", "private function getRandomGif(string $dir): string\n {\n if (!\\array_key_exists($dir, $this->gifs) || ...
[ "0.8535389", "0.7491451", "0.6824442", "0.681902", "0.67169064", "0.6700161", "0.6627347", "0.65595835", "0.65510345", "0.64787465", "0.6445229", "0.64342076", "0.6343674", "0.63405985", "0.63100165", "0.61893976", "0.61142796", "0.60785127", "0.60670596", "0.6066348", "0.602...
0.8455441
1
hooks when get_field('image') is fired, check if there is a webp file of that image field and append it to the returning array
срабатывание хуков при вызове get_field('image'), проверить, существует ли файл webp этого поля изображения, и добавить его в возвращаемый массив
function check_webp_in_field( $value, $post_id, $field ) { if(isset($value['url'])){ $webp = array(); $webp['url'] = checkForWebp($value['url']); if($webp['url'] != ''){ $value['webp'] = $webp; foreach($value['sizes'] as $key => $size){ if(is_strin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function webp_upload_mimes($existing_mimes) {\n $existing_mimes['webp'] = 'image/webp';\n return $existing_mimes;\n}", "function webp_upload_mimes($existing_mimes) {\n $existing_mimes['webp'] = 'image/webp';\n return $existing_mimes;\n}", "function rcw_getproduct_image($custom_fields)\r\n{\r\n\t$rc...
[ "0.61691344", "0.61691344", "0.61526424", "0.6107032", "0.5923917", "0.58555", "0.5782459", "0.57566553", "0.5712521", "0.56968486", "0.5693804", "0.5691555", "0.5660896", "0.5630541", "0.5626338", "0.55956376", "0.55899453", "0.5555322", "0.55404913", "0.55335695", "0.551739...
0.72655964
0
/ Sanitize() function removes any potential threat from the data submitted. Prevents email injections or any other hacker attempts. if $remove_nl is true, newline chracters are removed from the input.
Функция Sanitize() удаляет любые потенциальные угрозы из поданных данных. Предотвращает впрыскивание электронной почты или любые другие попытки хакеров. Если $remove_nl истинно, переносы строк извлекаются из ввода.
function Sanitize($str,$remove_nl=true) { $str = $this->StripSlashes($str); if($remove_nl) { $injections = array('/(\n+)/i', '/(\r+)/i', '/(\t+)/i', '/(%0A+)/i', '/(%0D+)/i', '/(%08+)/i', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sanitize_email ( $data )\n{\n return filter_var( $data, FILTER_SANITIZE_EMAIL );\n}", "function _sanitize_text_fields($str, $keep_newlines = false)\n{\n if (is_object($str) || is_array($str)) {\n return '';\n }\n\n $str = (string)$str;\n\n $filtered = _check_invalid_utf8($str);\n\n ...
[ "0.6794247", "0.6654424", "0.6637228", "0.66172343", "0.6609677", "0.6486063", "0.6405715", "0.63935524", "0.63821113", "0.63591087", "0.63568646", "0.6324086", "0.6321996", "0.62748134", "0.6269623", "0.6255445", "0.625284", "0.6248171", "0.6243588", "0.62356937", "0.6233477...
0.7228384
0
Returns the path to the home page. Works on both local and web host.
Возвращает путь к домашней странице. Работает как на локальном, так и на веб-хосте.
function getHomePagePath(){ $path = dirname($_SERVER["REQUEST_URI"]); return "$path"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getHomeURL () {}", "public function getHomeUrl()\n {\n return Mage::helper('d1m_common')->getDefaultWebsiteUrl();\n }", "function homeLink() : string {\n\tstatic $home;\n\tif ( isset( $home ) ) {\n\t\treturn $home;\n\t}\n\t\n\t$home = website() . getRoot();\n\treturn $home;\...
[ "0.8205408", "0.79323685", "0.792047", "0.78915983", "0.7798424", "0.7745004", "0.7722347", "0.77062434", "0.7643458", "0.7535397", "0.75319463", "0.747226", "0.7445284", "0.74419653", "0.7412659", "0.7400842", "0.7392647", "0.7383805", "0.7357384", "0.7311601", "0.7287609", ...
0.850293
0
/ Yii::app()>db>createCommand('DROP TRIGGER tblnegocioprodutobarraaiauad ON tblnegocioprodutobarra')>execute(); Yii::app()>db>createCommand('DROP FUNCTION fntblnegocioprodutobarraaiauad()')>execute(); Yii::app()>db>createCommand('DROP TRIGGER tblnegocioformapagamentoaiauad ON tblnegocioformapagamento')>execute(); Yii::...
Yii::app()>db>createCommand('DROP TRIGGER tblnegocioprodutobarraaiauad ON tblnegocioprodutobarra')>execute(); Yii::app()>db>createCommand('DROP FUNCTION fntblnegocioprodutobarraaiauad()')>execute(); Yii::app()>db>createCommand('DROP TRIGGER tblnegocioformapagamentoaiauad ON tblnegocioformapagamento')>execute(); Yii::ap...
public function down() { Yii::app()->db->createCommand('delete from tblauditoriaexcecao where codauditoriaexcecao in (10, 11, 12, 13)')->execute(); Yii::app()->db->createCommand('DROP TRIGGER tblnegocioaiau_valorprodutos_valoraprazo_valordesconto ON tblnegocio')->execute(); Yii::app()->db->createCommand('DROP...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function safeDown()\n {\n $this->execute('DROP TRIGGER IF EXISTS bi_protocolo_codigo');\n $this->execute('DROP TRIGGER IF EXISTS bu_protocolo_codigo');\n $this->execute('alter table Protocolo drop codigo'); \n }", "public function uninstall() {\n\t\t$this->wire('database')...
[ "0.69736236", "0.6369702", "0.6262452", "0.62603414", "0.6207339", "0.61463857", "0.6072497", "0.6066129", "0.6017069", "0.5981716", "0.5936848", "0.59205294", "0.59103155", "0.5909377", "0.5860988", "0.5857946", "0.5844039", "0.5826303", "0.5825906", "0.58029103", "0.5802495...
0.80432004
0
OneToMany (owning side) Get fkImobiliarioParcelamentoSolos
OneToMany (сторона, владеющая связью) Получить fkImobiliarioParcelamentoSolos
public function getFkImobiliarioParcelamentoSolos() { return $this->fkImobiliarioParcelamentoSolos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prodotti(){\n\t\treturn $this->has_many_through('Prodotto', 'Appartiene', 'IDPizzeria', 'IDProdotto');\n\t}", "public function getFkImobiliarioCondominio()\n {\n return $this->fkImobiliarioCondominio;\n }", "public function getFkImobiliarioLoteamento()\n {\n return $this-...
[ "0.65146506", "0.6475713", "0.6409782", "0.6401709", "0.63792133", "0.6311262", "0.6311262", "0.6297605", "0.6280888", "0.62588084", "0.6210222", "0.6194396", "0.6163479", "0.6163479", "0.6162989", "0.6155951", "0.614924", "0.6149116", "0.60990083", "0.6086532", "0.6075685", ...
0.764664
0
Count the number of occurences of $needle in the $haystack string
Посчитайте количество вхождений $needle в строку $haystack
public static function coutOccurences($haystack, $needle) { return substr_count($haystack, $needle); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function substr_count($haystack,$needle)\n{\n\treturn 0;\n}", "public function needles_in_haystack($haystack, $needles) {\n $count = 0;\n $pos = false;\n\n foreach ($needles as $needle) {\n # Case insensitive match\n $pos = stripos($haystack, $needle);\n #$po...
[ "0.76118034", "0.7162018", "0.71608144", "0.7036443", "0.70224875", "0.7001094", "0.67386013", "0.6735104", "0.6475802", "0.6389287", "0.63808817", "0.6310425", "0.6290571", "0.62539566", "0.62525487", "0.61973256", "0.6148768", "0.6148768", "0.6099766", "0.6073875", "0.59313...
0.8355607
0
Empresa has many Funcionarios.
Empresa имеет много Funcionarios.
public function funcionarios() { // hasMany(RelatedModel, foreignKeyOnRelatedModel = empresa_id, localKey = id) return $this->hasMany(Funcionario::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFuncionario()\n {\n return $this->hasOne(Funcionario::className(), ['id' => 'id_funcionario']);\n }", "public function Funcionario()\n {\n \treturn $this->belongsTo(Funcionario::class, 'id_funcionario');\n }", "public function empresas() {\n\t\treturn $this->hasMany('Ap...
[ "0.7201467", "0.70568407", "0.66950655", "0.65882117", "0.65273607", "0.6502186", "0.6486179", "0.6454457", "0.63997257", "0.63325614", "0.6284589", "0.62607074", "0.625324", "0.6228556", "0.6202118", "0.61895365", "0.6124543", "0.61091065", "0.6102558", "0.6091838", "0.60698...
0.8097612
0
Helper function which checks if pinned projects have changed. If flagPinnedProjects has been called this returns true and if this function is called again before flagPinnedProjects was called again it will return false.
Помощьная функция, которая проверяет, изменились ли закрепленные проекты. Если вызвана функция flagPinnedProjects, то возвращается значение true, а если эта функция вызывается снова до того, как flagPinnedProjects была вызвана снова, то возвращается значение false.
public function pinnedProjectsChanged() { $options = $this->getInvokeArg('bootstrap')->getOptions(); $sess = new Zend_Session_Namespace($options['auth']['user']['namespace']); if (isset($sess->pinnedProjectsChanged)) { return $sess->pinnedProjectsChanged; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function enablePinnedProjectsCache()\n {\n if ($this->pinnedProjectsChanged()) {\n $userGet = new Service_User_Get($this->translator, $this->logger, 0);\n $settings = $userGet->getUserSettings(self::getUserInformation()->getId());\n if (is_null($settings)) {\n ...
[ "0.67915195", "0.67723286", "0.6476417", "0.64575315", "0.5892045", "0.5857776", "0.5794011", "0.5714966", "0.569667", "0.5579134", "0.5539948", "0.534472", "0.53385645", "0.53031397", "0.52850455", "0.52757883", "0.5249425", "0.5221726", "0.5170598", "0.51466405", "0.5112337...
0.7846517
0
Checks if the pinned projects have changed. If yes updates the cache with the new data, if not it just returns the cache.
Проверяет, изменились ли закрепленные проекты. Если да, обновляет кэш новыми данными, если нет, просто возвращает кэш.
private function enablePinnedProjectsCache() { if ($this->pinnedProjectsChanged()) { $userGet = new Service_User_Get($this->translator, $this->logger, 0); $settings = $userGet->getUserSettings(self::getUserInformation()->getId()); if (is_null($settings)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function pinnedProjectsChanged()\n {\n $options = $this->getInvokeArg('bootstrap')->getOptions();\n $sess = new Zend_Session_Namespace($options['auth']['user']['namespace']);\n if (isset($sess->pinnedProjectsChanged)) {\n return $sess->pinnedProjectsChanged;\n } ...
[ "0.68224514", "0.61243445", "0.57752824", "0.5516113", "0.55105394", "0.5485643", "0.53611636", "0.5352887", "0.5284906", "0.5284906", "0.52185565", "0.5195031", "0.51914465", "0.5158794", "0.5139314", "0.51103985", "0.510931", "0.5088482", "0.50705856", "0.5068675", "0.50677...
0.73374563
0
Clear phone. Remove extra characters from phone number. Input: text phone with characters. Output: text phone number without characters, symbols.
Чистый телефон. Удаление лишних символов из номера телефона. Вход: текст с номером телефона и символами. Выход: текст номера телефона без символов, знаков.
function elentoys_the_phone_clear($textPhone, $isPlus = 0) { $pattern = '/[^0-9]/'; if ($isPlus === 1) { $pattern = '![^0-9]+!'; } return preg_replace($pattern, '', $textPhone); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clearPhone($data){\n if(substr($data, 0, 1) == '+'){\n $data = substr($data, 1);\n }\n return $data;\n }", "public static function cleanUpPhoneNumber($phoneNum) {\n if(strlen($phoneNum) < 1) return $phoneNum;\n return preg_replace(\"/[\\(\\)\\s+-\\.]/\", ''...
[ "0.7569061", "0.7080517", "0.707926", "0.688895", "0.6815929", "0.680573", "0.6772606", "0.6732721", "0.6650797", "0.65307605", "0.63649684", "0.63516504", "0.63194066", "0.61978865", "0.604374", "0.6010386", "0.5992057", "0.5967733", "0.5913955", "0.5852997", "0.57885635", ...
0.801076
0
Compares two ResourceRecords to determine which is the higher order. Used with the usort() function.
Сравнивает два ResourceRecord, чтобы определить, какой из них имеет более высокий приоритет. Используется с функцией usort().
public static function compareResourceRecords(ResourceRecord $a, ResourceRecord $b) { if ($a->getType() === $b->getType()) { return strcmp($a->getName() . $a->getRdata()->output(), $b->getName() . $b->getRdata()->output()); } $_a = array_search($a->getType(), self::$order); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function compareRecords($recordOne, $recordTwo);", "protected static function compare_records($a, $b, $sortfields) {\n foreach ($sortfields as $field => $mult) {\n if ($field === 'name' || $field === 'idnumber' || $field === 'path') {\n // string fields\n if...
[ "0.74613255", "0.6289508", "0.60546625", "0.59275216", "0.59275216", "0.5888479", "0.58762306", "0.58737713", "0.5864333", "0.5835263", "0.5806186", "0.57671905", "0.57593125", "0.5757411", "0.57531416", "0.5744378", "0.57349765", "0.5686883", "0.56492525", "0.56197417", "0.5...
0.8129702
0
/ function to get the tweets from the AWS database, passing the start value from the browser (if there is one) else defaults to the last start value ie the last tweet in the database
Функция для получения твитов из базы данных AWS, передающая значение start из браузера (если оно есть), иначе использует последнее значение start, то есть последний твит в базе данных
function getTweetsFromAWS($client, $start_value, $comparision) { $tableName = 'MStweets'; $result = $client->query(array( 'TableName' => $tableName, 'Limit' => 2, 'KeyConditions' => array( 'indexId' => array( 'AttributeValueList' => array( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tw_get_kultweet($search, $start) {\r\n $start--;\r\n $arr = q(\"SELECT topik, deskripsi, hashtag, posisi, isi, orderby, twitter_id, id FROM ref_kultweet WHERE user_id = \".$_SESSION['user_id'].\" AND status='draft' LIMIT $start, $_SESSION[limit]\");\r\n $output = tw_render_kultweet($arr);\r\n return $...
[ "0.65106523", "0.6409445", "0.6270156", "0.61959", "0.5972083", "0.58199114", "0.58089066", "0.58021384", "0.5783352", "0.5746364", "0.5744474", "0.5713759", "0.57106423", "0.5704037", "0.56913227", "0.5690423", "0.5645171", "0.5623961", "0.5623189", "0.562023", "0.5611936", ...
0.7321723
0
/ Function to insert the filtered tweets into tweets table of DynamoDB
Функция для вставки отфильтрованных твитов в таблицу tweets DynamoDB
function insertTweets($client, array $answers) { //Retrieve tweet content to store in columns of //tweets table foreach($filteredArray as $tweet) { //Clean the inputs before storing $twitterId = addslashes($tweet['twitter_id']); $text = addslashes($tweet['text']); $screen_nam...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insertTweets()\n\t{\n\t\t$tweets = $this->tweets;\n\t\tif(is_array($tweets) && array_key_exists('results', $tweets)) {\n\t\t\t//better ways DI could be done but it's a small sample app, so we will treat all DB connections as one offs\n\t\t\t$writeDb = Bills_DependencyInjection::getWriteDb();\n\n\t\...
[ "0.70017457", "0.62391573", "0.560295", "0.5462094", "0.53724337", "0.528762", "0.5233566", "0.5092407", "0.49020946", "0.48994732", "0.48719987", "0.48666948", "0.483105", "0.48212138", "0.47597593", "0.47310552", "0.47148404", "0.47019976", "0.46999952", "0.4693968", "0.466...
0.8029388
0
action liste: liste de l'agenda
action список: список расписания
public function listeAction() { $rAgenda = $this->getDoctrine() ->getManager() ->getRepository('emhAgendaBundle:Agendas') ->findAll(); return $this->render('emhAgendaBundle:Agendas:liste.h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list_action() {\n Navigation::activateItem('/calendar/raumbelegung/list');\n PageLayout::setTitle($this->dispatcher->plugin->getDisplayName() . ' - ' .\n dgettext('roomplanplugin', 'Tagesansicht (Liste)'));\n $this->loadBelegung();\n }", "public function listAct...
[ "0.755574", "0.7337963", "0.7277988", "0.7189763", "0.6954494", "0.68064994", "0.6794873", "0.6791821", "0.67893285", "0.67756844", "0.6744057", "0.6716648", "0.66477466", "0.66423094", "0.6627613", "0.6609391", "0.66084605", "0.6597556", "0.65799385", "0.6554363", "0.6541087...
0.7468504
1
Return allowed post types for filters
Возвращать разрешенные типы постов для фильтров
public function allowed_types_for_filter() { if ( false !== $this->_allowed_types ) { return $this->_allowed_types; } $allowed_types = jet_blog_settings()->get( 'allow_filter_for', 'post' ); if ( ! $allowed_types ) { $allowed_types = array( 'post' ); } if ( ! is_array( $allowed_types ) ) { $all...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_allowed_post_types() {\n\t\t$allowed_post_types = apply_filters( 'f1_multi_section_reports_post_types', array( 'post' ) );\n\t\tif( !array( $allowed_post_types ) ) {\n\t\t\t$allowed_post_types = array( $allowed_post_types );\n\t\t}\n\n\t\treturn $allowed_post_types;\n\t}", "function fa_allowe...
[ "0.7805029", "0.76441896", "0.7641487", "0.7437757", "0.7412423", "0.7311771", "0.72474754", "0.7150673", "0.7131008", "0.7096839", "0.7077668", "0.7073188", "0.7005181", "0.69932973", "0.6962477", "0.69594496", "0.694233", "0.6938715", "0.69338804", "0.68988955", "0.68538916...
0.8967673
0
Edit transactional email action override fcuntion to _NOT_ load the Block adminhtml/system_email_template_edit before rendering
Измените функцию перехвата действия транзакционной электронной почты, чтобы не загружать Block adminhtml/system_email_template_edit перед отображением
public function editAction() { $this->loadLayout(); $template = $this->_initTemplate('id'); $this->_setActiveMenu('system/email_template'); $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Transactional Emails'), Mage::helper('adminhtml')->__('Transactional Emails'), $this->getUrl('*...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editmailtemplateAction(){\n\t\t\n\t\tglobal $mySession; \n\t\t\n\t\t$this->view->pageHeading = \"Edit Email Templates\";\n\t\t$this->view->pageDescription = \"manage all email templates\";\n\t\t$this->view->pageIcon = \"icon-envelope-letter\";\n \t\t\n\t\t$id = $this->_getParam('email_key');\n\t\t...
[ "0.740029", "0.71523404", "0.6997064", "0.69367635", "0.6740081", "0.66811067", "0.65280265", "0.63431716", "0.6327925", "0.6315973", "0.62442064", "0.6229877", "0.62249327", "0.6202486", "0.61862814", "0.617384", "0.61453694", "0.61402524", "0.61298305", "0.61185825", "0.609...
0.7608634
0
Whether the response format is Object.
Чи формат відповіді є об'єктом.
public function isFormatObject() { return $this->getService()->getFormat() == self::FORMAT_OBJECT; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isObject()\n {\n return strpos($this->type, 'object') === 0;\n }", "public function isObject()\n {\n return (bool) ($this->getValueType()===ValueType::TYPE_OBJECT);\n }", "public function isObject()\n {\n return is_object($this->_value);\n }", ...
[ "0.7527644", "0.7305077", "0.71263194", "0.68980104", "0.6815169", "0.65901494", "0.6570614", "0.653666", "0.65129715", "0.6495816", "0.64236426", "0.6381936", "0.6318382", "0.62933564", "0.6284086", "0.623104", "0.623104", "0.61989474", "0.6175065", "0.6171212", "0.6167339",...
0.768251
0
Seta a folha como aberta
Открыть лист
public function setFolhaAberta() { $this->lAberto = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setFolhaFechada() {\n $this->lAberto = false;\n }", "public function fecharFolha(){\n \n $this->lAberto = false;\n $this->salvar();\n }", "abstract public function setAfiliacao($afiliacao);", "function set(){\n \t$this->estado=\"logueado\";\n \t$this->usuario=$this-...
[ "0.66121817", "0.60374707", "0.5987726", "0.5873112", "0.58351576", "0.57910615", "0.55917895", "0.5577274", "0.5494003", "0.5482148", "0.54667264", "0.5426847", "0.5424282", "0.539853", "0.5396675", "0.53846014", "0.5383507", "0.53676283", "0.5367364", "0.5365229", "0.535137...
0.7149748
0
Seta a folha como fechada
Закройте лист
public function setFolhaFechada() { $this->lAberto = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setFolhaAberta() {\n $this->lAberto = true;\n }", "public function escreveFicha() {}", "public function encenderFoco( ) {\n $this->setComando(self::$FOCOS_TODOS,\"ON\");\n }", "public function fecharFolha(){\n \n $this->lAberto = false;\n $this->salvar();\n }", "public f...
[ "0.63181466", "0.62863", "0.6238464", "0.60476124", "0.59110516", "0.58129495", "0.5792441", "0.57725435", "0.5655721", "0.561912", "0.5539831", "0.54285765", "0.5400114", "0.5342396", "0.53199947", "0.52825147", "0.5276325", "0.5259803", "0.5234518", "0.52135515", "0.5209622...
0.7173208
0
Retorna o tipo da folha
Возвращает тип листа
public function getTipoFolha() { return $this->iTipoFolha; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getTipo();", "function getTipoRicevuta();", "public function get_type();", "public function tipo()\n {\n return $this->recuperar() ? $this->recuperar()->tipo : null;\n }", "function getType() ;", "function getType() ;", "function getType() ;", "function getType()...
[ "0.71681935", "0.69696623", "0.6958095", "0.6882987", "0.68281066", "0.68281066", "0.68281066", "0.68281066", "0.68270797", "0.67561215", "0.67561215", "0.67561215", "0.67561215", "0.67330706", "0.67310023", "0.6701916", "0.6687204", "0.66864717", "0.66803694", "0.6623271", "...
0.7184137
0
Retorna o nome da tabela do ponto de acordo com o tipo folha informado
Возвращает имя таблицы согласия в зависимости от указанного типа листа
public function getTabelaPonto(){ switch ($this->iTipoFolha) { case FolhaPagamento::TIPO_FOLHA_SALARIO: case FolhaPagamento::TIPO_FOLHA_SUPLEMENTAR: return Ponto::SALARIO; break; case FolhaPagamento::TIPO_FOLHA_RESCISAO: return Ponto::RESCISAO; break; case Fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTablename() {}", "public static function getTablename()\r\n {\r\n return \"Productos_01\";\r\n }", "function getTablename() ;", "function getTabellaOggetto($tipo) {\r switch($tipo) {\r \tcase \"strutture\":\r \t\treturn \"oggetto_uffici\";\r \tbreak...
[ "0.69680315", "0.6858934", "0.6756439", "0.6609991", "0.6537063", "0.64672387", "0.6310013", "0.6267023", "0.62508816", "0.62426716", "0.624174", "0.6216348", "0.6149854", "0.61485565", "0.61325085", "0.6128749", "0.6123676", "0.61228764", "0.6119325", "0.6119325", "0.6095127...
0.7129164
0
function to get all inactive employees in company except the administration
функция для получения всех неактивных сотрудников в компании, кроме администрации
public function viewAllInactiveEmployees() { $this->load->database(); $query = $this->db->query("SELECT employees.*, department_name FROM employees, departments WHERE employee_type <> 'administration' AND employee_status ='inactive' AND employees.department_id = departments.department_id" ); return $quer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function viewInactiveEmployees($ref)\n\t{\n\t\t$this->load->database();\n\t\t$query = $this->db->query(\"SELECT employees.*, department_name FROM employees, departments\n\t\t\t\tWHERE employee_type <> 'administration' AND employee_status ='inactive' AND\n\t\t\t\temployees.department_id = departments.departm...
[ "0.6577894", "0.65366465", "0.6499771", "0.63167745", "0.62526983", "0.6250463", "0.61639535", "0.61526245", "0.61165786", "0.609684", "0.6054516", "0.603649", "0.60199934", "0.6006025", "0.6001997", "0.6001811", "0.59686494", "0.5954038", "0.5953713", "0.5928129", "0.5916140...
0.75983846
0
function to get all technicians in company
функция для получения всех техников в компании
public function getTechnicians() { $this->load->database(); $query = $this->db->query("SELECT * FROM technicians where technician_id>1"); return $query->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function auxAllTechnicians() {\n \t$qbProd = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('fe_users');\n\t\t$aufProd = $qbProd->select('uid','username','name')->from('fe_users')->where($qbProd->expr()->eq('pid',(int)$this->settings['technicianPid']))\n\t\t\t\t\t\t\t ->ad...
[ "0.67450243", "0.62820715", "0.62747425", "0.61466324", "0.6144669", "0.60935676", "0.60505635", "0.5972498", "0.59508145", "0.5944556", "0.5942213", "0.59314394", "0.5905875", "0.5903336", "0.58965266", "0.5887776", "0.5868925", "0.58671236", "0.5865219", "0.58548635", "0.58...
0.7252288
0
function to clear outdated issues Delete issues older than 3 months
функция для удаления устаревших задач Удалить задачи старше 3 месяцев
public function deleteOutdatedIssues() { $cutoff_date = date("Y-m-d",strtotime('-3 months')); $this->load->database(); $info = $this->db->query('DELETE FROM issues WHERE issue_id IN ( SELECT issue_id FROM issue_log where date_reported < "'.$cutoff_date.'")'); return $info; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cleanup()\n\t{\n\t\t$lastmonth = Date::of(time() - (30 * 24 * 60 * 60))->toSql();\n\t\t$this->_db->setQuery(\"DELETE FROM `$this->_tbl` WHERE lastviewed < \" . $this->_db->quote($lastmonth));\n\t\t$this->_db->query();\n\t}", "static function clearOutOfDates() {\n \t$meg = new System_message();...
[ "0.6615048", "0.63969094", "0.631692", "0.6305854", "0.62233937", "0.62132543", "0.6135093", "0.61109984", "0.61019784", "0.6099104", "0.6087214", "0.6080587", "0.6049526", "0.60029024", "0.5981497", "0.5980038", "0.590978", "0.58887726", "0.58741015", "0.5849471", "0.5848133...
0.76263535
0
Returns array of possible settings for axis switch
Возвращает массив возможных настроек для переключения оси
static public function axisSwitchArray() { return array ( self::AXIS_SWITCH_NONE, self::AXIS_SWITCH_ALWAYS, self::AXIS_SWITCH_DYNAMIC, ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getAxes() {\n static $axes = array(self::SELECT, self::UPDATE, self::DELETE, self::INSERT);\n return $axes;\n }", "public function setAxisSwitch($settings)\n\t{\n\t\tif (is_numeric($settings)) {\n\t\t\t$this->_axisSwitchMode = self::AXIS_SWITCH_DYNAMIC;\n\t\t\t$this->_axisSwitchScale = ...
[ "0.610515", "0.6021915", "0.58462846", "0.5821557", "0.56627053", "0.56274307", "0.56146693", "0.5613127", "0.55391645", "0.55298126", "0.55202943", "0.55181986", "0.5494733", "0.5479747", "0.547552", "0.547552", "0.54729414", "0.5462773", "0.54599935", "0.5458239", "0.542414...
0.78377676
0
Whether we want to display metric picker. Returns false if there is only one or metric picker is disabled
Нужно ли отображать пикер метрик. Возвращает false, если имеется только одна метрика или пикер метрик отключен
public function shouldShowMetricPicker() { return (count($this->_metrics) > 1) && $this->_showMetricPicker; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSummaryFieldOptionDisabled()\n\t{\n\t\treturn 70 === $this->get('uitype');\n\t}", "public function setShowMetricPicker($value = true)\n\t{\n\t\t$this->_showMetricPicker = $value;\n\t\treturn $this;\n\t}", "public function isEnablePercent()\r\n {\r\n if ($this->getData('my_selection_...
[ "0.5970338", "0.5966922", "0.58272636", "0.5813356", "0.5706864", "0.5665058", "0.5602984", "0.5549124", "0.5524459", "0.55051005", "0.55051005", "0.5476105", "0.5440846", "0.54396856", "0.54385996", "0.5437183", "0.5422375", "0.54119307", "0.5400114", "0.5378098", "0.5378098...
0.8543246
0
Returns true if the given given LOD level is enabled
Возвращает true, если заданный уровень LOD включен
public function isLodLevelEnabled($level) { return isset($this->_lodLevels[$level]) ? $this->_lodLevels[$level] : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isEnabledFor($level) {\n\t\treturn (bool)($level->isGreaterOrEqual($this->getEffectiveLevel()));\n\t}", "protected function _isLevelEnabled($level)\n\t{\n\t\treturn $this->_getLevelInteger($level) >=\n\t\t\t$this->_getLevelInteger($this->getLogLevel());\n\t}", "private function isEnabled(string...
[ "0.7269483", "0.68858904", "0.6820382", "0.663439", "0.65478706", "0.64237505", "0.6296104", "0.62840563", "0.62768865", "0.62344027", "0.6215026", "0.6174609", "0.6154909", "0.6140208", "0.6087902", "0.60868734", "0.6085941", "0.6061591", "0.6060025", "0.6035131", "0.6016794...
0.7639723
0
Sets $type of the line for given metric
Устанавливает $type линии для заданной метрики
public function setLineType($metric, $type) { $this->_lineTypes[$metric] = $type; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_type ($type) {}", "public function setLineType($lineType) { $this->lineType = $lineType ; }", "public function set_type ($type)\n {\n if ($type)\n {\n $this->restrict (\"entry_type = '$type'\");\n }\n }", "function setType($type) { $this->type = $type; }", "public functi...
[ "0.6397503", "0.6365922", "0.61603945", "0.6152466", "0.6116141", "0.60819423", "0.60411525", "0.6035295", "0.6030146", "0.601149", "0.601149", "0.6005794", "0.6003311", "0.60022837", "0.5999235", "0.5994443", "0.5994154", "0.5994154", "0.59891564", "0.59823567", "0.59823567"...
0.7673098
0
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / checkItem Function v1.0 This Function Accept Parameters $col = The Column Name $tbl_name = The Table Name $value = The Value Of the Row Field It Returns The Count Of The Sql Query
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / Функция checkItem v1.0 Эта функция принимает параметры $col = Название колонки $tbl_name = Название таблицы $value = Значение поля строки Она возвращает количество записей из запроса SQL
function checkItem($col, $tbl_name ,$value){ global $con; $stmt = $con->prepare("select $col from $tbl_name where $col = ?"); $stmt->execute(array($value)); $count = $stmt->rowCount(); return $count; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkItem ($column , $table, $value) {\n\t\tglobal $con;\n\t\t$statment = $con->prepare(\"SELECT $column FROM $table WHERE $column = ?\");\n\n\t\t$statment->execute( array($value ));\n\n\t\t$count = $statment->rowcount();\n\t\treturn $count;\t\n\t}", "function checkItem($select , $table , $value) {\n\t...
[ "0.8293827", "0.7728576", "0.7566384", "0.7472619", "0.74646664", "0.7458559", "0.7435481", "0.74250126", "0.74055946", "0.7387522", "0.736471", "0.73210615", "0.73157763", "0.7282588", "0.7282269", "0.72739995", "0.7266686", "0.71707606", "0.7169173", "0.71443665", "0.713768...
0.836913
0
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / getRec Function v1.0 This Function Accept Parameters $col = The Column Name $tbl_name = The Table Name $value = The Value Of the Row Field It Returns The All Records Of The Sql Query
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / getRec Функция v1.0 Эта Функция Принимает Параметры $col = Название Колонки $tbl_name = Название Таблицы $value = Значение Поля Строки Она Возвращает Все Записи Sql Запроса
function getRec($col, $tbl_name, $value=''){ global $con; if(empty($value)) $stmt = $con->prepare("select $col from $tbl_name"); else $stmt = $con->prepare("select $col from $tbl_name where $col = ?"); $stmt->execute(array($value)); $rows = $stmt->fetchAll(); return $rows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetch_all_record_function($table_name='',$col_id='',$col_name='',$cond='')\r\n{\r\n\tif($cond=='')\r\n\t $sql=\"select * from $table_name\";\r\n\telse\r\n\t $sql=\"select * from $table_name $cond\";\t\r\n\t \r\n\t $ArrayData=array();\r\n\t $rssql=mysql_query($sql) or die(mysql_error());\r\n\t if(mysql...
[ "0.7710835", "0.7631524", "0.740271", "0.72903055", "0.71865845", "0.71583605", "0.7147761", "0.714019", "0.7089684", "0.7040479", "0.7010299", "0.6996363", "0.69688815", "0.6959919", "0.6955653", "0.6934973", "0.6933501", "0.69310516", "0.69237417", "0.6915928", "0.6890869",...
0.7695763
1
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / getItem Function v1.0 This Function Accept Parameters $col = The Column Name $tbl_name = The Table Name $col2 = The Second Column Which Use In The Condition $value = The Value Of the Row Field It Retu...
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / getItem Функция v1.0 Эта Функция Принимает Параметры $col = Название Столбца $tbl_name = Название Таблицы $col2 = Второй Столбец, Который Используется В Условии $value = Значение Поля Строки Она Возвр...
function getItem($col, $tbl_name,$col2,$value){ global $con; $stmt = $con->prepare("select $col from $tbl_name where $col2 = ? order by $col2 desc"); $stmt->execute(array($value)); $rows = $stmt->fetchAll(); return $rows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getItem2($col, $tbl_name,$col2,$col3,$value){\n global $con;\n $stmt = $con->prepare(\"select $col from $tbl_name where $col2 = ? order by $col3 desc\");\n $stmt->execute(array($value));\n $rows = $stmt->fetchAll();\n return $rows;\n}", "function fetch_all_record_function($table_name='',$...
[ "0.76143885", "0.7389483", "0.7347685", "0.7273279", "0.72056246", "0.7193852", "0.71430755", "0.7142395", "0.7132223", "0.7075855", "0.7015457", "0.6947665", "0.6934922", "0.69043344", "0.6887444", "0.68445796", "0.6833388", "0.6765099", "0.6729921", "0.67182136", "0.6707457...
0.77179325
0
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / checkinfo Function v1.0 This Function Accept Parameters $col1 = The First Column Name $tbl_name = The Table Name $col2 = The Second Column Name $val1 = The Value Of the The First Column $val2 = The Va...
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / функция checkinfo v1.0 Эта функция принимает параметры $col1 = имя первой колонки $tbl_name = имя таблицы $col2 = имя второй колонки $val1 = значение первой колонки $val2 = значение второй колонки Воз...
function checkinfo($col1, $col2, $tbl_name, $val1,$val2){ global $con; $stmt = $con->prepare("select $col1,$col2 from $tbl_name where ($col1 = ? or $col2 = ?) limit 1"); $stmt->execute(array($val1,$val2)); $rows = $stmt->fetch(); return $rows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetInfoBy($tbl_name,$field,$value, $ctype)\n\t{\n\t\t//echo \"SELECT * FROM \".$tbl_name.\" WHERE \".$field.\"='\".$value.\"'\";\n\t\t$inf = $this->SelectQuery(\"SELECT * FROM \".$tbl_name.\" WHERE \".$field.\"='\".$value.\"'\", $ctype);\n\t\treturn $inf[0];\n\t}", "function fetch_all_record_function($t...
[ "0.69592327", "0.6732886", "0.6594571", "0.65415066", "0.651876", "0.64431816", "0.64371794", "0.64057434", "0.6370758", "0.63545215", "0.6332723", "0.632441", "0.63195676", "0.6313637", "0.6296908", "0.6296027", "0.6290678", "0.6274725", "0.6258662", "0.624691", "0.62397045"...
0.7962376
0
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / getItem2 Function v2.0 This Function Accept Parameters $col = The Column Name $tbl_name = The Table Name $col2 = The Second Column Which Use In The Condition $value = The Value Of the Row Field It Ret...
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / getItem2 Функция v2.0 Эта Функция Принимает Параметры $col = Название Колонки $tbl_name = Название Таблицы $col2 = Вторая Колонка, Используемая В Условии $value = Значение Поля Строки Она Возвращает В...
function getItem2($col, $tbl_name,$col2,$col3,$value){ global $con; $stmt = $con->prepare("select $col from $tbl_name where $col2 = ? order by $col3 desc"); $stmt->execute(array($value)); $rows = $stmt->fetchAll(); return $rows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getItem($col, $tbl_name,$col2,$value){\n global $con;\n $stmt = $con->prepare(\"select $col from $tbl_name where $col2 = ? order by $col2 desc\");\n $stmt->execute(array($value));\n $rows = $stmt->fetchAll();\n return $rows;\n}", "function getItem3($col, $tbl_name,$col2,$col3,$value){\n ...
[ "0.76736116", "0.7353969", "0.69400066", "0.6743115", "0.6741015", "0.6709354", "0.66452795", "0.66343457", "0.6601488", "0.66005856", "0.65970284", "0.647808", "0.6416413", "0.63993245", "0.63556904", "0.6334032", "0.6333265", "0.6330655", "0.63086975", "0.62510353", "0.6250...
0.7671536
1
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / getRec2 Function v2.0 This Function Accept Parameters $col = The Column Name $tbl_name = The Table Name $value = The Value Of the Row Field It Returns The All Records Of The Sql Query
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / getRec2 Функция v2.0 Эта Функция принимает параметры $col = Название Колонки $tbl_name = Название Таблицы $value = Значение Поля Строки Она возвращает Все Записи Sql Запроса
function getRec2($col, $tbl_name, $value=''){ global $con; if(empty($value)) $stmt = $con->prepare("select $col from $tbl_name"); else $stmt = $con->prepare("select $col from $tbl_name where $col = ?"); $stmt->execute(array($value)); $rows = $stmt->fetch(); return $rows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetch_all_record_function($table_name='',$col_id='',$col_name='',$cond='')\r\n{\r\n\tif($cond=='')\r\n\t $sql=\"select * from $table_name\";\r\n\telse\r\n\t $sql=\"select * from $table_name $cond\";\t\r\n\t \r\n\t $ArrayData=array();\r\n\t $rssql=mysql_query($sql) or die(mysql_error());\r\n\t if(mysql...
[ "0.72333676", "0.7134198", "0.7098831", "0.67537355", "0.6751414", "0.67346585", "0.67218786", "0.6708219", "0.66415083", "0.660393", "0.658918", "0.6558112", "0.6556786", "0.65538394", "0.655282", "0.6544359", "0.65428174", "0.650594", "0.6504274", "0.6433147", "0.6418883", ...
0.7255817
0
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / getItem3 Function v3.0 This Function Accept Parameters $col = The Column Name $tbl_name = The Table Name $col2 = The Second Column Which Use In The Condition $value = The Value Of the Row Field It Ret...
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// / getItem3 Функция v3.0 Эта Функция принимает параметры $col = Название Колонки $tbl_name = Название Таблицы $col2 = Вторая Колонка, которая используется в Условии $value = Значение Поля Строки Она возв...
function getItem3($col, $tbl_name,$col2,$col3,$value){ global $con; $stmt = $con->prepare("select $col from $tbl_name where $col2 = ? order by $col3 desc"); $stmt->execute(array($value)); $rows = $stmt->fetchAll(); return $rows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getItem2($col, $tbl_name,$col2,$col3,$value){\n global $con;\n $stmt = $con->prepare(\"select $col from $tbl_name where $col2 = ? order by $col3 desc\");\n $stmt->execute(array($value));\n $rows = $stmt->fetchAll();\n return $rows;\n}", "function getItem($col, $tbl_name,$col2,$value){\n ...
[ "0.7597726", "0.71880615", "0.67669106", "0.6651871", "0.650352", "0.6456945", "0.64450634", "0.64291495", "0.6416324", "0.64068604", "0.6387016", "0.63439846", "0.6322795", "0.6315415", "0.6289228", "0.6279596", "0.6271596", "0.62402195", "0.6237515", "0.62315726", "0.619224...
0.7736893
0
Checks if user is dealer.
Проверяет, является ли пользователь дилером.
private function isDealer() { return ($this->getService('session')->user['role'] === 'dealer'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isBuyer()\r\n\t{\r\n\t\treturn $this->info->userType == \"buyer\";\r\n\t}", "public function isBuyer()\n {\n $user = $this->getUser();\n\n if ($this->getData('buyer_id') == $user['id']) {\n return true;\n }\n\n return false;\n }", "public function is...
[ "0.7230152", "0.69566226", "0.64417", "0.63571364", "0.62197924", "0.6120996", "0.6043068", "0.6020769", "0.6019267", "0.60102797", "0.59957856", "0.59027696", "0.5888881", "0.5877099", "0.5873395", "0.5869978", "0.5859892", "0.5848625", "0.5830762", "0.58254004", "0.58230996...
0.79457575
0
voir php3 > exercice composition car dans _user il y a userModel enfaite
voir php3 > exercice composition car dans _user il y a userModel enfaite
public function __construct(User $user){ // voir php3 -> exercice composition car j'ai appelé la l'objet userModel $this->_user = $user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function UserModel(){}", "function user()\n {\n parent::Model();\n \n }", "private function userInfoModel()\n {\n\n }", "public function user()\n {\n \treturn $this->belongsTo(\\Modules\\My\\Entities\\User::class, 'user_id');\n }", "public function user(){\n \t/...
[ "0.7643571", "0.74642485", "0.7142685", "0.7105871", "0.70644283", "0.70504755", "0.70455015", "0.7042717", "0.7033512", "0.700894", "0.700442", "0.6999008", "0.6994753", "0.6968852", "0.6966633", "0.69662863", "0.6955064", "0.695474", "0.6934085", "0.69279295", "0.6921981", ...
0.7597618
1
/ $contact = new \App\Contact(); $contact>contact_name = request('contact_name'); $contact>email = request('email'); $contact>comments = request('comments'); $contact>save();
$contact = new \App\Contact(); $contact>contact_name = request('contact_name'); $contact>email = request('email'); $contact>comments = request('comments'); $contact>save();
public function store() { request()->validate([ 'contact_name' => ['required',"min:5","max:40"], 'email' => ['required',"min:5","max:40"], 'comments' => ['required',"min:10","max:255"] ]); Contact::create([ 'contact_name' => request('contact_name'), 'email' => ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ContactRequest(Request $request){\n $this->validate($request, [\n 'email'=>'required|email',\n 'name'=>'required|max:120',\n 'message'=>'required|min:10|max:1000'\n ]);\n\n $email = $request['email'];\n $name = $request['name'];\n ...
[ "0.75822306", "0.7578347", "0.7574222", "0.7527627", "0.74944025", "0.74937224", "0.74439585", "0.7401785", "0.73883134", "0.73606277", "0.734365", "0.7314777", "0.73074794", "0.7304775", "0.72860056", "0.72784626", "0.7262585", "0.72589505", "0.72370446", "0.7226352", "0.719...
0.81131834
0
Get lock file resource
Получить ресурс файла блокировки
protected function _getLockFile() { if ($this->_lockFile === null) { $varDir = Mage::getConfig()->getVarDir('locks'); $file = $varDir . DS . 'gpi_tsc_cron.lock'; if (is_file($file)) { $this->_lockFile = fopen($file, 'w'); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getLockFile()\n {\n return $this->getRuntimePath() . '/' . $this->getName() . $this->getFileExtension();\n }", "protected function getLockFileName() {}", "protected function getLockFileName() {}", "public function getResource()\n {\n $handle = fopen($this->path, 'r');\...
[ "0.7868276", "0.71170133", "0.7116997", "0.6696816", "0.66111743", "0.65437555", "0.6496402", "0.643482", "0.64214575", "0.6329864", "0.61918867", "0.61906713", "0.60817873", "0.60655814", "0.6059557", "0.60361207", "0.60351056", "0.60273254", "0.5974242", "0.5973672", "0.594...
0.7568631
1
/ | | Update Employee Status |
| | Обновление статуса сотрудника |
public function updateEmployeeStatus(Employee $id, $status) { if($status == 'resigned') { $timestamp = now(); $EmployeeStatus = Employee::where('id', $id->id) ->update([ 'status' => $stat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateStatus(){\r\n\t\t$_POST['status'] = ($_POST['status'] == 0) ? 1 : 0;\r\n\t\tif ($_POST['status'] == 0){\r\n\t\t\tif ( count( $this->employee_model->getDriverSched($_POST['employee_id']) ) > 0 ){\r\n\t\t\t\techo json_encode([\r\n\t\t\t\t\t'status'=> false\r\n\t\t\t\t]);\r\n\t\t\t\tdie();\r\n\t...
[ "0.7403281", "0.7352416", "0.7248606", "0.7011009", "0.69081795", "0.6856178", "0.68193716", "0.68179524", "0.6722598", "0.66968936", "0.6591684", "0.65834", "0.6569602", "0.6516105", "0.6476663", "0.6473292", "0.64713115", "0.6460797", "0.64357543", "0.6431188", "0.6429048",...
0.7365368
1
/ | | Save Employee Payroll Detail |
| | Сохранить детали заработной платы сотрудника |
public function savePayrollDetail(Employee $id) { $id->update(request([ 'bank_name', 'bank_account', 'basic_rate', 'rata', 'pera', 'meal_allowance', 'project_allowance' ])); return redire...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_employee_details() {\n\t\t$employee = $this->Employee->validate_employee();\n\t\tif ($employee) {\n\t\t\t$employee = $this->params['form']['employee'];\n\t\t\t$this->Employee->save($employee);\n\t\t\t$this->result = $employee;\n\t\t}\n\t\telse {\n\t\t\t$this->error = generate_error(\"Permission er...
[ "0.70380044", "0.67613095", "0.66320366", "0.654999", "0.6523232", "0.64886373", "0.6421772", "0.6418965", "0.632582", "0.6318713", "0.63110906", "0.62963283", "0.6250366", "0.6202974", "0.6196332", "0.6165746", "0.61524355", "0.6143625", "0.61340666", "0.61278075", "0.611912...
0.7229187
0
/ | | Client Age Calculator |
/ | | Калькулятор возраста клиента |
public function ageCalculator($age) { return $age = Carbon::parse($age)->age; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function calculateAge()\r\n\t{\r\n\t}", "protected function getAge()\n\t{\n\t}", "public function calcAgeDataProvider() {}", "public function calcAgeDataProvider() {}", "public function getAge()\n\t{\n\t}", "function age($birthdate) {\n\t return (strtotime('now') -strtotime($birthdate))/(60*60*24*...
[ "0.79320484", "0.7243389", "0.7233703", "0.7233305", "0.7104483", "0.6950873", "0.69024533", "0.6861237", "0.6725179", "0.67163414", "0.6711687", "0.6710673", "0.66934264", "0.6679571", "0.66772413", "0.66771036", "0.66771036", "0.6673222", "0.6669908", "0.6658179", "0.665817...
0.72869235
1
post_status( $conn, $user_id, $status ) Posts a status for a user (uses the current timestamp and date)
post_status( $conn, $user_id, $status ) Публикует статус пользователя (использует текущее время и дату)
function post_status($conn,$user_id,$status) { $user_id = (int)$user_id; $status = substr(sanitize($status),0,200); $timestamp = time(); $date = date('D d.m.y H:i'); $conn->exec("INSERT INTO `status` (`owner_id`,`content`,`timestamp`,`date`) VALUES ($user_id, '$status',$timestamp,'$date')"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function postStatus($prof_id, $status)\n {\n \t$date = date('m/d/Y h:i:s a', time());\n $query = \"INSERT INTO status(prof_id, Date, Status)VALUES(?,?,?)\";\n if ($stmt = $this->link->prepare($query))\n {\n $stmt->bind_param(\"iss\",$prof_id, $date, $status);\n $stm...
[ "0.757202", "0.6967799", "0.69111645", "0.6727277", "0.64897984", "0.644271", "0.6429459", "0.63814735", "0.63669014", "0.63248974", "0.6322101", "0.62117225", "0.6200976", "0.6189246", "0.61698943", "0.6119751", "0.6116718", "0.6083708", "0.6079905", "0.6017837", "0.59965795...
0.8547575
0
pardon_user( $conn, $user_id ) Pardons/Unbans an user :D
pardon_user( $conn, $user_id ) Пardon/Unban пользователя :D
function pardon_user($conn, $user_id) { $update_data = array( 'is_banned' => 0 ); update_user($conn, $user_id, $update_data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ban_user($conn, $user_id) {\n\t$update_data = array(\n\t\t'is_banned' => 1\n\t);\n\tupdate_user($conn, $user_id, $update_data);\n}", "function deactivateuser($trash, $mysqli){\n $sql = \"UPDATE players Set imgeditorstate = 'false' WHERE pid = '$trash'\";\n if($mysqli->query($sql) === TRUE) {\n\t\techo...
[ "0.66003835", "0.65618795", "0.6459492", "0.6444973", "0.636239", "0.63379675", "0.63168913", "0.62367314", "0.6234241", "0.6228914", "0.62245333", "0.618851", "0.6156423", "0.612623", "0.6106297", "0.609563", "0.6092977", "0.6091286", "0.6082705", "0.60247093", "0.60072976",...
0.7662722
0
ban_user( $conn, $user_id ) Bans an user :(
ban_user( $conn, $user_id ) Заблокировать пользователя :( ```
function ban_user($conn, $user_id) { $update_data = array( 'is_banned' => 1 ); update_user($conn, $user_id, $update_data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function banUser() {\n\n}", "function do_ban() {\n\t// Anti-hacking check\n\tif ($_GET['xsrf_token'] != $_SESSION['xsrf_token'])\n\t\ttrigger_error('Ban: Invalid XSRF token', E_USER_ERROR);\n\t\n\t// Check that the user id is valid\n\t$query = 'SELECT id FROM users WHERE id=\"' . mysqli_real_escape_string(DB::ge...
[ "0.82184535", "0.8172555", "0.7885412", "0.78484833", "0.7701654", "0.76973814", "0.7691217", "0.74548316", "0.7379515", "0.7363973", "0.733686", "0.7270543", "0.72386", "0.721525", "0.7116039", "0.70958716", "0.70627695", "0.69677377", "0.6967227", "0.69587034", "0.6954777",...
0.8947352
0
register_user( $register_data ) Registers a new user :D
register_user( $register_data ) Регистрирует нового пользователя :D
function register_user($conn, $register_data) { array_walk($register_data, 'array_sanitize'); $register_data['password'] = md5($register_data['password']); $fields = '`' . implode('`, `', array_keys($register_data)) . '`'; $data = '\'' . implode('\', \'', $register_data) . '\''; $conn->exec("INSERT INTO `users` ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reguser($data){\n\t\t\n\t}", "public function register_user($data) {\n\t\tif ($this->db->insert('user', $data)) {\n\t\t\treturn $this->db->insert_id();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function registerUser($data){\n\t\t\t// Write the SQL Insert Query\n\t\t\t$sql = \"I...
[ "0.826026", "0.7869892", "0.78020746", "0.7687884", "0.76543295", "0.7633187", "0.76274204", "0.76197714", "0.76028514", "0.75878423", "0.75758296", "0.7570013", "0.7552082", "0.7539722", "0.75349236", "0.749748", "0.74939716", "0.7491364", "0.746946", "0.7461082", "0.7451312...
0.79931796
1
Get all paddocks related to a particular farm
Получить все загоны, связанные с определенной фермой
public static function getPaddocksByFarmID($farm_id) { $database = DatabaseFactory::getFactory()->getConnection(); $sql = "SELECT paddock_id, paddock_name, paddock_address, paddock_area, paddock_google_area FROM paddock WHERE farm_id = :farm_id"; $query = $database->prepare($sql); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllPenHouseForFarm($farmId)\n {\n $penHouse = PenHouse::where('farm_id', $farmId)->get();\n return $penHouse;\n }", "public function farm()\n {\n return $this->belongsTo('App\\Farm', 'farm_id');\n }", "public function get_pen_house($farm_id)\n {\n $...
[ "0.60699636", "0.5700745", "0.55712646", "0.5335011", "0.5320421", "0.51926965", "0.5096542", "0.50510925", "0.5030338", "0.49816144", "0.4964572", "0.496417", "0.49628145", "0.49342594", "0.48957312", "0.48866126", "0.48824507", "0.4866567", "0.48525622", "0.48393428", "0.48...
0.72562957
0
Get a single farm
Получить одну ферму
public static function getFarm($farm_id) { $database = DatabaseFactory::getFactory()->getConnection(); $sql = "SELECT farm_id, farm_name, farm_contact_firstname, farm_contact_lastname, farm_email_address, farm_phone_number FROM farm WHERE farm_id = :farm_id"; $query = $database->pre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function farm()\n {\n return $this->belongsTo('App\\Farm', 'farm_id');\n }", "public function show()\n {\n $farms = Farm::where('idUser',Auth::id())-> get();\n return view('farm.show', compact('farms'));\n }", "private function farmName($id){\n\n\t\t$selected_farm = Farms...
[ "0.66757333", "0.6543471", "0.6224712", "0.61447567", "0.6041405", "0.6029119", "0.58705497", "0.58623767", "0.583757", "0.57753056", "0.57512164", "0.5741813", "0.5723047", "0.5662638", "0.56406033", "0.56304866", "0.56182104", "0.5615352", "0.5557783", "0.55022156", "0.5480...
0.7242668
0
Delete a specific farm
Удалить конкретную ферму
public static function deleteFarm($farm_id){ $paddocks = self::getPaddocksByFarmID($farm_id); $flag = true; foreach ($paddocks as $paddock){ $flag = false; if(self::deletePaddock($paddock->paddock_id)){ $flag = true; } } if($flag==true){ if(self::deleteFarmUserByFarmID($farm_id)){ if(self...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete($id) \n {\n $role = $this->session->userdata('userrole');\n if ($role == ROLE_OWNER) {\n $fleet = $this->fleet->getFleet($id); \n if ($fleet != NULL) {\n $this->fleet->delete($id);\n }\n }\n redirect(base_url('/fleet'))...
[ "0.6462171", "0.6343541", "0.63333696", "0.6314383", "0.62916154", "0.6285951", "0.6204167", "0.62007725", "0.6198963", "0.6198963", "0.6198963", "0.6188789", "0.6182732", "0.6182732", "0.61616427", "0.6155225", "0.61179745", "0.6111969", "0.6111969", "0.6111969", "0.6111969"...
0.7026873
0
find all product by input merk User jika data ada return json
найдите все продукты по введенному марке пользователя, если данные есть, верните json
public function findProduct(){ $datas['cars'] = $this->m_product->getCarbyName($_POST['typingdata']); $x=0; foreach ($datas['cars'] as $key => $value) { # code... //print_r($value); $datas['image'][$x] = $this->m_product->getAllImage($value['id']); //print_r($data['image']); $x++; } // $data...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find_all_get(){\n $data = json_encode($this->ProductModel->findall());\n // print_r($data);\n \n }", "public function getProductInf(){\n $infor = json_decode(file_get_contents(\"php://input\"), true);\n\n $idProduct = $infor[\"idProduct\"];\n $query = \"se...
[ "0.75685084", "0.7557194", "0.7444135", "0.7250766", "0.71868235", "0.7181367", "0.7113025", "0.7080197", "0.70474863", "0.70447093", "0.70077354", "0.70077354", "0.6952126", "0.68688345", "0.68670243", "0.6860383", "0.6836481", "0.68340564", "0.67975795", "0.6761371", "0.675...
0.77057314
0
Returns the meta data for the Browser
Возвращает метаданные для Браузера
protected static function getBrowserMeta() { return json_decode( '[' . ' {' . ' "name":"master",' . ' "keyField":"options_id",' . ' "model":"options"' . ' }' . ']...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getMeta() {\n $metadata = array(\n 'title' => 'Explore', \n 'desc' => 'Request URL: ' . Config::get('app.api_url'), \n 'meta' => array( \n 'title' => 'Explore | Seeties', \n 'description' => 'Sample meta description' \n ),\n 'sid...
[ "0.7413277", "0.7162922", "0.7157097", "0.714393", "0.714393", "0.7117799", "0.7027653", "0.6901325", "0.6901325", "0.68415415", "0.68388927", "0.68388927", "0.68388927", "0.68388927", "0.68388927", "0.68388927", "0.67925835", "0.6772208", "0.67697", "0.6756015", "0.6679321",...
0.7822783
0
Returns the meta data for the Loader
Возвращает метаданные для загрузчика
protected static function getLoaderMeta() { return json_decode( '[' . ' {' . ' "name":"master",' . ' "keyField":"options_id",' . ' "model":"options"' . ' }' . ']'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadMetaData() {}", "public function getMeta();", "public function getMeta();", "protected function loadMetaData()\n {\n if(!$this->_metaloaded) {\n $this->setMetaData();\n }\n }", "public function getMetaData();", "public function getMetadata();", "pub...
[ "0.7471543", "0.7067906", "0.7067906", "0.7014985", "0.7002783", "0.67854166", "0.6769003", "0.6733774", "0.66970855", "0.6637992", "0.6619396", "0.6619396", "0.65674096", "0.6528874", "0.64806175", "0.644835", "0.6419953", "0.63946486", "0.63652575", "0.6333883", "0.63304263...
0.8138647
0
Construct a new catalogue Get all items from the database and insantiate them as Item instances in $this>items Also add the items ID's to $this>ids
Создайте новый каталог. Получите все элементы из базы данных и создайте для них экземпляры класса Item в $this>items. Также добавьте идентификаторы элементов в $this>ids.
function __construct() { $mysqli = new mysqli("localhost", "root", "root", "STORE"); // Check connection if ($mysqli->connect_errno) { printf("Connect failed: %s\n", $mysqli->connect_error); exit(); } // Get array of all items from the database if ($result = $mysqli->query("SELECT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _construct()\n {\n $this->_init('aht_product_items', 'id');\n }", "public function get_items()\n {\n $this->items = array();\n $query = \"SELECT sci.id, sci.product_id, sci.cart_id, sci.product_quantity,\n p.name, p.description, p.on_sale, ...
[ "0.6308699", "0.6302995", "0.6291861", "0.62713754", "0.6257691", "0.6121299", "0.6056013", "0.5994275", "0.595758", "0.59570485", "0.5941738", "0.5924671", "0.59233725", "0.5919012", "0.59090424", "0.5863233", "0.58368695", "0.58349234", "0.5829463", "0.5817566", "0.5802726"...
0.73103404
0
Check if an item exists in this catalogue using its ID number
Проверьте, существует ли товар в этом каталоге с помощью его номера ID
public function itemExists($id) { if (in_array($id, $this->ids)) { return $item = $this->items[$id]; } // Return false is not found return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function itemExists($itemId);", "public function hasItemId(){\n return $this->_has(1);\n }", "function find_item_by_catalogid($itemCatID) {\r\n\t\tforeach ($this->items as $item)\r\n\t\t{\r\n\t\t\tif ($item['itemCatID'] == $itemCatID)\r\n\t\t\t\treturn $item;\r\n\t\t\t\t//return $itemCatID;\r\n\...
[ "0.7484222", "0.7315698", "0.7000874", "0.6966338", "0.69645697", "0.69356084", "0.6912796", "0.6877325", "0.6758355", "0.67510617", "0.6679403", "0.66548663", "0.66253525", "0.6600533", "0.65936565", "0.65765834", "0.6568933", "0.656743", "0.6554471", "0.65475935", "0.653473...
0.7338467
1
/ Plugin Name: ShortcodeTwitter Version: 1.0 Description: Shortcode to share on Twitter Author: Pinto Author URI: Plugin URI: Text Domain: shortcodetwitter Domain Path: /languages / Shortcode share on Twitter. [sct_sharetwitter] Attributes: text. Default is empty size. Default is small. Other value is big Example: [sct...
Название плагина: ShortcodeTwitter Версия: 1.0 Описание: Короткий код для поделиться в Twitter Автор: Pinto Адрес автора: URI плагина: Домен языка: shortcodetwitter Путь домена: /languages Короткий код для поделиться в Twitter. [sct_sharetwitter] Атрибуты: text. По умолчанию пустой размер. По умолчанию маленький. Друго...
function shortcodetwitter_sharetwitter( $atts, $content = null ) { $atts_sharetwitter = shortcode_atts( array( 'text' => 'Compartir en Twitter', 'size' => 'small', ), $atts ); $link_twitter = 'http://twitter.com/intent/tweet?url=' . urlencode( get_permalink() ) . '&amp;text=' . urlencode( get_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function twittervisualeditor_sharetwitter( $atts, $content = null ) {\n $atts_sharetwitter = shortcode_atts( array(\n 'text' => 'Compartir en Twitter',\n 'size' => 'small',\n ), $atts );\n\n\t$link_twitter = 'http://twitter.com/intent/tweet?url=' . urlencode( get_permalink() ) . '&amp;text=' . ...
[ "0.8584708", "0.8209196", "0.74053806", "0.7402932", "0.7349059", "0.7241591", "0.70832604", "0.69989127", "0.6840119", "0.6780929", "0.664442", "0.6638069", "0.6637999", "0.6620358", "0.6618683", "0.6574712", "0.6565323", "0.6548778", "0.6506255", "0.6481193", "0.64625895", ...
0.8612176
0
generate username a partially random username eg. userkemim4t.tr
генерировать имя пользователя частично случайное имя пользователя, например, userkemim4t.tr
function generate_random_tutor_username() { $characters = "0123456789abcdefghijklmnopqrstuvwxyz"; $username = "user"; for($i = 0; $i < 7; $i++) $username .= $characters[rand(0, strlen($characters)-1)]; $username .= ".tr"; return $username; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generate_username(){\n\t\t$username = 'G'.substr(md5(microtime()),-29);\n\t\treturn $username;\n\t\t\n\t}", "public function generate_username(){\n\t\t$username = 'S'.substr(md5(microtime()),-29);\n\t\treturn $username;\n\t\t\n\t}", "public function generate_username(){\n\t\t$username = 'B'.sub...
[ "0.8411461", "0.8362493", "0.8323102", "0.8306559", "0.8274651", "0.82576877", "0.81291974", "0.80986786", "0.7875038", "0.77159774", "0.76074654", "0.74734175", "0.74608094", "0.7354456", "0.7341184", "0.7339365", "0.73325676", "0.7326563", "0.7277645", "0.7215455", "0.72045...
0.8833394
0
Function to get the inner joins for the select query
Функция для получения внутренних соединений для запроса select
protected function getInnerJoins() { $innerJoins = ""; return $innerJoins; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function InnerJoin();", "function generateInnerJoins($aJoin){\n\n\t\t$array=array();\n\n\t\tforeach($aJoin as $tabla => $field){\n\n\t\t\t$this->readTable($tabla);\n\n\t\t\t$array[]=' INNER JOIN '.$tabla.' ON '.$this->table.'.'.$field.'='.$tabla.'.'.$field;\n\n\t\t}\n\n\t\treturn implode(\" \\r\\n\",$array);\n\n...
[ "0.7448834", "0.7080023", "0.6909097", "0.6831074", "0.66839635", "0.65912956", "0.65155184", "0.64283717", "0.6404166", "0.63552195", "0.6330702", "0.6265769", "0.6253875", "0.61925375", "0.61738133", "0.6162502", "0.61492056", "0.6100854", "0.60821855", "0.60821855", "0.607...
0.73069644
1
Select Query Count for ViewWorkflowModuleData override parent's getSelectQueryCount()
Выборка количества запросов для ViewWorkflowModuleData переопределяет метод getSelectQueryCount() родителя
public function getSelectQueryCount() { $tables = "workflow,"; $tables = substr($tables, 0, strlen( $tables) - 1); $innerJoins = $this->getInnerJoins(); $query = "SELECT count(*) as total_data FROM $tables $innerJoins "; return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountSelect() {}", "public function countQueriesDataProvider() {}", "public function getQueryCount();", "public function getQueryCount();", "public function queryCount()\n\t{\n\t\treturn $this->source->queryCount();\n\t}", "function getQueryCount()\n {\n return $this->_queryC...
[ "0.74375623", "0.71771485", "0.7106137", "0.7106137", "0.68308973", "0.67337286", "0.6704904", "0.6694791", "0.6694401", "0.66743815", "0.667142", "0.667142", "0.66682404", "0.6653718", "0.66280866", "0.6625321", "0.6610069", "0.6604424", "0.65977365", "0.6581787", "0.6581787...
0.75249225
0
Create new object of ViewWorkflowModuleData
Создать новый объект ViewWorkflowModuleData
function createNew() { include_once( "Bin/Module.DataModel/WorkflowModuleData.php"); $o = new ViewWorkflowModuleData(); return $o; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createAction()\n\t{\n\t\t$this->view->modules = Modules::find(array(\n\t\t \"application_id={$this->session->get('auth-identity')['Application_ID']}\"\n ));\n\t}", "protected function LoadModuleInstanceData()\n {\n // check if page is under workflow control and locked\n ...
[ "0.6240478", "0.6159505", "0.5992916", "0.59055185", "0.5867749", "0.58572847", "0.58562905", "0.5832856", "0.57970315", "0.57788354", "0.57589257", "0.5726254", "0.5707638", "0.5691603", "0.5691011", "0.5687197", "0.5650551", "0.5640428", "0.5621998", "0.56196594", "0.561069...
0.8102068
0
Returns whether the paragraph is aligned with other paragraphs in its alignment.
Возвращает, выровнен ли абзац с другими абзацами в его выравнивании.
public function isAligned() { return $this->aligned; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasParagraphs(){\n return $this->_has(3);\n }", "protected function _text_align()\n {\n $style = $this->_frame->get_style();\n $w = $this->_frame->get_containing_block(\"w\");\n $width = (float)$style->length_in_pt($style->width, $w);\n\n switch ($style->tex...
[ "0.6007189", "0.5544741", "0.551467", "0.5220142", "0.5195136", "0.5188089", "0.5180809", "0.51640403", "0.49955356", "0.49738723", "0.49738723", "0.4971938", "0.497168", "0.48364457", "0.4835631", "0.48292494", "0.48157647", "0.48090246", "0.48011336", "0.47796196", "0.47677...
0.7524777
0
Get authorization uri for service
Получить URI авторизации для службы
public function getAuthorizationUri() { $token = $this->service->requestRequestToken(); $uri = $this->service->getAuthorizationUri(['oauth_token' => $token->getRequestToken()]); return $uri; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_authorization_endpoint_uri(): string\n {\n return self::AUTHORIZATION_ENDPOINT_URI;\n }", "public function getAuthorizationUri()\n {\n return $this->authorizationUri;\n }", "public function getAuthUrl(): string\n {\n return $this->client->getAuthor...
[ "0.77491885", "0.73413426", "0.7286677", "0.7211736", "0.71934056", "0.7176888", "0.71158403", "0.70887804", "0.7064104", "0.7058907", "0.70348024", "0.70101154", "0.69829506", "0.69604576", "0.69604576", "0.69604576", "0.69604576", "0.6936703", "0.68522364", "0.6816658", "0....
0.75443023
1
Check if have an access token and refresh if needed
Проверьте, есть ли токен доступа, и обновите его при необходимости
protected function checkTokenRefresh() { $storage = $this->service->getStorage(); $serviceName = ucfirst($this->getServiceName()); if ($storage->hasAccessToken($serviceName)) { $token = $storage->retrieveAccessToken($serviceName); //need to check if we can refresh yet $extraParams = $token->getExtraPa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function refresh_token()\n {\n $url = self::API_ROOT_URL . \"/oauth/token\";\n\n $headers = array();\n $headers[] = 'Host: api.cronofy.com';\n $headers[] = 'Content-Type: application/json; charset=utf-8';\n\n $postfields = array(\n 'client_id' => $this->client_id,\n...
[ "0.7257425", "0.7146657", "0.7101824", "0.70861864", "0.70742106", "0.70441115", "0.69434416", "0.68850505", "0.6875705", "0.68448424", "0.6795838", "0.6733362", "0.6707013", "0.6686278", "0.6678726", "0.66610986", "0.6657056", "0.6653785", "0.6651674", "0.6639031", "0.661762...
0.7950151
0
Returns the Dialog helper object.
Возвращает объект помощника Dialog.
public function getDialogHelper() { if ($this->dialog instanceof DialogHelper) { return $this->dialog; } $this->dialog = new DialogHelper(); $this->dialog->setHelperSet($this->getHelperSet()); return $this->dialog; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDialog()\n {\n return new Dialog(\n $this->connection,\n $this->bankCode,\n $this->username,\n $this->pin,\n $this->systemId,\n $this->logger\n );\n }", "protected function createDialog() {\n $dialog = ...
[ "0.7720271", "0.6825156", "0.648276", "0.6410094", "0.62319887", "0.618184", "0.61666894", "0.61435163", "0.6132889", "0.60764617", "0.60501087", "0.60470873", "0.6026574", "0.599472", "0.5988156", "0.58781266", "0.5820206", "0.57872874", "0.5786025", "0.57780325", "0.568431"...
0.87052625
0
return session variables as an associative array
вернуть переменные сеанса в виде ассоциативного массива
public static function getVars(){ self::initSession(); $sessionVars = array(); foreach( $_SESSION as $name => $value ){ $sessionVars[$name] = $value; } return $sessionVars; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray()\n\t{\n\t\treturn $_SESSION;\n\t}", "public function toArray()\n\t{\n\t\treturn $_SESSION;\n\t}", "public function toArray()\r\n\t{\r\n\t\treturn $_SESSION;\r\n\t}", "public function getSessionVariables()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----...
[ "0.79116625", "0.79116625", "0.7893694", "0.76835924", "0.7532642", "0.7467207", "0.73326486", "0.7277825", "0.72466177", "0.7239419", "0.7208519", "0.7137424", "0.7122563", "0.7112345", "0.70655835", "0.70299816", "0.70087796", "0.69989043", "0.6969665", "0.6934496", "0.6912...
0.8170752
0
Filter the query on the realname column Example usage: $query>filterByRealname('fooValue'); // WHERE realname = 'fooValue' $query>filterByRealname('%fooValue%', Criteria::LIKE); // WHERE realname LIKE '%fooValue%'
Фильтрация запроса по столбцу realname Пример использования: $query>filterByRealname('fooValue'); // WHERE realname = 'fooValue' $query>filterByRealname('%fooValue%', Criteria::LIKE); // WHERE realname LIKE '%fooValue%'
public function filterByRealname($realname = null, $comparison = null) { if (null === $comparison) { if (is_array($realname)) { $comparison = Criteria::IN; } } return $this->addUsingAlias(UserTableMap::COL_REALNAME, $realname, $comparison); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterByName($name)\n {\n return $this->filterByFirstname('%'.$name.'%', \\Criteria::LIKE)\n ->_or()->filterByLastname('%'.$name.'%', \\Criteria::LIKE)\n ->_or()->filterByTrigram('%'.$name.'%', \\Criteria::LIKE)\n ;\n }", "public function setRealName($rea...
[ "0.61921966", "0.61139494", "0.6077658", "0.6012541", "0.59651536", "0.5906386", "0.560587", "0.55972856", "0.5574616", "0.55600446", "0.5521817", "0.5414136", "0.53988355", "0.538401", "0.5382414", "0.53436714", "0.5341971", "0.5339919", "0.53063", "0.5296022", "0.5286517", ...
0.7044463
0
Get Wizard config defaults.
Получить значения по умолчанию конфигурации Волшебника.
public function wizardConfigDefaults(): array { return ['fields' => ['', '']]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaults();", "protected function getDefaults()\n {\n $config = new configuration\\config;\n $config->responsibleDefault();\n return $config->getDefaults();\n }", "public static function get_defaults() {\n\t\treturn self::$defaults;\n\t}", "abstract protected fun...
[ "0.7248065", "0.712635", "0.71080196", "0.70660865", "0.7017847", "0.70047385", "0.69577146", "0.6941933", "0.6941933", "0.6926826", "0.69071585", "0.6885238", "0.68804413", "0.68804413", "0.68804413", "0.68566287", "0.6826845", "0.6746885", "0.67267793", "0.6717827", "0.6716...
0.71681684
1
Return wizard config sections.
Вернуть разделы конфигурации волшебника.
public function wizardConfigSections():array { return ['required', 'range']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woovator_admin_get_settings_sections() {\n $sections = array(\n \n array(\n 'id' => 'woovator_general_tabs',\n 'title' => esc_html__( 'General', 'woovator-pro' )\n ),\n\n array(\n 'id' => 'woovator_woo_te...
[ "0.66932386", "0.6621123", "0.6340143", "0.6273554", "0.6220051", "0.6194182", "0.61868894", "0.614951", "0.61430955", "0.6127665", "0.6048522", "0.60062736", "0.5970553", "0.5914007", "0.5913909", "0.59064466", "0.58999157", "0.5893116", "0.58901477", "0.58530426", "0.582771...
0.7165438
0
Returns true if the control can be used only for virtual property.
Возвращает true, если контроль может использоваться только для виртуального свойства.
public function wizardIsForVirtualOnly():bool { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isVirtual()\n {\n return $this->getIsVirtual();\n }", "public function isVirtual()\n {\n return $this->getType() == self::TYPE_VIRTUAL;\n }", "public function is_virtual() {\n\t\treturn true;\n\t}", "public function is_virtual() {\n\t\treturn true;\n\t}", "function...
[ "0.71606034", "0.7111629", "0.6971192", "0.6971192", "0.6796014", "0.67132056", "0.6616311", "0.65646136", "0.6384144", "0.622827", "0.61497813", "0.60995424", "0.60651624", "0.6055053", "0.60359466", "0.5872408", "0.5861007", "0.58457536", "0.58410364", "0.57536846", "0.5671...
0.7177363
0
Protected accessor used to initialize auth object
Защищенный аксессор, используемый для инициализации объекта auth
abstract protected function getAuth();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct(){\n\t\t$this->auth = $this->getAuth();\n\t}", "public function __construct(){\r\n\t\t$this->_auth = Zend_Auth::getInstance();\r\n\t}", "public function initAuthenticationObject()\n {\n $config = \\Piwik\\Config::getInstance();\n $auth = StaticContainer::getContainer()->ge...
[ "0.7980694", "0.7625868", "0.7603633", "0.76004356", "0.7584518", "0.758402", "0.7579928", "0.75477916", "0.75230575", "0.75159657", "0.7473375", "0.7470563", "0.7421099", "0.74020904", "0.7375888", "0.73732626", "0.7351478", "0.73462594", "0.73356014", "0.73322564", "0.73002...
0.7760975
1
/ connect to the ftp server
/ подключиться к серверу ftp
public function ftp_connect();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function connect(){\n\t\t$this->_ftp->connectftp();\n\t}", "protected function connect() {\n if (!empty($this->settings['host'])) {\n $this->connid = ftp_connect($this->settings['host'], $this->settings['port']);\n }\n }", "function connect()\r\n\t{\r\n $this->conn=ftp...
[ "0.87692136", "0.8603114", "0.8483479", "0.84328973", "0.814232", "0.8049472", "0.77587265", "0.76605594", "0.7561236", "0.7463351", "0.74298745", "0.73821384", "0.7183829", "0.715351", "0.7147598", "0.7080063", "0.698168", "0.697018", "0.6899919", "0.68751544", "0.68725014",...
0.8874005
0
use a default repository with the main currencies if no repository is defined
используйте репозиторий по умолчанию с основными валютами, если репозиторий не определен
public static function useDefaultCurrencyRepository($use=true) { self::$use_default_currency_repository = $use; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getDefaultRepository();", "static public function defaultRepo()\n {\n $connManager = ConnectionManager::getInstance();\n $write = $connManager->getConnection(static::WRITE_SOURCE_ID);\n $read = $connManager->getConnection(static::READ_SOURCE_ID);\n retu...
[ "0.7106685", "0.6535381", "0.6340032", "0.62941056", "0.6270779", "0.6206659", "0.61087203", "0.6054044", "0.59749895", "0.57736456", "0.5751571", "0.5721549", "0.5717956", "0.5702726", "0.56863916", "0.5668956", "0.5639065", "0.56269616", "0.56269616", "0.56269616", "0.55888...
0.7031848
1
/ recherche si l'amapien d'id $id est avec un binome dans la $table. retourne l'id du binome inscrit au contrat si il y a bien un binome, 1 sinon
Ищет, есть ли в таблице $table амапиен с id $id в паре. Возвращает id пары, зарегистрированной в договоре, если пара действительно существует, иначе возвращает 1
function getIdBinome( $base, $table, $id) { $question="SELECT id_contrat FROM binome WHERE id_binome='".$id."' AND type_amap='".$table."'"; $reponse = mysqli_query($question) or die(mysqli_error()); if ( $donnees=mysqli_fetch_array($reponse) ) { // c'est un binome $idContrat = $donnees['id_contrat']; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function find_detalle_remito($table,$id)\n{\n global $db;\n $id = (int)$id;\n if(tableExists($table)){\n $sql =\" SELECT * FROM \".$db->escape($table);\n $sql .=\" WHERE id_remito=\". $db->escape($id);\n return find_by_sql($sql);\n }\n}", "public function validate_existencia...
[ "0.69270533", "0.6449438", "0.6395124", "0.6361121", "0.63036335", "0.6299167", "0.6229345", "0.6155176", "0.6133242", "0.61247164", "0.6053645", "0.60262525", "0.6020229", "0.6012103", "0.60075855", "0.5984196", "0.5919905", "0.5911419", "0.58990115", "0.58984226", "0.588346...
0.7134677
0
This function can be used to create a table without worrying about schema compatibilities across supported database systems. If the table exists will, by default, do nothing. Builds table with columns as passed to it at least one column must be sent. The columns array should have one subarray for each column these sub ...
Эта функция может использоваться для создания таблицы без необходимости беспокоиться о совместимости схемы между поддерживаемыми системами баз данных. Если таблица существует, по умолчанию она ничего не делает. Создает таблицу с колонками, переданными ей, хотя бы одна колонка должна быть передана. Массив колонок должен...
public function create_table($table_name, $columns, $indexes = array(), $parameters = array()) { $parameters = array_merge(array( 'if_exists' => 'ignore', 'temporary' => false, ), $parameters); // With or without the database name, the fullname looks like this. $full_table_name = str_replace('{db_prefix...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createTable($tableName, $columns, $ifNotExists = true) {\n $ifNotExists = $ifNotExists ? \"IF OBJECT_ID ('\" . self::$schema . \".{$tableName}', 'U') IS NULL\\n\" : '';\n $create = $ifNotExists . \"CREATE TABLE [\" . self::$schema . \"].[{$tableName}] (\\n\";\n $fields = [];\n ...
[ "0.73847914", "0.73214823", "0.7240997", "0.6793146", "0.67918926", "0.6719202", "0.66436166", "0.66071564", "0.6597888", "0.65880626", "0.6565609", "0.65653384", "0.65550995", "0.6548279", "0.65288717", "0.6526375", "0.6478709", "0.641894", "0.63992184", "0.6390947", "0.6378...
0.75835174
0
Return a copy of this instance package log
Вернуть копию этого экземпляра пакета журналов
public function package_log() { return $this->_package_log; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLog() {\r\n\t\t$this->log->setEventItem('pid', posix_getpid());\r\n\t\t$this->log->setEventItem('syslog_time', date('Y-m-d H:i:s'));\r\n\t\treturn $this->log;\r\n\t}", "function getLog() {\n return $this->_log;\n }", "private function getLog()\n {\n return $this->_log;\n ...
[ "0.7422179", "0.70675546", "0.7023243", "0.70051485", "0.6957061", "0.69489247", "0.692104", "0.6860481", "0.6860481", "0.6860481", "0.68283933", "0.6823685", "0.6807199", "0.6738869", "0.6661425", "0.6659114", "0.6654722", "0.6633941", "0.6615966", "0.66005796", "0.6593441",...
0.7242139
1
Finds a column by name in a table and returns some info.
Находит столбец по имени в таблице и возвращает некоторые сведения.
protected function _get_column_info($table_name, $column_name) { $columns = $this->list_columns($table_name, true); foreach ($columns as $column) { if ($column_name == $column['name']) { return $column; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_column($table_name, $column_name)\r\n {\r\n $result = $this->run_query_result(\"SHOW COLUMNS FROM `$table_name` LIKE '$column_name'\", true);\r\n\r\n if ($result->count() !== 1) {\r\n throw new Kohana_Exception('migrations.column_not_found', array($column_name, $table_name));\r\n...
[ "0.71045655", "0.70883685", "0.6924415", "0.69001395", "0.68273824", "0.681452", "0.68137634", "0.6785749", "0.6779984", "0.67740583", "0.67343706", "0.67032194", "0.66839135", "0.66798407", "0.6634202", "0.6616867", "0.6564355", "0.6540758", "0.6535857", "0.65279114", "0.652...
0.777168
0
Submit handler for the mock_agent_activate() form.
Обработчик отправки для формы mock_agent_activate().
function mock_agent_activate_submit($form, &$form_state) { global $user; $agent = $form_state['agent']; db_update('mock_agents') ->fields(array('status' => 1, 'uid' => $user->uid, 'access' => REQUEST_TIME)) ->condition('aid', $agent->aid) ->execute(); backdrop_set_message(t('Agent !identificationI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function activation()\n {\n if (!$this->_mod()->setting('activation')) redirect();\n\n if (user_is_login()) $this->_redirect();\n\n\n $form = array();\n\n $form['validation']['params'] = array('email_activation', 'security_code');\n\n $form['submit'] = function ($params...
[ "0.60632265", "0.60599965", "0.60326564", "0.5987866", "0.5971286", "0.59686506", "0.5875741", "0.5755307", "0.570747", "0.5694796", "0.5694094", "0.5686492", "0.5684563", "0.56704456", "0.5661202", "0.56591153", "0.5638385", "0.563644", "0.5616358", "0.5591813", "0.55873036"...
0.8144261
0
Submit handler for the mock_agent_block() form.
Обработчик отправки для формы mock_agent_block().
function mock_agent_block_submit($form, &$form_state) { global $user; $agent = $form_state['agent']; db_update('mock_agents') ->fields(array('status' => 2, 'uid' => $user->uid, 'access' => REQUEST_TIME)) ->condition('aid', $agent->aid) ->execute(); backdrop_set_message(t('Agent !identificationID b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function blockSubmit($form, &$form_state) {\n $this->setConfigurationValue('example_block_name', $form_state['values']['example_block_name']);\n }", "public function submitblock($block)\n {\n return $this->_run('submitblock', $block);\n }", "public function blockSubmit($form, FormStateInterface...
[ "0.6376874", "0.62442935", "0.60272515", "0.60238355", "0.6011752", "0.58978677", "0.5878515", "0.58585703", "0.58353573", "0.5829282", "0.5827295", "0.58208984", "0.57747674", "0.5771173", "0.5732702", "0.5716669", "0.5689945", "0.5683706", "0.5680644", "0.56764656", "0.5676...
0.72919106
0
Submit handler for the mock_agent_delete() form.
Обработчик отправки для формы mock_agent_delete().
function mock_agent_delete_submit($form, &$form_state) { global $user; $agent = $form_state['agent']; db_delete('mock_agents') ->condition('aid', $agent->aid) ->execute(); backdrop_set_message(t('Agent !identificationID deleted!', array('!identificationID' => $agent->identificationID))); backdrop_go...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function kolab_lead_delete_form_submit($form, &$form_state) {\n $lead = $form_state['lead'];\n kolab_lead_delete($lead->lid);\n drupal_set_message(t('Lead %title deleted.', array('%title' => entity_label('lead', $lead))));\n $form_state['redirect'] = '<front>';\n}", "function dh_landunit_form_submit_delete(&...
[ "0.6826255", "0.67668647", "0.6632734", "0.66247267", "0.6602873", "0.6597799", "0.6541233", "0.65106666", "0.64862394", "0.64841413", "0.647773", "0.6466839", "0.64157534", "0.6411708", "0.6390553", "0.63754123", "0.63712835", "0.6361444", "0.6358135", "0.6354678", "0.630997...
0.82582855
0
Deletes this Song and the associated file(s).
Удаляет этот Song и связанные с ним файл(ы).
public function delete() { $elem_in_playlists = $this->elements()->get(); foreach ($elem_in_playlists as $elem) { Playlist::playlistChanged($elem->playlist_id); $elem->delete(); } if (Playlist::isPlaylistUpdateEnabled()) Playlist::updateChangedPlay...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete()\n\t{\n\t\tforeach ($this->iterator as $file)\n\t\t{\n \t\t\tunlink($file->getPathname());\n\t\t}\n\t}", "public function delete() {\n // Delete from files\n $stmt = $this->db->prepare(\"DELETE FROM files where itemID = :itemID\");\n $stmt->bindValue(\":itemID\", $thi...
[ "0.71788615", "0.7016158", "0.69098425", "0.6849137", "0.67848796", "0.6763012", "0.6714293", "0.66495186", "0.66253614", "0.65928066", "0.65928066", "0.6572307", "0.64545554", "0.64536107", "0.6429958", "0.6392748", "0.6368396", "0.6336569", "0.6327446", "0.6311971", "0.6283...
0.7138302
1
Ritorna il nome della traccia (in questo caso della canzone).
Возвращает имя трека (в данном случае песни).
public function nome_traccia() { $result = $this->nome_canzone; if ($this->title!=null) { $result = $this->title; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function generate_zone_name()\n {\n }", "function getNombre_zona()\n {\n if (!isset($this->snombre_zona) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->snombre_zona;\n }", "public function getZone_name()\n {\n return $thi...
[ "0.6372102", "0.62913126", "0.62677366", "0.6266742", "0.623", "0.61726713", "0.6157986", "0.60962725", "0.6083137", "0.6070783", "0.6044097", "0.60235584", "0.59832674", "0.5959797", "0.59470046", "0.59470046", "0.59470046", "0.59470046", "0.5924888", "0.5908275", "0.5879005...
0.77162075
0
Get the invoice lines of the invoice.
Получите строки счета счета.
public function invoiceLines() { return $this->hasMany(InvoiceLine::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_invoice_lines(){\n\n $lines = array();\n\n $products = $this->get_products();\n if( !empty( $products ) ){ $lines = array_merge( $lines, $products ); }\n\n $shipping = $this->get_shipping();\n if( !empty( $shipping ) ){ $lines = array_merge( $lines, $shipping ...
[ "0.87156886", "0.7557365", "0.74656314", "0.743662", "0.72469395", "0.71092427", "0.70983505", "0.7059282", "0.69365835", "0.6896244", "0.6896244", "0.6896244", "0.68655556", "0.68655556", "0.682252", "0.6757883", "0.67158794", "0.668702", "0.66676563", "0.66342753", "0.66307...
0.8249142
1
Get formatted reference number.
Получить отформатированный номер референса.
public function getFormattedReferenceNumberAttribute(): string { if (!$referenceNumber = $this->reference_number) return ''; $reversed = strrev($referenceNumber); $result = ''; for ($i = 0; $i < strlen($reversed); $i++) { if ($i > 0 && $i % 5 == 0) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function referenceFormat()\n {\n return 'REP'.substr(date('Y'), 2).date('md').uniqid();\n }", "public function getReferenceNumber()\n {\n return $this->referenceNumber;\n }", "public static function referenceNumber()\n {\n return new TextNode(\"reference_number\");\n ...
[ "0.7542533", "0.73855466", "0.73686385", "0.7328782", "0.7328042", "0.7328042", "0.7240725", "0.72341204", "0.7191556", "0.7147101", "0.6928056", "0.6907819", "0.6892527", "0.68291056", "0.67675763", "0.6526512", "0.64698", "0.64613926", "0.64587253", "0.63792974", "0.6356596...
0.85290116
0
Set the reference number.
Задайте номер ссылки.
public function setReferenceNumberAttribute($value) { $this->attributes['reference_number'] = self::cleanReferenceNumber($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_referenceNumber($referenceNumber) {\n \t$this->referenceNumber = $referenceNumber;\n }", "protected function setReference($reference)\r\n {\r\n $this->reference = $reference;\r\n }", "public function setReferenceId(?string $value): void {\n $this->getBackingStore()...
[ "0.76017636", "0.7062899", "0.7026962", "0.70169663", "0.69670343", "0.6952962", "0.6912826", "0.67810726", "0.67810726", "0.6691822", "0.65939367", "0.65779936", "0.65593946", "0.6534669", "0.6490412", "0.6490412", "0.6460318", "0.645868", "0.63648814", "0.63368714", "0.6316...
0.7841527
0
Clean the reference number (e.g. remove all whitespace characters).
Очистите номер ссылки (например, удалите все пробельные символы).
public static function cleanReferenceNumber(string $value): string { return preg_replace('@\s@', '', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function cleanup($number) {\n\t\treturn preg_replace(\"/[^0-9]/\", \"\", $number);\n\t}", "function clean_number($phone_number){\n\treturn preg_replace(\"/[^0-9]/\", \"\", $phone_number);\n}", "public function scrub()\n {\n return preg_replace( '/[^\\dx]/', '', $this->value );\n }", ...
[ "0.69868875", "0.66305566", "0.640343", "0.6285084", "0.6273243", "0.62306887", "0.62064457", "0.6173581", "0.6166296", "0.6158193", "0.61561024", "0.61528397", "0.6097295", "0.6096058", "0.6086807", "0.6073552", "0.6067511", "0.6062324", "0.60595226", "0.60164696", "0.600956...
0.8049663
0
Get all invoice numbers of the invoices which have given invoice date.
Получить все номера счетов тех счетов, которые имеют заданную дату счета.
public static function getExistingInvoiceNumbers(DateTime $invoiceDate): array { return Invoice::where('invoice_date', $invoiceDate->format('Y-m-d'))->pluck('invoice_number')->all(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getInvoices($clientID,$productID,$startDate,$endDate)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('invoices');\n\t\t$this->db->join('invoicelineitems','invoicelineitems.invoice_num=invoices.invoice_num');\n\t\t$this->db->join('products','products.product_id=invoicelineitems.product_id');\n\t\t$...
[ "0.66534585", "0.6571263", "0.65049946", "0.6383324", "0.6225595", "0.62230504", "0.622149", "0.619132", "0.61831695", "0.617371", "0.6145658", "0.6145317", "0.61304563", "0.6116287", "0.6116287", "0.60305345", "0.60158163", "0.60033035", "0.6000256", "0.5994478", "0.5921798"...
0.77857107
0
Generate a reference number. The reference number is related to given invoice number.
Сгенерируйте справочное число. Справочное число связано с указанным номером счета.
public static function generateReferenceNumber($invoiceNumber) { $reversed = strrev($invoiceNumber); $coefficient = array(7, 3, 1); $num = 0; for ($i = 0; $i < strlen($reversed); $i++) { $num += $reversed[$i] * $coefficient[$i % 3]; } $controlNumber = (10 ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateInvoiceReference()\n {\n $date = date('Y_m_d');\n return $this->invoice_reference = strtoupper(uniqid($date.'_'));\n }", "Public Static function getNewInvoiceNumber() {\n $q = date(\"dmy\");\n $options = [\n 'type' => 'object',\n 'su...
[ "0.8184139", "0.7111383", "0.70431393", "0.7018498", "0.681945", "0.6775404", "0.6770761", "0.66808796", "0.6651605", "0.66427505", "0.6626906", "0.6591951", "0.65873", "0.65703446", "0.65652823", "0.6503088", "0.64884865", "0.63782746", "0.63558114", "0.633512", "0.6287676",...
0.82346314
0
return the monolog instance
верните экземпляр monolog
public static function instance() { return static::$monolog; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function newLogger()\n {\n return new Monolog(config('logger'));\n }", "protected function getMonologInstance()\n {\n /* Use logstash formatter for logstash log file */\n $stream = (new StreamHandler('./logs/logstash.log', 'INFO'))\n ->setFormatter(new LogstashFor...
[ "0.7513618", "0.72322065", "0.7200067", "0.7070781", "0.7000982", "0.6944209", "0.68774736", "0.68729573", "0.68556863", "0.68485063", "0.6825648", "0.6769508", "0.6737492", "0.67112404", "0.6655983", "0.6653737", "0.66141415", "0.6605563", "0.65804005", "0.65613365", "0.6539...
0.8379338
0
Checks if the address contains parameters with the given names. This method accepts an arbitrary number of arguments, each of which should be a string representing a parameter name.
Проверяет, содержит ли адрес параметры с заданными именами. Этот метод принимает произвольное количество аргументов, каждый из которых должен быть строкой, представляющей имя параметра.
public function has(string ...$names): bool { foreach ($names as $name) { if (!isset($this->parameters[$name])) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function has(string ...$names): bool\n {\n foreach ($names as $name) {\n if (!isset($this->_parameters[$name])) {\n return false;\n }\n }\n return true;\n }", "public function hasValid(string ...$names): bool\r\n {\r\n foreach ($nam...
[ "0.7361959", "0.7243965", "0.6713591", "0.66183656", "0.66183656", "0.6604985", "0.65965384", "0.65407115", "0.64640903", "0.63883144", "0.6296335", "0.62946683", "0.624172", "0.620032", "0.61994946", "0.61970603", "0.61846906", "0.616627", "0.6161366", "0.61592275", "0.61503...
0.7342127
1
Checks if the collection contains parameters with the given names and validates them. This method accepts an arbitrary number of arguments, each of which should be a string representing a parameter name.
Проверяет, содержит ли коллекция параметры с заданными именами и проверяет их. Этот метод принимает произвольное количество аргументов, каждый из которых должен быть строкой, представляющей имя параметра.
public function hasValid(string ...$names): bool { foreach ($names as $name) { if (!isset($this->parameters[$name]) || !$this->parameters[$name]->isValid()) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function has(string ...$names): bool\n {\n foreach ($names as $name) {\n if (!isset($this->_parameters[$name])) {\n return false;\n }\n }\n return true;\n }", "public function has(string ...$names): bool\r\n {\r\n foreach ($names as...
[ "0.7015358", "0.6968659", "0.6350374", "0.6317687", "0.6314094", "0.6314094", "0.6283167", "0.6240721", "0.6231489", "0.6109557", "0.6098418", "0.60512125", "0.60491985", "0.6016441", "0.59925485", "0.59905076", "0.59656286", "0.59653115", "0.5963786", "0.59604794", "0.591716...
0.73300654
0
Loads the template defined in the $template property.
Загружает шаблон, определённый в свойстве $template.
private function loadTemplate(): void { if (!empty($this->template)) { $this->setTemplate($this->template); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function loadTemplate();", "public function loadTemplet($template)\n {\n }", "private function loadTemplate()\n {\n\n\n /*\n * En primer lugar debemos ubicarnos en el direcctorio: resources/views\n */\n $base_path = dirname(dirname(dirname(__DIR__)...
[ "0.8140955", "0.79858685", "0.772581", "0.7611614", "0.75620896", "0.7501225", "0.7492366", "0.7470402", "0.74190116", "0.7396579", "0.7357957", "0.73523", "0.7314624", "0.7275957", "0.7243875", "0.72225356", "0.7158025", "0.71362025", "0.7102228", "0.7081242", "0.7074973", ...
0.8295724
0
Parameters: > $location_a is an associative array that represents a full location where 'street' => the street portions of the location 'supplemental' => additional street portion of the location 'province' => the province, state, or territory 'country' => lowercased twoletter ISO code (REQUIRED) > $location_b is assoc...
Параметры: > $location_a — это ассоциативный массив, представляющий полный адрес, где 'street' — это часть улицы адреса, 'supplemental' — дополнительная часть улицы адреса, 'province' — провинция, штат или территория, 'country' — нижний регистр двухбуквенного кода ISO (обязательно). > $location_b — ассоциативный массив...
function location_driving_directions_link_us($location_a, $location_b) { return _location_driving_directions_link_us_yahoo($location_a, $location_b); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _location_driving_directions_link_us_yahoo($location_a, $location_b) {\n if (trim($location_b['country']) != 'ca' && trim($location_b['country']) != 'us') {\n return '';\n }\n\n // These are the fields that need to be in each location if we are to provide a direct\n // link to yahoo directions. If...
[ "0.77701086", "0.52509934", "0.51433897", "0.49379975", "0.48762372", "0.47555682", "0.47094804", "0.46253607", "0.46237728", "0.45579875", "0.45459658", "0.4540418", "0.45164794", "0.44977158", "0.44920805", "0.44898644", "0.44672182", "0.4448725", "0.44437584", "0.4443386", ...
0.7867983
0
Parameters: Function that is called by location_driving_directions_link_us() under assumption that it is the chosen function Returns: a URL with HTTP GET variables Depending on how full the locationes are, the URL will either point to the driving directions on Yahoo! or, if only partial locationes are provided, a URL t...
Параметры: Функция, вызываемая функцией location_driving_directions_link_us() при предположении, что это выбранная функция Возвращает: URL с HTTP GET-переменными В зависимости от полноты данных о местоположении, URL будет указывать либо на карты маршрутов Yahoo!, либо, если предоставлены только частичные данные о место...
function _location_driving_directions_link_us_yahoo($location_a, $location_b) { if (trim($location_b['country']) != 'ca' && trim($location_b['country']) != 'us') { return ''; } // These are the fields that need to be in each location if we are to provide a direct // link to yahoo directions. If all of the...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function location_driving_directions_link_us($location_a, $location_b) {\n return _location_driving_directions_link_us_yahoo($location_a, $location_b);\n}", "function _location_us_enough_fields_for_yahoo($location) {\n // link to yahoo directions. If all of these fields don't have values, then we generate\n ...
[ "0.67458177", "0.5816129", "0.58034426", "0.5752731", "0.565079", "0.5428559", "0.5386167", "0.5367151", "0.53425705", "0.53319854", "0.5311969", "0.5273851", "0.5209707", "0.52007383", "0.51916426", "0.5185287", "0.5182172", "0.5136", "0.5093544", "0.5068746", "0.505565", ...
0.7466107
0
MAIN QUERY METHOD AND QUERY PARAM BINDING Requires as arguments the sql statement with placeholders and the array of params Accepts as an optinal argument the name of the model class to be used as return object Binds the params provided to the sql statement and performs the db query. If model class is provided, fetches...
ОСНОВНОЙ МЕТОД ЗАПРОСА И СВЯЗЬ ПАРАМЕТРОВ ЗАПРОСА Требует в качестве аргументов sql-запрос с плейсхолдерами и массив параметров Принимает в качестве необязательного аргумента имя класса модели, который будет использоваться как возвращаемый объект Связывает предоставленные параметры с sql-запросом и выполняет запрос к б...
public function query($sql, $params = [], $class = false){ $this->_error = false; if($this->_query = $this->_pdo->prepare($sql)){ $x = 1; if(count($params)){ foreach($params as $param){ $this->_query->bindValue($x, $param); $x++; } } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function QueryFetchObject($sql, $params = null) {\n $data = array();\n $this->_query($this->_parameterize($sql, $params));\n while ($rows = @mysql_fetch_object($this->query)) {\n $data[] = $rows;\n }\n $this->results = $data;\n }", "public function query($sql, $pa...
[ "0.6640077", "0.6572421", "0.6555044", "0.6536685", "0.6505599", "0.64413774", "0.6433263", "0.64115626", "0.6402304", "0.6399265", "0.63866323", "0.63861185", "0.6375432", "0.63729954", "0.6319776", "0.63103455", "0.6254364", "0.6238893", "0.6213411", "0.62021434", "0.617554...
0.70642716
0
UPDATES DATA IN DB TABLE Unique identifier $id is a required parameter, along with db table name and an array of db fields to be updated. The db fields array must contain key value pairs of db column names and values to be inserted Returns true on success, false otherwise
ОБНОВЛЯЕТ ДАННЫЕ В ТАБЛИЦЕ БД. Уникальный идентификатор $id является обязательным параметром, вместе с именем таблицы БД и массивом полей БД для обновления. Массив полей БД должен содержать пары ключ-значение, представляющие имена столбцов БД и значения, которые необходимо вставить. Возвращает true при успешном выполне...
public function update($table, $id, $fields = []){ $fieldStr = ''; $values = []; foreach($fields as $field => $value){ $fieldStr .= ' '.$field.' =?, '; $values[] = $value; } $fieldStr = trim($fieldStr); // remove spaces around $fieldStr = rtrim($fieldStr, ','); // remov...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($table, $id, $fields = array()){\n if(count($fields)){\n $set = '';\n $x = 1;\n\n foreach ($fields as $col_name => $value){\n $set .= \"{$col_name} = ?\";\n if($x < count($fields)){\n $set .= ', ';\n ...
[ "0.7732533", "0.76704603", "0.755407", "0.75266683", "0.7475251", "0.74639726", "0.7395765", "0.7357555", "0.73468965", "0.7304019", "0.7283449", "0.72542787", "0.7224254", "0.71733946", "0.71336174", "0.7130395", "0.7122489", "0.7031574", "0.7029487", "0.6969732", "0.6963672...
0.7682382
1
RESET THE _result AND _query PROPERTY VALUES TO NULL
Сбросить значения свойств _result и _query до NULL
public function clearResult(){ $this->_result = null; $this->_query = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function resetQuery() {\n\t\t$this->stmt = null;\n\t\t$this->queryParams = [];\n\t}", "public function reset() {\n $this->query = array();\n }", "protected function resetResults()\n {\n // reset a few things\n $this->lastInsertID = 0;\n $this->lastResult = null;...
[ "0.76489544", "0.76372844", "0.75289947", "0.7481267", "0.7407895", "0.73545516", "0.73472214", "0.7299989", "0.72915024", "0.72693694", "0.72477555", "0.72453874", "0.7241251", "0.72129047", "0.7201088", "0.71948373", "0.7155927", "0.7132346", "0.7130873", "0.7119057", "0.70...
0.8171018
0