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
Create a listing of events as an array Creates a listing of events occuring on the given day as array items. These items are added into the cell of the calendar for the given day.
Создать список событий в виде массива. Создает список событий, происходящих в указанный день, в виде массива элементов. Эти элементы добавляются в ячейку календаря для указанного дня.
private function makeDayEventListArray() { $outevents = array(); $n = 0; foreach($this->eventItems as $item) { if($item['date'] == $this->curYear.'-'.$this->curMonth.'-'.$this->dayOfMonth) { $outevents[$n]['category'] = $item['cat']; if($item['stdurl']) { $outevents[$n]['url'] = $item['url...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEventsByDay( $day ) {\n\n\t\t$rangestart = strtotime($day) * 1000; // zimbra always works with milliseconds in timestamps\n\t\t$rangeend = $rangestart + (24 * 60 * 60 * 1000);\n\n\t\t/**\n\t\t* build full call url\n\t\t*/\n\t\t$calendar = $this->getFromZimbra(\"/calendar?start=\" . $rangestart ....
[ "0.6671869", "0.6494189", "0.6369033", "0.63672584", "0.62191", "0.6172734", "0.61669075", "0.6152314", "0.61197495", "0.6069392", "0.59930086", "0.5899545", "0.5881705", "0.5879517", "0.5862057", "0.5854946", "0.5847806", "0.5821305", "0.5820824", "0.5739708", "0.5734776", ...
0.7613199
0
Iterate calendar days (HTML version) Loop through the calendar days for the given month and create cells for each day. Populate each cell with it's given events (if any) and output as a complete table contents.
Итерация календарных дней (версия HTML) Проходите по дням календаря для заданного месяца и создавайте ячейки для каждого дня. Заполняйте каждую ячейку событиями, назначенными на этот день (если они есть), и выводите как полный контент таблицы.
private function makeHTMLIterator() { $this->weekDayNum = $this->firstDayOfTheMonth+1; for($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) { // Set the default style $style = 'class="normalDay"'; // Set the style to a weekend day style if(($this->weekDayNum == 8)||(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function draw_calendar($month,$year,$events = array()){\n\t\t$dayofweek = array('<td class=\"calendar-header\">Sunday</td>',\n\t\t'<td class=\"calendar-header\">Monday</td>',\n\t\t'<td class=\"calendar-header\">Tuesday</td>',\n\t\t'<td class=\"calendar-header\">Wednesday</td>',\n\t\t'<td class=\"calendar-header\">...
[ "0.72028095", "0.71000516", "0.70803356", "0.70312774", "0.70239383", "0.6909667", "0.690769", "0.6813331", "0.6793757", "0.67725843", "0.67438596", "0.67350274", "0.6697026", "0.6695359", "0.6692827", "0.6680418", "0.6673593", "0.6642261", "0.65114194", "0.6481101", "0.64571...
0.7805902
0
Iterate calendar days (Array version) Loop through calendar days for the given month and create a large multidimensional array of all the elements required to draw the calendar.
Итерация календарных дней (версия с массивом) Проходите по календарным дням для заданного месяца и создавайте большой многомерный массив всех элементов, необходимых для отрисовки календаря.
private function makeArrayIterator() { $this->weekDayNum = $this->firstDayOfTheMonth+1; for($this->dayOfMonth; $this->dayOfMonth <= $this->daysInMonth; $this->dayOfMonth++) { // Set the default style $this->outArray['days'][$this->dayOfMonth]['style'] = 'normalDay'; // Set the style to a weekend day...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _getDaysArray($month, $year = 0)\n {\n if ($year == 0)\n {\n $year = $this->year;\n }\n\n $days = array();\n\n // Return everyday of the month if both bit[2] and bit[4] are '*'\n if ($this->bits[2] == '*' AND $this->bits[4] == '*')\n {\n $days = $this->_getDays($mon...
[ "0.7222785", "0.69435954", "0.69158983", "0.68997", "0.6889217", "0.6864905", "0.6826922", "0.68108207", "0.6707525", "0.67010236", "0.6694331", "0.66921747", "0.6622807", "0.65878236", "0.65718424", "0.6504943", "0.64617896", "0.6432567", "0.6409523", "0.64075303", "0.637946...
0.73546946
0
Generic method to output the calendar Outputs the calendar as an array
Общий метод для вывода календаря Выводит календарь в виде массива
public function drawArray() { $this->outArray['days'] = array(); $this->makeCalendarTitle(); $this->makeCalendarHead(); $this->makeDayHeadings(); $this->startMonthSpacers(); $this->makeArrayIterator(); $this->endMonthSpacers(); return $this->outArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CalendarData($month=null, $year=null) {\n if (is_null($year)) $year = date('Y');\n if (is_null($month)) $month = date('n');\n\n // RENDER\n exec(\"cal \".$month.\" \". $year, $cal); $this->dbgMsg( ' ### calendar '.$month.\" \". $year.\" :: \", $cal );\n $rxp[] = array_fill(0,7,' ');\n ...
[ "0.6879275", "0.6866407", "0.6681683", "0.66030675", "0.6585608", "0.65136975", "0.6499322", "0.6464244", "0.6386328", "0.636859", "0.6288093", "0.6283444", "0.6279114", "0.62678814", "0.6267044", "0.62599", "0.6204513", "0.61667717", "0.6158972", "0.6122414", "0.6097351", ...
0.74939036
0
Generic method to draw the calendar Outputs the HTML for drawing the calendar table.
Обобщённый метод для отрисовки календаря. Выдаёт HTML для отрисовки таблицы календаря.
public function drawHTML() { $this->calWeekDays .= "<table border=\"1\">\n"; $this->makeCalendarTitle(); $this->makeCalendarHead(); $this->makeDayHeadings(); $this->calWeekDays .= "\t<tr>\n"; $this->startMonthSpacers(); $this->makeHTMLIterator(); $this->endMonthSpacers(); $this->calWeekDays .= "\t</t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function output_calendar() // Generating calendar HTML content\r\n\t{\r\n\t\t# Apparently, it's not possible to dereference $this->callback()\r\n\t\t$cb = $this->callback;\r\n\r\n\t\t# Preliminary calculations\r\n\t\t$t = getdate(strtotime($this->date));\r\n\t\t$today = $t[\"mday\"];\r\n\t\t$year = $t[\"year\"];\r...
[ "0.7477533", "0.7392036", "0.7086154", "0.7049579", "0.703222", "0.7010395", "0.6995145", "0.6987137", "0.6983575", "0.687349", "0.68351984", "0.6822865", "0.6801249", "0.67956764", "0.67782706", "0.67735076", "0.6663788", "0.66468054", "0.6645773", "0.6644275", "0.6528975", ...
0.8193256
0
Creates Pagination for a given data array and with a number of records per page to display Solution based on
Создает Pagination для заданного массива данных и с количеством записей на странице для отображения решения на основании
private function constructPagination($dataArr){ $currentPage = LengthAwarePaginator::resolveCurrentPage(); $col = new Collection($dataArr); $perPage = 10; $entries = new LengthAwarePaginator($col->forPage($currentPage, $perPage), $col->count(), $perPage, $currentPage); $entries->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function buildPagination() {}", "protected function buildPagination() {}", "abstract public function preparePagination();", "function pager($current_page, $records_per_page, $pages_per_pageList, $dataQuery, $countQuery){\n $obj->record = array(); // beinhaltet ein Arrr...
[ "0.71911424", "0.71911424", "0.6706617", "0.6704734", "0.66460437", "0.6541788", "0.65004593", "0.64607495", "0.639451", "0.6369193", "0.6365944", "0.63075614", "0.6303151", "0.6286792", "0.6261076", "0.6258619", "0.6243266", "0.6224657", "0.6145747", "0.61237186", "0.6088247...
0.72358215
0
retorna los saldos de todos los bancos
возвращает балансы всех банков
public function getSaldoBancos(){ $bancos = $this->getList(new UIBancoCriteria()); $saldos = 0; foreach ($bancos as $banco) { $saldos += $banco->getSaldo(); } return $saldos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buscarSalas($sala){\n $listado = [];\n \n #Consulto el tipo de servicio...\n $id = new MongoDB\\BSON\\ObjectId($sala);\n //'eliminado'=>false,'status'=>true,\n $res_servicios = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array(\"_id\"=>$id))->g...
[ "0.69366264", "0.6667662", "0.6523915", "0.63235855", "0.63079447", "0.6089488", "0.60707694", "0.6013067", "0.5995885", "0.5995085", "0.5968853", "0.59546", "0.59546", "0.58985096", "0.58831257", "0.5863881", "0.58619416", "0.58089036", "0.5788279", "0.5738757", "0.5696751",...
0.8077642
0
construcrs a new BaseModel
создает новый BaseModel
public function __construct() { $this->model = new BaseModel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construc()\r\n\t{\r\n\t\tparent::Model();\r\n\t}", "function __construct()\n {\n // 呼叫模型(Model)的建構函數\n parent::__construct();\n \n }", "function __construct()\r\n {\r\n parent::Model();\r\n }", "function __construct() {\r\n parent::Model();\r\n }...
[ "0.78787273", "0.7385974", "0.73807234", "0.73535955", "0.72769177", "0.72418636", "0.7142186", "0.7119367", "0.709172", "0.70602024", "0.7030872", "0.7000855", "0.69489264", "0.69489264", "0.69489264", "0.69489264", "0.69463074", "0.6916801", "0.6860955", "0.6841091", "0.672...
0.8086582
0
Creates a base32 secret key of 16 chars length.
Создает секретный ключ base32 длиной 16 символов.
public static function generateSecretKey() : string { $secretKey = ''; for ($i = 0; $i < 16; $i++) $secretKey .= self::CHARSET[random_int(0, 31)]; return $secretKey; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function create_secret($secret_length = 16)\n {\n $valid_chars = self::_get_base32_lookup_table();\n unset($valid_chars[32]);\n\n $secret = '';\n for ($i = 0; $i < $secret_length; $i++) \n {\n $secret .= $valid_chars[array_rand($valid_chars)];\n ...
[ "0.7042178", "0.69217473", "0.6914015", "0.69081116", "0.6839549", "0.67635924", "0.6713405", "0.66964394", "0.662873", "0.6366154", "0.6325132", "0.6315783", "0.6314056", "0.63033956", "0.626251", "0.6223508", "0.62070405", "0.6206676", "0.61957306", "0.6176235", "0.61426216...
0.71212524
0
Decodes a base32 (without padding) string.
Декодирует строку base32 без заполнения.
protected static function base32Decode(string $base32) : string { $buffer = ''; // Map each character to a group of 5 bits and pass to the buffer foreach (str_split($base32) as $char) { $buffer .= sprintf('%05b', strpos(self::CHARSET, $char)); } $string = ''; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function base32_decode($b32) {\n\n\t\t$b32 \t= strtoupper($b32);\n\n\t\tif (!preg_match('/^[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]+$/', $b32, $match))\n\t\t\tthrow new Exception('Invalid characters in the base32 string.');\n\n\t\t$l \t= strlen($b32);\n\t\t$n\t= 0;\n\t\t$j\t= 0;\n\t\t$binary = \"\";\n\n\t\...
[ "0.7243656", "0.7161796", "0.6729308", "0.64577985", "0.64366245", "0.64254874", "0.636153", "0.6198241", "0.60867786", "0.6041026", "0.59015214", "0.5849243", "0.5808985", "0.5790852", "0.5704809", "0.56872135", "0.5678966", "0.56746227", "0.5662673", "0.5658981", "0.5657274...
0.7620079
0
Get all provider keys.
Получить все ключи провайдеров.
public function getProviderKeys(): array { return array_keys($this->config['providers']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllKey();", "public function getProviders();", "public function getProviders();", "public function getProviderNames();", "public function retrieveKeys()\n {\n return $this->start()->uri(\"/api/key\")\n ->get()\n ->go();\n }", "public function getKeys() {}", "functi...
[ "0.7434844", "0.70270675", "0.70270675", "0.6984621", "0.69273", "0.69063944", "0.6888709", "0.6882201", "0.6858453", "0.67454326", "0.6735779", "0.66732335", "0.666168", "0.6645941", "0.6609066", "0.66000277", "0.65987337", "0.6579623", "0.65228564", "0.65209067", "0.6490834...
0.8154769
0
Deactivate User so they will no longer be displayed in the manage users page is accessed. (Will only be called if user has no access for 180 days)
Деактивировать пользователя, чтобы они больше не отображались на странице управления пользователями. (Этот метод будет вызываться только в случае, если пользователь не имеет доступа в течение 180 дней)
private function deactivate_user($id) { //Update user table $query = "UPDATE users SET deactivated='1' WHERE id='$id'"; $update_database = mysqli_query($this->con, $query); //Insert into User History for Documentation $employee_id = $this->check_employee_id($id); $query = "INSERT INTO user_history (employee...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _deactivate_user() {\n\t\t$sql=\"SELECT GROUP_CONCAT(id_user) as id FROM \".TABLE_PREFIX.\"user WHERE DATEDIFF(current_date(),last_login) = \".$this->_input['day'].\" AND id_admin <> 1 \";\n\t\t$ids= getsingleindexrow($sql);\n\t\tif($this->_input['day'] && $this->_input[\"flag\"] == 1){\n\t\t if($id...
[ "0.6963564", "0.6935043", "0.6856261", "0.6852787", "0.68121284", "0.67821443", "0.6718867", "0.67051685", "0.66214716", "0.65922475", "0.6584458", "0.6561433", "0.65479505", "0.6547784", "0.65232265", "0.6419346", "0.6373802", "0.63685125", "0.63394564", "0.6334459", "0.6309...
0.74709094
0
Preprocesses the input stream.
Предварительно обрабатывает входной поток.
abstract public function preprocessInputStream(string $input): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function preProcess() {}", "public static function pre_process() {}", "public function preProcess();", "public function preProcess();", "abstract protected function _preProcess();", "public function rewind()\n {\n $this->stream->rewind();\n\n // read one line as we do in the co...
[ "0.6401543", "0.62233925", "0.6172487", "0.6172487", "0.6024839", "0.60180485", "0.59495956", "0.5867547", "0.5641567", "0.56222886", "0.5604959", "0.55110306", "0.5509075", "0.5491158", "0.54185945", "0.54065216", "0.5406473", "0.53696454", "0.53464806", "0.5319898", "0.5317...
0.74403566
0
Initialization hook method. Use this method to add common initialization code like loading components. e.g. `$this>loadComponent('Security');`
Метод-хук инициализации. Используйте этот метод для добавления общего кода инициализации, например, загрузки компонентов. Например: `$this>loadComponent('Security');`
public function initialize() { parent::initialize(); $this->loadComponent('RequestHandler'); $this->loadComponent('Flash'); /* * Enable the following components for recommended CakePHP security settings. * see https://book.cakephp.org/3.0/en/controllers/components...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initialize()\n {\n parent::initialize();\n\n $this->loadComponent('RequestHandler');\n $this->loadComponent('Flash');\n $this->loadComponent('Cookie', [\n 'expires' => Configure::read('Config.CookieExpires'),\n 'httpOnly' => true\n ]);\n ...
[ "0.7946912", "0.7773577", "0.77526087", "0.7741109", "0.771082", "0.7704803", "0.76974875", "0.7584935", "0.7526934", "0.7523755", "0.74972165", "0.74754775", "0.74528354", "0.74457645", "0.7434708", "0.7425733", "0.7389886", "0.73864573", "0.73737717", "0.7363953", "0.736384...
0.8072819
0
Validate a suite class
Проверить класс набора тестов
final private function _isValidSuiteClass ($class) { $ref = new ReflectionClass($class); if ($class === $this->_baseClass or $ref->isSubclassOf($this->_baseClass)) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateClasses()\n\t{\n\t\tforeach ($this->config->getConfigNode() as $libs) {\n\t\t\tforeach ($libs as $lib) {\n\t\t\t\tif (!$this->isClassValid($lib->class, IMetric::class)) {\n\t\t\t\t\t$this->addClassError($lib->class);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function assertValid($classnam...
[ "0.64271075", "0.64263386", "0.60432744", "0.60092914", "0.59393984", "0.58977675", "0.5857467", "0.58248943", "0.57671475", "0.56481177", "0.56185144", "0.55800825", "0.547926", "0.54645455", "0.54575545", "0.5451911", "0.54474896", "0.5442635", "0.5427876", "0.5391416", "0....
0.71460056
0
Get all deny rules for product
Получить все правила отклонения для продукта
public static function getAllDenyRules($product, $sku_id = 0) { // Если требуется показать все правила скидок, невзирая на условия if ($product === null || !$product) { $product = self::getAbstractProduct(); $sku_id = 0; } $instance = get_class(); //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function accessRules() {\n return array(\n array(\n 'deny',\n 'actions' => array('oauthadmin'),\n ),\n );\n }", "public function policy()\n {\n $return = array();\n\n // Itterate over policy rules\n foreach( $this...
[ "0.62747824", "0.61449367", "0.6049338", "0.60105056", "0.595904", "0.590118", "0.5839226", "0.58275163", "0.5824314", "0.5819507", "0.58173406", "0.5816028", "0.5816028", "0.5793534", "0.57879716", "0.57848406", "0.57720983", "0.57696295", "0.576035", "0.57250845", "0.571212...
0.7084203
0
echo "SELECT hrc.`room_id`,hrc.`room_no`,hrc.`floor`,hrc.`room_type`,hrc.`adults`,hrc.`child`,hrc.`smoking`,hrtc.`room_type_id`,hrtc.`room_type_name`,hrtc.`facility_id`,hrtc.`bed_size`,hrtc.`charge`,hrtc.`note` FROM " . TABLE_HMS_ROOM_CREATION . " as hrc, " . TABLE_HMS_ROOM_TYPE_CREATION . " as hrtc WHERE hrc.`room_typ...
echo "SELECT hrc.`room_id`,hrc.`room_no`,hrc.`floor`,hrc.`room_type`,hrc.`adults`,hrc.`child`,hrc.`smoking`,hrtc.`room_type_id`,hrtc.`room_type_name`,hrtc.`facility_id`,hrtc.`bed_size`,hrtc.`charge`,hrtc.`note` FROM " . TABLE_HMS_ROOM_CREATION . " as hrc, " . TABLE_HMS_ROOM_TYPE_CREATION . " as hrtc WHERE hrc.`room_typ...
function roomFetchAllRecords($room_type){ $hms_info_fetch_allrec_sql = db_query("SELECT hrc.`room_id`,hrc.`room_no`,hrc.`floor`,hrc.`room_type`,hrc.`adults`,hrc.`child`,hrc.`smoking`,hrtc.`room_type_id`,hrtc.`room_type_name`,hrtc.`facility_id`,hrtc.`bed_size`,hrtc.`charge`,hrtc.`note` FROM " . TABLE_HMS_ROOM_CREA...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showAllRoom($branch,$username,$module,$desc) {\n\necho \"\n\n<style type='text/css'>\n.head {\ncolor:white;\n}\n\n.roomData {\nfont-size:13px;\n}\n\n#selected:hover {\nbackground-color:yellow;\ncolor:black;\n}\n\n.exceeded {\nborder-color:red;\ncolor:red;\n}\n\n.unExceed {text-decoration:none; colo...
[ "0.62165904", "0.6080373", "0.59947807", "0.5870859", "0.5832687", "0.5784368", "0.5756885", "0.57293993", "0.57280064", "0.5640402", "0.55528164", "0.5521277", "0.5479622", "0.5429577", "0.5407253", "0.5391274", "0.5389326", "0.5387009", "0.53830487", "0.53813696", "0.536572...
0.7341497
0
Get the total of issues currently imported by retrieveAllIssues() This may be an estimated number
Получите общее количество текущих импортированных проблем с помощью retrieveAllIssues() Это может быть оцененное число
public function getTotalIssuesBeingImported() { return $this->total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function totalIssues()\n {\n $url = $this->base_uri.'search?jql=project='.$this->project.'&startAt=0&maxResults=0';\n $issues = $this->request($url);\n if (!$this->infos['errorBoolean']) {\n return json_decode($issues)->total;\n }\n }", "protected function getTotal()\n ...
[ "0.83486587", "0.6618601", "0.65681076", "0.6443894", "0.64355946", "0.64127195", "0.6370253", "0.6367052", "0.63533825", "0.6346644", "0.6345541", "0.63357216", "0.63295615", "0.6322821", "0.62981313", "0.6297393", "0.62857234", "0.6277588", "0.6273738", "0.62620693", "0.625...
0.86565197
0
Get a list of all organisations a user is member of
Получить список всех организаций, в которых состоит пользователь
public function getListOfAllUserOrganisations() { return ['All projects']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function all()\n {\n return $this->get('/user/memberships/orgs');\n }", "public function listOrganizations($user) {\n return $user->organizations;\n }", "public function get_organisers(){\n $sql = \"SELECT DISTINCT * from members WHERE members.id IN \"\n .\"(SELECT o...
[ "0.76634663", "0.7379162", "0.7372059", "0.70723677", "0.698785", "0.6977385", "0.696514", "0.68578535", "0.684014", "0.664089", "0.6487919", "0.64069617", "0.6307691", "0.62922287", "0.62767303", "0.62561554", "0.61909", "0.6177162", "0.6159785", "0.61528057", "0.61368436", ...
0.75359803
1
/desc:generate authcode /input:arg(email,code_type(1register,2change password,3change email,4change phone),user_type,user_id) /output:return(authcode,errorcode(1success,0failed))
/desc:генерировать authcode /input:arg(email,code_type(1регистрация,2смена пароля,3смена email,4смена телефона),user_type,user_id) /output:return(authcode,errorcode(1успешно,0неудачно))
function generate_authcode_email($email,$code_type=0,$user_id="",$user_type=Constant::USER_TYPE_TEACHER,$check=true) { $authcode=""; if($check) $errorcode=$this->check_authcode_email($email,$code_type,$user_id); else $errorcode=array('errorcode'=>false); if(!$errorcode['errorcode']) { $au...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate_authcode_phone($phone,$code_type=0,$user_id=\"\",$user_type=Constant::USER_TYPE_TEACHER)\n\t{\n\t\t$authcode=\"\";\n\t\t$errorcode=$this->check_authcode_phone($phone,$code_type);\n if(!$errorcode['errorcode'])\n {\n\t\t\t$authcode=random_string('nozero',6);\n $data=$this-...
[ "0.7041306", "0.6664811", "0.6414264", "0.63870126", "0.6328473", "0.6225655", "0.6189174", "0.6171091", "0.6162935", "0.61328924", "0.6098717", "0.6017145", "0.600179", "0.5996775", "0.5996761", "0.5988542", "0.59841704", "0.59823465", "0.5956479", "0.5842074", "0.5827205", ...
0.73247254
0
/desc:generate authcode /input:arg(phone,code_type(1register,2change password),user_type,user_id) /output:return(authcode,errorcode(1success,0failed))
/desc:генерировать authcode /input:arg(phone,code_type(1register,2change password),user_type,user_id) /output:return(authcode,errorcode(1success,0failed))
function generate_authcode_phone($phone,$code_type=0,$user_id="",$user_type=Constant::USER_TYPE_TEACHER) { $authcode=""; $errorcode=$this->check_authcode_phone($phone,$code_type); if(!$errorcode['errorcode']) { $authcode=random_string('nozero',6); $data=$this->bind_verify($user_id,""...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_authcode_phone($phone,$code_type,$user_id=\"\")\n {\n\t\tif($phone)\n\t\t{\n\t\t\tif($this->_redis)\n\t\t\t{\n\n\t\t\t\t$errorcode=$this->check_auth('phone',sha1($phone));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->db->select(\"id\");\n\t\t\t\t$this->db->from($this->_table);\n\t\t\t\t$this->db...
[ "0.6973977", "0.68567944", "0.653663", "0.6469809", "0.6230544", "0.6160553", "0.6155896", "0.6071113", "0.606184", "0.6061542", "0.60458225", "0.6037689", "0.5979467", "0.595551", "0.59494174", "0.5949014", "0.59301543", "0.5901704", "0.5869621", "0.58634496", "0.5858948", ...
0.79321396
0
/desc:check authcode time /input:arg(user_id,code_type,email) /output:return(errorcode(1success,0failed))
/desc: проверка времени кода авторизации /input:arg(user_id,code_type,email) /output:return(errorcode(1success,0failed))
function check_authcode_email($email,$code_type,$user_id="") { if($email) { if($this->_redis) { $errorcode=$this->check_auth('email',$email); } else { $this->db->select("id"); $this->db->from($this->_table); $this->db->where("email",$email); $t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verify_authcode_email($authcode)\n\t{\n\t\t$user_id=$email=$code_type=$user_type=0;\n\t\tif($this->_redis)\n\t\t{\n\t\t\t$data=$this->cache->get($authcode);\t\n\t\t\tif(!empty($data))\n\t\t\t{\n\t\t\t\t$data=json_decode($data);\n\t\t\t\t$user_id=$data->user_id;\n\t\t\t\t$email=$data->email;\n\t\t\t\t$code...
[ "0.70175093", "0.6671944", "0.6636695", "0.6557928", "0.65566397", "0.64303976", "0.64200485", "0.639658", "0.63700753", "0.6228954", "0.6207038", "0.60789436", "0.60712767", "0.60692966", "0.60504144", "0.6032281", "0.6017066", "0.5968752", "0.59380555", "0.5934535", "0.5929...
0.7296355
0
/desc:check authcode time /input:arg(user_id,code_type,phone) /output:return(errorcode(1success,0failed))
/desc: проверка времени кода аутентификации /input:arg(user_id,code_type,phone) /output:return(errorcode(1success,0failed))
function check_authcode_phone($phone,$code_type,$user_id="") { if($phone) { if($this->_redis) { $errorcode=$this->check_auth('phone',sha1($phone)); } else { $this->db->select("id"); $this->db->from($this->_table); $this->db->where("phone",sha1($phone));//需要通过服务获得加密后的电话号码 $thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_authcode_email($email,$code_type,$user_id=\"\")\n\t{\n\t\tif($email)\n\t\t{\n\t\t\tif($this->_redis)\n {\n\t\t\t\t$errorcode=$this->check_auth('email',$email);\n }\n else\n {\n\t\t\t\t$this->db->select(\"id\");\n\t\t\t\t$this->db->from($this->_table);\n\t\...
[ "0.66229653", "0.66124845", "0.6599462", "0.65965307", "0.65910935", "0.6551686", "0.6520834", "0.64820313", "0.6337884", "0.6298369", "0.62243575", "0.622435", "0.620291", "0.61889225", "0.6100215", "0.6006341", "0.59979546", "0.5992259", "0.5990905", "0.59638214", "0.588976...
0.7295115
0
/desc:verify email /input:arg(authcode) /output:return(user_id,email,code_type,errorcode(1success,0failed))
/desc:проверить email /input:arg(authcode) /output:return(user_id,email,code_type,errorcode(1success,0failed))
function verify_authcode_email($authcode) { $user_id=$email=$code_type=$user_type=0; if($this->_redis) { $data=$this->cache->get($authcode); if(!empty($data)) { $data=json_decode($data); $user_id=$data->user_id; $email=$data->email; $code_type=$data->code_type; $user_type=$data->use...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_authcode_email($email,$code_type,$user_id=\"\")\n\t{\n\t\tif($email)\n\t\t{\n\t\t\tif($this->_redis)\n {\n\t\t\t\t$errorcode=$this->check_auth('email',$email);\n }\n else\n {\n\t\t\t\t$this->db->select(\"id\");\n\t\t\t\t$this->db->from($this->_table);\n\t\...
[ "0.7357168", "0.72274476", "0.72213393", "0.69830644", "0.69380236", "0.6888172", "0.67501175", "0.6735601", "0.6733808", "0.67028695", "0.66032106", "0.6547012", "0.64602464", "0.6446105", "0.64100087", "0.6404664", "0.63921386", "0.6387383", "0.63602126", "0.6347601", "0.63...
0.7359493
0
/desc:verify phone /input:arg(authcode,verify(1verified,2not verified)) /output:return(user_id,phone,code_type,errorcode(1success,0failed))
/desc:проверить телефон /input:arg(авторизационный код,verify(1подтвержден,2не подтвержден)) /output:return(идентификатор пользователя,телефон,тип кода,код ошибки(1успешно,0неудачно))
function verify_authcode_phone($authcode,$phone,$verify=true) { $user_id=$code_type=0; if($this->_redis) { $data=$this->cache->get($authcode.'_'.sha1($phone)); if(!empty($data)) { $data=json_decode($data); $user_id=$data->user_id; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_authcode_phone($phone,$code_type,$user_id=\"\")\n {\n\t\tif($phone)\n\t\t{\n\t\t\tif($this->_redis)\n\t\t\t{\n\n\t\t\t\t$errorcode=$this->check_auth('phone',sha1($phone));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->db->select(\"id\");\n\t\t\t\t$this->db->from($this->_table);\n\t\t\t\t$this->db...
[ "0.7081012", "0.7042071", "0.69467556", "0.69088787", "0.6656038", "0.6648316", "0.6640863", "0.66265166", "0.6513513", "0.6507705", "0.6505614", "0.6425127", "0.638509", "0.6370607", "0.6327103", "0.63181174", "0.62563235", "0.62260467", "0.6206373", "0.61765593", "0.6142251...
0.7232017
0
Get an array of possible view files.
Получите массив возможных файлов представлений.
protected function getPossibleViewFiles($name) { $user_id = Auth::user()->id ?? 0; //var_dump($user_id); return array_map(function ($extension) use ($name, $user_id) { return str_replace('.', '/', $name) . '.' . $extension; $segments = explode(".", $name); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function availableViews() {\n\tglobal $fmdb, $__FM_CONFIG;\n\t\n\t$array[0][] = __('All Views');\n\t$array[0][] = '0';\n\t\n\t$j = 0;\n\t/** Views */\n\t$result = basicGetList('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'views', 'view_name', 'view_');\n\tif ($fmdb->num_rows) {\n\t\t$results = $fmdb->last_result;\n\t...
[ "0.68583673", "0.6747502", "0.6722233", "0.6706559", "0.6586508", "0.6569959", "0.6563175", "0.649346", "0.63854706", "0.63686913", "0.63263506", "0.63124937", "0.6309444", "0.6297853", "0.6285851", "0.6274101", "0.6222237", "0.6213446", "0.61889684", "0.61388683", "0.6132831...
0.7155296
0
/ PPBKDF2 A Password KDF called Parallel PBKDF2. Written in 2020 Steve "Sc00bz" Thomas (steve at tobtu dot com) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warran...
/ PPBKDF2 Параллельный PBKDF2. Написан в 2020 году Steve "Sc00bz" Thomas (steve at tobtu dot com) В пределах возможного по закону автор(ы) полностью передали все авторские и смежные права на этот софт в общественное достояние по всему миру. Этот софт распространяется без каких-либо гарантий. Вы должны были получить коп...
function ppbkdf2($algo, $password, $salt, $cost, $length = 0, $binary = false) { // Hash length and PHP limits // There is no actual limit to cost. When 384*cost is more than 2^32-1, // iterations is doubled and cost is halved until 384*cost is less than 2^32. $hashLen = strlen(hash_pbkdf2($algo, '', '', 1, 0, true...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pbkdf2($algorithm, $password, $salt, $count, $key_length, $raw_output = false)\n{\n $algorithm = strtolower($algorithm);\n if(!in_array($algorithm, hash_algos(), true))\n trigger_error('PBKDF2 ERROR: Invalid hash algorithm.', E_USER_ERROR);\n if($count <= 0 || $key_length <= 0)\n tr...
[ "0.74503815", "0.7211696", "0.71586984", "0.70948225", "0.6761175", "0.64212", "0.60631734", "0.598255", "0.58243155", "0.58212477", "0.56231505", "0.5556102", "0.53807485", "0.5266688", "0.5222263", "0.51415634", "0.51129895", "0.50296575", "0.49911317", "0.49544737", "0.493...
0.73477584
1
function to lock user account
функция для блокировки учетной записи пользователя
function lockAccount($userid){ $query = "UPDATE users_account SET status ='Locked' WHERE userid = ?"; $paramType = "i"; $paramValue = array( $userid ); $this->db_handle->update($query, $paramType, $paramValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lockout($username = \"\") {\n\t\tglobal $wpdb;\n\n\t\t$ip = $this->get_user_ip();;\n\n\t\t$username = sanitize_user($username);\n\n\t\t$user = get_user_by( 'login', $username );\n\n\t\tif ( !$user ) { \n\t\t\t$user = new stdClass();\n\t\t\t$user->ID = 0;\n\t\t}\n\n\t\t$sql = \"insert into \" . $this->lock...
[ "0.699564", "0.6948573", "0.6936408", "0.6891661", "0.6808437", "0.67276627", "0.67084074", "0.6677602", "0.6629723", "0.6624969", "0.66050994", "0.653671", "0.6534801", "0.6527167", "0.6525149", "0.65177596", "0.6380179", "0.63343114", "0.6333951", "0.6330517", "0.62679476",...
0.77444375
0
function to unlock(reactivate) user account
функция для разблокировки (реактивации) учетной записи пользователя
function unlockAccount($userid){ $query = "UPDATE users_account SET status ='Active' WHERE userid = ?"; $paramType = "i"; $paramValue = array( $userid ); $this->db_handle->update($query, $paramType, $paramValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function unlock_account() {\n $model = \\Auth::$model;\n\n # hash GET param exists\n if ($hash = data('hash')) {\n\n # verificando se ha algum usuário com a hash.\n $user = $model::first(array(\n 'fields' => 'id, hash_unlock_account',\n ...
[ "0.7728947", "0.6833659", "0.6818787", "0.67574424", "0.6682874", "0.6681313", "0.6660578", "0.66593945", "0.66593945", "0.66593945", "0.66593945", "0.66593945", "0.663565", "0.65629786", "0.6530485", "0.64594066", "0.64483666", "0.6439482", "0.64256066", "0.633211", "0.63257...
0.73606616
1
/ Function definition Add interface to LAS_API
/ Определение функции Добавление интерфейса к LAS_API
function las_add_interface($name, $url, $msgtype='json', $rettype='json') { global $LAS_API; if ( $name && $url && $msgtype ) { $entry = new stdClass; $entry->url = $url; $entry->msgtype = $msgtype; $entry->rettype = $rettype; $LAS_API[$name] = $entry; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function las_get_interface($name = null) {\n\tglobal $LAS_CFG, $LAS_API;\n\n\t$las_api = $LAS_CFG->wwwroot . '/api';\n\t$report_api = $LAS_CFG->wwwroot . '/report';\n\t\n\tlas_add_interface(\n\t\t'GetAPIs',\n\t\t$las_api . '/GetAPIs',\n\t\tLAS_API_MSGTYPE_JSON,\n\t\tLAS_API_MSGTYPE_JSON\n\t);\n\t\n\tlas_add_interf...
[ "0.6499728", "0.62105834", "0.60508", "0.5871631", "0.5857463", "0.57444525", "0.5723107", "0.5674913", "0.56539774", "0.555263", "0.5550741", "0.55499077", "0.5504947", "0.54936004", "0.5485003", "0.5468451", "0.5464812", "0.5438502", "0.54377526", "0.54197794", "0.5410646",...
0.7473338
0
Get interface from LAS_API
Получить интерфейс из LAS_API
function las_get_interface($name = null) { global $LAS_CFG, $LAS_API; $las_api = $LAS_CFG->wwwroot . '/api'; $report_api = $LAS_CFG->wwwroot . '/report'; las_add_interface( 'GetAPIs', $las_api . '/GetAPIs', LAS_API_MSGTYPE_JSON, LAS_API_MSGTYPE_JSON ); las_add_interface( 'UploadFile', $las_api . ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInterface();", "public function getInterface()\n {\n return $this->interface;\n }", "public function getApi();", "public function getApi();", "public function getApi();", "function las_add_interface($name, $url, $msgtype='json', $rettype='json') {\n\tglobal $LAS_API;\n\n\t...
[ "0.7175563", "0.62512624", "0.6231569", "0.6231569", "0.6231569", "0.5970218", "0.5890664", "0.5888556", "0.5847565", "0.58154094", "0.5804445", "0.5797872", "0.5750256", "0.57447606", "0.5722948", "0.56863195", "0.5651915", "0.5639321", "0.56219655", "0.56097263", "0.5604869...
0.7418081
0
echo getMaxSumSubSequence($arr, 0, 5); The following algorithm solves the problem with time complexity O(N^3) and it's not so efficient because it computes partial sums many times.
echo getMaxSumSubSequence($arr, 0, 5); Следующий алгоритм решает задачу с временем сложности O(N^3) и он не очень эффективен, поскольку многократно вычисляет частичные суммы.
function getSubseqSum( $arr ) { $N = count($arr) - 1; $bestSum = 0; $posBest = -1; for($i = 0; $i <= $N; $i++) { for($j = $N; $j >= $i; $j--) { $partialSum = 0; for($k = $i; $k <= $j; $k++) { $partialSum += $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSubseqMaxSum( $arr ) {\n\n //firstly we determine the number of the elements\n $N = count($arr) - 1;\n\n $sumMax = -999;\n\n $iMax = -1; $jMax = -1; \n\n //for i = 0 to N execute\n for($i = 0; $i <= $N; $i++) {\n\n $sum = 0;\n\n f...
[ "0.8041444", "0.77919126", "0.73802394", "0.7115275", "0.6726554", "0.65194285", "0.6506421", "0.6403983", "0.64031935", "0.62988573", "0.6288922", "0.6204386", "0.6123467", "0.61165744", "0.6093035", "0.60909206", "0.60499895", "0.60432196", "0.590041", "0.5755475", "0.57342...
0.8347308
0
/ replace placeholders in message with values from content array
Замените плейсхолдеры в сообщении значениями из массива content
public function formate($message, array $content) { foreach ($content as $placeholder => $value) { $replacement['{' . $placeholder . '}'] = (string) $value; } return \strtr($message, $replacement); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function makeReplacements(&$message, $token, $replacement) {\n foreach($message as $key => &$value){\n $value = nl2br($value);\n }\n $message['subject'] = str_replace($token, $replacement, $message['subject']);\n $message['body'] = str_replace($token, $replacement, $message['body']);...
[ "0.68687326", "0.67710483", "0.6470346", "0.6353506", "0.63520706", "0.6323045", "0.6194089", "0.618991", "0.6100591", "0.60618514", "0.59654427", "0.59377706", "0.5934986", "0.5905428", "0.58528835", "0.5832218", "0.58300316", "0.58032006", "0.579664", "0.57896924", "0.57749...
0.75160474
0
return all the prescriptions issued to the patient through the intermediate class Appointment
вернуть все назначения, выданные пациенту через промежуточный класс Appointment
public function prescriptions() { return $this->hasManyThrough( Prescription::class, Appointment::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prescriptions() {\n return $this->hasManyThrough('App\\Prescription', 'App\\Patient', 'clinic_id', 'patient_id', 'id');\n }", "public function getAppointments()\n {\n return $this->hasMany(Appointment::className(), ['id' => 'id']);\n }", "public function appointments()\n ...
[ "0.7060157", "0.6855971", "0.65665466", "0.65665466", "0.65665466", "0.6546537", "0.65306604", "0.6474078", "0.643309", "0.6346216", "0.631028", "0.6279422", "0.6258811", "0.6211584", "0.6199713", "0.61197203", "0.6111887", "0.608494", "0.59529245", "0.5883215", "0.5769721", ...
0.82217264
0
return all appointments for today
вернуть все встречи сегодня
public function todayAppointments(){ $today = Carbon::today()->format('Y-m-d'); //dd($today); return $this->appointments()->whereDate('date',$today)->orderby('date','asc'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAppointments()\n {\n $search['office'] = (auth()->user()->offices->count()) ? auth()->user()->offices->first()->id : '';\n\n $search['date1'] = isset($search['date1']) ? Carbon::parse($search['date1']) : '';\n $search['date2'] = isset($search['date2']) ? Carbon::parse($s...
[ "0.74740237", "0.71332127", "0.6835558", "0.6817955", "0.6792229", "0.6659481", "0.6588427", "0.65401274", "0.65291023", "0.6524496", "0.6524496", "0.6524496", "0.65140134", "0.65131205", "0.6485515", "0.6428696", "0.6383067", "0.6329027", "0.6329027", "0.6307852", "0.6284065...
0.74957526
0
Checks if given file is an image based on mime type.
Проверяет, является ли заданный файл изображением на основе типа mime.
function is_image($file) { $type = get_image_type($file); $mime = get_image_mime_type($type); return substr($mime, 0, 5) == 'image'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isImage()\n {\n return strtolower(substr($this->getMimeType(), 0, 5)) == 'image';\n }", "public function isImage()\n {\n return str_contains($this->mimetype, 'image/');\n }", "public function isImage()\n {\n $mime_type = $this->getMimeType() ?: $this->detectM...
[ "0.7998941", "0.798145", "0.7931971", "0.78337795", "0.7780923", "0.77540976", "0.77496356", "0.77299255", "0.77058524", "0.76602066", "0.76510376", "0.7542194", "0.75233656", "0.74584746", "0.7403115", "0.73764265", "0.737469", "0.7367184", "0.7351188", "0.7326479", "0.73247...
0.83122104
0
Are we on a Podlove Settings screen?
Находимся ли мы на экране настроек Podlove?
function is_podlove_settings_screen() { $screen = get_current_screen(); return stripos($screen->id, 'podlove') !== false && $screen->id != 'settings_page_podlove-web-player-settings'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_settings() {\n\t\t\t\tglobal $pagenow;\n\t\t\t\treturn is_admin() && $pagenow == $this->settings_parent && $_GET['page'] == $this->slug;\n\t\t\t}", "public function is_plugin_settings() {\n\n\t\treturn isset( $_GET['page'], $_GET['tab'] ) && 'wc-settings' === $_GET['page'] && 'pip' === $_GET['tab'];\...
[ "0.7601792", "0.71732724", "0.71638584", "0.7098602", "0.7015568", "0.66845447", "0.6675503", "0.6599174", "0.64648736", "0.6446677", "0.6445697", "0.64327866", "0.6432238", "0.6379396", "0.6368239", "0.63527364", "0.62000245", "0.61750424", "0.6094654", "0.6089445", "0.60812...
0.848778
0
Are we on an edit screen for episodes?
Мы находимся на экране редактирования эпизодов?
function is_episode_edit_screen() { $screen = get_current_screen(); return in_array($screen->base, ['edit', 'post']) && $screen->post_type == 'podcast'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function has_edit_screen(): bool { return true; }", "public function isEditFormShown() {}", "public function is_edit_page() {\n\t\t\tglobal $current_screen;\n\n\t\t\treturn in_array( $current_screen->id, (array) $this->_meta_box['pages'] );\n\t\t}", "protected function is_edit_page() {\n\t\treturn fal...
[ "0.791495", "0.7261454", "0.7122002", "0.68549705", "0.68472046", "0.6609266", "0.65801805", "0.65801805", "0.65569115", "0.64714736", "0.644012", "0.6424129", "0.64155513", "0.64130676", "0.6375586", "0.6364731", "0.6350217", "0.63103384", "0.6307443", "0.63019407", "0.62914...
0.8592952
0
prepare an existing episode slug for use in URL
подготовить существующий слаг эпизода для использования в URL
function prepare_episode_slug_for_url($slug) { $slug = trim($slug); $slug = rawurlencode($slug); // allow directories in slug return str_replace('%2F', '/', $slug); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createSlug() {\r\n \r\n $proposal = !empty($this->subject) ? substr(create_slug($this->subject), 0, 60) : $this->id;\r\n \r\n $result = $this->db->fetchAll(\"SELECT post_id FROM nuke_bbposts_text WHERE url_slug = ?\", $proposal); \r\n \r\n if (count($resul...
[ "0.6596095", "0.64756995", "0.62256926", "0.62190425", "0.62190425", "0.61237764", "0.6093455", "0.59840983", "0.59807336", "0.597703", "0.5959924", "0.5959924", "0.5959924", "0.5959924", "0.5935384", "0.5917748", "0.5912548", "0.5829948", "0.5818715", "0.5817684", "0.5782966...
0.81629515
0
getFoodTruckNearestLocation This method returns JSON data of all foodtrucks in a partular Latitude/Longitude retrieved from csv
getFoodTruckNearestLocation Этот метод возвращает JSON-данные всех foodtrucks в определенной широте/долготе, полученные из csv
public function getFoodTruckNearestLocation($lat, $lon ,$countOfLoc) { try { $rows = array_map('str_getcsv', file('../Mobile_Food_Facility_Permit.csv')); $header = array_shift($rows); $csv = array(); $counter = 1; $myJSON = array(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFoodTruckNearestLocationDB($lat, $lon ,$countOfLoc) {\r\n try{\r\n $query = \"\r\n SELECT * FROM (\r\n SELECT *, \r\n (\r\n (\r\n (\r\n ...
[ "0.65143555", "0.6391593", "0.5560715", "0.5535994", "0.54945916", "0.54651827", "0.5382494", "0.53443116", "0.5340008", "0.53354216", "0.5199319", "0.51734483", "0.51684", "0.515701", "0.51220787", "0.51204926", "0.5112165", "0.5102098", "0.5099035", "0.5032958", "0.5014162"...
0.73884773
0
getFoodTruckNearestLocationDB This method returns JSON data of all foodtrucks in a partular Latitude/Longitude retrieved from MYSQL db.
getFoodTruckNearestLocationDB Этот метод возвращает JSON-данные всех фудтраков в определенной широте/долготе, полученные из базы данных MYSQL.
public function getFoodTruckNearestLocationDB($lat, $lon ,$countOfLoc) { try{ $query = " SELECT * FROM ( SELECT *, ( ( ( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFoodTruckNearestLocation($lat, $lon ,$countOfLoc) {\r\n try {\r\n $rows = array_map('str_getcsv', file('../Mobile_Food_Facility_Permit.csv'));\r\n $header = array_shift($rows);\r\n $csv = array();\r\n $counter = 1;\r\n $myJSON =...
[ "0.62735647", "0.6116956", "0.59083396", "0.5695926", "0.55033654", "0.5340375", "0.5322224", "0.5300415", "0.52903897", "0.5273668", "0.5233395", "0.5198685", "0.51730955", "0.51668566", "0.5162884", "0.5161274", "0.5120996", "0.51192355", "0.51150507", "0.5101921", "0.50933...
0.74327886
0
Test login error messagebag.
Тестовое сообщение об ошибке входа.
public function testLoginError() { $response = $this->post('/login', ['email' => 'guest@guest.com']); $response->assertSessionHasErrors(['password']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testLoginFailedFunctionality()\n {\n $this->expectOutputString(\"err_login_failed\");\n $email = 'test@example.com';\n $ctrl = new Controller();\n // Give it the wrong password\n $ctrl->login($email,'wrong password');\n\n }", "public function test_fail_log...
[ "0.72976077", "0.7211856", "0.72001415", "0.7194656", "0.7149142", "0.6939885", "0.6877418", "0.67970085", "0.6767706", "0.6703715", "0.6697657", "0.668701", "0.66855484", "0.6662124", "0.66285294", "0.6624921", "0.66187966", "0.66072", "0.6591176", "0.65838015", "0.6552334",...
0.7768425
0
If location exists, it gets updated by IP address. Otherwise new row is inserted
Если локация существует, она обновляется по IP-адресу. В противном случае добавляется новая строка
private function storeLocation(GeoLocationItem $location) { try { $row = DB::table(IpInfoLocation::TABLE) ->where('ip', $location->ipAddress) ->first(); // Dunno why, but updateOrInsert call just throws an undefined method error. // Probab...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateLocation()\n {\n $core = Core::dbOpen();\n $sql = \"UPDATE program_locations SET city = :city, state = :state, zip = :zip\n WHERE locationID = :id\";\n $stmt = $core->dbh->prepare($sql);\n $stmt->bindParam(':city', $this->city);\n $stmt->bindParam(':state', $this->s...
[ "0.6711153", "0.632539", "0.6307383", "0.61594105", "0.6054637", "0.6026602", "0.602257", "0.599693", "0.5888941", "0.58303875", "0.57807565", "0.5773717", "0.57388145", "0.5719206", "0.57057923", "0.56735486", "0.56349283", "0.56100094", "0.56093854", "0.56065106", "0.558452...
0.7290895
0
this ajax function fetches a specific course name based on the id as a get paramter
эта функция ajax получает конкретное название курса на основе идентификатора в качестве параметра get
public function fetch_course_name_for_merging() { $id = $this->input->get("id"); $id = $this->security->xss_clean(htmlspecialchars($id)); if($id==""){ echo "course name was not gotten there seems to be a problem"; }else{ $get_course = $this->admin_student_courses_mdl->c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function retrieveName(){\n\t\t$query = \"SELECT cours_id,code,intitule FROM cours WHERE cours_id=\".$this->course_id.\";\";\n\n\t\t$result = mysqli_query($this->link,$query);\n\t\t$data = $result->fetch_assoc();\n\n\t\t//Check if course exists\n\t\tif(is_null($data))\n\t\t{\n\t\t\techo 'Course with specifi...
[ "0.7151769", "0.6881356", "0.6790038", "0.6713046", "0.6632258", "0.6587846", "0.6493558", "0.64224267", "0.63592136", "0.63252246", "0.6270154", "0.62516433", "0.6241985", "0.6225451", "0.621234", "0.6210548", "0.61982703", "0.6194064", "0.6175547", "0.61040205", "0.609663",...
0.7466677
0
///////////////////////////////////////////////////////////////////////// / createJSONResponse() / / This method will return the JSON response to output so that the iPhone / application can parse the profile along with status object. If the / operation was not successul (i.e. the status object holds anything but / SUCC...
///////////////////////////////////////////////////////////////////////// / createJSONResponse() / / Этот метод вернёт JSON-ответ для вывода, чтобы iPhone / приложение могло распарсить профиль вместе со статусным объектом. Если / операция не была успешной (то есть статусный объект содержит что-либо, кроме / SUCCESS), т...
public function createJSONResponse() { $json_array = array(); if ($this->status->getCode() != Status::SUCCESS) { // The operation failed. Send only the error $json_array['Status'] = $this->status->membersToJsonFormat(); } else { // ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function jsonResponse($status, $code, $html, $message = null) {\n $this->getResponse()\n ->setHeader('Content-Type', 'application/json')\n ->setHttpResponseCode($code)\n ->setBody(Zend_Json::encode(array(\"status\" => $status, \"html\" => $html, \"messa...
[ "0.655637", "0.6509824", "0.63844895", "0.63839203", "0.63462466", "0.6301859", "0.6283636", "0.6273224", "0.62719935", "0.62586755", "0.621284", "0.62051564", "0.61972684", "0.6192168", "0.61861074", "0.6154327", "0.61485696", "0.61400616", "0.6078888", "0.6058823", "0.60327...
0.8476488
0
Registers Course Notes as custom post type
Регистрирует Заметки по курсу как пользовательский тип поста
function nt_register_course_note_create_type() { $post_labels = array( 'name' => 'Course Notes', 'singular_name' => 'Course Notes', 'add_new' => 'Add New', 'add_new_item' => 'Add New Note', 'edit' => 'Edit', 'edit_item' => 'Edit Course Note', 'new_item' => 'New Co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function courses_custom_post_type (){\n\n $labels = array(\n 'name' => 'Courses',\n 'singular_name' => 'Course',\n 'add_new' => 'Add course',\n 'all_items' => 'All courses',\n 'add_new_item' => 'Add course',\n 'edit_item' => 'Edit course',\n 'new_item' => 'New co...
[ "0.6953161", "0.67703384", "0.6549829", "0.6466879", "0.6453754", "0.6426882", "0.64204943", "0.6400464", "0.6392772", "0.6388003", "0.63603806", "0.6349964", "0.63493836", "0.63026845", "0.6274581", "0.62579477", "0.6244729", "0.62369424", "0.62205845", "0.6216684", "0.62091...
0.8126819
0
Genereate full title for course, lessson, topic
Создайте полное название для курса, урока, темы
function nt_generate_course_title($course_type,$active_id){ if( $course_type == 'sfwd-courses' ) { $title = get_the_title($active_id); } if( $course_type == 'sfwd-lessons' ) { $course_id = get_post_meta( $active_id , 'course_id' , true ); $course_title = get_the_title( $course_id ); $lesson_title = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generate_title()\r\n\t\t{\r\n\t\t\treturn $this->c_title;\r\n\t\t}", "private function _generateTitle()\n {\n $title = '';\n foreach ($this->_contents as $content)\n {\n $title = ('' == $title) ? $content->myGetSeoTitleTag() : $content->myGetSeoTitleTag().' | '.$title;\n }\n ...
[ "0.76468766", "0.7431139", "0.72518694", "0.7196875", "0.7176244", "0.71324164", "0.71307904", "0.71307904", "0.7121572", "0.6982277", "0.69780296", "0.69776493", "0.69529694", "0.68825686", "0.6865529", "0.6864429", "0.68161696", "0.68044627", "0.6802795", "0.6782037", "0.67...
0.76487195
0
Determines if the node allows a parent node.
Определяет, позволяет ли узел родительскому узлу.
final public function allowsParent() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function is_for_parent_node(Jquarry_Node $parent);", "public function isParent();", "public function hasParent(BaseObject $node)\n {\n return (bool)$node->getParentIdValue();\n }", "public function hasParent();", "public function hasParent();", "public function hasParent();", "publ...
[ "0.77847123", "0.7613103", "0.7498584", "0.7463138", "0.7463138", "0.7463138", "0.7421399", "0.734292", "0.73293597", "0.7315476", "0.7274375", "0.7221334", "0.7178115", "0.714417", "0.71127516", "0.7076997", "0.7028497", "0.7007704", "0.681925", "0.6754446", "0.66959333", ...
0.7977174
0
Determines if the node has a parent node.
Определяет, имеет ли узел родительский узел.
final public function hasParent() { return ($this->_parentNode !== null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasParent(BaseObject $node)\n {\n return (bool)$node->getParentIdValue();\n }", "public function hasParent()\n {\n return $this->currentParent !== null;\n }", "public function hasParent()\n\t{\n\t\treturn !empty($this->parent);\n\t}", "public function hasParent() {\n retu...
[ "0.8103629", "0.80385506", "0.7996985", "0.79281795", "0.78594285", "0.7759335", "0.7759335", "0.7759335", "0.7632996", "0.76225877", "0.7453177", "0.7414269", "0.7411043", "0.73730993", "0.7371341", "0.7369907", "0.7111826", "0.7086192", "0.7049188", "0.70080405", "0.6909298...
0.8085965
1
Returns the parent node of this node.
Возвращает родительский узел этого узла.
final public function getParent() { return $this->_parentNode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getParentnode()\n {\n return $this->__parentnode__;\n }", "public function getParentNode() {}", "public function getParentNode()\r\n {\r\n return $this->_parentNode ? $this->_parentNode : false;\r\n }", "public function get_parent() {\n\t\treturn $this->parent();\n\t...
[ "0.8736719", "0.8143647", "0.8125172", "0.8109064", "0.8107589", "0.8100206", "0.8060032", "0.7985446", "0.79760116", "0.7964146", "0.79399323", "0.7919951", "0.79183215", "0.79183215", "0.791358", "0.791358", "0.79123634", "0.79123634", "0.79123634", "0.79123634", "0.7912363...
0.83716
1
Determines if the node is allowed children.
Определяет, разрешено ли узлу иметь дочерние элементы.
final public function allowsChildren() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canHaveChildren() {}", "function isChildren()\n {\n return count($this->children)>0;\n }", "final public function hasChildren() {\n\t\treturn false;\n\t}", "public function has_children()\n {\n return ($this->size > 2);\n }", "public function hasChildren()\n {\n...
[ "0.7782169", "0.7439577", "0.73829496", "0.7340907", "0.7249016", "0.7231493", "0.72313994", "0.72313994", "0.72313994", "0.72313994", "0.718624", "0.71645445", "0.71645445", "0.71645445", "0.71645445", "0.71552926", "0.7153716", "0.71522504", "0.71467394", "0.712846", "0.712...
0.7883431
0
Determines if the node is allowed events.
Определяет, разрешены ли события узлу.
final public function allowsEvents() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function allowedEvents()\n\t{\n\t\treturn array();\n\t}", "protected static function allowedEvents()\n\t{\n\t\treturn array(\n\t\t\t\t\t\t'onclick',\n\t\t\t\t\t\t'ondblclick',\n\t\t\t\t\t\t'onmousedown',\n\t\t\t\t\t\t'onmouseup',\n\t\t\t\t\t\t'onmouseover',\n\t\t\t\t\t\t'onmousemove',\n\t\t\t\t\...
[ "0.6507748", "0.61673623", "0.61363316", "0.6070249", "0.6053544", "0.59942406", "0.5910554", "0.58316106", "0.5809283", "0.58078367", "0.5785749", "0.57683766", "0.57584107", "0.5697767", "0.56874067", "0.56789976", "0.5611035", "0.56024045", "0.55912614", "0.55571294", "0.5...
0.71755666
0
Id Unittest with Regular expression Check digits because Id consist of only Digits
Тестирование идентификатора с использованием регулярного выражения для проверки цифр, так как идентификатор состоит только из цифр
public function testThatWeCanGetTheId() { $ads = new Cities; $ads->setId('1'); //$this->assertEquals($ads->getId(), '1'); $this->assertEquals(1 , preg_match( '/^[0-9]+$/', $ads->getId() ), $ads->getId() . ' is not a set of digits' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function idFormat($value){\n \n if(!preg_match(VALID_INT_FORMAT,$value)){\n return false;\n }\n \n return true;\n\n}", "function isValidStudentID($id){\n if(preg_match('/^\\d+$/', $id) && strlen($id) == 8){\n return true;\n }\n else{\n return false;\n }\n }", "funct...
[ "0.7301074", "0.70989186", "0.7034525", "0.6836522", "0.6819846", "0.67861956", "0.66976845", "0.6664169", "0.6619569", "0.6570407", "0.65465444", "0.64891106", "0.64370906", "0.6389786", "0.6352944", "0.62604386", "0.62125146", "0.62057936", "0.62054217", "0.6114142", "0.611...
0.75277257
0
Handle the Twitter callback and the values that go along with it. Ensure the user is already logged into the local application. Get the Twitter account and details, and store or update them. Then redirect back to home.
Обработка обратного вызова Twitter и связанных с ним значений. Убедитесь, что пользователь уже авторизован в локальном приложении. Получите учетную запись Twitter и детали, и сохраните или обновите их. Затем перенаправьте пользователя обратно на главную страницу.
public function handleProviderCallback() { if (!Auth::check()) { return redirect('home'); } $user = Auth::user(); try { $twitterUser = Socialite::driver('twitter')->user(); $twitterAccount = new TwitterAccount(); if (isset($user->account)) { $twitterAccount = $user->a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handleTwitterCallback() {\n \n try {\n $google = Socialite::driver('twitter')->user();\n } \n catch (Exception $e) {\n return redirect('/');\n }\n\n $user = User::where('twitter_id', $google->getId())->first();\n\n if (!$user) {...
[ "0.7475294", "0.7417158", "0.715611", "0.6884492", "0.6866934", "0.68483645", "0.6827211", "0.6771592", "0.67118204", "0.66646576", "0.6659212", "0.659853", "0.6492194", "0.64831465", "0.64755946", "0.6414651", "0.638114", "0.63667583", "0.6309072", "0.6265936", "0.624094", ...
0.7532611
0
select bankdetail from site config
выбрать bankdetail из конфигурации сайта
function bankDetail() { $this->db->select('bankdetail'); $this->db->from('site_config'); $this->db->where('id','1'); $query = $this->db->get(); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDetailbank_account($statement,$customefield){\n $xstr=\"SELECT $customefield FROM bank_account $statement\";\n $query = $this->db->query($xstr);\n $row = $query->row();\n return $row;\n }", "public function fetch_bank_profile($id){\n $query = $this->db->join('nat...
[ "0.61173713", "0.5951274", "0.5829982", "0.5795855", "0.5791454", "0.5781638", "0.5781638", "0.5768795", "0.57437587", "0.57186544", "0.5711446", "0.5711446", "0.5711446", "0.5646425", "0.559416", "0.55846524", "0.55753636", "0.55376464", "0.5529413", "0.5529413", "0.55252427...
0.75317544
0
Remove change from the changelog with the given id
Удалить изменение из changelog с заданным идентификатором
public function remove($id = false) { // Check for the permission requirePermission("canRemoveChange"); if(!($id && is_numeric($id))) redirect('changelog'); $this->changelog_model->deleteChange($id); $this->logger->createLog('Deleted change', $id); $th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove($id)\n {\n //please rely on SQL CASCADING ON DELETE\n return $this->resource\n ->model()\n ->setHistoryId($id)\n ->remove('history');\n }", "public function remove($id);", "public function remove($id);", "public function remove_log($...
[ "0.6911787", "0.65498304", "0.65498304", "0.6480803", "0.64462155", "0.64227533", "0.63518", "0.6288279", "0.62754357", "0.62627167", "0.6172742", "0.61661977", "0.6121003", "0.6064454", "0.6058251", "0.6037887", "0.60171944", "0.59594464", "0.5942517", "0.5901918", "0.589767...
0.7916442
0
/========= get all ads data ============
/========= получение всех данных о рекламных объявлениях ============
public function get_all_ads_data() { return $this->db->get('ads')->result(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadAds(){\n\t\t$adsStmt = $this->dbc->query('SELECT id FROM items');\n\t\t//creates new array $ads\n\t\t$ads = [];\n\n\t\t//calls fetch and stores new ad as a new row\n\t\twhile($row = $adsStmt->fetch(PDO::FETCH_ASSOC)){\n\n\t\t\t$ad = new Ad($this->dbc, $row['id']);\n\t\t\t//stores the row into new arra...
[ "0.73616433", "0.71695775", "0.7024424", "0.6936244", "0.6893066", "0.68124807", "0.6736222", "0.67176384", "0.6714373", "0.668626", "0.66410184", "0.6527145", "0.6497333", "0.64401305", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843", "0.6439843"...
0.83270156
0
/======= ads data delete========
/======= удаление данных рекламы========
public function delete_ads_data($id=null) { $image = $this->db->where('id', $id)->get('ads')->row(); $this->db->where('id', $id); $this->db->delete('ads'); if($this->db->affected_rows()){ if(file_exists($image->image_path)){ unlink($image->image_path); } return TRUE; }else{ return FALSE; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DeleteAd() {\n\tglobal $smarty, $config, $dbconn;\n\t\n\t$id = intval($_REQUEST[\"id\"]);\n\t$dbconn->Execute(\"DELETE FROM \".SPONSORS_ADS_TABLE.\" WHERE id='\".$id.\"' \");\n\tListSponsors(\"list\");\n\t\n}", "public function deleteAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Serv...
[ "0.7212382", "0.69998235", "0.69921184", "0.6891348", "0.68780804", "0.6874245", "0.6854788", "0.680761", "0.67968005", "0.6763797", "0.67127246", "0.66882026", "0.6685151", "0.6678544", "0.66711485", "0.6657466", "0.6652556", "0.6613945", "0.6611281", "0.661096", "0.66050917...
0.7163646
1
/ get class by grade id
/ получить класс по идентификатору оценки
public function getClassByGrade($gradeId = 0) { $query = $this->db->get_where('class', array('grade_id' => $gradeId)); return $query->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getclassbyid($id){\n $q = \"select * from class where id=$id\";\n $r = mysql_query($q);\n \n return $r;\n }", "public function class_from_id($id)\n {\n $table = $this->return_table();\n $this->db->where(\"id\",$id);\n $query = $this->d...
[ "0.67843014", "0.6700869", "0.66379195", "0.64641935", "0.63689137", "0.6306242", "0.6274677", "0.62539315", "0.624929", "0.61943233", "0.6159662", "0.6152666", "0.609955", "0.6036327", "0.6018728", "0.59580636", "0.5871087", "0.58137476", "0.5803317", "0.57713073", "0.572415...
0.72668713
0
Returns true if the path to the file is remote.
Возвращает true, если путь к файлу является удаленным.
protected function isRemoteFile() { return preg_match('/^(https?|ftp):\/\/.*/', $this->path) === 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isRemote()\n {\n return (bool) filter_var($this->absolutePath, FILTER_VALIDATE_URL) or starts_with($this->absolutePath, '//');\n }", "public function hasRemoteUrl();", "public function isRemote();", "protected function isRemoteFile($src)\n {\n return str_contains($src, ...
[ "0.87318176", "0.7833936", "0.773356", "0.7731327", "0.7335231", "0.73053795", "0.7165521", "0.7163399", "0.68658733", "0.6744763", "0.6735592", "0.6728468", "0.66863126", "0.6668585", "0.6553969", "0.65391153", "0.650277", "0.649269", "0.64453685", "0.64114124", "0.6399556",...
0.8952474
1
Display confirmation page for group registration
Показать страницу подтверждения для регистрации группы
function _displayGroupConfirmation($tpl) { $Itemid = JRequest::getInt('Itemid'); $db = & JFactory::getDBO() ; $eventId = JRequest::getInt('event_id', 0) ; $groupId = JRequest::getInt('group_id', 0) ; $config = EventBookingHelper::getConfig() ; $firstName = JRequest::getVar('first_name', '', 'post') ; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _displayFormConfirmGroup($err='')\n\t{\n\t\t$dt = $this->_dt;\n\n\t\t$utpage = new utPage('draws');\n\t\t$content =& $utpage->getPage();\n\t\t$form =& $content->addForm('tDelGroups', 'draws', DRAW_GROUP_DELETE);\n\n\t\t// Initialize the field\n\t\t$group = kform::getData();\n\t\tif (empty($ids)) $ids[] =...
[ "0.6968954", "0.6951138", "0.6525918", "0.6508716", "0.641738", "0.6292342", "0.62908393", "0.62744606", "0.6181828", "0.6164168", "0.6156973", "0.61371714", "0.61126643", "0.60993075", "0.606455", "0.6057234", "0.600011", "0.5994623", "0.598585", "0.59798807", "0.5962121", ...
0.70351744
0
Fetches rotators and returns a paginator array
Получает повороты и возвращает массив пагинатора
public function fetchRotators($params = NULL) { $select = $this->registry->db->select(); $select->from(array('r' => 'rotators')); $select->order('r.rot_name ASC'); if(isset($params['page']) && is_numeric($params['page'])) : $pagenum = $params['page']; else : $pagenum = 1; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get()\n {\n $total_pages = ceil($this->total / $this->per_page);\n $begin = $this->page - $this->side_pages_n;\n $end = $this->page + $this->side_pages_n;\n $pagination = [];\n\n if ($begin <= 0) {\n $begin = 1;\n }\n\n for ($i = $begin...
[ "0.62979025", "0.6165122", "0.6155151", "0.61040735", "0.5817724", "0.5728571", "0.57275563", "0.5717619", "0.57031745", "0.56964433", "0.5673149", "0.5596236", "0.5568827", "0.55192745", "0.5514366", "0.5473531", "0.5468489", "0.5458858", "0.5447404", "0.54116285", "0.540255...
0.75844246
0
Fetches slides and returns a paginator array
Загружает слайды и возвращает массив пагинатора
public function fetchSlides($params = NULL) { $select = $this->registry->db->select(); $select->from(array('s' => 'rotators_slides')); if(isset($params['rotator'])) : $select->where('s.rots_rotator = ?', $params['rotator']); endif; $select->order('s.rots_title ASC'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSlides()\n {\n return Slide::all();\n }", "public function index()\n {\n $user = Auth::user();\n\n return $user->slides()->get();\n }", "public function getAllSlides(){\n\t\ttry{\n\t\t\tif($this->_apc && apc_exists($this->apc_slide_list_total)){\n\t\t\t\t$sli...
[ "0.6874107", "0.6742782", "0.6700479", "0.64704734", "0.6461192", "0.64561254", "0.6413705", "0.6401697", "0.6321626", "0.6203791", "0.618617", "0.6172811", "0.6135084", "0.6093218", "0.60679615", "0.6015203", "0.6014194", "0.5975106", "0.59717023", "0.597073", "0.5970278", ...
0.7377342
0
Constructor method for BSGHistoryType
Конструктор метода BSGHistoryType
public function __construct(\Sabre\UpdateReservation\StructType\BSGRefHistoryType $bSGReference = null, \Sabre\UpdateReservation\StructType\BSGCounterHistoryType $bSGCounter = null) { $this ->setBSGReference($bSGReference) ->setBSGCounter($bSGCounter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(LogHistory $log)\n {\n parent::__construct();\n $this->log = $log;\n }", "public function __construct($history_id)\n {\n $this->history_id = $history_id;\n }", "public function __construct(array $attributes = [])\n {\n \t$this->setTable(config(...
[ "0.6414826", "0.6120144", "0.5866517", "0.5728219", "0.5634685", "0.5594342", "0.55675554", "0.5566955", "0.5551891", "0.55483204", "0.5523311", "0.55220085", "0.5457646", "0.544002", "0.5428715", "0.54101074", "0.5392327", "0.5355599", "0.534591", "0.5339991", "0.53359264", ...
0.7013523
0
Provides test data for deleteList()
Предоставляет тестовые данные для deleteList()
public function seedDeleteList() { // Type, Expected, Exception return array( array('general', 0, null), array(null, null, 'UnexpectedValueException'), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFetchList() {\n\t\t$jsonpad = parent::_getJsonpadInstance();\n\t\t\n\t\t// Create a list\n\t\t$listData = parent::_createTestListData(false, false);\n\t\t$list = $jsonpad->createList($listData[\"name\"]);\n\t\t\n\t\t// Fetch the list\n\t\t$listCopy = $jsonpad->fetchList($listData[\"name\"]);\n\...
[ "0.6827508", "0.6819238", "0.6784634", "0.6687292", "0.6687292", "0.660787", "0.656904", "0.6501135", "0.649941", "0.6469645", "0.64224976", "0.6409896", "0.63950765", "0.6326235", "0.6296645", "0.62827826", "0.62773657", "0.6275371", "0.6203269", "0.61882216", "0.61827624", ...
0.72155136
0
Login as task manager.
Войти как менеджер задач.
protected function loginAsTaskManager() { $user = factory(User::class)->create(); $user->assignRole('task-manager'); $this->actingAs($user); View::share('user', $user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _login() {\n if( !$this->_connection->getCookieJar()->getCookie( $this->_baseUrl,\n 'auth_tkt', Zend_Http_CookieJar::COOKIE_OBJECT ) ) {\n $this->_connection->setUri( $this->_baseUrl . self::URL_LOGIN );\n $this->_connection->setParameterPost( array(\n 'login_username' =...
[ "0.618467", "0.6175975", "0.604869", "0.60438454", "0.5925457", "0.59057355", "0.5846533", "0.58246094", "0.5797072", "0.57736874", "0.5744761", "0.57443666", "0.57392716", "0.57392716", "0.5736101", "0.5699988", "0.56944746", "0.56714183", "0.55994856", "0.5594075", "0.55870...
0.79556954
0
Show Create form task.
Форма задания задачи "Показать создать".
public function show_create_form_task() { $user = factory(User::class)->create(); $user->assignRole('task-manager'); $this->actingAs($user); View::share('user', $user); factory(User::class, 5)->create(); $response = $this->get('/tasks_php/create'); $response...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return view('tasks.form_Create');\n }", "public function create()\n {\n return view(('tasks.create'));\n }", "public function create()\n {\n return view('task::create');\n }", "public function create() // create task page\n {\n\n ...
[ "0.83006", "0.80128914", "0.8012868", "0.7993994", "0.7976243", "0.78447783", "0.7815096", "0.7810919", "0.7810919", "0.7793664", "0.7772025", "0.77439636", "0.77391636", "0.77141106", "0.7663464", "0.7645821", "0.7625751", "0.7625751", "0.7623814", "0.7609847", "0.760436", ...
0.83771765
0
Show Edit form task.
Показать форму редактирования задачи.
public function show_edit_form_task() { $user = factory(User::class)->create(); $user->assignRole('task-manager'); $this->actingAs($user); View::share('user', $user); $task = factory(Task::class)->create(); factory(User::class, 5)->create(); $users = User::a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editTask() {\n return $this->render('enterprise/task/task_form.html.twig');\n }", "protected function editTaskAction() {}", "public\n function edit(\n Task $task\n ) {\n //\n }", "public function edit(Task $task)\r\n {\r\n //\r\n }", "public fu...
[ "0.84663403", "0.8147351", "0.7905769", "0.7901467", "0.78734225", "0.7873279", "0.7852675", "0.7852675", "0.7852675", "0.7852675", "0.7852675", "0.7852675", "0.7852675", "0.77807105", "0.77442133", "0.76450604", "0.7600352", "0.7546014", "0.75014967", "0.74968445", "0.748101...
0.837018
1
Delete BOM from UTF8 file.
Удалить BOM из файла UTF8.
function stripBOM( $fname ) { $res = fopen( $fname, 'rb' ); if ( FALSE !== $res ) { $bytes = fread( $res, 3 ); if ( $bytes == pack( 'CCC', 0xef, 0xbb, 0xbf ) ) { $this->log['notice'][] = 'Getting rid of byte order mark...'; fclose( $res ); $contents = file_get_contents( $fname ); if ( FALSE =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove_utf8_bom($text)\n {\n $bom = pack('H*', 'EFBBBF');\n $text = preg_replace(\"/^$bom/\", '', $text);\n return $text;\n }", "public static function remove_utf8_bom($text)\n {\n $bom = pack('H*','EFBBBF');\n $text = preg_replace(\"/^$bom/\", '', $text);\n ...
[ "0.6859319", "0.6698459", "0.63637424", "0.61635953", "0.5933664", "0.5701735", "0.5619509", "0.5535986", "0.5482405", "0.5439231", "0.540613", "0.53998137", "0.53452617", "0.5292144", "0.5219815", "0.5168766", "0.5168082", "0.5163145", "0.5085094", "0.50767064", "0.5047837",...
0.7538135
0
Template function: Current answer pid (defaults to echo)
Шаблонная функция: текущий pid ответа (по умолчанию echo)
function pzdc_answer_pid($echo = TRUE) { global $PraizedCommunity; return $PraizedCommunity->tpt_attribute_helper('answer', 'pid', $echo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ipal_show_current_question_id(){\r\n global $DB;\r\n global $ipal;\r\n if($DB->record_exists('ipal_active_questions', array('ipal_id'=>$ipal->id))){\r\n $question=$DB->get_record('ipal_active_questions', array('ipal_id'=>$ipal->id));\r\n\treturn($question->question_id);\r\n...
[ "0.61139846", "0.6036489", "0.5860119", "0.58509076", "0.5791751", "0.57732755", "0.57375836", "0.57286006", "0.57042944", "0.5665438", "0.5615497", "0.5593824", "0.55016434", "0.54930747", "0.5466239", "0.54382545", "0.54382545", "0.54382545", "0.54382545", "0.54222846", "0....
0.74753225
0
Template function: Current answer content (defaults to echo)
Шаблонная функция: текущий ответ (по умолчанию echo)
function pzdc_answer_content($echo = TRUE) { global $PraizedCommunity; return $PraizedCommunity->tpt_answer_content($echo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function learn_press_single_quiz_result() {\n\t\tlearn_press_get_template( 'content-quiz/result.php' );\n\t}", "public function index()\n {\n return $this->renderTemplate('index', array(\n 'answerToLife' => 42\n ));\n }", "function ipal_show_current_question(){\r\n\tglobal $DB;\r...
[ "0.6596057", "0.6357175", "0.63338345", "0.6331963", "0.6319106", "0.62815267", "0.6264724", "0.6248425", "0.6177948", "0.6105952", "0.6083066", "0.6070545", "0.6057158", "0.602704", "0.6000365", "0.598585", "0.5985163", "0.59800196", "0.5978304", "0.59624666", "0.59600383", ...
0.7108255
0
Template function: Current answer creation date (defaults to echo)
Шаблонная функция: дата создания текущего ответа (по умолчанию — echo)
function pzdc_answer_created_at($echo = TRUE, $format = NULL) { global $PraizedCommunity; $out = $PraizedCommunity->tpt_attribute_helper('answer', 'created_at', FALSE); if ( strstr($format, '%')) $out = pzdc_date($out, $format); if ( $echo ) echo $out; return $out; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function question_template() {\n return 'mod_kilman/question_date';\n }", "public function get_date_created();", "function action_date_title()\n{\n\treturn time();\n}", "function article_date() {\n if($created = Registry::prop('article', 'created')) {\n return $created->format('jS ...
[ "0.7006385", "0.6849955", "0.6585595", "0.65626806", "0.6535771", "0.65323025", "0.6353296", "0.63356644", "0.63274735", "0.63221806", "0.6319094", "0.6301945", "0.62798476", "0.6279081", "0.6272804", "0.6271872", "0.62542444", "0.6246117", "0.62416136", "0.6235833", "0.62334...
0.7245025
0
Template function: Current answer update date (defaults to echo)
Шаблонная функция: Дата обновления текущего ответа (по умолчанию — echo)
function pzdc_answer_updated_at($echo = TRUE, $format = NULL) { global $PraizedCommunity; $out = $PraizedCommunity->tpt_attribute_helper('answer', 'updated_at', FALSE); if ( strstr($format, '%')) $out = pzdc_date($out, $format); if ( $echo ) echo $out; return $out; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUpdate_date(){\n return $this->update_date;\n }", "public function question_template() {\n return 'mod_kilman/question_date';\n }", "function thememount_entry_date( $echo = true ) {\n\tif ( has_post_format( array( 'chat', 'status' ) ) ){\n\t\t$format_prefix = _x( '%1$s on...
[ "0.6501566", "0.6387943", "0.63545024", "0.6338772", "0.6268726", "0.62497306", "0.62400746", "0.61910963", "0.6182912", "0.617213", "0.61395335", "0.61238694", "0.61160564", "0.61160564", "0.60986876", "0.60690296", "0.6047989", "0.60397077", "0.6036389", "0.6022142", "0.602...
0.73972625
0
Template function: Current answer community name (defaults to echo)
Шаблонная функция: Название сообщества текущего ответа (по умолчанию echo)
function pzdc_answer_community_name($echo = TRUE) { global $PraizedCommunity; return $PraizedCommunity->tpt_attribute_helper('answer', 'community->name', $echo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pzdc_hub_community_name($echo = TRUE) {\n global $PraizedCommunity;\n return $PraizedCommunity->tpt_attribute_helper('hub_community', 'name', $echo);\n}", "function sensei_custom_lesson_quiz_text () {\n\t$text = \"Report What You Have Learned\";\n\treturn $text;\n}", "function getCommunityName($...
[ "0.65929174", "0.6272064", "0.624304", "0.6118805", "0.59549624", "0.5878432", "0.5851263", "0.5834428", "0.5825534", "0.57663107", "0.57654345", "0.5755862", "0.5729981", "0.5725135", "0.57136834", "0.56959033", "0.56898546", "0.5687959", "0.5682004", "0.5678113", "0.5675483...
0.77328944
0
Template function: Current answer community base url (defaults to echo)
Шаблонная функция: URL базы сообщества текущего ответа (по умолчанию echo)
function pzdc_answer_community_base_url($echo = TRUE) { global $PraizedCommunity; return $PraizedCommunity->tpt_attribute_helper('answer', 'community->base_url', $echo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pzdc_hub_community_base_url($echo = TRUE) {\n global $PraizedCommunity;\n return $PraizedCommunity->tpt_attribute_helper('hub_community', 'base_url', $echo);\n}", "public function url()\n {\n return '/' . $this->currlang();\n }", "function Twiloop_url_base()\n{\n $url_base = '';\n $ur...
[ "0.7046336", "0.6991275", "0.6703107", "0.65687627", "0.6547273", "0.65252006", "0.65221125", "0.64541996", "0.6406084", "0.63991785", "0.63912255", "0.6376294", "0.6372226", "0.63653404", "0.6341989", "0.6341989", "0.6340184", "0.6325074", "0.6322471", "0.63210034", "0.63210...
0.79169625
0
Gets the total execution time and memory usage of a benchmark as a list.
Получает общее время выполнения и использование памяти теста в виде списка.
public static function total($token) { // Import the benchmark data $mark = Profiler::$_marks[$token]; if ($mark['stop_time'] === FALSE) { // The benchmark has not been stopped yet $mark['stop_time'] = microtime(TRUE); $mark['stop_memory'] = memory_get_usage(); } return array ( // Total time...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function total($token)\n\t{\n\t\t// Import the benchmark data\n\t\t$mark = Profiler::$_marks[$token];\n\n\t\tif ($mark['stop_time'] === FALSE)\n\t\t{\n\t\t\t// The benchmark has not been stopped yet\n\t\t\t$mark['stop_time'] = microtime(TRUE);\n\t\t\t$mark['stop_memory'] = memory_get_usage();\n\t\t...
[ "0.7219387", "0.6719664", "0.65577984", "0.6542137", "0.65279955", "0.64651036", "0.6401488", "0.6376632", "0.6191155", "0.6079454", "0.6042299", "0.59888583", "0.5940406", "0.5859489", "0.5822668", "0.57726973", "0.576621", "0.5718496", "0.5701244", "0.5679189", "0.5676112",...
0.73667246
0
/ | | Hook for manipulate query of index result |
/ | | Хук для манипуляции запросом результата индекса |
public function hook_query_index(&$query) { //Your code here }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hook_query_index(&$query)\n\t{\n\t\t//Your code here\n\n\t}", "public function hook_before_index(&$result) {\n \n }", "function process_query_index( $query )\n\t{\n\t\treturn $query;\n\t}", "public function hook_query_index(&$query) {\n/*\t //Your code here\n $userI...
[ "0.7515977", "0.74312127", "0.7166127", "0.6533022", "0.64704245", "0.6426205", "0.63736165", "0.62815654", "0.62301713", "0.62301713", "0.62301713", "0.6228801", "0.6228801", "0.6228801", "0.622835", "0.6227676", "0.6227676", "0.61556554", "0.6145412", "0.6126141", "0.610176...
0.7664927
0
Test if command rejects invalid job type.
Проверьте, отклоняет ли команда недопустимый тип задачи.
public function testInvalidJobTypeExit() { $application = new Application(); $application->add($this->command); $command = $application->find('dequeue'); $command_tester = new CommandTester($command); $command_tester->execute([ 'command' => $command->getName(), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function validateCommand() : bool\n {\n $format = $this->argument('format');\n\n if (!$this->isValidFormat($format)) {\n $this->error(\"Error: Format not supported.\");\n $this->info(\"Supported formats: \" . join(', ', array_keys(static::getFormatsMap())));\n ...
[ "0.60966", "0.5553765", "0.54333586", "0.54293066", "0.5390708", "0.53891224", "0.5382428", "0.5364725", "0.53171414", "0.52714354", "0.5257588", "0.5240791", "0.5204579", "0.5204579", "0.518975", "0.5163288", "0.5158636", "0.514738", "0.51260024", "0.51204145", "0.5098007", ...
0.7435408
0
Create a controller dispatch with provided arguments
Создайте контроллер диспетчеризации с предоставленными аргументами
private function createDispatch(array $arguments): ControllerDispatch { $arguments['controller'] = $this->filterName($arguments['controller']); $data = [ 'controllerClassName' => ltrim( "{$arguments['namespace']}"."\\"."{$arguments['controller']}", "\\" ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function controller()\r\n {\r\n $collector = $this->getControllerCollector();\r\n \r\n foreach (func_get_args() as $controller) {\r\n call_user_func([$collector, 'controller'], $controller);\r\n }\r\n }", "public function createController( ezcMvcRequest $reques...
[ "0.6747391", "0.6745231", "0.66545177", "0.6643778", "0.6583779", "0.6445065", "0.64262486", "0.6365146", "0.63440603", "0.6268208", "0.62662405", "0.62603784", "0.6251924", "0.62374294", "0.6217345", "0.6202858", "0.618361", "0.61825645", "0.6180855", "0.61748445", "0.615751...
0.7837791
0
Static function to retrieve custom value with entity id and field label
Статическая функция для получения пользовательского значения с идентификатором сущности и меткой поля
static function getSingleCustomValue( $entityId, $customFieldLabel, $entityType = "Contact") { $value = ''; if (empty($entityId) || empty($customFieldLabel)) { return $value; } $apiParams = array( 'version' => 3, 'entity_id' => $entityId, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValue(ContentEntityInterface $entity, $field);", "function _doesoe_theme_entity_get_value($entity_type, $entity, $field) {\n if (empty($entity)) {\n return NULL;\n }\n $entity_w = entity_metadata_wrapper($entity_type, $entity);\n if (isset($entity_w->{$field}) && !empty($entity_w->{$fie...
[ "0.6889181", "0.65778357", "0.6566542", "0.6518875", "0.6511518", "0.6479505", "0.6430689", "0.63849026", "0.6360047", "0.6330542", "0.62819505", "0.62806946", "0.6268203", "0.6244071", "0.6235161", "0.62296283", "0.62207985", "0.619831", "0.6186993", "0.61814636", "0.6163507...
0.7473264
0
Static function to retrieve the first contact date for a customer first contact date means the first date of any case or activity Enkelvoudige Hulpvraag
Статическая функция для получения даты первого контакта с клиентом. Дата первого контакта с клиентом означает первую дату любого случая или мероприятия Enkelvoudige Hulpvraag
static function getContactFirstDate($contactId) { $firstContactDate = ''; if (empty($contactId)) { return $firstContactDate; } /* * retrieve first date for contact for activities */ $apiParams = array( 'version' => 3, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFirstDate()\n {\n $query = \"SELECT MIN(stat_date) AS first FROM \" . $this->tableName;\n $data = $this->SelectData($query, PDO::FETCH_ASSOC);\n\n if (false === $data) {\n return false;\n } else {\n return $data[0]['first'];\n }\n }"...
[ "0.66933733", "0.63704073", "0.63404536", "0.63132966", "0.6234883", "0.60384035", "0.603287", "0.6024802", "0.5996857", "0.5894629", "0.58405346", "0.58069503", "0.5731643", "0.56996036", "0.5659405", "0.5656215", "0.56338644", "0.5597858", "0.5568438", "0.55662316", "0.5552...
0.7987506
0
Get the location of the export directory for the user accounts Get the location of the export directory for the user accounts
Получить расположение каталога экспорта для учетных записей пользователей Получить расположение каталога экспорта для учетных записей пользователей
function getExportDirectory() { $export_dir = ilUtil::getDataDir()."/usrf_data/export"; return $export_dir; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getExportDirectory()\n\t{\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$export_dir = ilUtil::getDataDir().\"/svy_data\".\"/svy_\".$this->getId().\"/export\";\n\n\t\treturn $export_dir;\n\t}", "function getExportPath() {\n\t\t$exportPath = Config::getVar('files', 'files_dir')...
[ "0.77157414", "0.7433574", "0.70509726", "0.6722199", "0.6703358", "0.6395572", "0.63304895", "0.63304895", "0.6227603", "0.61589086", "0.6032105", "0.60036784", "0.5987433", "0.59700906", "0.5887101", "0.5882436", "0.5869087", "0.58589864", "0.5856343", "0.5844826", "0.58379...
0.8034237
0
Get a list of the already exported files in the export directory Get a list of the already exported files in the export directory
Получить список уже экспортированных файлов в каталоге экспорта Получить список уже экспортированных файлов в каталоге экспорта
function getExportFiles() { $dir = $this->getExportDirectory(); // quit if export dir not available if (!@is_dir($dir) or !is_writeable($dir)) { return array(); } // open directory $dir = dir($dir); // initialize array $file = array(); // get files and save the in the array while ($entr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function FetchExporterList()\n\t{\n\t\t$exporterRoot = APP_ROOT.\"/includes/converter/exporters/\";\n\t\t$files = scandir($exporterRoot);\n\n\t\tforeach($files as $file) {\n\t\t\tif(!is_file($exporterRoot.$file) || isc_substr($file, -3) != \"php\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\trequire_once $exp...
[ "0.73119366", "0.6505552", "0.64573514", "0.63354045", "0.6275798", "0.62234676", "0.6104274", "0.60710806", "0.6069981", "0.60503703", "0.59917426", "0.59884036", "0.59783393", "0.59728575", "0.5964481", "0.5882239", "0.58674145", "0.5851655", "0.58128285", "0.57794315", "0....
0.8022613
0
Get all exportable user defined fields
Получить все экспортируемые пользовательские поля
function getUserDefinedExportFields() { include_once './Services/User/classes/class.ilUserDefinedFields.php'; $udf_obj =& ilUserDefinedFields::_getInstance(); $udf_ex_fields = array(); foreach($udf_obj->getDefinitions() as $definition) { if ($definition["export"] != FALSE) { $udf_ex_fields[] = arr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExportFields(): array;", "public function getFieldsForExport()\n {\n return $this->fields;\n }", "public function getFieldsForExport()\n {\n return $this->fields;\n }", "public function getAllFields();", "public function exportFields()\r\n\t{\r\n\t\treturn $this...
[ "0.8024037", "0.76265126", "0.76265126", "0.7204274", "0.71236205", "0.7002998", "0.7002998", "0.7002998", "0.7002998", "0.7002998", "0.7002998", "0.6957784", "0.6915152", "0.69085884", "0.69043565", "0.69043565", "0.69043565", "0.6840719", "0.6826699", "0.68175596", "0.68175...
0.804589
0
creates data directory for export files (data_dir/usrf_data/export, depending on data directory that is set in ILIAS setup/ini)
создает каталог данных для файлов экспорта (data_dir/usrf_data/export, в зависимости от каталога данных, заданного в настройках ILIAS setup/ini)
function createExportDirectory() { if (!@is_dir($this->getExportDirectory())) { $usrf_data_dir = ilUtil::getDataDir()."/usrf_data"; ilUtil::makeDir($usrf_data_dir); if(!is_writable($usrf_data_dir)) { $this->ilias->raiseError("Userfolder data directory (".$usrf_data_dir .") not writeable.",$thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createExportDirectory()\n\t{\n\t\tinclude_once \"./Services/Utilities/classes/class.ilUtil.php\";\n\t\t$svy_data_dir = ilUtil::getDataDir().\"/svy_data\";\n\t\tilUtil::makeDir($svy_data_dir);\n\t\tif(!is_writable($svy_data_dir))\n\t\t{\n\t\t\t$this->ilias->raiseError(\"Survey Data Directory (\".$svy_data_...
[ "0.71233654", "0.6599585", "0.6466034", "0.6425255", "0.6224391", "0.59461343", "0.58316", "0.5826815", "0.5776275", "0.577291", "0.5707089", "0.5669395", "0.5567984", "0.5466869", "0.5404557", "0.5390497", "0.5372604", "0.53137654", "0.5299719", "0.5281254", "0.5279568", "...
0.77968264
0
Get profile fields (DEPRECATED, use ilUserProfile() instead)
Получить поля профиля (Устаревший, используйте ilUserProfile() вместо этого)
static function &getProfileFields() { include_once("./Services/User/classes/class.ilUserProfile.php"); $up = new ilUserProfile(); $up->skipField("username"); $up->skipField("roles"); $up->skipGroup("preferences"); $fds = $up->getStandardFields(); foreach ($fds as $k => $f) { $profile_fields[] = $k; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getProfileFields(){\n \n\t\tif(self::$profileFields == null){\n\t\t\t$prefix = Engine_Db_Table::getTablePrefix();\n\t\t\t$adapter = Engine_Db_Table::getDefaultAdapter();\n\t\t\t$sql = \"SELECT engine4_user_fields_meta.* FROM `engine4_user_fields_maps` \n\t\t\t\t\tjoin engine4_user_fields...
[ "0.76904273", "0.7676826", "0.75186956", "0.7189752", "0.711803", "0.69145244", "0.6889209", "0.67853636", "0.66062826", "0.6600881", "0.6552911", "0.6533339", "0.6508206", "0.64770323", "0.6473083", "0.6392423", "0.6363981", "0.6363373", "0.6332004", "0.63207716", "0.6320771...
0.8419101
0
Gets the public 'doctrine.dbal.default_connection' shared service.
Получает публичный сервис 'doctrine.dbal.default_connection'.
protected function getDoctrine_Dbal_DefaultConnectionService() { $a = new \Doctrine\DBAL\Logging\LoggerChain(); $a->addLogger(new \Symfony\Bridge\Doctrine\Logger\DbalLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \Symfony\Component\HttpK...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultConnection()\n {\n return $this->getConnection('default');\n }", "public function getDefaultConnection()\n {\n return $this->resolver->getDefaultConnection();\n }", "public static function getConnection() {\n return self::$defaultConnection;\n }", ...
[ "0.81350857", "0.79463524", "0.7825295", "0.77760863", "0.7753064", "0.77185494", "0.7701747", "0.74805605", "0.7440557", "0.7440329", "0.7239404", "0.723882", "0.7122834", "0.70731086", "0.70431226", "0.70157063", "0.6971493", "0.6964537", "0.6956631", "0.6914261", "0.689303...
0.8255185
0
Gets the public 'doctrine_cache.providers.doctrine.orm.default_metadata_cache' shared service.
Получает общую службу 'doctrine_cache.providers.doctrine.orm.default_metadata_cache'.
protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService() { $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] = $instance = new \Doctrine\Common\Cache\ArrayCache(); $instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99...
[ "0.853291", "0.75862014", "0.7562599", "0.72116524", "0.71779937", "0.6434227", "0.634034", "0.609408", "0.6056222", "0.5939375", "0.5939375", "0.5705965", "0.56817466", "0.56808627", "0.5647003", "0.5617541", "0.56172186", "0.5580735", "0.5568569", "0.55595183", "0.5544308",...
0.85365456
0
Gets the public 'doctrine_cache.providers.doctrine.orm.default_query_cache' shared service.
Получает общую службу 'doctrine_cache.providers.doctrine.orm.default_query_cache'.
protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService() { $this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] = $instance = new \Doctrine\Common\Cache\ArrayCache(); $instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f58...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a...
[ "0.86607194", "0.76459724", "0.76295567", "0.73168004", "0.7298351", "0.6500934", "0.6238524", "0.59537226", "0.5944275", "0.58803606", "0.58335924", "0.5699514", "0.5644874", "0.5579449", "0.5557641", "0.5508757", "0.54441965", "0.5409987", "0.5409987", "0.5357156", "0.53184...
0.8665333
0
Gets the public 'doctrine_cache.providers.doctrine.orm.default_result_cache' shared service.
Получает публичный сервис 'doctrine_cache.providers.doctrine.orm.default_result_cache'.
protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService() { $this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] = $instance = new \Doctrine\Common\Cache\ArrayCache(); $instance->setNamespace('sf_orm_default_ffac7d8ed8da8c1e8ea974c49c51bce96663f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a...
[ "0.86435807", "0.76219445", "0.76211333", "0.6833611", "0.6819532", "0.6507174", "0.6368295", "0.6008313", "0.5956899", "0.5604679", "0.548948", "0.5455574", "0.544233", "0.5436743", "0.5431846", "0.54301", "0.5398462", "0.539615", "0.53681433", "0.5363936", "0.5323601", "0...
0.86590713
0
Gets the public 'security.token_storage' shared service.
Получает публичный общий сервис 'security.token_storage'.
protected function getSecurity_TokenStorageService() { return $this->services['security.token_storage'] = new \Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStorageService();", "public function getStorageService()\n {\n $class = $this->app['config']->get('shoppingcart.storage','session');\n\n switch ($class)\n {\n case 'session':\n return 'session';\n break;\n case 'database':...
[ "0.70061004", "0.69544894", "0.6743185", "0.6726429", "0.6493238", "0.64293724", "0.64108723", "0.6380058", "0.63707745", "0.63647574", "0.63508135", "0.62439954", "0.6182945", "0.61813575", "0.6169047", "0.61324614", "0.61092895", "0.60971105", "0.6093218", "0.6093218", "0.6...
0.80226177
1
Gets the private 'App\EventSubscriber\RestSubscriber' shared autowired service.
Получает приватный 'App\EventSubscriber\RestSubscriber' общедоступный автовставленный сервис.
protected function getRestSubscriberService() { return $this->services['App\EventSubscriber\RestSubscriber'] = new \App\EventSubscriber\RestSubscriber(${($_ = isset($this->services['annotation_reader']) ? $this->services['annotation_reader'] : $this->getAnnotationReaderService()) && false ?: '_'}, ${($_ = i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getEventDispatcherService()\n {\n $this->services['event_dispatcher'] = $instance = new \\Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher($this);\n\n $instance->addListener('kernel.request', array(0 => function () {\n return ${($_ = isset($this->ser...
[ "0.6869794", "0.6032906", "0.59967154", "0.5986137", "0.59064466", "0.5882892", "0.5875221", "0.5854544", "0.5829561", "0.5825283", "0.58147025", "0.57799953", "0.5775164", "0.57709503", "0.57209134", "0.57184684", "0.57043725", "0.5691644", "0.5673127", "0.56611854", "0.5610...
0.8636062
0
Gets the private 'annotation_reader' shared service.
Получает приватный общий сервис 'annotation_reader'.
protected function getAnnotationReaderService() { return $this->services['annotation_reader'] = new \Doctrine\Common\Annotations\CachedReader(${($_ = isset($this->services['annotations.reader']) ? $this->services['annotations.reader'] : $this->getAnnotations_ReaderService()) && false ?: '_'}, ${($_ = isset(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getAnnotationReaderService()\n {\n return $this->services['annotation_reader'] = new \\Doctrine\\Common\\Annotations\\CachedReader(${($_ = isset($this->services['annotations.reader']) ? $this->services['annotations.reader'] : $this->getAnnotations_ReaderService()) && false ?: '_'}, new...
[ "0.78386486", "0.7793118", "0.75140715", "0.6867563", "0.6572512", "0.64137864", "0.6359297", "0.62259763", "0.6131553", "0.5929245", "0.5681704", "0.5652193", "0.558437", "0.5562851", "0.5559268", "0.5553822", "0.5501414", "0.54617417", "0.5460059", "0.5460059", "0.5460035",...
0.7894564
0
Gets the private 'config_cache_factory' shared service.
Получает приватный «config_cache_factory» общедоступный сервис.
protected function getConfigCacheFactoryService() { return $this->services['config_cache_factory'] = new \Symfony\Component\Config\ResourceCheckerConfigCacheFactory(new RewindableGenerator(function () { yield 0 => ${($_ = isset($this->services['dependency_injection.config.container_parameters_re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getConfigCacheFactoryService()\n {\n return $this->services['config_cache_factory'] = new \\Symfony\\Component\\Config\\ResourceCheckerConfigCacheFactory(array());\n }", "protected function getCacheService()\n {\n return $this->services['cache'] = new \\phpbb\\cache\\ser...
[ "0.85419357", "0.7490239", "0.69463694", "0.6896996", "0.6809103", "0.66566825", "0.6515313", "0.6390726", "0.6376414", "0.63504124", "0.63116676", "0.6310457", "0.62856317", "0.6273551", "0.6257921", "0.6257274", "0.6251199", "0.6251199", "0.62475675", "0.62276244", "0.62117...
0.83640254
1
Gets the private 'controller_name_converter' shared service.
Получает приватный общедоступный сервис 'controller_name_converter'.
protected function getControllerNameConverterService() { return $this->services['controller_name_converter'] = new \Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser(${($_ = isset($this->services['kernel']) ? $this->services['kernel'] : $this->get('kernel', 1)) && false ?: '_'}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getControllerNameConverterService()\n {\n return $this->services['controller_name_converter'] = new \\Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerNameParser($this->get('kernel'));\n }", "protected function getResolveControllerNameSubscriberService()\n {\n ret...
[ "0.87402654", "0.75222164", "0.6778608", "0.6602507", "0.6602507", "0.6550051", "0.65097094", "0.64549685", "0.6215908", "0.6212425", "0.6212425", "0.6200901", "0.617198", "0.61692774", "0.614288", "0.61354715", "0.6130968", "0.6097719", "0.60866785", "0.60866785", "0.6084919...
0.8904801
0
Gets the private 'debug.debug_handlers_listener' shared service.
Получает приватный общий сервис 'debug.debug_handlers_listener'.
protected function getDebug_DebugHandlersListenerService() { return $this->services['debug.debug_handlers_listener'] = new \Symfony\Component\HttpKernel\EventListener\DebugHandlersListener(NULL, ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \Symfony\C...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDebug_DebugHandlersListenerService()\n {\n return $this->services['debug.debug_handlers_listener'] = new \\Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener(NULL, $this->get('monolog.logger.php', ContainerInterface::NULL_ON_INVALID_REFERENCE), -1, 0, false, ${($_ ...
[ "0.8282563", "0.6258716", "0.62494403", "0.61819434", "0.6104834", "0.61011034", "0.59818786", "0.59299964", "0.5870668", "0.5847579", "0.5801385", "0.5797447", "0.5788257", "0.5761843", "0.57312024", "0.57001466", "0.56827587", "0.56806254", "0.56712466", "0.5661961", "0.565...
0.82447433
1
Gets the private 'doctrine.dbal.connection_factory' shared service.
Получает приватный общий сервис 'doctrine.dbal.connection_factory'.
protected function getDoctrine_Dbal_ConnectionFactoryService() { return $this->services['doctrine.dbal.connection_factory'] = new \Doctrine\Bundle\DoctrineBundle\ConnectionFactory(array()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = new \\Doctrine\\DBAL\\Logging\\LoggerChain();\n $a->addLogger(new \\Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfo...
[ "0.7696066", "0.7554053", "0.7129665", "0.68138146", "0.6775207", "0.6718847", "0.6718172", "0.6692915", "0.6646955", "0.6597594", "0.65972865", "0.6595268", "0.6595268", "0.65097743", "0.6505646", "0.65036124", "0.65036124", "0.6482762", "0.6459367", "0.6436997", "0.64220536...
0.80488616
1
Gets the private 'doctrine.orm.default_entity_listener_resolver' shared service.
Получает приватный общий сервис 'doctrine.orm.default_entity_listener_resolver'.
protected function getDoctrine_Orm_DefaultEntityListenerResolverService() { return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \Doctrine\Bundle\DoctrineBundle\Mapping\ContainerAwareEntityListenerResolver($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDoctrine_Orm_DefaultListeners_AttachEntityListenersService()\n {\n return $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener();\n }", "protected function getDoctrine_Orm_DefaultListeners_AttachEn...
[ "0.6966117", "0.6966117", "0.6498643", "0.63196063", "0.62522846", "0.61482424", "0.60225236", "0.59778345", "0.5947468", "0.5942576", "0.5942576", "0.5940109", "0.57047516", "0.5683288", "0.5628644", "0.56167156", "0.55560815", "0.5549502", "0.55389035", "0.55319613", "0.552...
0.85726523
1
Gets the private 'doctrine.orm.default_listeners.attach_entity_listeners' shared service.
Получает приватный сервис 'doctrine.orm.default_listeners.attach_entity_listeners'.
protected function getDoctrine_Orm_DefaultListeners_AttachEntityListenersService() { return $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \Doctrine\ORM\Tools\AttachEntityListenersListener(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }", "protected function getDoctrine_Orm_DefaultEnt...
[ "0.64334244", "0.64334244", "0.5869672", "0.57529545", "0.57149476", "0.5712496", "0.557874", "0.55479974", "0.5502006", "0.549932", "0.5481192", "0.5437904", "0.54050857", "0.5402216", "0.5402216", "0.53823227", "0.5362008", "0.53454226", "0.53084135", "0.53084135", "0.52549...
0.839687
1
Gets the private 'doctrine.orm.default_manager_configurator' shared service.
Получает частный сервис 'doctrine.orm.default_manager_configurator' общего использования.
protected function getDoctrine_Orm_DefaultManagerConfiguratorService() { return $this->services['doctrine.orm.default_manager_configurator'] = new \Doctrine\Bundle\DoctrineBundle\ManagerConfigurator(array(), array()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static protected function getConfigurationManager()\n\t{\n\t\tif (!is_null(static::$configurationManager)) {\n\t\t\treturn static::$configurationManager;\n\t\t}\n\t\t$objectManager = GeneralUtility::makeInstance(ObjectManager::class);\n\t\t$configurationManager = $objectManager->get(ConfigurationManagerInterface::...
[ "0.7327674", "0.6912394", "0.67747617", "0.6763204", "0.65604854", "0.6474837", "0.6451315", "0.64095104", "0.6408204", "0.6408204", "0.6408204", "0.6408204", "0.6408204", "0.6408204", "0.6408204", "0.6386998", "0.635874", "0.63547593", "0.6352963", "0.6260632", "0.6260632", ...
0.88063693
1