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
ajouterCitoyen("bass", "Diop", "20150510 00:00:00", "thies", 1238200400779, "masculin", "20150813 00:00:00", "20150910 00:00:00", "etudiant", "informatique", "celibataire", "20150812", "profil.jpg", "noir", "1.3", "0020456", "20150812"); //////////////////////////// ajouter contacte ////////////////////////////////////...
ajouterCitoyen("bass", "Diop", "20150510 00:00:00", "thies", 1238200400779, "masculin", "20150813 00:00:00", "20150910 00:00:00", "etudiant", "informatique", "celibataire", "20150812", "profil.jpg", "noir", "1.3", "0020456", "20150812"); //////////////////////////// ajouter contacte ////////////////////////////////////...
function ajouterContact($tel,$email,$telGondwana,$adressGondwana,$telSenegal,$adresse,$adresseTravail,$adresseDomicil,$cniCitoyen){ $bdd = new PDO('mysql:host=localhost;dbname=gondwana', 'root', 'passer'); //insertion avec requête préparée $sql="INSERT INTO contacts(cty_telephone, cty_email, cty_telGondwana, cty_a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function crearContacto($conexion, $nombre, $apellido, $telefono, $movil, $email){\r\n\t$resultado = $conexion->query(\"INSERT INTO contactos (nombre, apellido, telefono, movil, email) VALUES ('$nombre','$apellido','$telefono','$movil','$email')\");\r\n}", "function ajouterCitoyen($nom,$prenom,$datenais,$lieunais...
[ "0.7354048", "0.7251094", "0.7251094", "0.69102335", "0.6893848", "0.68259144", "0.6821789", "0.6748285", "0.6743216", "0.6740295", "0.67101645", "0.6692685", "0.6675008", "0.6669215", "0.66655177", "0.6639609", "0.6634278", "0.6627869", "0.66266483", "0.66112345", "0.6610536...
0.73811984
0
Get upload date of file
Получить дату загрузки файла
public function getUploadDate();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_FileDate() {\n return $this->file_date;\n }", "function getDateUploaded() {\n\t\treturn $this->getData('dateUploaded');\n\t}", "function getDateUploaded() {\n\t\treturn $this->getData('dateUploaded');\t\n\t}", "public function get_FileDate_Date() {\n return DateTime::createFromForm...
[ "0.81634474", "0.7930747", "0.7899538", "0.7857881", "0.7306805", "0.7213288", "0.71593595", "0.7078162", "0.6901552", "0.6897212", "0.67402595", "0.65553117", "0.649065", "0.6488603", "0.64724404", "0.64690095", "0.6399547", "0.63621336", "0.63542295", "0.63417083", "0.63318...
0.8875633
1
Get date of change
Получить дату изменения
public function getChangeDate();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDateChange()\n {\n return $this->dateChange;\n }", "public function getDateChange();", "public function getChangeDate()\n {\n return $this->getCreatedAt();\n }", "public function getChangedDate()\n {\n return isset($this->source['changed']) ? DateTime::fromJso...
[ "0.8184234", "0.792042", "0.75197756", "0.6922969", "0.6885635", "0.68266004", "0.6808153", "0.66792655", "0.65502906", "0.6460721", "0.63920766", "0.63479924", "0.629043", "0.6260664", "0.6196763", "0.6168065", "0.61333656", "0.61302793", "0.6104816", "0.6102334", "0.6097299...
0.8567828
0
Retorna la Cantidad de Columnas del Archivo Excel.
Возвращает количество столбцов файла Excel.
public function countColumns() { return $this->_columnas; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getColumnasReporte(){\n\n\t\treturn $this->columnas_excel;\n\t}", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "function getColumns();", "public function get_column_count() {\n\t\tlist ( $columns, $hidden ) ...
[ "0.68219846", "0.6815339", "0.6815339", "0.6815339", "0.6815339", "0.6809698", "0.66903913", "0.6561207", "0.6558138", "0.65550417", "0.6554744", "0.6543408", "0.6541916", "0.6540154", "0.65389097", "0.6527394", "0.6502526", "0.64895755", "0.6474547", "0.6468612", "0.64678293...
0.7106468
0
/ INPUT: $dir: a directory containing class files you wish to delete.
/ ВХОД: $dir: каталог, содержащий файлы классов, которые вы хотите удалить.
function delete_class_files($dir) { global $verbose; $all_files = scandir($dir); foreach ( $all_files as $f ) { if ( preg_match('#\.class\.php$#i', $f) || preg_match('#\.map\.inc\.php$#i', $f)) { if ( unlink("$dir/$f") ) { if ($verbose...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function delTree($dir)\n {\n $files = glob($dir.'/*');\n Buddy::out('Found %d files for deletion in \\'%s\\'', array(count($files), $dir));\n foreach($files as $file)\n {\n if(is_file($file))\n {\n // Delete the file:\n $thi...
[ "0.7051884", "0.69363", "0.6844253", "0.67454183", "0.6727462", "0.67187667", "0.67185175", "0.6714446", "0.67062", "0.6701563", "0.66954464", "0.6636735", "0.6612746", "0.65993917", "0.65967184", "0.65925413", "0.6580575", "0.65504825", "0.65317184", "0.6523796", "0.6512865"...
0.8422929
0
Render video gallery widget
Отображать виджет галереи видео
public function renderWidget($videoGallery = null, $latestVideos = null) { if ($this->headline === null) { $this->headline = $videoGallery->name; } else { $this->headline = $this->special; } if ($this->headline !== null) { $widgetContent = <<<EOS ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function vaveragroxner_video_Widget() {\n\t\n\t\t/* Widget settings. */\n\t\t$widget_ops = array( 'classname' => 'vaveragroxner_video_widget', 'description' => __('Show last video from category Vaveragroxner', 'kino') );\n\n\t\t/* Widget control settings. */\n\t\t$control_ops = array( 'width' => 300, 'height' => 3...
[ "0.7015234", "0.68835557", "0.6760365", "0.67541623", "0.6505877", "0.6422562", "0.6362112", "0.632261", "0.6306588", "0.6269884", "0.6241181", "0.62345535", "0.62176645", "0.6212468", "0.620474", "0.6202693", "0.61849177", "0.61744493", "0.61666757", "0.6158811", "0.6133835"...
0.71776956
0
Recherche une playlist par son ID Renvoit le contenu du modal pour la suppresion de la playlist
Поиск плейлиста по его ID Возвращает содержимое модального окна для удаления плейлиста
public static function searchById($id) { //appel de la fonction de recherche par ID $r = Playlist::findById($id); //generation de l'affichage echo '<div class="modal-header bg-color-custom radius"> <button type="button" class="close" data-dismiss="modal"> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPlaylist()\n\t{\n $app = JFactory::getApplication();\n\n $option\t= $app->input->get('option', '', 'word');\n $view = $app->input->get('view', '', 'word');\n $id = $app->input->get('id', '', 'int');\n $playlist_id = $app-...
[ "0.6660749", "0.6615134", "0.65537393", "0.6408807", "0.6402288", "0.6365775", "0.6298264", "0.6183223", "0.6097544", "0.60698074", "0.6056143", "0.6016017", "0.59752166", "0.5955051", "0.5950715", "0.5938941", "0.5882055", "0.5874607", "0.58622336", "0.58477885", "0.584757",...
0.77167314
0
Uri to: Get customer group by group ID.
Uri: Получить группу клиентов по идентификатору группы.
public function getById($id) { return "/V1/customerGroups/{$id}"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGroupById($group_id);", "public function getCustomerGroup();", "public function getCustomerGroup();", "public function show($id)\n {\n $group = Group::where('id',$id)->get();\n return GroupResource::collection($group);\n }", "abstract public function get($id, $group...
[ "0.70781654", "0.69194275", "0.69194275", "0.6795118", "0.6748188", "0.65743005", "0.6561559", "0.6544657", "0.6504394", "0.6496906", "0.6417773", "0.6415297", "0.62544256", "0.623837", "0.6187358", "0.6166738", "0.61636806", "0.60993505", "0.60875607", "0.60707927", "0.60687...
0.761883
0
Uri to: Delete customer group by ID.
Uri для: удаления группы клиентов по ID.
public function deleteById($id) { return "/V1/customerGroups/{$id}"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_group_get() {\n $del_id = $this->get('id');\n $data = $this->dashboard_model->delete_group($del_id);\n $this->response($data, 200);\n }", "public function delete()\n {\n\n $get_data = $this->http->data('GET');\n if ($this->http->method() != 'DELETE') {\n $this-...
[ "0.71051526", "0.6909575", "0.69020087", "0.68362945", "0.67398405", "0.6714902", "0.67112637", "0.6688448", "0.66641325", "0.66221404", "0.66058505", "0.6560454", "0.65560937", "0.6546793", "0.65460235", "0.65409184", "0.6529081", "0.6490795", "0.6488764", "0.64864665", "0.6...
0.8000342
0
Uri to: Get default customer group.
Uri: Получить группу клиентов по умолчанию.
public function getDefault() { return "/V1/customerGroups/default"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCustomerGroup();", "public function getCustomerGroup();", "public function post()\n {\n return \"/V1/customerGroups\";\n }", "public function getDefaultGroup()\n {\n return $this->defaultGroup;\n }", "public function getDefaultByStoreId($storeId)\n {\n ...
[ "0.6652024", "0.6652024", "0.64038235", "0.62317544", "0.6223359", "0.61855197", "0.6075484", "0.6058859", "0.595877", "0.5898899", "0.5873682", "0.5819449", "0.5819449", "0.57972443", "0.57330513", "0.5722236", "0.5716417", "0.57033473", "0.56686705", "0.56563413", "0.565513...
0.8353181
0
TODO: Implement grab() method.
TODO: Реализовать метод grab().
public function grab() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function grabFile() {\n\t\t$fs = $this->getFilestore();\n\t\treturn $fs->grabFile($this);\n\t}", "public function capture();", "public function grab()\n {\n //PHP version\n $this->_php_version = PHP_VERSION;\n\n //Galette version\n $this->_galette_version = GALETTE_VERSION...
[ "0.6106188", "0.58927125", "0.5787171", "0.5482473", "0.5274457", "0.5239887", "0.5189977", "0.5057277", "0.500302", "0.49654067", "0.49654067", "0.4964129", "0.4962378", "0.49384877", "0.49353918", "0.49273336", "0.49196136", "0.49087065", "0.48994955", "0.4890076", "0.48900...
0.8099505
0
/ File: courseFunctions.php Description: Contains all functions for the course page Author: Alexander Bandukwala/Kenneth Cross Date: Wednesday April 20th, 2011 I hereby certify that this page is entirely my own work. / Function: displayCourse($COURSE_DEPT, $COURSE_NUM) Description: Display the course data calls other f...
/ Файл: courseFunctions.php Описание: Содержит все функции для страницы курса Автор: Александр Бандуквала/Кеннет Кросс Дата: среда, 20 апреля 2011 года Я подтверждаю, что эта страница полностью является моим собственным трудом. / Функция: displayCourse($COURSE_DEPT, $COURSE_NUM) Описание: Отображает данные курса, вызыв...
function displayCourse($COURSE_DEPT, $COURSE_NUM){ $course = mysql_fetch_array(mysql_query("SELECT * FROM course where course_num = '$COURSE_NUM' AND course_dept = '$COURSE_DEPT';")); if($course==null) noCourseGoof($COURSE_DEPT, $COURSE_NUM); else{ displayCourseInfo($course); displayAdvisingLink($course); d...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayCourseInfo($course){\n\techo \"<table align = 'right'><tr><td>\";\n\tif($_SESSION['advisor']==true)\n\t\t//Form to delete course or edit course\n\t\techo \"<form style = \\\"display:inline;\\\" method=\\\"post\\\" action=\\\"courseListing.php\\\">\n\t\t <input type=\\\"hidden\\\" name=\\\"dele...
[ "0.76163584", "0.75516236", "0.723061", "0.7196981", "0.68062896", "0.67592186", "0.67342776", "0.6455579", "0.64451617", "0.644487", "0.6436489", "0.64339906", "0.63842785", "0.63810194", "0.6365245", "0.6346805", "0.6336598", "0.6335602", "0.6332785", "0.6327125", "0.632495...
0.84524786
0
/ Function: displayClassesInfo($COURSE_DEPT, $COURSE_NUM) Description: Displays the information for each class instance of a course
Функция: displayClassesInfo($COURSE_DEPT, $COURSE_NUM) Описание: Отображает информацию для каждой экземпляра класса курса
function displayClassesInfo($COURSE_DEPT, $COURSE_NUM){ //Find the years that classes were available $year_query = mysql_query("SELECT year FROM class where course_num = '$COURSE_NUM' AND course_dept = '$COURSE_DEPT' GROUP BY year ORDER BY year;"); //Get them while($year = mysql_fetch_array($year_query)){ //Outpu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show_classes( $psid )\n{\n\n\t$info = unserialize ( $_SESSION['info'] );\n\t$name = $info->getName();\n\n\t//student\n\n\t$course = file(\"courses.txt\");\n\t$coursesTaken = array();\n\tfor ($i = 0; $i < count($course); $i++):\n\n\t\t$courseInfo = explode( \":\", $course[$i] );\n\t\n\t\tif ( $psid == $cou...
[ "0.65685517", "0.6165698", "0.572847", "0.56964403", "0.56052804", "0.56052804", "0.55041677", "0.54780704", "0.52921957", "0.5270271", "0.5247392", "0.52356666", "0.52036816", "0.5173165", "0.514429", "0.51436746", "0.5097636", "0.5092379", "0.50869185", "0.5066826", "0.5050...
0.7182562
0
/ Function: displayCoursePrerequisites($course) Description: Display the prerequisites for a course
/ Функция: displayCoursePrerequisites($course) Описание: Отображает предварительные требования для курса
function displayCoursePrerequisites($course) { //Get the prerequisite groupings $keys = mysql_query("SELECT distinct prim_key FROM requisite where course_num = \"".$course['course_num']."\" and course_dept = \"".$course['course_dept']."\" order by prim_key;"); //If there are prerequisites in those groupings, outpu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayCoursePrerequisitesEdit($course)\n{\n\t//Get the groupings of prereuisites\n\t$keys = mysql_query(\"SELECT distinct prim_key FROM requisite where course_num = \\\"\".$course['course_num'].\"\\\" and course_dept = \\\"\".$course['course_dept'].\"\\\" order by prim_key;\");\n\t//Header\n\techo \"<tab...
[ "0.75536567", "0.660681", "0.624583", "0.61545163", "0.61408937", "0.60268486", "0.6020863", "0.5930706", "0.57600087", "0.5567009", "0.55631953", "0.5530236", "0.55084455", "0.54677415", "0.54363143", "0.54122674", "0.539683", "0.5362769", "0.5354759", "0.53066564", "0.52810...
0.83800846
0
/ Function: displayCourseFulfills($course) Description: Displays courses that the current course can count for
Функция: displayCourseFulfills($course) Описание: Отображает курсы, которые текущий курс может учитывать
function displayCourseFulfills($course) { //Find courses that the current course can count for $countsForQuery = mysql_query("SELECT sub_course_dept, sub_course_num FROM counts_for where course_dept = '".$course['course_dept']."' and course_num = '".$course['course_num']."';"); //If they exist, output them if($coun...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayCourseFulfillsEdit($course)\n{\n\t//Header\n\techo \"<table align = \\\"center\\\"><tr align = \\\"center\\\"><td><b>Counts For</b></td></tr></table>\";\n\t\n\t//Does this course count for any other course?\n\t$countsForQuery = mysql_query(\"SELECT sub_course_dept, sub_course_num FROM counts_for wh...
[ "0.7031332", "0.65961444", "0.65540564", "0.6428248", "0.6341713", "0.6341713", "0.6291813", "0.6262805", "0.62412333", "0.6221002", "0.6217268", "0.61801296", "0.61232316", "0.61232316", "0.61232316", "0.61232316", "0.61232316", "0.61232316", "0.61232316", "0.6093717", "0.60...
0.79392785
0
/ Function: displayAdvisingLink($course) Description: Links the advising page to the course page
/ Функция: displayAdvisingLink($course) Описание: Связывает страницу консультаций с страницей курса
function displayAdvisingLink($course){ include("calculations.php"); //Is an advisor logged in with an advisee? if($_SESSION['advisor'] and isset($_SESSION['advisee_CLID'])) //If so, set CLID to the advisee CLID $CLID = $_SESSION['advisee_CLID']; else //Otherwise, set the CLID to the session CLID $CLID = $_S...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function courses_render($course)\n{\n\techo '<a href=\"index.php?option=course&view=detail&id='.$course['id'].'\">';\n\th3($course['id'].\" - \".$course['name']);\n\techo '</a>';\n\tp($course['description']);\n\techo \"<h5>Credit Hours : \".$course['credithours'].\"</h5>\";\n\tif (users_loggedIn()) {\n\t\tcourse_r...
[ "0.68239486", "0.61736953", "0.60958767", "0.60133517", "0.5983784", "0.5906565", "0.58896554", "0.58273095", "0.58273095", "0.57425874", "0.5689501", "0.5581171", "0.55741304", "0.55690324", "0.553347", "0.5519918", "0.5519918", "0.5519918", "0.5519918", "0.5519918", "0.5519...
0.804277
0
/ Function: displayCourseEdit($COURSE_DEPT, $COURSE_NUM) Description: Displays an editable version of the course.php page
Функция: displayCourseEdit($COURSE_DEPT, $COURSE_NUM) Описание: Отображает редактируемую версию страницы course.php
function displayCourseEdit($COURSE_DEPT, $COURSE_NUM){ //Find the proper course $course = mysql_fetch_array(mysql_query("SELECT * FROM course where course_num = '$COURSE_NUM' AND course_dept = '$COURSE_DEPT';")); if($course==null) //If it doesn't exist, create it createCourse($COURSE_DEPT, $COURSE_NUM); else{ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayCourseInfoEdit($course){\n\t//Header\n\techo \"<center><h1>\".$course['course_dept'].\" \".$course['course_num'].\" - \".$course['title'].\"</h1></center><hr>\";\n\t//Display titles and input fields\n\techo \"<form action=\\\"course.php?submit=1&DEPT=\".$course['course_dept'].\"&NUM=\".$course['cou...
[ "0.7455739", "0.7281704", "0.7201349", "0.6608353", "0.6566615", "0.6566615", "0.6566615", "0.6566615", "0.6566615", "0.6566615", "0.6566615", "0.6566615", "0.65632224", "0.643415", "0.6430652", "0.642072", "0.640582", "0.63708407", "0.63476026", "0.63194233", "0.63072395", ...
0.87399614
0
/ Function: displayCourseInfoEdit($course) Description: Display the fields to be edited for the course table, showing the data that's already in the table.
Функция: displayCourseInfoEdit($course) Описание: Отображает поля для редактирования таблицы курсов, показывая данные, которые уже находятся в таблице.
function displayCourseInfoEdit($course){ //Header echo "<center><h1>".$course['course_dept']." ".$course['course_num']." - ".$course['title']."</h1></center><hr>"; //Display titles and input fields echo "<form action=\"course.php?submit=1&DEPT=".$course['course_dept']."&NUM=".$course['course_num']."\" method=\"POST...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayCourseInfo($course){\n\techo \"<table align = 'right'><tr><td>\";\n\tif($_SESSION['advisor']==true)\n\t\t//Form to delete course or edit course\n\t\techo \"<form style = \\\"display:inline;\\\" method=\\\"post\\\" action=\\\"courseListing.php\\\">\n\t\t <input type=\\\"hidden\\\" name=\\\"dele...
[ "0.7536639", "0.71331614", "0.71331614", "0.71331614", "0.71331614", "0.71331614", "0.71331614", "0.71331614", "0.71331614", "0.70962167", "0.70285654", "0.6924631", "0.68981504", "0.6820551", "0.6806771", "0.66918665", "0.66465396", "0.6556617", "0.6554827", "0.6529366", "0....
0.76733434
0
/ Function: submitData() Description: Update the database with the information for the course.
Функция: submitData() Описание: Обновление базы данных с информацией о курсе.
function submitData(){ //Update the course with the form information mysql_query("UPDATE course SET title=".((trim($_POST['title'])=="")?'null':"'".mysql_real_escape_string(trim($_POST['title']))."'").", credit_hours=".((trim($_POST['credit_hours'])=="")?'null':"'".mysql_real_escape_string(trim($_POST['credit_hours']...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateCourse() {\n\t\t\t// Add Classes\n\t\t\t$RepCourse\t\t\t= new RepCourse();\n\t\t\t// Initialize variables\n\t\t\t$return\t\t\t\t= 'nok';\n\t\t\t$id_course\t\t\t= (isset($_POST['id_course'])) ? trim($_POST['id_course']) : false;\n\t\t\t$id_field\t\t\t= (isset($_POST['id_field'])) ? trim($_POS...
[ "0.68369997", "0.65936553", "0.6555296", "0.65105814", "0.64922804", "0.64248896", "0.6412862", "0.6272145", "0.6264613", "0.62340045", "0.62304217", "0.6177387", "0.61661065", "0.61648005", "0.615223", "0.6125406", "0.60652685", "0.60557514", "0.603988", "0.6002428", "0.5923...
0.7662989
0
/ Function: displayCoursePrerequisitesEdit($course) Description: Display the fields showing requisites and the fields for editing and adding correquisites.
Функция: displayCoursePrerequisitesEdit($course) Описание: Отображает поля, показывающие требования и поля для редактирования и добавления корректирующих требований.
function displayCoursePrerequisitesEdit($course) { //Get the groupings of prereuisites $keys = mysql_query("SELECT distinct prim_key FROM requisite where course_num = \"".$course['course_num']."\" and course_dept = \"".$course['course_dept']."\" order by prim_key;"); //Header echo "<table align = \"center\"><tr ali...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayCoursePrerequisites($course)\n{\n\t//Get the prerequisite groupings\n\t$keys = mysql_query(\"SELECT distinct prim_key FROM requisite where course_num = \\\"\".$course['course_num'].\"\\\" and course_dept = \\\"\".$course['course_dept'].\"\\\" order by prim_key;\");\n\t\n\t//If there are prerequisit...
[ "0.71617156", "0.60740876", "0.6025689", "0.57805", "0.5464842", "0.53005624", "0.5249856", "0.5196784", "0.5196784", "0.5196784", "0.5196784", "0.5196784", "0.5196784", "0.5196784", "0.5196784", "0.5189385", "0.5180067", "0.5147888", "0.5131817", "0.512193", "0.50762874", ...
0.79920435
0
/ Function: dropPrereq() Description: Drop the selected requisite from the database.
Функция: dropPrereq() Описание: Удалить выбранный предварительный требований из базы данных.
function dropPrereq(){ //Delete the prerequisite from the table mysql_query("DELETE FROM requisite WHERE course_dept='".$_POST['prereq_dept']."' AND course_num='".$_POST['prereq_num']."' AND prim_key='".$_POST['prim_key']."' AND req_course_num='".$_POST['req_num']."' AND req_course_dept='".$_POST['req_dept']."';"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function realisateurs_drop(){\r\n\t\tglobal $conn;\r\n\t\t$query =$conn->prepare( \"DELETE QUICK FROM realisateurs WHERE :id_realisateur = id_realisateur;\");\r\n\t\t$query->execute(array(\"id_realisateur\" =>$this->id_realisateur));\r\n\t}", "function deleterequest($prid)\n{\n\t$query=\"DELETE FROM `pati...
[ "0.5467304", "0.52114135", "0.51728845", "0.5116718", "0.50793254", "0.50383824", "0.5035918", "0.5030883", "0.5017908", "0.5012144", "0.49989715", "0.49834025", "0.4981978", "0.4979694", "0.4969859", "0.49604556", "0.49435002", "0.49344546", "0.49161452", "0.49078172", "0.49...
0.7634836
0
/ Function: addPrereq() Description: Add the selected requisite for the selected course.
Функция: addPrereq() Описание: Добавить выбранный требуемый элемент для выбранного курса.
function addPrereq(){ $fail=false; //Error message if(!mysql_fetch_array(mysql_query("SELECT * FROM course WHERE course_num='".$_POST['prereq_num']."' AND course_dept='".$_POST['prereq_dept']."';"))){ $fail=true; echo "<h2><font color='#FF0000'>You done goofed: Course Does Not Exist</font></h2>"; } //Insert th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCoursePrereq($fullname){\n $sql=\"SELECT * FROM prereq where CRSE LIKE '\".$fullname.\"'\" ;\n $resultprereq = $this->execute($sql);\n\n //if there is no pre requisites defined for the course; return empty line\n if(sizeof($resultprereq) == 0){\n $resultprereq[0][...
[ "0.6091617", "0.55849236", "0.535216", "0.52428627", "0.51575035", "0.5133169", "0.5118854", "0.5085771", "0.5048523", "0.50225693", "0.4969176", "0.48801422", "0.48246843", "0.47832757", "0.4771921", "0.47636738", "0.47601753", "0.47135234", "0.46295187", "0.46279058", "0.45...
0.7197296
0
/ Function: dropTeacherPermission() Description: Remove permission of instructor as a prerequisite to the course.
Функция: dropTeacherPermission() Описание: Удаление разрешения инструктора как предварительного условия для курса.
function dropTeacherPermission(){ //Remove teacher permission mysql_query("DELETE FROM requisite WHERE course_dept='".$_GET['DEPT']."' AND course_num='".$_GET['NUM']."' AND prim_key='".$_POST['prim_key']."' AND req_course_num='100' AND req_course_dept='INST';"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeTeacher()\n {\n $this->type = self::TYPE_USER;\n return $this->save(false);\n }", "abstract protected function deletePermission();", "public abstract function removePermission($id);", "public function deleteTeacherPriority() {\n if (isset($_POST['teacher_prefe...
[ "0.64598227", "0.5656125", "0.5614231", "0.56044143", "0.559744", "0.5562738", "0.5499303", "0.5497442", "0.5460477", "0.54566425", "0.5442376", "0.54298115", "0.5420073", "0.53532565", "0.5337106", "0.53302413", "0.52982324", "0.52982324", "0.52982324", "0.52820426", "0.5217...
0.7407217
0
/ Function: displayCourseFulfillsEdit($course) Description: Display and edit the courses that the selected course can count for.
Функция: displayCourseFulfillsEdit($course) Описание: Отображение и редактирование курсов, которые выбранный курс может считать.
function displayCourseFulfillsEdit($course) { //Header echo "<table align = \"center\"><tr align = \"center\"><td><b>Counts For</b></td></tr></table>"; //Does this course count for any other course? $countsForQuery = mysql_query("SELECT sub_course_dept, sub_course_num FROM counts_for where course_dept = '".$cours...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit($course)\n {\n //\n }", "public function edit(Course $course)\n {\n //\n }", "public function edit(Course $course)\n {\n //\n }", "public function edit(Course $course)\n {\n //\n }", "public function edit(Course $course)\n {\n ...
[ "0.6698906", "0.659696", "0.659696", "0.659696", "0.659696", "0.659696", "0.659696", "0.659696", "0.659696", "0.658292", "0.65296495", "0.6522416", "0.6507903", "0.64368296", "0.6399939", "0.6396167", "0.6384807", "0.6340757", "0.6279808", "0.6251982", "0.6246609", "0.62157...
0.75917006
0
get_pool_payout_amounts for a pool get the payout amounts
get_pool_payout_amounts для пула получает суммы выплат
function get_pool_payout_amounts($poolid, $fee = null, $pot = null) { global $db; if (empty($poolid)) return null; if ($fee == null) { $feestmt = $db->prepare('SELECT fee FROM ' . TOTE_TABLE_POOLS . ' WHERE id=:pool_id'); $feestmt->bindParam(':pool_id', $poolid, PDO::PARAM_INT); $feestmt->execute(); $fee...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_pool_payout_percents($poolid)\n{\n\tglobal $db;\n\n\tif (empty($poolid))\n\t\treturn null;\n\n\t$percents = array();\n\n\t$percentstmt = $db->prepare('SELECT place, percent FROM ' . TOTE_TABLE_POOL_PAYOUT_PERCENTS . ' WHERE payout_id=(SELECT id FROM ' . TOTE_TABLE_POOL_PAYOUTS . ' WHERE pool_id=:payou...
[ "0.67262024", "0.6091471", "0.5710355", "0.53778636", "0.53517544", "0.53009033", "0.52642494", "0.52548677", "0.5236121", "0.5227887", "0.5209883", "0.5209221", "0.51515424", "0.5122536", "0.5106268", "0.50997496", "0.50975865", "0.50703204", "0.50696653", "0.5054615", "0.50...
0.7747757
0
get all public nodes which should be accessible (return html & no error code)
получить все публичные узлы, которые должны быть доступны (вернуть html и не код ошибки)
protected function getPublicNodes() { return [ "" ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getHTMLNodes();", "public function getNodes();", "public function nodes();", "abstract public function getHTML();", "public function getHTML();", "public function nodes() {return $this->doc->childNodes;}", "abstract function getHtml();", "public function getChildNodes() {}", ...
[ "0.74908304", "0.6507342", "0.6373417", "0.63180494", "0.6297785", "0.62842566", "0.6089233", "0.60767347", "0.6069372", "0.60315895", "0.6030292", "0.6001911", "0.5985348", "0.5948307", "0.5926722", "0.5922043", "0.58763057", "0.5862612", "0.5862612", "0.585342", "0.58363414...
0.7353716
1
Ejecuta la query recibida con el parametro $sql. Devuelve el resultado
Выполните полученный запрос с параметром $sql. Верните результат
public function ejecutar($sql){ $result = $this->conn->query($sql); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ejecutar($sql){\n\t\t$this->result=mysqli_query($this->link,$sql);\t\t\n\t\treturn $this->result;\n\t}", "public function executaQuery($sql){\r\n\t\t\t$tmp = mysqli_query($this->link, $sql) or die('Erro: ' . mysqli_error($this->link));\r\n\t\t\treturn ($tmp);\r\n\t\t}", "static function execut...
[ "0.8043095", "0.7813713", "0.77402514", "0.7630122", "0.7621467", "0.7621467", "0.7621467", "0.7614898", "0.75612324", "0.7527167", "0.749922", "0.74742115", "0.74506587", "0.7375425", "0.73647344", "0.7349051", "0.73292005", "0.7321536", "0.72872204", "0.72842", "0.7277312",...
0.79340875
1
Function fixes tag post limit that is displayed :)
Функция исправляет ограничение тега после отображения :)
function wpa69774_limit_tags( $query ) { if ( $query->is_tag() && $query->is_main_query() ) { $query->set( 'posts_per_page', 10 ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function snax_get_tags_limit() {\n\treturn (int) apply_filters( 'snax_tags_limit', get_option( 'snax_tags_limit', 10 ) );\n}", "function cat_limit_tags ($query) {\n if ($query->is_category() && $query->is_main_query()) {\n $query->set('posts_per_page', 10);\n }\n}", "function html5wp_custom_post($...
[ "0.74291444", "0.6910354", "0.68489635", "0.68489635", "0.68489635", "0.68489635", "0.68489635", "0.68489635", "0.6831921", "0.67877364", "0.6769443", "0.6769443", "0.66749334", "0.66234636", "0.65941334", "0.64994407", "0.6492461", "0.6475713", "0.6413553", "0.63304555", "0....
0.7335135
1
Function fixes category post limit that is displayed
Функция исправляет категорию ограничения поста, который отображается
function cat_limit_tags ($query) { if ($query->is_category() && $query->is_main_query()) { $query->set('posts_per_page', 10); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpse_modify_category_posts_per_page( $query ) {\n if (!is_admin() && $query->is_main_query()) {\n\n // Change to 8 posts per page when viewing a category.\n if ($query->is_category()) {\n $query->set( 'posts_page_page', '-1');\n } \n\n } \n}", "function post_limit($...
[ "0.69468117", "0.6648623", "0.6516231", "0.64645326", "0.6452394", "0.63037133", "0.6142977", "0.61267555", "0.60792035", "0.6037643", "0.6002155", "0.6002155", "0.5997902", "0.59638596", "0.5960562", "0.5950255", "0.5928579", "0.5913983", "0.58963805", "0.5896344", "0.589215...
0.7217859
0
Returns weblog Atom URL.
Возвращает URL-адрес weblog в формате Atom.
public function getAtomUrl() { return $this->_atomUrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function entry_url()\n {\n return entry_url($this->attribute('entry_id'));\n }", "protected function getFeedURL() {\n\t\treturn $this->owner->{$this->linkFieldName()};\n\t}", "public function getUpdateFeedUrl() {\n $project = $this->getProject();\n return $this->configuration->project...
[ "0.6601654", "0.6596075", "0.6526452", "0.6459967", "0.64379627", "0.63755625", "0.6363834", "0.6352382", "0.62966233", "0.62730205", "0.61898583", "0.617148", "0.612099", "0.6104138", "0.6097962", "0.6073106", "0.6071539", "0.6066114", "0.6055451", "0.6054046", "0.60482025",...
0.7798045
0
Sets number of inbound blogs.
Устанавливает количество входящих блогов.
public function setInboundBlogs($number) { $this->_inboundBlogs = (int) $number; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function incrementNumPosts()\n {\n $this->numPosts++;\n }", "public function setRequestCount(int $request_count) {}", "public function setNumPosts($numPosts)\n {\n $this->numPosts = \\intval($numPosts);\n }", "private function setCount($count) {\n $this->count = $count;\n ...
[ "0.5832474", "0.58200806", "0.57679254", "0.57557803", "0.56970507", "0.56946266", "0.56886256", "0.56756693", "0.56756693", "0.5639106", "0.56301343", "0.55811065", "0.55091083", "0.5502567", "0.54888606", "0.54753643", "0.547101", "0.54602075", "0.543183", "0.54300225", "0....
0.74238586
0
Sets number of Iinbound links.
Устанавливает количество входящих ссылок.
public function setInboundLinks($number) { $this->_inboundLinks = (int) $number; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setNetworkCount() {\n\t\t// Count attached nodes for this network\n\t\tforeach ($this -> getNetworks() as $network_id => $network) {\n\t\t\t$i = 0;\n\t\t\tforeach ($this -> getNodes() as $node) {\n\t\t\t\tforeach ($node -> getEthernets() as $interface) {\n\t\t\t\t\tif ($interface -> getNetworkId() ...
[ "0.65315694", "0.6274142", "0.59934735", "0.5831138", "0.5777746", "0.5747205", "0.57351595", "0.56989336", "0.5698328", "0.5694884", "0.56810504", "0.56533504", "0.5610987", "0.5504541", "0.54906666", "0.54878604", "0.5483511", "0.5483511", "0.5399986", "0.53996825", "0.5396...
0.74288404
0
Sets weblog Last Update timestamp. $datetime can be any value supported by Zend_Service_Technorati_Utils::normalizeDate().
Устанавливает метку последнего обновления веблога. $datetime может быть любым значением, поддерживаемым Zend_Service_Technorati_Utils::normalizeDate().
public function setLastUpdate($datetime) { $this->_lastUpdate = Zend_Service_Technorati_Utils::normalizeDate($datetime); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLastUpdatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastUpdatedDateTime', $value);\n }", "public function setLastUpdatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastUpdatedDateTime', $value);\n }", "public function set...
[ "0.64962125", "0.64962125", "0.6456791", "0.64243144", "0.6417017", "0.6389291", "0.630783", "0.630783", "0.6253188", "0.61309", "0.6102704", "0.6102704", "0.60425866", "0.6015717", "0.59685796", "0.5966657", "0.59427184", "0.59427184", "0.59427184", "0.59427184", "0.5932104"...
0.77073896
0
Get all custom taxonomies from a post type name and exclude taxonomies on the list($excluded) param
Получить все пользовательские таксономии из имени типа поста и исключить таксономии из параметра $excluded
public static function get_custom_taxonomies_by_pt($post_type,$excluded = null){ $taxs = get_object_taxonomies( $post_type ); $taxonomies = array(); if(!empty($taxs)){ if($excluded!=null || !empty($excluded)){ for($i=0;$i<count($taxs);$i++){ $sw = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function acf_get_taxonomies_for_post_type($post_types = 'post') {}", "public function custom_get_posts($post_type, $taxonomy, $terms = array()) {\n\n global $wpdb;\n\n $slugs = $this->slug_array_to_csv($terms);\n\n $a = $wpdb->get_results(\"SELECT ID, post_name, post_type FROM $wpdb->posts\n LEFT J...
[ "0.72057587", "0.6792398", "0.67113245", "0.6619529", "0.65856725", "0.6580742", "0.65744996", "0.65677154", "0.65454084", "0.6515719", "0.6473757", "0.6454195", "0.6441751", "0.6372587", "0.6371065", "0.63448405", "0.6330161", "0.6300543", "0.6286297", "0.62822586", "0.62767...
0.7571357
0
Add user to friends list
Добавить пользователя в список друзей
function add () { if (empty(main()->USER_ID)) { return _error_need_login(); } // Check target user id $_GET['id'] = intval($_GET['id']); if (empty($_GET['id'])) { return _e("No user id!"); } // Check if such user exists $target_user_info = user($_GET["id"], "full", array("WHERE" => array("active" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addFriend(User $user){\n $this->friends()->attach($user->id);\n }", "public function addFriend(User $user)\n {\n $this->friends()->attach($user->id);\n }", "function addtofriendAction() { \r\n if (!$this->_helper->requireUser()->isValid())\r\n \t return;\r\n \r\n \t// Di...
[ "0.80302393", "0.7628625", "0.7440201", "0.7404107", "0.72895664", "0.72684294", "0.71937513", "0.70889735", "0.7060153", "0.7019282", "0.6836885", "0.6836081", "0.6672406", "0.6650059", "0.6615435", "0.66124916", "0.6598341", "0.6597105", "0.6563381", "0.6511821", "0.6480103...
0.7823846
1
/ YOURLS general functions Make an optimized regexp pattern from a string of characters
/ Общие функции YOURLS Создать оптимизированный шаблон регулярного выражения из строки символов
function yourls_make_regexp_pattern( $string ) { // Simple benchmarks show that regexp with smarter sequences (0-9, a-z, A-Z...) are not faster or slower than 0123456789 etc... // add @ as an escaped character because @ is used as the regexp delimiter in yourls-loader.php return preg_quote( $string, '@' ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fr_create_regex_pattern($pattern) {\n $parts = preg_split('/(\\\\*+)/', $pattern, 0, PREG_SPLIT_DELIM_CAPTURE);\n $regex = '/^';\n foreach($parts as $p) {\n if ($p == '*') {\n $regex .= '(.*)';\n } else {\n $regex .= preg_quote($p, '/');\n }\n }\n ...
[ "0.69039935", "0.67434084", "0.6589", "0.6528559", "0.6518601", "0.6420374", "0.6401765", "0.6295237", "0.62511617", "0.6249823", "0.6154316", "0.6110785", "0.61043084", "0.61043084", "0.61043084", "0.61043084", "0.61043084", "0.6084792", "0.6070475", "0.6067802", "0.6049973"...
0.7642836
0
Return array of stats. (string)$filter is 'bottom', 'last', 'rand' or 'top'. (int)$limit is the number of links to return
Вернуть массив статистики. (string)$filter — 'bottom', 'last', 'rand' или 'top'. (int)$limit — количество ссылок для возврата
function yourls_get_stats($filter = 'top', $limit = 10, $start = 0) { switch( $filter ) { case 'bottom': $sort_by = '`clicks`'; $sort_order = 'asc'; break; case 'last': $sort_by = '`timestamp`'; $sort_order = 'desc'; break; case 'rand': case 'random': $sort_by = 'RAND()'; $sort...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHistory($limit);", "public static function trending($limit = 0)\n {\n $data = array_map('json_decode', Redis::zrevrange(static::cacheKey(), 0, $limit - 1));\n return $data;\n }", "public function getAllUserStats($filter='%',$limit=1,$start=0) {\n $this->debug->append(\...
[ "0.6258872", "0.5813997", "0.5809446", "0.5759565", "0.5662945", "0.5570653", "0.5560645", "0.5527605", "0.55269074", "0.5513839", "0.551331", "0.54784536", "0.5476923", "0.5421989", "0.5399418", "0.53592926", "0.53207767", "0.5307634", "0.52952677", "0.5285856", "0.5270422",...
0.7029705
0
Returns a sanitized a user agent string. Given what I found on it should be OK.
Возвращает очищенный строку агента пользователя. С учетом того, что я нашел, это должно быть в порядке.
function yourls_get_user_agent() { $ua = '-'; if ( isset( $_SERVER['HTTP_USER_AGENT'] ) ) { $ua = strip_tags( html_entity_decode( $_SERVER['HTTP_USER_AGENT'] )); $ua = preg_replace('![^0-9a-zA-Z\':., /{}\(\)\[\]\+@&\!\?;_\-=~\*\#]!', '', $ua ); } return yourls_apply_filter( 'get_user_a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function yourls_get_user_agent() {\n\t\tif ( !isset( $_SERVER['HTTP_USER_AGENT'] ) )\n\t\t\treturn '-';\n\t\t\n\t\t$ua = strip_tags( html_entity_decode( $_SERVER['HTTP_USER_AGENT'] ));\n\t\t$ua = preg_replace('![^0-9a-zA-Z\\':., /{}\\(\\)\\[\\]\\+@&\\!\\?;_\\-=~\\*\\#]!', '', $ua );\n\t\t\n\t\treturn substr( $ua, ...
[ "0.7546379", "0.7141944", "0.6990467", "0.6745603", "0.67302907", "0.6471047", "0.62418044", "0.61905634", "0.61160433", "0.60943913", "0.6029257", "0.601359", "0.60078835", "0.5995981", "0.5993068", "0.5958753", "0.5949694", "0.59377664", "0.5932231", "0.5925005", "0.5919028...
0.72000486
1
Redirect to another page YOURLS redirection, either to internal or external URLs. If headers have not been sent, redirection is achieved with PHP's header(). If headers have been sent already and we're not in a command line client, redirection occurs with Javascript. Note: yourls_redirect() does not exit automatically,...
Перенаправление на другую страницу YOURLS, как внутренний, так и внешний URL. Если заголовки не были отправлены, перенаправление достигается с помощью функции PHP header(). Если заголовки уже были отправлены и мы не находимся в клиенте командной строки, перенаправление происходит с помощью JavaScript. Примечание: функц...
function yourls_redirect( $location, $code = 301 ) { yourls_do_action( 'pre_redirect', $location, $code ); $location = yourls_apply_filter( 'redirect_location', $location, $code ); $code = yourls_apply_filter( 'redirect_code', $code, $location ); // Redirect, either properly if possible, or via Javascript othe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function redirect()\n\t{\n $redirect_to = $this->getRedirectURL();\n // If headers() have already been sent\n if (headers_sent()) {\n \t// PHP header() redirect won't work if headers already sent.\n \t// JavaScript redirect is pretty much only option in this case.\n ...
[ "0.74503434", "0.7366341", "0.73504436", "0.72686744", "0.7263774", "0.72275066", "0.7206526", "0.7132605", "0.71024764", "0.70808107", "0.7047945", "0.7004037", "0.69481605", "0.69090664", "0.68956214", "0.68910205", "0.68661827", "0.68656486", "0.68649644", "0.6862236", "0....
0.7663753
0
Redirect to an existing short URL Redirect client to an existing short URL (no check performed) and execute misc tasks: update clicks for short URL, update logs, and send an XRobotsTag header to control indexing of a page.
Перенаправление на существующий короткий URL Перенаправить клиента на существующий короткий URL (проверка не выполняется) и выполнить дополнительные задачи: обновить количество кликов по короткому URL, обновить логи и отправить заголовок XRobotsTag для управления индексацией страницы.
function yourls_redirect_shorturl($url, $keyword) { yourls_do_action( 'redirect_shorturl', $url, $keyword ); // Attempt to update click count in main table yourls_update_clicks( $keyword ); // Update detailed log for stats yourls_log_redirect( $keyword ); // Send an X-Robots-Tag header yo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function r() {\n if(isset($this->request['passed'][0])) {\n $short_url = $this->getShortUrlBasePart() . $this->request['passed'][0];\n $query = 'SELECT * FROM short_urls WHERE short_url = :short_url';\n $result = $this->ShortUrl->find($query, array(':short_url' => $sh...
[ "0.63812476", "0.622127", "0.6174387", "0.6124885", "0.6054522", "0.6007838", "0.5992552", "0.59142613", "0.5881546", "0.58729815", "0.5871318", "0.585416", "0.58512133", "0.5803575", "0.57925934", "0.57724255", "0.57633173", "0.5747541", "0.56883997", "0.56594956", "0.565601...
0.71393347
0
Send header to prevent display within a frame from another site (avoid clickjacking) This header makes it impossible for an external site to display YOURLS admin within a frame, which allows for clickjacking. See This said, the whole function is shuntable : legit uses of iframes should be still possible.
Отправить заголовок для предотвращения отображения внутри фрейма с другого сайта (избежать кликджекинга). Этот заголовок делает невозможным отображение админ-панели YOURLS с внешнего сайта в фрейме, что позволяет избежать кликджекинга. См. В этом случае вся функция может быть отключена: легальные использования iframe в...
function yourls_no_frame_header() { // Allow plugins to short-circuit the whole function $pre = yourls_apply_filter( 'shunt_no_frame_header', false ); if ( false !== $pre ) { return $pre; } if( !headers_sent() ) { header( 'X-Frame-Options: SAMEORIGIN' ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = TRUE ) {\n global $squirrelmail_language;\n\n if ( !sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION) ) {\n global $base_uri;\n }\n global $theme_css, $custom_css, $pageheader_sent;\n\n // prevent clickjack attempts\n...
[ "0.7169436", "0.70951664", "0.66191363", "0.6484585", "0.6465566", "0.641549", "0.64000255", "0.62571096", "0.62165797", "0.6175328", "0.6159219", "0.6094755", "0.60814685", "0.5987066", "0.5968459", "0.58993155", "0.5867756", "0.58591235", "0.5844409", "0.57522523", "0.57413...
0.7523473
0
Redirect to another page using Javascript. Set optional (bool)$dontwait to false to force manual redirection (make sure a message has been read by user)
Перенаправить на другую страницу с использованием JavaScript. Установите необязательный (bool)$dontwait в false, чтобы принудительно выполнить ручное перенаправление (убедитесь, что пользователь прочитал сообщение)
function yourls_redirect_javascript( $location, $dontwait = true ) { yourls_do_action( 'pre_redirect_javascript', $location, $dontwait ); $location = yourls_apply_filter( 'redirect_javascript', $location, $dontwait ); if ( $dontwait ) { $message = yourls_s( 'if you are not redirected after 10 second...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRedirectWithJavascriptRedirect()\n\t{\n\t\t$url = 'http://mydomain.com/index.php?phi=Φ';\n\n\t\t// Inject the client information.\n\t\tTestReflection::setValue(\n\t\t\t$this->class,\n\t\t\t'client',\n\t\t\t(object) array(\n\t\t\t\t'engine' => JApplicationWebClient::TRIDENT,\n\t\t\t)\n\t\t);\n\n...
[ "0.6727302", "0.66707414", "0.6480599", "0.6423308", "0.63582116", "0.6314013", "0.63098603", "0.6306972", "0.6291779", "0.6284336", "0.6253562", "0.6228627", "0.61991876", "0.6183148", "0.6154245", "0.61483186", "0.61483186", "0.6124316", "0.6077852", "0.6073428", "0.6068546...
0.7126701
0
Log a redirect (for stats) This function does not check for the existence of a valid keyword, in order to save a query. Make sure the keyword exists before calling it.
Записать редирект (для статистики). Эта функция не проверяет наличие действительного ключевого слова, чтобы сохранить запрос. Убедитесь, что ключевое слово существует, перед вызовом этой функции.
function yourls_log_redirect( $keyword ) { // Allow plugins to short-circuit the whole function $pre = yourls_apply_filter( 'shunt_log_redirect', false, $keyword ); if ( false !== $pre ) { return $pre; } if (!yourls_do_log_redirect()) { return true; } $table = YOURLS_DB_TABLE_LOG; $ip...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function yourls_redirect_shorturl($url, $keyword) {\n yourls_do_action( 'redirect_shorturl', $url, $keyword );\n\n // Attempt to update click count in main table\n yourls_update_clicks( $keyword );\n\n // Update detailed log for stats\n yourls_log_redirect( $keyword );\n\n // Send an X-Robots-Tag...
[ "0.6259518", "0.5999188", "0.5896973", "0.5644288", "0.560846", "0.55304205", "0.5511793", "0.5485169", "0.5460418", "0.5435495", "0.53875786", "0.53604704", "0.532773", "0.5304894", "0.52842957", "0.5283948", "0.5283948", "0.52657425", "0.5230549", "0.52208364", "0.5219849",...
0.76124793
0
Check if we want to not log redirects (for stats)
Проверить, хотим ли мы не логировать переадресации (для статистики)
function yourls_do_log_redirect() { return ( !defined( 'YOURLS_NOSTATS' ) || YOURLS_NOSTATS != true ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isRedirection(): bool {}", "public function isRedirect(): bool {}", "protected function checkRedirect() {}", "public function isRedirection()\n {\n return $this->statusCode >= 300 && $this->statusCode < 400;\n }", "public function isRedirection()\n {\n return $this->g...
[ "0.73152554", "0.69466645", "0.6865782", "0.67777306", "0.677399", "0.676634", "0.676634", "0.67424077", "0.67354196", "0.6669545", "0.6591941", "0.6591941", "0.6533104", "0.6496713", "0.6422714", "0.6422714", "0.6422714", "0.6422714", "0.6365711", "0.6340895", "0.6340895", ...
0.79034835
0
Allow several short URLs for the same long URL ?
Разрешить несколько коротких URL для одного и того же длинного URL?
function yourls_allow_duplicate_longurls() { // special treatment if API to check for WordPress plugin requests if ( yourls_is_API() && isset( $_REQUEST[ 'source' ] ) && $_REQUEST[ 'source' ] == 'plugin' ) { return false; } return yourls_apply_filter('allow_duplicate_longurls', defined('YOU...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shorten() {\r\n\t\tif (!empty($this->URLs)) {\r\n\t\t\t// process all requested URLs\r\n\t\t\tforeach ($this->URLs as $hash=>$url) {\r\n\t\t\t\t// check if already shortened\r\n\t\t\t\t$result = $this->getShortUrl($url['long']);\r\n\r\n\t\t\t\tif ($result) {\r\n\t\t\t\t\t$this->URLs[$hash]['short']...
[ "0.71363986", "0.69663936", "0.69531703", "0.6854759", "0.67606527", "0.67056745", "0.6654614", "0.6643336", "0.65627223", "0.6484127", "0.64182585", "0.6406956", "0.6388878", "0.6349751", "0.6324953", "0.6304869", "0.62590474", "0.6235863", "0.6182551", "0.6171625", "0.61625...
0.7094176
1
Check if YOURLS is installing
Проверьте, устанавливается ли YOURLS
function yourls_is_installing() { return (bool)yourls_apply_filter( 'is_installing', defined( 'YOURLS_INSTALLING' ) && YOURLS_INSTALLING ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _is_curl_installed() \n\t {\n if (in_array ('curl', get_loaded_extensions())) {\n\t\t\t echo '<p class=\"padding-x\"> cUrl is installed </p>';\n return true;\n } else {\n\t\t\t echo '<p class=\"sms-fail\"> cUrl is not installed </p>';\n return false;\n ...
[ "0.7178497", "0.71389484", "0.7105397", "0.6848562", "0.6787071", "0.67333966", "0.672373", "0.66754824", "0.6648038", "0.66259545", "0.66052073", "0.65438426", "0.6533551", "0.6531446", "0.65256065", "0.6517425", "0.6517425", "0.6513535", "0.6511881", "0.650158", "0.6495996"...
0.7629593
0
Get a remote page title This function returns a string: either the page title as defined in HTML, or the URL if not found The function tries to convert funky characters found in titles to UTF8, from the detected charset. Charset in use is guessed from HTML meta tag, or if not found, from server's 'contenttype' response...
Получить заголовок удаленной страницы. Эта функция возвращает строку: либо заголовок страницы, как определен в HTML, либо URL, если его не найдено. Функция пытается преобразовать необычные символы, найденные в заголовках, в UTF8 из обнаруженного набора символов. Набор символов, который используется, определяется на осн...
function yourls_get_remote_title( $url ) { // Allow plugins to short-circuit the whole function $pre = yourls_apply_filter( 'shunt_get_remote_title', false, $url ); if ( false !== $pre ) { return $pre; } $url = yourls_sanitize_url( $url ); // Only deal with http(s):// if ( !in_arra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTitle($url) {\n\t\t$file_headers = @get_headers($url);\n\t\tif(!$file_headers || $file_headers[0] == 'HTTP/1.1 404 Not Found' || $file_headers[0] == 'HTTP/1.0 403 Forbidden' || $file_headers[0] == 'HTTP/1.1 403 Forbidden: Access is denied.' || $file_headers[0] == 'HTTP/1.1 463' || $file_headers[0] == ...
[ "0.71066505", "0.7004566", "0.6923462", "0.66059387", "0.64645785", "0.6437142", "0.63913256", "0.639098", "0.6354955", "0.63432497", "0.63095206", "0.61413264", "0.6140763", "0.610723", "0.6106007", "0.6070019", "0.6070019", "0.6064249", "0.6054439", "0.6045723", "0.5989146"...
0.8283596
0
Fix $_SERVER['REQUEST_URI'] variable for various setups. Stolen from WP. We also strip $_COOKIE from $_REQUEST to allow our lazy using $_REQUEST without 3rd party cookie interfering. See 3383 for explanation.
Исправить переменную $_SERVER['REQUEST_URI'] для различных настроек. Стандарт взят из WP. Мы также удаляем $_COOKIE из $_REQUEST, чтобы позволить нашему ленивому использованию $_REQUEST без вмешательства сторонних cookie. См. 3383 для объяснения.
function yourls_fix_request_uri() { $default_server_values = [ 'SERVER_SOFTWARE' => '', 'REQUEST_URI' => '', ]; $_SERVER = array_merge( $default_server_values, $_SERVER ); // Make $_REQUEST with only $_GET and $_POST, not $_COOKIE. See #3383. $_REQUEST = array_merge( $_GET, $_P...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function beforeRequest($request) {\n\t\t// _uri is defined in the public/.htaccess file. Many developers may not notice it because of\n\t\t// it's transparency during development. We unset it here incase developers are using the query string\n\t\t// for any reason. An example of where it might be an ...
[ "0.72812104", "0.7023726", "0.69372886", "0.6611508", "0.65932786", "0.65438867", "0.64679843", "0.64302313", "0.62786496", "0.6135281", "0.6132593", "0.6097896", "0.6090536", "0.6064853", "0.6056577", "0.6010992", "0.5996633", "0.59912324", "0.5950135", "0.59469897", "0.5884...
0.7195551
1
Check for maintenance mode. If yes, die. See yourls_maintenance_mode(). Stolen from WP.
Проверьте режим обслуживания. Если да, завершите работу. См. yourls_maintenance_mode(). Списано из WP.
function yourls_check_maintenance_mode() { $dot_file = YOURLS_ABSPATH . '/.maintenance' ; if ( !file_exists( $dot_file ) || yourls_is_upgrading() || yourls_is_installing() ) { return; } global $maintenance_start; yourls_include_file_sandbox( $dot_file ); // If the $maintenance_start timestamp is o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function maintenance_mode() {\n\t\treturn file_exists(ABSPATH . '.maintenance') || defined('WP_INSTALLING');\n\t}", "protected function maintenanceCheck()\n {\n if ($this->app['config']->get('general/maintenance_mode', false)) {\n $notice = json_encode([\n 'severity'...
[ "0.8631076", "0.8065116", "0.799071", "0.79595953", "0.7846978", "0.77934134", "0.774321", "0.7659825", "0.7614759", "0.75744206", "0.75150824", "0.7345906", "0.7262827", "0.72416097", "0.7192849", "0.7184312", "0.71180946", "0.6969852", "0.69330287", "0.6874908", "0.67868775...
0.83185035
1
Check if a URL protocol is allowed Checks a URL against a list of whitelisted protocols. Protocols must be defined with their complete scheme name, ie 'stuff:' or 'stuff://' (for instance, 'mailto:' is a valid protocol, 'mailto://' isn't, and 'http:' with no double slashed isn't either
Проверяет, разрешен ли протокол URL Проверяет URL на соответствие списку разрешенных протоколов. Протоколы должны быть определены с полным именем схемы, например, 'stuff:' или 'stuff://' (например, 'mailto:' является допустимым протоколом, 'mailto://' — нет, и 'http:' без двойных слешей также недопустим).
function yourls_is_allowed_protocol( $url, $protocols = [] ) { if ( empty( $protocols ) ) { global $yourls_allowedprotocols; $protocols = $yourls_allowedprotocols; } return yourls_apply_filter( 'is_allowed_protocol', in_array( yourls_get_protocol( $url ), $protocols ), $url, $protocols ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function URLHasAllowedScheme($url)\n {\n return (bool)preg_match('/^https?:\\/\\//i', $url);\n }", "function url_validate($url){\n\t\tif (!filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) === false) { // Must start with scheme\n\t\t $url_parser = parse_url($url);\n\n\t\t if (...
[ "0.70472693", "0.6922815", "0.68499666", "0.67999816", "0.66672486", "0.6619116", "0.6577892", "0.65182936", "0.6504399", "0.6476801", "0.64026874", "0.63969487", "0.63854885", "0.6369774", "0.63248163", "0.63137245", "0.6300763", "0.62081045", "0.6196495", "0.6187498", "0.61...
0.77668023
0
Get protocol from a URL (eg mailto:, http:// ...) What we liberally call a "protocol" in YOURLS is the scheme name + colon + double slashes if present of a URI. Examples: "something://blah" > "something://" "something:blah" > "something:" "something:/blah" > "something:" Unit Tests for this function are located in test...
Получить протокол из URL (например, mailto:, http:// ...) В YOURLS мы вольно называем "протоколом" схему имени + двоеточие + двойные слеши, если они присутствуют в URI. Примеры: "something://blah" > "something://" "something:blah" > "something:" "something:/blah" > "something:" Едининые тесты для этой функции находятся...
function yourls_get_protocol( $url ) { /* http://en.wikipedia.org/wiki/URI_scheme#Generic_syntax The scheme name consists of a sequence of characters beginning with a letter and followed by any combination of letters, digits, plus ("+"), period ("."), or hyphen ("-"). Although schemes are case-insensitive, the can...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCanExtractSchemeFromUrl()\n {\n $test = Http::extract_scheme_from_url('https://www.boom.co.uk/page1/sspage2?query=value#coucou');\n $this->assertIsString($test);\n $this->assertEquals('https', $test);\n }", "private function getUrl($protocol = true): string\n {\n...
[ "0.69655895", "0.6782599", "0.67761916", "0.67139834", "0.664785", "0.65719336", "0.64961755", "0.6485279", "0.64753836", "0.644569", "0.64394367", "0.6426689", "0.6389337", "0.63829756", "0.63751423", "0.6362052", "0.63481915", "0.6288651", "0.6258243", "0.6239648", "0.62396...
0.8062292
0
Get relative URL (eg 'abc' from ' Treat indifferently http & https. If a URL isn't relative to the YOURLS install, return it as is or return empty string if $strict is true
Получить относительный URL (например, 'abc' из ' Treat indifferently http & https. Если URL не является относительным по отношению к установке YOURLS, верните его как есть или верните пустую строку, если $strict истинно
function yourls_get_relative_url( $url, $strict = true ) { $url = yourls_sanitize_url( $url ); // Remove protocols to make it easier $noproto_url = str_replace( 'https:', 'http:', $url ); $noproto_site = str_replace( 'https:', 'http:', yourls_get_yourls_site() ); // Trim URL from YOURLS root URL :...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function evf_get_relative_url( $url ) {\n\treturn evf_is_external_resource( $url ) ? $url : str_replace( array( 'http://', 'https://' ), '//', $url );\n}", "function get_full_url($url)\n{\n global $uri, $config;\n\n // fully qualified?\n if (preg_match(\"/^https?:\\/\\//\", $url)) return $url;\n\n //...
[ "0.6709432", "0.6620513", "0.6411747", "0.6330554", "0.6311966", "0.63051206", "0.6236017", "0.622662", "0.622654", "0.6221459", "0.62119615", "0.62117124", "0.61994064", "0.6192122", "0.61916035", "0.6115628", "0.61038595", "0.6092025", "0.60852903", "0.6049193", "0.6037362"...
0.7547241
0
Set URL scheme (HTTP or HTTPS) to a URL
Установите схему URL (HTTP или HTTPS) для URL
function yourls_set_url_scheme( $url, $scheme = '' ) { if ( in_array( $scheme, [ 'http', 'https' ] ) ) { $url = preg_replace( '!^[a-zA-Z0-9+.-]+://!', $scheme.'://', $url ); } return $url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_url_scheme($url, $scheme = \\null)\n{\n}", "public function changeShemeFromHttpToHttpsAndBack()\n {\n $url = stubURL::fromString('http://example.org/');\n $url->setScheme('https');\n $this->assertEquals('https://example.org/', $url->get());\n\n $url->setScheme('http');...
[ "0.81843394", "0.74524283", "0.7206715", "0.70585775", "0.7045556", "0.6892871", "0.6873256", "0.6846654", "0.6691655", "0.6662634", "0.66549", "0.65848076", "0.6544221", "0.6489683", "0.64790916", "0.6449893", "0.6436005", "0.6436005", "0.6409955", "0.6396455", "0.6396455", ...
0.75020635
1
Tell if there is a new YOURLS version This function checks, if needed, if there's a new version of YOURLS and, if applicable, displays an update notice.
Укажите, есть ли новая версия YOURLS. Эта функция проверяет, если необходимо, наличие новой версии YOURLS и, при наличии, отображает уведомление о обновлении.
function yourls_tell_if_new_version() { yourls_debug_log( 'Check for new version: '.( yourls_maybe_check_core_version() ? 'yes' : 'no' ) ); yourls_new_core_version_notice(YOURLS_VERSION); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _checkForNewVersion() {\n if ($this->_aSession['user']['role'] == 4 && ALLOW_VERSION_CHECK &&\n (WEBSITE_MODE == 'staging' || WEBSITE_MODE == 'production')) {\n $oFile = @fopen('https://raw.github.com/marcoraddatz/candyCMS-Core/master/version.txt', 'rb');\n $sVersionContent...
[ "0.72601616", "0.70673347", "0.6868144", "0.6834339", "0.68274134", "0.6734179", "0.67305195", "0.67301315", "0.671827", "0.6644253", "0.66216457", "0.65945125", "0.65918595", "0.65205276", "0.650603", "0.64923626", "0.6491889", "0.6477021", "0.64401066", "0.64378184", "0.638...
0.7538962
0
File include sandbox Attempt to include a PHP file, fail with an error message if the file isn't valid PHP code. This function does not check first if the file exists : depending on use case, you may check first.
Файл include в песочнице Попытка включения файла PHP, сбой с сообщением об ошибке, если файл не является корректным кодом PHP. Эта функция не проверяет сначала, существует ли файл: в зависимости от использования, вы можете проверить сначала.
function yourls_include_file_sandbox($file) { try { if (is_readable( $file )) { include_once $file; yourls_debug_log("loaded $file"); return true; } } catch ( \Throwable $e ) { yourls_debug_log("could not load $file"); return sprintf("%s (%s : ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function include_file($file){\n$file=$file.'php';\nif($file!=''){\n$check=file_exists($file);\nif($check){\ninclude_once($file); \n}else{\nerror('file was not included'); \n} \n}else{\nerror('File missing'); \n} \n}", "function system_include_file($file){\n\t$included_files = get_included_files();...
[ "0.7377517", "0.6951646", "0.6913586", "0.6891339", "0.68241125", "0.6755063", "0.6641337", "0.6555563", "0.6468056", "0.6408247", "0.63854146", "0.6382496", "0.63782513", "0.6363372", "0.63611233", "0.63092387", "0.6258568", "0.6234257", "0.62329865", "0.6216048", "0.6192271...
0.753265
0
Delete the current record from database. Only if are the key values
Удалить текущий запись из базы данных. Только если значения ключа
public function delete(){ $conn = $GLOBALS[$this->_connection_var]; $where = array(); $obj = $this->getColsAndValues(); $vals = $obj["vals"]; $cols = $obj["cols"]; //Verificar as chaves if ($this->hasKeys($cols,$vals)){ for ($i=0;$i<count($cols);$i++){ if (strpos($this->_keys,$cols[$i])!==false){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __delete_record() {\n\t\t$keys = self::__pk();\n\t\t$table = self::__table();\n\n\t\tforeach($keys AS $field) {\n\t\t\t$request[] = \"{$field} = :{$field}\";\n\t\t\t$execut_values[':'.$field] = $this->{$field};\n\t\t}\n\n\t\tD::$db->exec(\"DELETE FROM {$table} WHERE \".implode(' AND ', $request).\" LIMIT ...
[ "0.75116986", "0.71655685", "0.7159489", "0.71479815", "0.6962861", "0.69572854", "0.691659", "0.68632704", "0.6805671", "0.678909", "0.6774237", "0.67611086", "0.67197186", "0.67195493", "0.67088753", "0.6701048", "0.6688195", "0.6641369", "0.66355175", "0.66185725", "0.6618...
0.749861
1
Schedule all backup tasks.
Запланировать все задачи резервного копирования.
public function schedule_backups() { global $CFG, $SHAREDB; $events = $SHAREDB->get_records('rollovers', array( 'status' => \local_rollover\Rollover::STATUS_WAITING_SCHEDULE, 'from_env' => $CFG->kent->environment, 'from_dist' => $CFG->kent->distribution )); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function schedule(Schedule $schedule)\n {\n parent::schedule($schedule);\n $schedule->command('system:sync')->everyFiveMinutes();\n $schedule->command('backup:clean')->daily(); //->at('01:00');\n $schedule->command('backup:run --only-db')->daily(); //->at('01:00');\n }",...
[ "0.6736401", "0.6549362", "0.6319878", "0.6293942", "0.62493217", "0.5998464", "0.5972934", "0.5913843", "0.5913276", "0.58688694", "0.5849105", "0.5847386", "0.5828939", "0.5822851", "0.58011615", "0.57978046", "0.57827055", "0.578146", "0.578146", "0.57760954", "0.576675", ...
0.78193885
0
Schedule all restore tasks.
Запланировать все задачи восстановления.
public function schedule_restores() { global $CFG, $SHAREDB; $events = $SHAREDB->get_records('rollovers', array( 'status' => \local_rollover\Rollover::STATUS_BACKED_UP, 'to_env' => $CFG->kent->environment, 'to_dist' => $CFG->kent->distribution )); //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function schedule_backups() {\n global $CFG, $SHAREDB;\n\n $events = $SHAREDB->get_records('rollovers', array(\n 'status' => \\local_rollover\\Rollover::STATUS_WAITING_SCHEDULE,\n 'from_env' => $CFG->kent->environment,\n 'from_dist' => $CFG->kent->distribution\...
[ "0.6701703", "0.6499385", "0.5767316", "0.564534", "0.55385023", "0.55262643", "0.5396643", "0.5396643", "0.53944427", "0.53695464", "0.5353349", "0.5346335", "0.53460234", "0.5336232", "0.53353393", "0.5321948", "0.52927345", "0.52710116", "0.5265898", "0.5252204", "0.524781...
0.7407714
0
Merge an array of items into the cache.
Объединить массив элементов в кэш.
public function merge(array $items) : Cache { foreach ($items as $key => $value) { $this->put($key, $value); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function merge($items);", "public function merge($items);", "public function merge(array $data);", "public function merge(array ...$items): Collection\n {\n $this->data = array_merge($this->data, ...$items);\n return $this;\n }", "public function merge(...$items)\n {\n ...
[ "0.69744045", "0.69744045", "0.6129321", "0.6086023", "0.6046861", "0.5907003", "0.5716228", "0.56622773", "0.5605182", "0.5602181", "0.55927366", "0.5582721", "0.5469713", "0.54244053", "0.5412549", "0.5366859", "0.5364347", "0.53366905", "0.5303095", "0.5275805", "0.5272882...
0.75882167
0
get all new reservations / await reservations
получить все новые бронирования / ожидать бронирований
public function getAwaitReservations() { $req = 'SELECT id_reservation, reservation_name, reservation_cutlery, reservation_date, reservation_time, reservation_phone, reservation_email FROM reservations WHERE reservation_visibility = 1'; $awaitReservations = $this->queryMany($req); return $aw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getReservations() {\n\t\t//caching missin\n\t\tself::$_db->saveQry(\"SELECT * FROM `#_reservations` WHERE `startTime` >= ? AND `user` = ? ORDER BY `ID` DESC\", \n\t\t\t\tdate(\"Y-m-d\"), User::load()->getId());\n\t\twhile($r = self::$_db->fetch_assoc()) $res[] = $r;\n\t\treturn $res;\n\t}", "function ge...
[ "0.7321337", "0.727442", "0.7061527", "0.7049649", "0.70262665", "0.70129603", "0.6986917", "0.6798983", "0.67833674", "0.6761187", "0.6745888", "0.67376316", "0.6735864", "0.6681585", "0.66792256", "0.66616356", "0.6653464", "0.6625826", "0.6621192", "0.6573031", "0.6519459"...
0.740574
0
get all the archive reservations / older reservations
получить все архивные резервации / старые резервации
public function getArchiveReservations() { $req = 'SELECT id_reservation, reservation_name, reservation_cutlery, reservation_date, reservation_time, reservation_phone, reservation_email FROM reservations WHERE reservation_visibility = 0'; $validateReservations = $this->queryMany($req); retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getReservations() {\n\t\t//caching missin\n\t\tself::$_db->saveQry(\"SELECT * FROM `#_reservations` WHERE \".\n\t\t\t\t\"`startTime` >= ? AND `startstation` = ? AND (`status` = 'queued' \".\n\t\t\t\t\"OR `status` = 'pending' OR `status` = 'prefered') ORDER BY `startTime` ASC\",\n\t\t\t\tdate(\"Y-m-d\"), U...
[ "0.76263916", "0.74987745", "0.72957885", "0.7151803", "0.69877017", "0.687268", "0.67810446", "0.6745251", "0.67026824", "0.6667864", "0.666316", "0.6592319", "0.6520823", "0.64966595", "0.648552", "0.63875854", "0.63371915", "0.63311267", "0.6322617", "0.63221353", "0.63139...
0.83381975
0
/ USER CAPABILITIES /===================================================== / Hide core update info for nonadmins /
/ ВОЗМОЖНОСТИ ПОЛЬЗОВАТЕЛЯ /===================================================== / Скрыть информацию о обновлении ядра для непользователей /
function onlyadmin_update() { if (!current_user_can('update_core')) { remove_action( 'admin_notices', 'update_nag', 3 ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hide_update_notice_to_all_but_admin_users() {\n\tif (!current_user_can('update_core')) {\n\t\tremove_action( 'admin_notices', 'update_nag', 3 );\n\t}\n}", "function hide_core_update_notifications_from_users() {\n\tif ( ! current_user_can( 'update_core' ) ) {\n\t\tremove_action( 'admin_notices', 'update_...
[ "0.7614592", "0.75579", "0.72046053", "0.71520275", "0.69677263", "0.6648444", "0.6616183", "0.6610867", "0.64366794", "0.63456327", "0.6314514", "0.63136476", "0.62930673", "0.62569785", "0.625449", "0.6249096", "0.6236674", "0.6219008", "0.62072027", "0.6199503", "0.6190762...
0.7784994
0
validFirstName() returns true if first name is not empty and contains only letters
validFirstName() возвращает true, если имя не пустое и содержит только буквы
function validFirstName($fname) { return !empty(trim($fname)) && ctype_alpha($fname); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validFirstName ($name) {\n\tif (preg_match(\"/^[A-Z]{1}[a-z]*$/\", $name)) {return true;}\n\telse {return false;}\n}", "function isFirstNameValid($firstName)\n {\n \treturn preg_match('/\\A[A-Za-z\\-\\.\\s]+\\Z/', $firstName);\n }", "function validateFirstName($_fname){\r\n //Check the first...
[ "0.86181796", "0.83704245", "0.80168027", "0.795576", "0.78864706", "0.77981204", "0.7789811", "0.7783173", "0.7665629", "0.7596762", "0.7577626", "0.7564945", "0.7542696", "0.7525381", "0.7478183", "0.7464843", "0.7438301", "0.7386987", "0.73854685", "0.73258585", "0.7321353...
0.8643855
0
validLastName() returns true if last name is not empty and contains only letters
validLastName() возвращает true, если фамилия не пустая и содержит только буквы
function validLastName($lname) { return !empty(trim($lname)) && ctype_alpha($lname); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isLastNameValid($lastName)\n {\n \treturn preg_match('/\\A[A-Za-z\\-\\.\\s]+\\Z/', $lastName);\n }", "function validLastName ($name) {\n\tif (preg_match(\"/^[A-Z]{1}[a-z]*(\\s|-|\\.|\\\\\\\\|\\/)?[A-Z]?[a-z]*$/\", $name)) {return true;}\n\telse {return false;}\n}", "function validateLastName($_lnam...
[ "0.8433318", "0.8270795", "0.81227475", "0.80007225", "0.7998567", "0.79498035", "0.7889374", "0.78865135", "0.78739667", "0.7627452", "0.7480739", "0.73674315", "0.7310253", "0.7269425", "0.72321653", "0.72225034", "0.7209979", "0.70387197", "0.69508415", "0.69409114", "0.69...
0.8702625
0
validAge() returns true if age is not empty and contains only numbers and is between 18 and 118
validAge() возвращает true, если age не пуст и содержит только числа и находится в диапазоне от 18 до 118
function validAge($age) { return !empty(is_numeric($age)) && 18 <= $age && $age <= 118; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function validAge($age)\n {\n return !empty(is_numeric($age)) && $age >= 18 && $age <= 118;\n }", "function validAge($age)\r\n {\r\n\r\n return is_numeric($age) && ($age >= 18 && $age <= 118);\r\n }", "static function validAge($age)\r\n {\r\n $HIGHEST_AGE = 118;\r\n ...
[ "0.8995214", "0.89455456", "0.870905", "0.8518654", "0.7700698", "0.76890045", "0.7518943", "0.749468", "0.7478441", "0.7388498", "0.722607", "0.7151336", "0.7065751", "0.7025373", "0.6985046", "0.67827207", "0.65440196", "0.63327986", "0.632134", "0.6290527", "0.6289302", ...
0.9016402
0
validGender() returns true if selected gender is in list of valid options
validGender() возвращает true, если выбран пол присутствует в списке допустимых вариантов
function validGender($gender) { $validGender = $this->_dataLayer->getGender(); return in_array($gender, $validGender); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkGender($gender) {\n return in_array($gender, ['Male', 'Female']);\n }", "function isValidGender(&$gender)\n{\n switch ($gender)\n {\n case 'female':\n $gender = 1;\n return true;\n case 'male':\n $gender = 2;\n return true;\n...
[ "0.7667697", "0.7444532", "0.73551327", "0.7348952", "0.72739553", "0.722818", "0.717357", "0.70830226", "0.70798665", "0.7073294", "0.70661753", "0.69280905", "0.6757124", "0.67352915", "0.66611105", "0.6660759", "0.650955", "0.642208", "0.6371904", "0.6371027", "0.63351095"...
0.7856385
0
validPhone() returns true if phone number is not empty and valid
validPhone() возвращает true, если номер телефона не пуст и корректен
function validPhone($phone) { return !empty($phone) && preg_match("/^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$/", $phone); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validPhone($phone)\r\n{\r\n return $phone !== \"\" AND preg_match('/^[0-9]{10}+$/', $phone);\r\n}", "static function validPhone($phone)\n {\n $pattern = '/^\\s*(?:\\+?(\\d{1,3}))?([-. (]*(\\d{3})[-. )]*)?((\\d{3})[-. ]*(\\d{2,4})(?:[-.x ]*(\\d+))?)\\s*$/';\n return preg_match($patter...
[ "0.8285506", "0.81843567", "0.81641066", "0.81298006", "0.8128751", "0.81084245", "0.80870634", "0.8082455", "0.8061444", "0.80464864", "0.80431443", "0.79883295", "0.7979802", "0.79612964", "0.79437923", "0.79333985", "0.7905329", "0.78513044", "0.7848815", "0.7828314", "0.7...
0.8363916
0
validState() returns true if selected state is in list of valid options
validState() возвращает true, если выбранное состояние находится в списке допустимых вариантов
function validState($state) { $validState = $this->_dataLayer->getStates(); return in_array($state, $validState); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValidStates() {}", "private function validState($state) {\n return $state == \"A\" || $state == \"I\" || $state == \"D\";\n }", "function isValidSelection()\n\t{\n\t\t\n\t\treturn $this->isValidSelection;\n\t\t\n\t}", "public function valid()\n {\n return isset( $this->proper...
[ "0.7170013", "0.68888265", "0.67047006", "0.6671276", "0.64848477", "0.6417621", "0.64127964", "0.6406905", "0.6387127", "0.63455147", "0.62989473", "0.6290785", "0.62750757", "0.62468064", "0.61838454", "0.61758", "0.6170754", "0.6105052", "0.60812116", "0.60396487", "0.6024...
0.72508705
0
validIndoor() returns true if selected indoor interests are all in the list of valid options
validIndoor() возвращает true, если выбранные интересы, связанные с помещением, полностью соответствуют списку допустимых вариантов
function validIndoor($selectedIndoor) { //Get valid indoor activities from data layer $validIndoor = $this->_dataLayer->getIndoor(); //Check every selected indoor activity foreach ($selectedIndoor as $selected) { return in_array($selected, $validIndoor); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validIndoor($selectedIndoor)\n {\n $validIndoor = $this->_dataLayer->getIndoor();\n\n //Check every selected condiment\n foreach ($selectedIndoor as $selected) {\n\n //If the selected condiment is not in the valid list, return false\n if (!in_array($selected, ...
[ "0.84139407", "0.77209777", "0.77055156", "0.71757126", "0.71472675", "0.7080949", "0.69563365", "0.61106783", "0.57132465", "0.5650455", "0.5613667", "0.56023395", "0.55445826", "0.546871", "0.5429483", "0.54272884", "0.54039395", "0.5401917", "0.5400985", "0.53797317", "0.5...
0.8359771
1
validOutdoor() returns true if selected outdoor interests are all in the list of valid options
validOutdoor() возвращает true, если выбранные внеуличные интересы полностью соответствуют списку допустимых вариантов
function validOutdoor($selectedOutdoor) { //Get valid outdoor activities from data layer $validOutdoor = $this->_dataLayer->getOutdoor(); //Check every selected outdoor activity foreach ($selectedOutdoor as $selected) { return in_array($selected, $validOutdoor);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validOutdoor($selectedOutdoor)\n {\n $validOutdoor = $this->_dataLayer->getOutdoor();\n\n //Check every selected condiment\n foreach ($selectedOutdoor as $selected) {\n\n //If the selected condiment is not in the valid list, return false\n if (!in_array($selec...
[ "0.8484101", "0.8323713", "0.8033903", "0.7885252", "0.7601553", "0.73357064", "0.71916795", "0.6586516", "0.55859816", "0.54658353", "0.54536086", "0.54214585", "0.5404227", "0.53337276", "0.5252384", "0.52454084", "0.5243372", "0.5232192", "0.52266943", "0.5223204", "0.5220...
0.8559818
0
Read data from a buffered event
Чтение данных из буферизованного события
function event_buffer_read($bevent, $data_size) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function didReadData() {}", "abstract private function onDataRead(string $data): array;", "public function processReceivedData()\r\n {\r\n }", "function event_buffer_new($stream, $readcb, $writecb, $errorcb, $arg = NULL)\n{\n}", "public function onRead() {\n\t\tstart:\n\t\tif ($this->type =...
[ "0.6162241", "0.6150046", "0.60884655", "0.6025907", "0.6024726", "0.5919056", "0.57423186", "0.573453", "0.57247543", "0.5723616", "0.5689649", "0.56726813", "0.5671027", "0.5671027", "0.5671027", "0.5671027", "0.5671027", "0.5671027", "0.5671027", "0.5671027", "0.5671027", ...
0.80576503
0
Download the file pointed by url to the specified path If $local_path is not specified, than it's obtained from the
Скачайте файл, указанный по url, в указанную папку. Если $local_path не указан, то он получается из того, что указано в
public function download($url, $local_path = NULL) { $data = $this->get($url, FALSE); if ($data) { if ( ! isset($local_path)) { $local_path = TMPPATH . '/' . basename($url); } file_put_contents($local_path, $data); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function download_cached($url, $local_path = NULL)\n {\n if ( ! isset($local_path))\n {\n $local_path = $this->_tmp_dir . '/' . basename($url);\n }\n\n if (is_readable($local_path))\n return $local_path;\n\n return $this->download($url, $local_path...
[ "0.80061847", "0.7867534", "0.74750865", "0.7141652", "0.6986304", "0.69827664", "0.6815216", "0.6745518", "0.6713848", "0.6577433", "0.6498322", "0.64805007", "0.64583015", "0.64540905", "0.6448804", "0.6381646", "0.6363147", "0.63325727", "0.624812", "0.62255764", "0.619338...
0.8114214
0
Get the count by pk
Получить количество по pk
public function countByPk($pk) { return $this->count(array( $this->getPrimaryKey() => $pk )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count()\n {\n $countBy = \"{$this->repository->makeModel()->getTable()}.{$this->repository->makeModel()->getKeyName()}\";\n\n return $this->repository->makeQuery()->count($countBy);\n }", "public function count($primary_key)\n {\n return count($this->items);\n }",...
[ "0.6746122", "0.6682799", "0.65329075", "0.6461691", "0.64230746", "0.63838965", "0.6287825", "0.62759256", "0.62692374", "0.62387836", "0.62172264", "0.6194201", "0.6188269", "0.6186641", "0.61824554", "0.6173644", "0.61719245", "0.6160565", "0.6151971", "0.6094377", "0.6076...
0.81536925
0
Access to global settings form
Доступ к форме настроек глобальных параметров
public function gSettings() { return $this->globalSettingsForm; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function settings( &$form )\n\t{\n\t\t\n\t}", "private function settings()\r\n\t{\r\n\t\t\r\n\t\t$this->form_code\t= 'module=settings&amp;section=settings';\r\n\t\t$this->form_code_js\t= 'module=settings&section=settings';\r\n\t\t\r\n\t\t/* Grab, init and load settings */\r\n\t\t\r\n\t\t$classToLoad\t= IP...
[ "0.77732956", "0.764184", "0.75989985", "0.748364", "0.7450637", "0.73838556", "0.723138", "0.7183807", "0.7177968", "0.71218", "0.7112737", "0.7111454", "0.70763814", "0.70600253", "0.7058343", "0.7055591", "0.70529646", "0.7031612", "0.70214826", "0.70214164", "0.70020753",...
0.7823864
0
Access to user settings form
Доступ к форме настроек пользователя
public function uSettings() { return $this->userSettingsForm; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function settings() {\n\t\t$this->validate();\n\t\t$this->setupTemplate();\n\n\n\t\t$user = Request::getUser();\n\t\tif(isset($user)) {\n\t\t\timport('classes.notification.form.NotificationSettingsForm');\n\t\t\t$notificationSettingsForm = new NotificationSettingsForm();\n\t\t\t$notificationSettingsForm->display()...
[ "0.78713906", "0.7680158", "0.7526779", "0.7395353", "0.73875", "0.7377517", "0.73139745", "0.7264041", "0.72529316", "0.723502", "0.7219306", "0.7216033", "0.7201161", "0.7173686", "0.7164768", "0.7157199", "0.71490115", "0.71480703", "0.7104508", "0.7101204", "0.70959777", ...
0.7938258
0
Echoes "Hello world!" code comment
Комментарий к коду "Echoes "Hello world!""
public static function hello_world_comment() { echo '<!-- Hello world! -->'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function exampleHelloWorld()\n {\n print \"Hello World.\";\n }", "public static function hello_world() {\n echo 'Hello world!';\n }", "function helloWorld()\n{\n\techo '<p>Hello World</p>';\t\n}", "public function sayHello() {\n\t\techo \"Buna ziua! <br>\";\n\t}", "public functi...
[ "0.7533665", "0.7109259", "0.69257236", "0.6850491", "0.67998934", "0.6736034", "0.6728944", "0.67210746", "0.67182505", "0.66636336", "0.66610336", "0.6588399", "0.6561659", "0.6555585", "0.65504193", "0.6547505", "0.65437573", "0.6535646", "0.6456127", "0.63921934", "0.6389...
0.85697806
0
Generate a payment URL for the GET method.
Создайте URL для оплаты метода GET.
public function generatePaymentURL(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaymentUrl();", "public function getPaymentInfoUrl();", "public function getPaymentPageUrl();", "public function getPostPaymentUrl();", "public function getPaymentChangeUrl();", "public function getURLPayment($data)\n {\n }", "private function getPaymentURL()\n\t{\n\t\t$sandbox...
[ "0.77701855", "0.7253339", "0.7234459", "0.72264504", "0.71825796", "0.6963053", "0.692674", "0.69177395", "0.69092", "0.68661493", "0.6855455", "0.6734849", "0.67171335", "0.6689439", "0.66625065", "0.6648798", "0.6626462", "0.6626054", "0.6603007", "0.66003186", "0.65947354...
0.8095121
0
Return parameters for the form / POST. $name > $value.
Возвращаемые параметры формы / POST. $name > $value.
public function getParametersForForm(): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function postvalue($name)\n{\n\tif(isset($_POST[$name]))\n\t\t$value=$_POST[$name];\n\telse if(isset($_GET[$name]))\n\t\t$value=$_GET[$name];\n\telse\n\t\treturn \"\";\n\tif(!is_array($value))\n\t\treturn refine($value);\n\t$ret=array();\n\tforeach($value as $key=>$val)\n\t\t$ret[$key]=refine($val);\n\treturn $ret...
[ "0.70058733", "0.6867608", "0.6759094", "0.6734329", "0.6654307", "0.6504478", "0.6422605", "0.6422605", "0.63837224", "0.6358457", "0.6350611", "0.63473815", "0.634407", "0.63078964", "0.63017464", "0.6293944", "0.6285513", "0.6264015", "0.6262378", "0.6239275", "0.6237112",...
0.7096118
0
friendship that this user was asked for but now blocked
дружба, которую этот пользователь был запрошен, но теперь заблокирован
protected function thisUserFriendOfBlocked() { if(Request()->has('cari')){ return $this->belongsToMany(User::class, 'friendships', 'second_user', 'first_user') ->select('users.id','users.username','users.nama_lengkap','users.member_id') ->withPivot('status', 'acted_u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function friendsOfThisUserBlocked()\n\t{\n if(Request()->has('cari')){\n return $this->belongsToMany(User::class, 'friendships', 'first_user', 'second_user')\n ->select('users.id','users.username','users.nama_lengkap','users.member_id')\n ->withPivot('statu...
[ "0.6905171", "0.6708333", "0.6614139", "0.6590026", "0.6584122", "0.65822357", "0.65550756", "0.6535467", "0.64761406", "0.64538306", "0.64455354", "0.64425695", "0.6437355", "0.6418729", "0.6408338", "0.6375415", "0.6364055", "0.6361015", "0.6320415", "0.63066334", "0.629996...
0.70141304
0
accessor allowing you call $user>blocked_friends
аксессор, позволяющий вызвать $user>blocked_friends
public function getBlockedFriendsAttribute() { if ( ! array_key_exists('blocked_friends', $this->relations)) $this->loadBlockedFriends(); return $this->getRelation('blocked_friends'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getBlockedUsers()\n {\n if ($this->bool_login == false) {\n return false;\n }\n\n $this->http_client->post($this->plurk_paths['friends_get_blocked'],\n array('offset' => 0, 'user_id' => $this->uid));\n $response = $this->http_client->currentResponse();\...
[ "0.75683534", "0.71366656", "0.6988056", "0.69617385", "0.68364906", "0.67759454", "0.6710141", "0.66966426", "0.6677845", "0.66768163", "0.6536774", "0.6536774", "0.6536774", "0.6502995", "0.64696443", "0.64568955", "0.64528596", "0.6409205", "0.63982725", "0.6372229", "0.63...
0.7269179
1
Set userstamp on the current model depending upon the 1. Event 2. Field 3. Expression
Установить пользовательский временной штамп для текущей модели в зависимости от 1. события 2. поля 3. выражения
public function setUserstampOnModel(&$model, $eventName = '') { foreach ($this->userstamps as $fieldName => $dependsOn) { if (is_array($dependsOn) && count($dependsOn) > 0) { $mathes = [ 'depends_on_event' => $this->dependsOnEvent($dependsOn, $eventName), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function timestamp() {\n\t\t$attributes = $this->attributes;\n\t\tif(array_key_exists('last_update', $attributes)) {\n\t\t\t\\Yii::trace(\"Timestamping \".$this->modelName, \"parallel.yii.ActiveRecord\");\n\t\t\t$this->last_update = date('Y-m-d H:i:s');\n\t\t\t$this->last_update_user = \\Yii::app()->user...
[ "0.62851286", "0.6217538", "0.61455345", "0.60886276", "0.59845674", "0.58847475", "0.58119214", "0.56565547", "0.56284773", "0.56038433", "0.55765986", "0.5543656", "0.5500054", "0.5497848", "0.5495777", "0.5475936", "0.5467778", "0.5447426", "0.5368915", "0.53021497", "0.52...
0.7013338
0
Check if 'this' model uses the soft deletes trait
Проверьте, использует ли модель 'this' признак мягкого удаления
public function isSoftDeleteEnabled() { return in_array('Illuminate\Database\Eloquent\SoftDeletes', class_uses($this)) && !$this->forceDeleting; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSoftDeleteAble(): bool\n {\n return in_array(SoftDeletes::class, class_uses($this->model));\n }", "public function beforeSoftDelete()\n {\n if (method_exists($this->owner, 'beforeSoftDelete')) {\n if (!$this->owner->beforeSoftDelete()) {\n return...
[ "0.811374", "0.7968443", "0.79652774", "0.7684615", "0.7683672", "0.7559842", "0.7521526", "0.75056386", "0.75056386", "0.7493315", "0.74614865", "0.73421156", "0.73411787", "0.7340696", "0.73267335", "0.7292094", "0.72883266", "0.71581185", "0.7156064", "0.71557623", "0.7111...
0.8061135
1
Get userstamp field names from the userstamp array
Получить имена полей userstamp из массива userstamp
public function getUserstampFields() { return collect($this->userstamps)->map(function ($v, $k) { return is_array($v) ? $k : $v; })->values()->toArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_all_fieldnames(){\r\n\t\r\n\t\t$return_array = array();\r\n\t\r\n\t\t$return_array[\"basic\"] = array();\r\n\t\t$return_array[\"extended\"] = array();\r\n\t\t\r\n\t\t\r\n\t\t$fields = $this->db->list_fields('users');\r\n\t\t\r\n\t\tforeach ($fields as $field)\r\n\t\t{\r\n\t\t\t$return_array[\"b...
[ "0.6219211", "0.6013139", "0.59610564", "0.5885601", "0.57952046", "0.57028514", "0.5683875", "0.56459993", "0.5613167", "0.5612608", "0.5612608", "0.5581359", "0.55527395", "0.55372083", "0.5527637", "0.55216", "0.55045986", "0.55024296", "0.54707766", "0.5440985", "0.543769...
0.80942404
0
Get the class being used to provide a User.
Получить класс, используемый для предоставления пользователя.
protected function getUserClass() { if (get_class(auth()) === 'Illuminate\Auth\Guard') { return auth()->getProvider()->getModel(); } return auth()->guard()->getProvider()->getModel(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserClass();", "protected function getUserClass()\n {\n return User::class;\n }", "protected function getUserClass()\n {\n $forumConfig = $this->container->getParameter('valantir_forum');\n return $forumConfig['user_class'];\n }", "public function getClass(...
[ "0.8289046", "0.82838976", "0.7914326", "0.7686653", "0.7501137", "0.71454185", "0.71130824", "0.70724946", "0.7003249", "0.69909483", "0.69444644", "0.68597275", "0.68597275", "0.6849166", "0.6849166", "0.68211526", "0.67884225", "0.67772573", "0.6766531", "0.66686386", "0.6...
0.83397496
0
Creates a singleton instance of JSCalendar. Its important to use only this funcion than a direct initialization of the class! You can use this method via a static call.
Создает единственное экземпляр JSCalendar. Важно использовать только эту функцию вместо прямой инициализации класса! Вы можете использовать этот метод через статический вызов.
function &getInstance() { static $instance; if (!isset($instance)) $instance = new frontend_JSCalendar(); return $instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Calendar()\n {\n }", "static function get_instance() {\n if ( is_null(self::$instance) ) {\n self::$instance = new calendar_press_init();\n }\n return self::$instance;\n }", "static function get_calender(){\n\t\t$info = self::get_calender_access_info(...
[ "0.62977344", "0.6291048", "0.6169989", "0.605921", "0.60429573", "0.60268676", "0.58674204", "0.5835936", "0.579981", "0.57479554", "0.5746859", "0.5724102", "0.5710312", "0.57074416", "0.5704624", "0.5688639", "0.5645069", "0.5645069", "0.5631258", "0.56309783", "0.5600409"...
0.7990556
0
Reads and prepareas the global date2cal configuration.
Читает и готовит глобальную конфигурацию date2cal.
function readGlobalConfig() { // unserialize configuration $extConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['date2cal']); // get calendar image $extConfig['calImg'] = t3lib_div::getFileAbsFileName($extConfig['calImg']); $extConfig['calImg'] = $this->config['backPath'] . substr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _initDateTime() {\n\ttry {\n\t // load config\n\t $this->bootstrap('config');\n\n\t // get config\n\t $config = Knowledgeroot_Registry::get('config');\n\n\t // set timezone\n\t date_default_timezone_set($config->base->timezone);\n\t} catch (Exception $e) {\n\t echo $e->getMe...
[ "0.6197444", "0.60119843", "0.58599126", "0.5815024", "0.5726447", "0.56665087", "0.5650238", "0.5646667", "0.56183624", "0.5612507", "0.56066734", "0.56066734", "0.55358213", "0.55353004", "0.5524894", "0.55212176", "0.550819", "0.5496265", "0.54762375", "0.54754955", "0.547...
0.7030836
0
Creates a new XincludeFilter using the passed in Reader for instantiation.
Создает новый XincludeFilter с использованием переданного Reader для инстанцирования.
function chain(Reader $reader) { $newFilter = new XincludeFilter($reader); $newFilter->setProject($this->getProject()); $newFilter->setBasedir($this->getBasedir()); return $newFilter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function chain(Reader $reader)\n {\n $filter = new self($reader);\n\n $filter->setInputEncoding($this->getInputEncoding());\n $filter->setOutputEncoding($this->getOutputEncoding());\n\n $filter->setInitialized(true);\n $filter->setProject($this->getProject());\n\n ...
[ "0.6194466", "0.5691307", "0.5570537", "0.5473871", "0.52528375", "0.51121414", "0.51065826", "0.5086984", "0.50796974", "0.5072937", "0.5072937", "0.5072937", "0.5072937", "0.48507065", "0.482373", "0.47828498", "0.47752094", "0.47680256", "0.47610277", "0.4689902", "0.46811...
0.78414905
0
Extract a user id from the author tag in an entry section
Извлечь идентификатор пользователя из тега автора в разделе записи
protected function extractUserId(\DOMElement $entry) { $authors = $entry->getElementsByTagName('author'); if (!$authors->length) { throw new RepositoryException("User ID not found while building the event journal"); } $userId = null; foreach ($authors->item(0)->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function author_id()\r\r\n\t{\r\r\n\t\t//loading resources\r\r\n\t\t$user =& $this->getOneToOne('juser');\r\r\n\t\t\r\r\n \treturn $user->id();\r\r\n\t}", "function get_the_author_ID()\n{\n}", "private function get_user_id($author_string)\n {\n preg_match('/([a-z0-9]+)@/', $author_string, $m);\n\n...
[ "0.70314205", "0.7021395", "0.6979606", "0.694888", "0.6907339", "0.67993724", "0.6740163", "0.67401534", "0.67401534", "0.6686716", "0.6645139", "0.6609826", "0.66056234", "0.6595231", "0.6581952", "0.6581952", "0.6568903", "0.655957", "0.6555679", "0.65221524", "0.6500999",...
0.7475597
0
Method to display update notice on the admin dashboard. Check if db.php file is replaced with the apropriate version, and if not, display notice. This is not required for now. So this method only returns and do nothing.
Метод для отображения уведомления о обновлении на панели администратора. Проверить, заменен ли файл db.php на соответствующую версию, и если нет, отобразить уведомление. Это в настоящее время не требуется. Поэтому данный метод возвращает и ничего не делает.
public static function show_admin_notice() { return; $notice_string = __('Upgrading Notice: To finish upgrading, please activate SQLite Integration and go Setting >> SQLite Integration >> Miscellaneous, and click the button &quot;update&quot; at the bottom of the page. Or else replace wp-content/db.php with the one...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display_update_notice() {\n if( ! is_admin() ||\n $this->table_up_to_date() ) {\n return;\n } ?>\n <div class=\"notice notice-success\">\n <p>You need to update the database for <?php echo $this->table_name ?> (make sure you back it up first). <...
[ "0.7899555", "0.7856192", "0.76571256", "0.73601955", "0.7204334", "0.7097294", "0.6892505", "0.68893206", "0.68799394", "0.6857328", "0.67713666", "0.6767029", "0.67565167", "0.6669814", "0.66555536", "0.6640251", "0.6604424", "0.6594512", "0.65942484", "0.65916574", "0.6568...
0.837085
0
Method to read a error log file and returns its contents. 'FQDBDIR/debug.txt' is the log file name. If this file is not existent, returns false.
Метод для чтения файла журнала ошибок и возврата его содержимого. Имя файла журнала 'FQDBDIR/debug.txt'. Если этот файл не существует, возвращается false.
private function show_error_log() { $file = FQDBDIR . 'debug.txt'; if (file_exists($file)) { $contents = file_get_contents($file); return $contents; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function readLogFile() {}", "public function checkLog($filename)\n {\n if (file_exists($filename)) {\n $content = file_get_contents($filename);\n if ($this->findString($content, 'ERROR') ||\n $this->findString($content, 'WARNING')\n ) {\n ...
[ "0.59441346", "0.5909027", "0.57973284", "0.5707637", "0.568081", "0.5679721", "0.5468992", "0.5340641", "0.5230119", "0.5229444", "0.5153656", "0.51303697", "0.50965923", "0.5093557", "0.5005433", "0.4975814", "0.49626437", "0.49617139", "0.49526978", "0.49233136", "0.492040...
0.7175045
0
Method to get system information from the server and returns its data. Returned value is an associative array of system informations. sys_info['WordPress'] => WordPress Version sys_info['PHP'] => PHP Version
Метод для получения информации о системе с сервера и возврата её данных. Возвращаемое значение — ассоциативный массив информации о системе. sys_info['WordPress'] => Версия WordPress sys_info['PHP'] => Версия PHP
private function get_system_info() { global $wp_version; $sys_info = array(); $sys_info['WordPress'] = $wp_version; $sys_info['PHP'] = PHP_VERSION; return $sys_info; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSystemInfo()\n {\n $arrCMD = [\n 'action' => 'getSysInfo',\n ];\n $cmd = json_encode($arrCMD);\n\n $this->send($cmd);\n }", "public function systemInfo()\n {\n $cmd = null;\n switch (PHP_OS) {\n case 'WINNT':\n ...
[ "0.8129179", "0.7827862", "0.77737623", "0.7749732", "0.7615593", "0.7255971", "0.72305393", "0.7161898", "0.7156243", "0.71527433", "0.69883484", "0.689333", "0.68782526", "0.6791652", "0.67899853", "0.67757785", "0.675059", "0.6742022", "0.6682098", "0.66666216", "0.6666017...
0.8352264
0
Method to show the contents of 'wpcontent/db.php' file. If this file is not existent, shows message and returns false.
Метод для отображения содержимого файла 'wpcontent/db.php'. Если этот файл отсутствует, выводится сообщение и возвращается false.
private function show_db_php() { if (defined('WP_CONTENT_DIR')) { $file = WP_CONTENT_DIR . '/db.php'; } else { $file = ABSPATH . 'wp-content/db.php'; } if (file_exists($file)) { if (is_readable($file)) { $contents = file_get_contents($file); return $contents; } else { $contents = 'file i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function update_db_file() {\n\t\t$new_file = PDODIR . 'db.php';\n\t\tif (file_exists($new_file) && is_readable($new_file)) {\n\t\t\t$contents = file_get_contents($new_file);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t\tif (defined('WP_CONTENT_DIR')) {\n\t\t\t$path = WP_CONTENT_DIR . '/db.php';\n\t\t} els...
[ "0.6649088", "0.6385709", "0.6190597", "0.61792576", "0.60162103", "0.58525354", "0.5837716", "0.5837618", "0.5820574", "0.5813927", "0.58124316", "0.5809579", "0.575872", "0.57532394", "0.5729579", "0.57293534", "0.571335", "0.5700522", "0.5659405", "0.5654009", "0.5644635",...
0.8360911
0
Method to get SQLite database file size.
Метод для получения размера файла базы данных SQLite.
private function get_database_size() { $db_file = FQDB; if (file_exists($db_file)) { $size = filesize($db_file); clearstatcache(true, $db_file); return $this->convert_to_formatted_number($size); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dbSize()\n {\n return $this->getConn()->dbSize();\n }", "public function getDbSize()\n {\n return $this->dbSize;\n }", "public function getSize()\n {\n $app = Base::instance();\n $key = 'CACHE.db_size';\n if ($app->devoid($key)) {\n $...
[ "0.7530159", "0.74706763", "0.7326697", "0.72827613", "0.7089785", "0.69700265", "0.69435805", "0.69432825", "0.6920393", "0.6811338", "0.67740655", "0.67436653", "0.6723895", "0.6701522", "0.66627747", "0.6657618", "0.6589248", "0.65121925", "0.64341354", "0.6432036", "0.642...
0.83183825
0
Method to delete backup database file(s). Users can delete multiple files at a time.
Метод удаления файлов резервной базы данных. Пользователи могут удалять несколько файлов одновременно.
private function delete_backup_db() { $domain = $this->text_domain; $file_names = array(); $results = array(); if (isset($_POST['backup_checked'])) { $file_names = $_POST['backup_checked']; } else { return false; } if (chdir(FQDBDIR)) { foreach ($file_names as $file) { if (unlink($file)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteFiles();", "public function deleteFiles();", "public function deleteAllFiles();", "public static function cleanupBackupSqliteDatabaseFilesOnFailed()\n {\n $filesystem = new Filesystem();\n\n $filesystem->delete(\n Collection::make($filesystem->glob(database_p...
[ "0.69853306", "0.69853306", "0.6893587", "0.6844417", "0.6834542", "0.6612952", "0.66098577", "0.6565643", "0.6538508", "0.6445993", "0.64222884", "0.6385206", "0.6320279", "0.63194484", "0.6249761", "0.6228626", "0.6207546", "0.6165274", "0.61534953", "0.6144121", "0.6096608...
0.71933216
0
Method to download a backup file. This method uses header() function, so we have to register this function using admin_init action hook. It must also be declared as public. We check HTTP_REFERER and input button name, and ,after that, wp_nonce. When the admin_init is executed it only returns true. The database file mig...
Метод для загрузки файла резервной копии. Этот метод использует функцию header(), поэтому нам необходимо зарегистрировать эту функцию с помощью хука admin_init. Он также должен быть объявлен как публичный. Мы проверяем HTTP_REFERER и имя кнопки ввода, а затем wp_nonce. Когда выполняется admin_init, он возвращает только...
static function download_backup_db() { if (is_multisite()) { $script_url = network_admin_url('settings.php?page=setting-file'); } else { $script_url = admin_url('options-general.php?page=setting-file'); } if (isset($_POST['download_backup_file']) && stripos($_SERVER['HTTP_REFERER'], $script_url) !== false...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Download()\n\t{\n\t\tglobal $wpdb, $current_user, $user_ID;\n\t\t\n\t\t@error_reporting(0);\n\t\twpfb_loadclass('Category', 'Download');\n\t\t$downloader_ip = preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR']);\n\t\tget_currentuserinfo();\n\t\t$logged_in = (!empty($user_ID));\n\t\t$user_role...
[ "0.7061889", "0.6413926", "0.63980144", "0.6378042", "0.62873524", "0.62478495", "0.62320954", "0.62170243", "0.6206903", "0.6176022", "0.6136331", "0.6136", "0.6127228", "0.60896593", "0.60125893", "0.6006675", "0.59670347", "0.5943589", "0.59423864", "0.5936829", "0.5915832...
0.7856281
0
Check success status of response
Проверить статус успешного ответа
public function is_success(){ return $this->status == 200; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSuccess()\n {\n return $this->httpResponse->getStatusCode() == 200;\n }", "public function isSuccess();", "public function isSuccess();", "public function isSuccess();", "public function isSuccess()\n {\n return $this->info['http_code'] == 200;\n }", "public fu...
[ "0.8202603", "0.8144395", "0.8144395", "0.8144395", "0.8089377", "0.8070608", "0.80091524", "0.80091524", "0.80091524", "0.80091524", "0.80091524", "0.7951097", "0.7877858", "0.7877512", "0.7853477", "0.78364235", "0.7833899", "0.7822323", "0.7819146", "0.78047436", "0.780082...
0.83854175
0
Test that Hybrid\Memory::make() return an instanceof Hybrid\Memory.
Тестирование того, что Hybrid\Memory::make() возвращает экземпляр Hybrid\Memory.
public function testMake() { $this->assertInstanceOf('\Hybrid\Memory\Runtime', \Hybrid\Memory::make('runtime')); $this->assertInstanceOf('\Hybrid\Memory\Cache', \Hybrid\Memory::make('cache')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testStubMemory()\n\t{\n\t\t$stub = \\Hybrid\\Memory::make('stub.mock');\n\n\t\t$this->assertInstanceOf('\\Hybrid\\Tests\\MemoryStub', $stub);\n\n\t\t$refl = new \\ReflectionObject($stub);\n\t\t$storage = $refl->getProperty('storage');\n\t\t$storage->setAccessible(true);\n\n\t\t$this->assertEqual...
[ "0.6837811", "0.63904214", "0.61853355", "0.5950061", "0.58547854", "0.5854574", "0.57978725", "0.5697478", "0.5682003", "0.5654454", "0.5615333", "0.55862427", "0.5584432", "0.55782497", "0.5533303", "0.552395", "0.55113155", "0.5489876", "0.5484947", "0.5477742", "0.5456961...
0.78291833
0
Test that Hybrid\Memory::make() return exception when given invalid driver
Тестирование того, что Hybrid\Memory::make() возвращает исключение при передаче недопустимого драйвера
public function testMakeExpectedException() { \Hybrid\Memory::make('orm'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFactoryWithUnknownBackend()\n {\n $this->expectException('\\InvalidArgumentException');\n $this->expectExceptionMessage('Unknown backend');\n\n $db = DB::factory('foo', ['path' => ':memory:']);\n }", "public function testMake()\n\t{\n\t\t$this->assertInstanceOf('\\H...
[ "0.6566278", "0.6361251", "0.617224", "0.5955582", "0.57789516", "0.57786405", "0.5757919", "0.5744467", "0.57378906", "0.57332224", "0.57121944", "0.57032317", "0.5694251", "0.5684568", "0.5674729", "0.5655831", "0.56273866", "0.56163806", "0.5614631", "0.5587992", "0.556393...
0.7413855
0
Ajax: Join a group
Ajax: Присоединиться к группе
public function ajaxJoin() { $success = Group::joinGroup( Auth::user()->id, (int) Input::get('id') ); return array('error' => (int) !$success); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function join_group( ) {\n }", "function iform_show_group_join_success($group, $auth, $alreadyAMember=false, $group_home_path='', $groups_list_path='') {\n $pageData = data_entry_helper::get_population_data(array(\n 'table'=>'group_page',\n 'extraParams' => $auth['read'] + array(\n 'group_i...
[ "0.72266054", "0.6620852", "0.64756763", "0.6441695", "0.64360595", "0.6420984", "0.63964474", "0.6369455", "0.6336818", "0.6303585", "0.6231069", "0.61629236", "0.6116061", "0.6112537", "0.61021096", "0.6039468", "0.6025879", "0.59128994", "0.5902081", "0.58989924", "0.58511...
0.80796397
0
Ajax: Quit a group
Ajax: Выйти из группы
public function ajaxQuit() { DB::table('group_users') ->where('user_id', '=', Auth::user()->id) ->where('group_id', '=', (int) Input::get('id')) ->delete(); return array('error' => 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function exitGroupAction()\n {\n $usersGroups = new UsersGroups();\n $usersGroups->deleteRecord($_POST['groupName'] , $this->user->userName);\n Flash::addMessage('You left the group', Flash::WARNING);\n echo '/Group/showGroups'; \n }", "public function onCancelGrou...
[ "0.7345824", "0.683343", "0.6459278", "0.64564157", "0.64558303", "0.6454014", "0.6428954", "0.640005", "0.63859326", "0.6348207", "0.6282004", "0.6273404", "0.62476796", "0.61789733", "0.61748403", "0.6148356", "0.6142033", "0.61043525", "0.61019415", "0.6101808", "0.6101156...
0.81246364
0