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
Get the value of id_evento
Получить значение id_evento
public function getIdEvento() { return $this->id_evento; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getEventID() \n {\n return $this->getValueByFieldName('event_id');\n }", "public function getIdEvento()\n {\n return $this->IdEvento;\n }", "public function getIdEvent(){\n\t\treturn $this->_idEvent;\n\t}", "public function getIdEvent(): int\r\n {\r\n return $this...
[ "0.7865557", "0.7807048", "0.7579713", "0.7330413", "0.72307944", "0.7106427", "0.69149375", "0.68300307", "0.6684484", "0.65898496", "0.65686184", "0.6485357", "0.64751124", "0.6427963", "0.64184785", "0.64160097", "0.6373624", "0.6370785", "0.63654476", "0.6361426", "0.6318...
0.79665315
0
Set the value of id_evento
Задайте значение id_evento
public function setIdEvento($id_evento) { if (!empty($id_evento) && !is_null($id_evento)) $this->id_evento = $id_evento; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setEventID($value)\n {\n return $this->set('EventID', $value);\n }", "public function setEventID($value)\n {\n return $this->set('EventID', $value);\n }", "public function setEventIdAttribute($input)\n {\n $this->attributes['event_id'] = $input ? $input : nul...
[ "0.72768", "0.7276234", "0.6751538", "0.6751538", "0.674994", "0.6704126", "0.6656897", "0.65957", "0.65794384", "0.6487224", "0.6388146", "0.6319946", "0.62391716", "0.62348986", "0.62250584", "0.61788034", "0.6140958", "0.6132823", "0.61217976", "0.6112916", "0.6081487", ...
0.83266497
0
Get the value of cronogramas
Получить значение cronogramas
public function getCronogramas() { return $this->cronogramas; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCron() {\n\t\t$cron = [\"raw\" => \"\", \"active\" => false, \"mm\" => \"\", \"hh\" => \"\", \"dd\" => \"\", \"name\" => \"\"];\n\t\t$output = shell_exec('crontab -l');\n\t\t$lines = explode(\"\\n\", trim($output));\n\t\tif (count($lines) > 3) { // check cron is not empty - First 3 lines are not...
[ "0.7099301", "0.68836164", "0.67030823", "0.66089827", "0.6570627", "0.63516235", "0.63258845", "0.6310236", "0.6285631", "0.6254885", "0.62399715", "0.62308717", "0.6206157", "0.613996", "0.6079382", "0.605111", "0.6032399", "0.60285926", "0.60176677", "0.601261", "0.5996814...
0.7722641
0
Set the value of cronogramas
Задайте значение cronogramas
public function setCronogramas($cronogramas) { if (!is_null($cronogramas)) $this->cronogramas = $cronogramas; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cron() {\n settings()->cron = json_decode(db()->where('`key`', 'cron')->getValue('settings', '`value`'));\n\n $this->process();\n }", "public function setCron($cron)\n\t{\t\t\t\t\n\t\t$this->_cron = (bool)$cron;\n\t}", "public function getCronogramas()\n {\n return $t...
[ "0.71592665", "0.6684006", "0.64138365", "0.6182943", "0.61069244", "0.5990108", "0.5932474", "0.5924842", "0.5865707", "0.57423687", "0.5732745", "0.5713037", "0.56796956", "0.56608", "0.56129", "0.56129", "0.56055224", "0.5601728", "0.5543164", "0.5507323", "0.5494869", "...
0.7199602
0
Get the value of palestras
Получить значение palestras
public function getPalestras() { return $this->palestras; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMataPelajaran();", "public function getPessoa(){\n return $this->pessoa;\n }", "public function getPessoa(){\n return $this->pessoa;\n }", "public function getPessoa(){\n return $this->pessoa;\n }", "public function getPventa()\n {\n return $this->...
[ "0.6502115", "0.64628834", "0.64628834", "0.64628834", "0.62076026", "0.6175429", "0.6175429", "0.61499107", "0.61425567", "0.61425567", "0.6130344", "0.61234903", "0.6078906", "0.60720193", "0.60720193", "0.60720193", "0.60720193", "0.60720193", "0.6071577", "0.6071577", "0....
0.7383395
0
Set the value of palestras
Задайте значение palestras
public function setPalestras($palestras) { if (!is_null($palestras)) $this->palestras = $palestras; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setSorpresa($_caja){\r\n $this->sorpresa=$_caja;\r\n }", "public function setValue(array $arr){\r\n $this->_valores = $arr;\r\n }", "function setSumarPais(){\n\t\t$this->cantidad_paises++;\n\t}", "public function getPalestras()\n {\n return $this->palestras;\n }", ...
[ "0.6464339", "0.5962652", "0.59537643", "0.5953172", "0.5905962", "0.5766761", "0.5680135", "0.5653217", "0.5585396", "0.5509257", "0.5470948", "0.5453921", "0.54490644", "0.5447422", "0.54430276", "0.5427423", "0.5425", "0.5424925", "0.54056066", "0.5393502", "0.5352807", ...
0.7149851
0
end testGetGroupedAssocAsQuery() Using array.
end testGetGroupedAssocAsQuery() Использование массива.
public function testGetGroupedAssocAsArray() { $array = array( 0 => array( 'data_source' => 'AttributeDataSource', 'attributeid' => 'name', 'attribute_type' => 'text', ), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetGroupedAssocAsSimpleArray()\n {\n $input = array(\n array(\n 'a' => 1,\n 'b' => 'w',\n ),\n array(\n 'a' => 1,\n 'b' => 'x',\n ),\n ...
[ "0.7141153", "0.63554454", "0.6335384", "0.59214675", "0.5916378", "0.58807707", "0.5793125", "0.57348275", "0.57267785", "0.566768", "0.5666099", "0.56395984", "0.5595663", "0.55472004", "0.55272365", "0.5516761", "0.5509172", "0.5498868", "0.5415378", "0.5409265", "0.540493...
0.75327194
0
end testGetGroupedAssocAsArray() Using a simple array.
end testGetGroupedAssocAsArray() Используя простой массив.
public function testGetGroupedAssocAsSimpleArray() { $input = array( array( 'a' => 1, 'b' => 'w', ), array( 'a' => 1, 'b' => 'x', ), array( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetGroupedAssocAsArray()\n {\n $array = array(\n 0 => array(\n 'data_source' => 'AttributeDataSource',\n 'attributeid' => 'name',\n 'attribute_type' => 'text',\n ),\n ...
[ "0.82608145", "0.6495972", "0.64063925", "0.6297122", "0.62162393", "0.6184726", "0.6020912", "0.5987633", "0.59844714", "0.59807956", "0.592566", "0.5922221", "0.59171325", "0.58772993", "0.58733547", "0.5836067", "0.58304733", "0.5805689", "0.5782941", "0.5767935", "0.57305...
0.8088546
1
/ !__invoke() __invoke() should return true if a and b are equal floats
/ !__invoke() __invoke() должен возвращать true, если a и b равны числа с плавающей точкой
public function testInvokeReturnsTrueIfFloatsAreEqual() { $this->assertTrue((new AlmostEquals())(1/10, 0.1)); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInvokeReturnsFalseIfFloatsAreNotEqual()\n {\n $this->assertFalse((new AlmostEquals())(0.2, 0.7));\n \n return;\n\t}", "function compareFloats($float1, $float2) {\n\t\n\tif (abs($float1 - $float2) < EPSILON) {\n\t\treturn true;\n\t}\n\t\n\treturn false;\n}", "public f...
[ "0.8076987", "0.7167021", "0.6882428", "0.6571214", "0.6470858", "0.64224315", "0.6387942", "0.63311464", "0.6276146", "0.6254589", "0.6212797", "0.61662513", "0.611568", "0.5962164", "0.5930568", "0.59087986", "0.588694", "0.5816117", "0.5692367", "0.56493956", "0.5620851", ...
0.81218016
0
invoke() should return false if a and b are not equal floats
invoke() должен возвращать false, если a и b не равны как float
public function testInvokeReturnsFalseIfFloatsAreNotEqual() { $this->assertFalse((new AlmostEquals())(0.2, 0.7)); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInvokeReturnsTrueIfFloatsAreEqual()\n\t{\n $this->assertTrue((new AlmostEquals())(1/10, 0.1));\n \n return;\n\t}", "public function validFloats() {}", "public function functionCanBeInterpretedAsFloatValidDataProvider() {}", "function compareFloats($float1, $float2) {\...
[ "0.82742935", "0.70243645", "0.68627596", "0.68474066", "0.67759585", "0.65718377", "0.6505051", "0.6498424", "0.610658", "0.6035338", "0.6008609", "0.60012364", "0.6000699", "0.5931149", "0.58866614", "0.5878099", "0.58489645", "0.58190477", "0.57456887", "0.5730543", "0.570...
0.82586545
1
invoke() should return true if a and b are equal integers
invoke() должен возвращать true, если a и b являются равными целыми числами
public function testInvokeReturnsTrueIfIntegersAreEqual() { $this->assertTrue((new AlmostEquals())(1, 1)); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInvokeReturnsFalseIfIntegersAreNotEqual()\n\t{\n $this->assertFalse((new AlmostEquals())(1, 2));\n \n return;\n\t}", "public function testInvokeReturnsTrueIfFloatsAreEqual()\n\t{\n $this->assertTrue((new AlmostEquals())(1/10, 0.1));\n \n return;\n\t}"...
[ "0.7363713", "0.6073791", "0.5758132", "0.5730914", "0.57194567", "0.5573977", "0.5564393", "0.55420893", "0.552365", "0.5514138", "0.5452593", "0.5403413", "0.5398968", "0.53870285", "0.5357889", "0.53383285", "0.53187823", "0.5310619", "0.5277763", "0.52776957", "0.52561754...
0.81589186
0
invoke() should return false if a and b are not equal integers
invoke() должен возвращать false, если a и b не являются равными целыми числами
public function testInvokeReturnsFalseIfIntegersAreNotEqual() { $this->assertFalse((new AlmostEquals())(1, 2)); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInvokeReturnsTrueIfIntegersAreEqual()\n\t{\n $this->assertTrue((new AlmostEquals())(1, 1));\n \n return;\n\t}", "public function testInvokeReturnsFalseIfFloatsAreNotEqual()\n {\n $this->assertFalse((new AlmostEquals())(0.2, 0.7));\n \n return;\n\t}...
[ "0.80464494", "0.64106303", "0.6154537", "0.5656704", "0.56301427", "0.5625729", "0.56173563", "0.55470085", "0.5509613", "0.54955196", "0.54184407", "0.5403914", "0.535146", "0.5349276", "0.53443384", "0.5297169", "0.52804893", "0.527491", "0.52689356", "0.52602047", "0.5248...
0.80225563
1
add account suspension checkbox on user profile page to prevent federating to a specific user
Добавить чекбокс для приостановки аккаунта на странице профиля пользователя, чтобы предотвратить федерацию для конкретного пользователя
function add_suspend_checkbox($profileuser) { ?> <h3>Account Suspension</h3> <table class="form-table"> <tbody> <tr> <th>Suspend User?</th> <td> <input type="checkbox" name="suspend" id="suspend"<?= get_user_meta($profileuser->ID, 'suspended', true) ? ' checked="checked"' : ''; ?> va...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_suspension($user_id) {\n\t\t$user = get_user_by('ID', $user_id);\n\t\tupdate_user_meta($user_id, 'suspended', $_POST['suspend']);\n\t}", "public function suspend_user(User $user){\n //If the user is active suspend them if not reinstate them\n if ($user->active == 1) {\n $u...
[ "0.7279485", "0.6110009", "0.60696435", "0.60346645", "0.59689397", "0.59299785", "0.5887786", "0.5864444", "0.58610386", "0.5843482", "0.58022267", "0.5774083", "0.5759484", "0.57577986", "0.5746314", "0.57396126", "0.56693304", "0.56363165", "0.56325126", "0.5609747", "0.56...
0.7162685
1
Scope the query by the search term.
Ограничьте запрос поисковым термином.
public function scopeSearch($query, $term);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function scopeTerm($query, $term)\n {\n $query->where('term', $term);\n }", "public function scopeSearch($query, $term)\n {\n if($term)\n {\n $query->where(function ($q) use ($term){\n $q->where('title', 'LIKE', \"%{$term}%\");\n\n $q-...
[ "0.7200094", "0.7078981", "0.7055626", "0.7040496", "0.7038709", "0.6968079", "0.6954138", "0.68899995", "0.68072134", "0.67176807", "0.6663462", "0.66142356", "0.6528466", "0.6518129", "0.6496498", "0.6493741", "0.6481953", "0.647468", "0.62732166", "0.6271491", "0.6230858",...
0.8528256
0
Returns the value from given key as float.
Возвращает значение из заданного ключа в виде числа с плавающей точкой.
public function getFloat(string $key): float { return floatval($this->get($key)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function GetFloat($key)\n {\n return (float)self::Get($key);\n }", "public function getFloat(string $key): ?float;", "public function GetAsFloat(string $key, ?float $default = NULL) : float\r\n\t{\r\n\t\treturn (float)$this->Get($key, $default);\r\n\t}", "public function getFloat(s...
[ "0.8654503", "0.82764375", "0.74378604", "0.7384752", "0.7080263", "0.6863503", "0.6674205", "0.6595365", "0.64920515", "0.63623273", "0.6340042", "0.63212967", "0.6278956", "0.62688965", "0.62688965", "0.61743236", "0.6085025", "0.60708284", "0.6058516", "0.60427445", "0.594...
0.8671916
0
Create a Text component.
Создайте компонент Text.
abstract public function createText(string $text): Text;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createText ($a_text)\n\t{\n\t\treturn $this->doc->create_text_node($a_text);\n\t}", "public static function renderText();", "public function textbox($text)\n {\n return new TextBox($text);\n }", "public static function text() {}", "private function textCustomField(): string\n {\n ...
[ "0.7168611", "0.69245166", "0.65282935", "0.6474974", "0.63823974", "0.63712883", "0.6356421", "0.6356421", "0.6356421", "0.63413274", "0.62922776", "0.6206183", "0.6204111", "0.62025386", "0.61909616", "0.617346", "0.6167506", "0.61061776", "0.61036426", "0.6093867", "0.6089...
0.7436632
0
/ Forms list of JS files
/ Формирует список файлов JS
static function createJSList() { $result=""; if(!empty(self::$arr_js_list)) foreach (self::$arr_js_list as $js_file => $file_location) { if ($file_location == "common") $result.='<script type="text/javascript" src="js/'.$js_file.'.js"> </script>'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_js_files_array();", "function src_inc_list_js(string $assets_url, array $files) : string {\n $source = \"\";\n\n //Process the list of files\n foreach($files as $file){\n\n if(is_array($file))\n $file = $file[\"path\"];\n\n $source .= src_inc_js($assets_url.$file).\...
[ "0.7601964", "0.7290176", "0.7229591", "0.7160083", "0.70952433", "0.7082114", "0.70615447", "0.70410454", "0.70319945", "0.69940925", "0.6978113", "0.6973529", "0.6935044", "0.6930758", "0.6885285", "0.6833375", "0.68050987", "0.67926216", "0.66836214", "0.6676038", "0.66525...
0.7494312
1
/ Load class(es). Names of classes is a list of arguments passed to the function.
/ Загрузка классов(а). Имена классов — это список аргументов, переданных функции.
static function loadClass() { $list_arg = func_get_args(); if (!empty($list_arg)) { foreach (func_get_args() as $item) { include_once "system/classes/{$item}.class.php"; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load(string $class);", "function class_autoload($params){\n\tstatic $entries_count = 0;\n\tif($entries_count>0){ return; }\n\t$entries_count++;\n\tif(is_string($params)){\n\t\t__class_autoload__(array(\"directory\" => $params));\n\t}elseif(is_array($params)){\n\t\t__class_autoload__(array(\"filen...
[ "0.7430303", "0.7280138", "0.72281563", "0.7198098", "0.70076865", "0.7000388", "0.6960097", "0.69591594", "0.6899319", "0.6871622", "0.67953974", "0.6777515", "0.67452925", "0.67312145", "0.6724995", "0.67047477", "0.6662844", "0.6658949", "0.6655551", "0.66278106", "0.66195...
0.77774286
0
this is style color for grade cells
этот стиль цвета для ячеек оценок
function cellGradeColor($value) { $grade =''; if($value == 'F') { $grade = $grade.'<p class="red_text"><strong>'. $value.'</strong></p>'; }else if($value == 'E') { $grade = $grade.'<p class="red_text"><strong>'. $value.'</strong></p>'; }else { $grade = $grade.'<p class="bold_t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cellColor($cells,$color){\n\n global $objPHPExcel;\n\n\n\n $objPHPExcel->getActiveSheet()->getStyle($cells)->getFill()->applyFromArray(array(\n\n 'type' => PHPExcel_Style_Fill::FILL_SOLID,\n\n 'startcolor' => array(\n\n 'rgb' => $color\n\n )\n\n ));\n\n}", "func...
[ "0.63094264", "0.625012", "0.61878043", "0.61703295", "0.6165364", "0.6073847", "0.6031547", "0.6024332", "0.60128075", "0.5973592", "0.595727", "0.59476525", "0.59119856", "0.5894105", "0.5891965", "0.5891965", "0.5870571", "0.583276", "0.583276", "0.5814125", "0.579105", ...
0.76693165
0
Uncomment to try out Mock Service that simulates Amazon_EC2 responses without calling Amazon_EC2 service. Responses are loaded from local XML files. You can tweak XML files to experiment with various outputs during development XML files available under Amazon/EC2/Mock tree $service = new Amazon_EC2_Mock(); Setup reques...
Разкомментируйте, чтобы протестировать Мок-сервис, который имитирует ответы Amazon_EC2 без вызова сервиса Amazon_EC2. Ответы загружаются из локальных XML-файлов. Вы можете изменять XML-файлы для экспериментов с различными выводами во время разработки. XML-файлы доступны в дереве Amazon/EC2/Mock $service = new Amazon_EC...
function invokeCancelBundleTask(Amazon_EC2_Interface $service, $request) { try { $response = $service->cancelBundleTask($request); echo ("Service Response\n"); echo ("=============================================================================\n"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function invokeCreateDhcpOptions(Amazon_EC2_Interface $service, $request) \n {\n try {\n $response = $service->createDhcpOptions($request);\n \n echo (\"Service Response\\n\");\n echo (\"==================================================================...
[ "0.57063717", "0.5224328", "0.5221683", "0.5218664", "0.52149254", "0.514691", "0.5135969", "0.50998336", "0.50963", "0.5076121", "0.50745535", "0.5066518", "0.50583917", "0.5036538", "0.4993081", "0.49736503", "0.49698842", "0.4945904", "0.49452484", "0.49357474", "0.4923668...
0.7394219
0
The schema of the element
Схема элемента
protected function ElementSchema() { return ContentContainer::Schema(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function ElementSchema()\n {\n return ContentArticle::Schema();\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schem...
[ "0.74165154", "0.7182476", "0.7182476", "0.7182476", "0.7182476", "0.7182476", "0.7182476", "0.714634", "0.713557", "0.711691", "0.71104056", "0.71104056", "0.71104056", "0.6946721", "0.69412243", "0.68960327", "0.6875437", "0.6853163", "0.6843207", "0.68290246", "0.68121725"...
0.78418857
0
Function to create shortcode configuration
Функция для создания конфигурации короткого кода
public function __construct() { $this->config = array( // Handle will be used to use this shortcode 'handle' => 'cv_button', // Whether or not this is a shortcode composer element 'composer_element' => true, // Whether or not this is a template builder element ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n\n $this->config = array(\n\n // Handle will be used to use this shortcode\n 'handle' => 'cv_blog',\n\n // Whether or not this is a shortcode composer element\n 'composer_element' => true,\n\n // Whether or not this is a template builder...
[ "0.743043", "0.7048326", "0.7022841", "0.700769", "0.6952674", "0.68363947", "0.6694369", "0.66405785", "0.663074", "0.64663607", "0.6465659", "0.64568585", "0.64435476", "0.64272314", "0.6403885", "0.6380733", "0.6373701", "0.6354073", "0.6350395", "0.63348734", "0.6311312",...
0.72303295
1
Set the key filename e.g. 'serverkey.php';
Установите имя файла с ключом, например, 'serverkey.php';
public function setKeyFilename($filename) { $this->keyFilename = $filename; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFilename($key);", "public function SetKey($key = ''){\n \tself::$userKey = $key;\n }", "public function setKey(string $key);", "public function setKey($key);", "function generate_keypair($filename)\n\t\t{\n\t\t\t$key = '';\n\t\t\t/*$this->chars = mt_rand($this->minchars,$this->maxchars);\...
[ "0.7440625", "0.6548691", "0.651699", "0.6288802", "0.6232811", "0.6204074", "0.61951745", "0.6147825", "0.61389124", "0.6125335", "0.61098045", "0.60876864", "0.6057546", "0.60232896", "0.60232896", "0.60232896", "0.6018547", "0.6004541", "0.6003145", "0.60022795", "0.600227...
0.779224
0
Gets the configured server key, automatically loading the server key storage file if required.
Получает настроенный серверный ключ, автоматически загружая файл хранения серверного ключа, если это необходимо.
public function getKey() { if (defined('AKEEBA_SERVERKEY')) { return base64_decode(AKEEBA_SERVERKEY); } $filename = dirname(__FILE__) . '/../' . $this->keyFilename; if (file_exists($filename)) { include_once $filename; } if (defined('AKEEBA_SERVERKEY')) { return base64_decode(AKEEBA_SERVE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getClientKey()\n {\n if ($this->isTestMode()) {\n $clientKey = \\Configuration::get('ADYEN_CLIENTKEY_TEST');\n } else {\n $clientKey = \\Configuration::get('ADYEN_CLIENTKEY_LIVE');\n }\n\n return $clientKey;\n }", "function get_key() {\n\t\...
[ "0.67982113", "0.6729471", "0.6612301", "0.6525617", "0.6480175", "0.638844", "0.635593", "0.6311449", "0.6275006", "0.62131333", "0.61150295", "0.61014754", "0.6089145", "0.60690755", "0.6059629", "0.60583323", "0.6053272", "0.604728", "0.6037319", "0.60304147", "0.60231924"...
0.7422557
0
Gets the preferred encryption mode. Currently, if mcrypt is installed and activated we will use AES128.
Получает предпочитаемый режим шифрования. В настоящее время, если установлен и активирован mcrypt, мы используем AES128.
public function preferredEncryption() { $aes = new Encrypt(); $adapter = $aes->getAdapter(); if (!$adapter->isSupported()) { return 'CTR128'; } return 'AES128'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _getMode()\n {\n if ($this->_mcryptMode == '') {\n $this->_mcryptMode = MCRYPT_MODE_CBC;\n }\n return $this->_mcryptMode;\n }", "public function getEncryptionAlgo() {\n\treturn $this->cipher;\n }", "public static function getEncryption() {\n retu...
[ "0.767154", "0.72979665", "0.6930877", "0.68773717", "0.6873331", "0.68698907", "0.6644139", "0.6639792", "0.6544639", "0.6501823", "0.64128584", "0.639236", "0.6181453", "0.61720407", "0.61325115", "0.6088254", "0.60575503", "0.5986228", "0.593402", "0.5925919", "0.5922059",...
0.81342065
0
Create a new Producer using the given config
Создайте новый Producer с использованием заданной конфигурации
public function makeProducer(array $config): Producer { /** @var Conf $conf */ $conf = new Conf(); $conf->set('debug', 'all'); $conf->set('log_level', (string) LOG_EMERG); $conf->setErrorCb(function (KafkaProducer $producer, int $code, string $message) { $fields ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProducer();", "static public function factory($config)\n\t{\n\t\t$config = self::_parseConfig($config);\n\t\t$config = array_merge(array(\n 'stream' => null,\n 'mode' => null,\n 'timestamp' => 'Y-m-d',\n\t\t), $config);\n\n\t\tif(is_string($config['stre...
[ "0.5676305", "0.56273574", "0.5621961", "0.55575085", "0.5466776", "0.5454227", "0.5453966", "0.5441371", "0.54143965", "0.5322025", "0.5315374", "0.5314704", "0.53139746", "0.52447915", "0.5209993", "0.5207776", "0.5162182", "0.5147747", "0.5133559", "0.51193565", "0.5114752...
0.81060505
0
Create a new Consumer from the given topics and config
Создайте новый Consumer из заданных тем и конфигурации
public function makeConsumer(array $topics, array $config): Consumer { /** @var Conf $conf */ $conf = $this->app->makeWith('kafka.conf', []); if (array_key_exists('sasl_enable', $config) && true === $config['sasl_enable']) { $conf->set('sasl.mechanisms', 'PLAIN'); $c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createConsumer(string $brokers, array $topics, string $groupId = null): ConsumerBuilder\n {\n return ConsumerBuilder::create(\n brokers: $brokers,\n topics: $topics,\n groupId: $groupId\n );\n }", "public function consumer ()\n {\n re...
[ "0.64426035", "0.59062743", "0.5494641", "0.5447528", "0.51888996", "0.5171848", "0.5163574", "0.5144943", "0.51192594", "0.51159877", "0.5111771", "0.50185454", "0.500941", "0.5002108", "0.49861947", "0.49773213", "0.4975203", "0.49632445", "0.49512845", "0.49339795", "0.492...
0.80680555
0
Checks whether the file has been uploaded via Post.
Проверяет, был ли файл загружен через Post.
public function isUploadedFile() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkHttpPost()\n {\n\n if (!is_uploaded_file($this->fileInfo['tmp_name'])) {\n\n $this->error = 'The file is not upload for HTTP POST method.';\n\n return false;\n\n }\n\n return true;\n\n }", "public function hasFileUpload()\n\t{\n\t\treturn s...
[ "0.78011554", "0.7739323", "0.76930195", "0.76239014", "0.749089", "0.7487208", "0.7430359", "0.7349591", "0.7341637", "0.72567546", "0.7191997", "0.7088528", "0.7023829", "0.70154923", "0.70019734", "0.6998523", "0.69970524", "0.6983688", "0.69790584", "0.69391286", "0.69002...
0.7743306
1
Returns name for given substance
Возвращает имя для заданного вещества
function get_name($substance) { $data = $this->get_data($substance->pubchem); if(!$data) { return false; } return $data->name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_title($substance)\r\n {\r\n $data = $this->get_data($substance->pubchem);\r\n\r\n if(!$data)\r\n {\r\n return false;\r\n }\r\n\r\n return $data->name;\r\n }", "public function get_name();", "public function get_name();", "public function get_na...
[ "0.7154112", "0.6585022", "0.6585022", "0.6585022", "0.6541536", "0.6541536", "0.6541536", "0.65383506", "0.65271986", "0.65271986", "0.65271986", "0.65271986", "0.65271986", "0.65271986", "0.65271986", "0.65271986", "0.65271986", "0.65271986", "0.65271986", "0.65271986", "0....
0.81759375
0
Returns title for given substance
Возвращает заголовок для заданного вещества
function get_title($substance) { $data = $this->get_data($substance->pubchem); if(!$data) { return false; } return $data->name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_title();", "public function getSubTitle()\n {\n return $this->_sub_title;\n }", "public function get_title () {\r\n\t\treturn $this->get_info()['title'];\r\n\t}", "function get_name($substance)\r\n {\r\n $data = $this->get_data($substance->pubchem);\r\n\r\n i...
[ "0.7197259", "0.7100954", "0.7073303", "0.70097363", "0.6962412", "0.69240594", "0.69164973", "0.69154894", "0.6894681", "0.6865182", "0.68487823", "0.68334407", "0.68334407", "0.68219113", "0.68219113", "0.68219113", "0.68219113", "0.68219113", "0.68219113", "0.68219113", "0...
0.8392056
0
Returns drugbank id for given substance
Возвращает идентификатор DrugBank для заданного вещества
function get_drugbank($substance) { // TODO return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_bank_id($bank_name){\r\n\t\t\t\r\n\t\t\t//sql\r\n\t\t\t$sql = \"SELECT `bank_id` FROM \".$this->table_name .\" WHERE `bank_name` = '\".$bank_name.\"'\";\r\n\t\t\t//run query\r\n\t\t\t$query = $this->connect_database->run_sql_query($sql);\r\n\t\t\t//fetch data\r\n\t\t\t$result = $this->connect_d...
[ "0.6160787", "0.6075651", "0.60275364", "0.5891143", "0.5854798", "0.5729254", "0.56611025", "0.56272376", "0.56229424", "0.5597028", "0.5563782", "0.5499955", "0.5497684", "0.5475803", "0.5462421", "0.5461983", "0.5426023", "0.542368", "0.5349958", "0.53223276", "0.52857584"...
0.74641776
0
Returns inchikey for given substance
Возвращает инчики для заданного вещества
function get_inchikey($substance) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_chebi($substance)\r\n {\r\n // TODO\r\n return FALSE;\r\n }", "public function getBusinessKey();", "public function getIncidentKey() {\n return $this->_get( 'incident_key' );\n }", "public function getScoutKey()\n {\n return $this->getKey();\n }", "pu...
[ "0.6399899", "0.5601469", "0.5595161", "0.55229294", "0.5506963", "0.5506963", "0.54651254", "0.5404561", "0.5404561", "0.5396095", "0.5396095", "0.5356951", "0.53555286", "0.53349775", "0.53224665", "0.53224665", "0.5318663", "0.5307164", "0.5300346", "0.5300346", "0.5300346...
0.8429058
0
Returns SMILES for given substance
Возвращает SMILES для заданного вещества
function get_smiles($substance) { if(!$substance || !$substance->pubchem) { return NULL; } $this->last_identifier = Validator_identifiers::ID_PUBCHEM; $identifier = $substance->pubchem; $properties = 'CanonicalSMILES,IsomericSMILES'; $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllPossibleArticulations()\n {\n // Get the SEs filtered by Permissible Articulations for that appropriate Bone type\n $sb = $this->skeletalbone()->first();\n $sb_articluations = $sb->articulations;\n $articluations_list = null;\n if ($sb_articluations->coun...
[ "0.5765427", "0.57627076", "0.5370952", "0.53667396", "0.5264939", "0.5244247", "0.51659495", "0.5046726", "0.50295466", "0.4998023", "0.4968456", "0.491974", "0.49056518", "0.48568264", "0.4829486", "0.47943258", "0.4738496", "0.4707235", "0.47005528", "0.46974158", "0.46912...
0.71819615
0
Returns membrane for LogP value
Возвращает мембрану для значения LogP
public static function get_logP_membrane() { $membrane = new Membranes(); return $membrane->get_by_type(self::logP_MEMBRANE_TYPE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function memno()\n {\n return $this->memno;\n }", "public static function getMemory() {\n if (is_null(self::$_mem)) {\n self::$_mem = memory_get_usage();\n } else {\n $memory = memory_get_usage() - self::$_mem;\n $unit = ['b', 'kb', 'mb', 'gb', '...
[ "0.6150588", "0.5846853", "0.5798001", "0.5791957", "0.56075186", "0.5495184", "0.54543567", "0.54391754", "0.5388734", "0.5386396", "0.53141105", "0.52907586", "0.52484614", "0.520135", "0.52009666", "0.51841897", "0.51679784", "0.51616234", "0.5155928", "0.5101433", "0.5036...
0.7902199
0
Check for shared variables in view
Проверка общих переменных в представлении
protected function hasSharedViewVariables(...$vars) { $view = $this->app->make('view'); $shared = $view->getShared(); $isShared = true; foreach ($vars as $var) { if (!isset($shared[$var])) { $isShared = false; } } return $is...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function in_vars($name){ // check the template variable\n\treturn array_key_exists($name, $this->vars);\n}", "public function isSharing($key){\n return isset($this->container[$key]);\n }", "public function has($name) {\n \treturn $this->view->hasVar($name);\n }", "public function isViewable()...
[ "0.63428265", "0.6022548", "0.5980206", "0.5930768", "0.58633286", "0.5774864", "0.57220304", "0.57220304", "0.572019", "0.57055664", "0.5700735", "0.5687482", "0.56696945", "0.5651799", "0.56449264", "0.5570839", "0.5499752", "0.5461292", "0.541304", "0.5404313", "0.54036105...
0.7229817
0
Sample add() action for uploading a YouTube Video
Пример действия add() для загрузки видео с YouTube
public function add() { if ($this->GdataAuth->isAuthorized()) { if (!empty($this->data)) { $this->YouTubeVideo->set($this->data); if ($this->YouTubeVideo->validates() && $this->YouTubeVideo->save($this->data)) { $this->Session->setFlash('It worked!'); $this->redirect(array(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addVideoAction(){\n $data = $this->getRequestData();\n if(isset($data['video']['name']) && isset($data['video']['content'])){\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n $folder = Asset_Folder::getByPath('/video/operation/'.$user->ge...
[ "0.6908513", "0.67726016", "0.67187214", "0.65416896", "0.6535789", "0.65266633", "0.65247077", "0.6462796", "0.62174994", "0.6217414", "0.6144979", "0.6128626", "0.61285716", "0.6119491", "0.6107957", "0.61028725", "0.6053066", "0.60468376", "0.60214686", "0.59895676", "0.59...
0.77451897
0
Check if "brand" has been set
Проверьте, задан ли "brand"
public function hasBrand() : bool { return isset($this->brand); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasBrand()\n {\n return $this->getBrand() !== null;\n }", "public function getBrandFound()\n\t{\n\t\treturn $this->brandFound;\n\t}", "public function getBrand()\n {\n return $this->brand;\n }", "public function getBrand()\n {\n return $this->brand;\n }"...
[ "0.78351945", "0.6539695", "0.64666253", "0.64666253", "0.6454689", "0.64524764", "0.64425576", "0.64391965", "0.64020604", "0.6197087", "0.6127845", "0.6113658", "0.60275143", "0.6016498", "0.6016498", "0.59953463", "0.59953403", "0.59526825", "0.59042585", "0.58953553", "0....
0.79522455
0
/filtering the user permissions gives access to all editors to all courses including previews add_filter ( 'sfwd_lms_has_access', 'make_all_editors_access_all_courses', 10, 2); Problem with this because it enrolls everyone in everything so can't do it this way
Фильтрация прав пользователей позволяет всем редакторам получить доступ ко всем курсам, включая предварительные просмотры add_filter ( 'sfwd_lms_has_access', 'make_all_editors_access_all_courses', 10, 2); Проблема в том, что это зачисляет всех на всё, поэтому так сделать нельзя
function make_all_editors_access_all_courses ( $post_id, $user_id ) { $user_id = get_current_user_id(); if ( user_can( $user_id, 'edit_others_courses' ) ) { return true; } $not_editor = sfwd_lms_has_access_fn( $post_id, $user_id ); return $not_editor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isAuthorized($user) {\n if ($this->action === 'apply' || $this->action === 'saveProject'){\n if($user['role'] == 'student' || $user['role'] == 'staff'){\n return true; \n } \n }\n \n if ($this->action === 'applied' || $this->action === 'saved'){\n if($user['role...
[ "0.65582514", "0.6455157", "0.61953515", "0.6160886", "0.6145387", "0.6139073", "0.60667795", "0.60467875", "0.59922636", "0.59680545", "0.595559", "0.5928867", "0.59185815", "0.5909147", "0.5907511", "0.5890844", "0.58852303", "0.58825856", "0.5860373", "0.5856435", "0.58556...
0.77159464
0
Parse the filter token and add it to the filters.
Парсить токен фильтра и добавить его в фильтры.
protected function parseFilterToken(Token $token, array &$filters) { $segments = explode(':', $token->getValue()); $filters[$segments[0]] = $segments[1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function processFilters()\n {\n $this->filters = [];\n foreach ($this->params as $key => $value) {\n $this->parser->setAlias('_' . $this->contentType);\n $filter = $this->parser->getFilter($key, $value);\n if ($filter) {\n $this->addFilter(...
[ "0.6063242", "0.58367395", "0.56083125", "0.5560027", "0.55562043", "0.55427796", "0.5539909", "0.54278505", "0.54116225", "0.5377635", "0.53736734", "0.53111464", "0.5269497", "0.52433854", "0.52269244", "0.5218317", "0.5212131", "0.5202909", "0.51966786", "0.51671946", "0.5...
0.70667917
0
Register the dashboard widget.
Зарегистрируйте виджет панели управления.
public function register_dashboard_widget() { global $wp_meta_boxes; wp_add_dashboard_widget( self::WIDGET_KEY, esc_html__( 'MonsterInsights', 'google-analytics-for-wordpress' ), array( $this, 'dashboard_widget_content' ) ); // Attept to place the widget at the top. $normal_dashboard = $wp_meta_box...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_dashboard_widgets() {\n\t\t$widget_render = array( &$this, 'render_widget' );\n\n\t\tif ( false !== $this->option( 'widget_id' ) && false !== $this->option( 'widget_name' ) ) {\n\t\t\t$wid = $this->option( 'widget_id' );\n\t\t\t$wname = $this->option( 'widget_name' );\n\t\t\t...
[ "0.79419625", "0.7689488", "0.75260895", "0.74805117", "0.74427485", "0.74165463", "0.7357983", "0.7346103", "0.73304766", "0.726166", "0.72448534", "0.7221919", "0.72114414", "0.71195287", "0.7081275", "0.7051902", "0.70332867", "0.6987035", "0.6964597", "0.6955723", "0.6932...
0.7954412
0
Remove assets added by other plugins which conflict.
Удалите активы, добавленные другими плагинами, которые конфликтуют.
public function remove_conflicting_asset_files() { $scripts = array( 'jetpack-onboarding-vendor', // Jetpack Onboarding Bluehost. ); if ( ! empty( $scripts ) ) { foreach ( $scripts as $script ) { wp_dequeue_script( $script ); // Remove JS file. wp_deregister_script( $script ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_plugin_assets() {\n wp_dequeue_style('roots-share-buttons'); // roots-share-buttons/assets/styles/share-buttons.css\n wp_dequeue_script('roots-share-buttons'); //roots-share-buttons/assets/scripts/share-buttons.js\n wp_dequeue_style('wp-biographia-bio'); //wp-biographia/css/wp-biographia-min.css...
[ "0.7483179", "0.6871173", "0.6645002", "0.6557588", "0.6411285", "0.6383721", "0.63729197", "0.62827915", "0.6204986", "0.6153422", "0.6143511", "0.61367404", "0.60806274", "0.60196817", "0.59756225", "0.595938", "0.5891339", "0.5885323", "0.58491904", "0.58378524", "0.580084...
0.81537473
0
Setup default header toolbar
Настройка заголовка панели инструментов по умолчанию
protected function setDefaultHeader() { if (!empty($this->toolbar)) { return; } $heading = function ($n) { return [ 'label' => Yii::t('kvmarkdown', 'Heading {n}', ['n' => $n]), 'options' => [ 'class' => 'kv-heading-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initPageHeaderToolbar()\n {\n if (empty($this->display)) {\n $this->page_header_toolbar_btn['new_reward'] = [\n 'href' => self::$currentIndex.'&addgamifications_reward&token='.$this->token,\n 'desc' => $this->l('Add new reward'),\n '...
[ "0.7684369", "0.7547535", "0.72856575", "0.70549166", "0.6901348", "0.68174076", "0.6805727", "0.6753242", "0.6738133", "0.6738133", "0.6738133", "0.6738133", "0.6738133", "0.6736813", "0.6697581", "0.6649288", "0.65927744", "0.6578604", "0.6529156", "0.6497052", "0.64743096"...
0.81465644
0
Setup default footer toolbar
Настройка основного нижнего панели инструментов
protected function setDefaultFooter() { if (!empty($this->footerButtons)) { return; } $isBs4 = $this->isBs4(); $this->footerButtons = [ [ 'buttons' => [ self::BTN_EXPORT => [ 'icon' => $isBs4 ? 'file-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function configureToolbar(): void\n {\n /** @var Toolbar $toolbarLayout */\n $toolbar = $this->getToolbarBlock();\n $toolbar->removeOrderFromAvailableOrders('position');\n $toolbar->addOrderToAvailableOrders('created_at', __('New'));\n $toolbar->setDefaultOrder('create...
[ "0.66668266", "0.6580473", "0.6548889", "0.6548889", "0.6548374", "0.65434927", "0.6488998", "0.64277583", "0.64157677", "0.6392546", "0.6332836", "0.63306195", "0.63297325", "0.63281965", "0.6313249", "0.6313249", "0.63089526", "0.62974197", "0.62793875", "0.62785935", "0.62...
0.72447264
0
Render the editor header content
Отобразить содержимое заголовка редактора
protected function renderHeader() { $output = ''; $this->setDefaultHeader(); foreach ($this->toolbar as $group) { if (empty($group['buttons'])) { continue; } $output .= $this->renderButtonGroup($group, true); } return Html::...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _renderHeader()\n\t{\n\t\t\n\t\tif( $this->header !== false ) {\n\t\t\t\n\t\t\t$button = $this->_renderCloseButton();\n\t\t\t\n\t\t\tHtml::addCssClass( $this->headerOptions, [ 'section' => 'modal-header' ] );\n\t\t\t\n\t\t\treturn ''\n\t\t\t\t. \"\\n\" . Html::beginTag( 'div', $this->headerOptio...
[ "0.73590595", "0.7197959", "0.6983766", "0.69070065", "0.6670509", "0.66643155", "0.66613", "0.65156126", "0.6490627", "0.6475516", "0.64704794", "0.6425557", "0.6419896", "0.6418579", "0.6401818", "0.63999873", "0.6391372", "0.6387554", "0.63873166", "0.63842887", "0.6376302...
0.73062545
1
Render the text area input
Отобразить текстовое поле ввода
protected function renderInput() { if ($this->hasModel()) { $input = Html::activeTextArea($this->model, $this->attribute, $this->options); } else { $input = Html::textArea($this->name, $this->value, $this->options); } Html::addCssClass($this->previewOptions, '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function renderTextarea();", "public function renderInput(): string\n {\n return FormFacade::textarea(\n $this->getKey(),\n $this->getInputValue(),\n $this->getInputAttributes(),\n )->toHtml();\n }", "public function renderInput();", "public ...
[ "0.76554257", "0.75911546", "0.74280965", "0.73470634", "0.727236", "0.71697164", "0.7111995", "0.7002426", "0.6892369", "0.6515212", "0.6496768", "0.64783555", "0.64740354", "0.64499253", "0.6443318", "0.64325243", "0.6421308", "0.6388781", "0.6345844", "0.628156", "0.628076...
0.78612345
0
this block only authenticate custom login
этот блок только аутентифицирует пользовательский логин
protected function loginAuthenticate(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loginIfRequested() {}", "protected function isUserAllowedToLogin() {}", "private function login(){\n \n }", "abstract protected function doLogin();", "public function _check_login()\n {\n\n }", "public function doAuthentication();", "public function authenticate() {}"...
[ "0.7752229", "0.730016", "0.72716826", "0.7197308", "0.71367323", "0.7082085", "0.7027493", "0.7017906", "0.7016155", "0.7016155", "0.7016155", "0.69435215", "0.6941434", "0.6917755", "0.6883439", "0.6883439", "0.68439996", "0.6836055", "0.6821786", "0.6805503", "0.6796287", ...
0.78271526
0
this block only authenticate gmail login
этот блок только аутентифицирует вход в gmail
protected function gmailAuthenticate(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function login()\n {\n $post_data = array();\n $post_data['Email'] = $this->email;\n $post_data['Passwd'] = $this->password;\n $post_data['source'] = \"exampleCo-exampleApp-1\";\n $post_data['service'] = \"cl\";\n $post_data['accountType'] = \"GOOGLE\";\n\n $this->getHeaders = true;\n $th...
[ "0.6555059", "0.64103204", "0.6272365", "0.6254495", "0.6244971", "0.6222282", "0.6212239", "0.62020814", "0.61934036", "0.61680424", "0.6127271", "0.6127271", "0.60897094", "0.60734254", "0.6034246", "0.6034246", "0.6034246", "0.59978527", "0.5994796", "0.59681726", "0.59495...
0.8177466
0
this block only authenticate facebook login
этот блок только для аутентификации входа через Facebook
protected function facebookAuthenticate(){ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function facebook(){\n\t\t// get redirect URL\n\t\t$requestUrl = $this->input->get(\"redirect\");\n\t\t\n\t\t// perform Facebook login\n\t\t$res = false;\n\t\ttry {\n\t\t\t$res = $this->login_util->loginFacebook($this->config->item('facebook_app_id'), $this->config->item('facebook_secret'), $requestUrl);\n\...
[ "0.74359804", "0.71453655", "0.70840883", "0.70840883", "0.6914692", "0.68811584", "0.6818329", "0.6753578", "0.67337024", "0.6728318", "0.6721904", "0.6643546", "0.66363746", "0.6551398", "0.6539965", "0.6532434", "0.65158284", "0.650476", "0.65030694", "0.64243335", "0.6409...
0.8184042
0
Returns the average of the values of an array, the highest and the lowest number inside of it.
Возвращает среднее значение элементов массива, максимальное и минимальное число внутри него.
function array_max_min_avg($array) { // initialize variables $result = array(); $amount = count($array); $avg = 0; // examine each array item for ($x = 0; $x < $amount; $x++) { // if no low number, set it if (!isset($low)) { $low = $array[$x]; // if there's a low number, compare and ass...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function average($array)\n{\n $avg = array_sum($array) / (count($array));\n return $avg;\n}", "function meanArray(array $array): float\n {\n if(count($array) > 0)\n {\n return array_sum($array)/count($array);\n }\n }", "public function mean(array $array)\n {\n ...
[ "0.75886863", "0.7583486", "0.7328579", "0.7323837", "0.7175791", "0.71208245", "0.70961696", "0.6960045", "0.6886118", "0.6861288", "0.6701732", "0.6672573", "0.6609607", "0.6566706", "0.6522628", "0.65039617", "0.64980316", "0.64142865", "0.6413147", "0.63881034", "0.631930...
0.82371354
0
Common setup for testing controllers
Общая настройка для тестирования контроллеров
protected function setUp() { $serviceManager = Bootstrap::getServiceManager(); $this->request = new Request(); $this->routeMatch = new RouteMatch(array('controller' => 'index')); $this->event = new MvcEvent(); $config = $serviceManager->get('Config'); $routerConfig = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setUp()\n {\n $this->controller = new Controller;\n }", "protected function setUp() {\n $this->_request = Request::createFromGlobals();\n $this->object = new LoginController($this->_request);\n }", "public function setUp()\n {\n $this->controllerInfo =...
[ "0.77857685", "0.778008", "0.77532476", "0.7676688", "0.75979656", "0.75629437", "0.75205594", "0.7509457", "0.75002337", "0.7497559", "0.74872553", "0.7478772", "0.7458696", "0.74349624", "0.7426481", "0.74040645", "0.7375428", "0.73751414", "0.7370263", "0.7345439", "0.7341...
0.78186023
0
Get result raw text
Получить результат в виде сырого текста
public function getResultRawText($result){ $response = $this->getRequests($result->CachedVersion)['response']; return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRawText() {\n\t\treturn $this->text;\n\t}", "public function getRawResult();", "public function getRawContent();", "public function getResult(): string\n {\n return $this->result;\n }", "public function getPlainText()\n {\n $this->_process();\n return $this-...
[ "0.7459461", "0.7343003", "0.6898581", "0.6853508", "0.67042506", "0.66429466", "0.6633207", "0.6585777", "0.6550246", "0.65176463", "0.6503442", "0.6503442", "0.6499746", "0.6499746", "0.6499746", "0.6499746", "0.6499746", "0.6477162", "0.6474499", "0.6466459", "0.64657354",...
0.78469855
0
Get a list of supported file types
Получить список поддерживаемых типов файлов
public function getSupportedFileTypes(){ $_url = $this->constants['SERVICE_ENTRY_POINT'].$this->constants['SERVICE_VERSION'].'/'.$this->constants['MISC_PATH'].'/supported-file-types'; $response = $this->getRequests($_url)['response']; return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function supported_filetypes() {\n return '*';\n }", "public function getFileTypes() {\r\n return $this->fileTypes;\r\n }", "public function getFileTypes()\n {\n return $this->fileTypes;\n }", "protected function getAcceptFileTypes()\n {\n $extensions = $this->getV...
[ "0.8109015", "0.7773267", "0.7746495", "0.7728592", "0.7716863", "0.76344466", "0.76314455", "0.74826074", "0.74736536", "0.74362206", "0.74091357", "0.7373458", "0.7320633", "0.7280888", "0.72280234", "0.7199084", "0.71385247", "0.7135508", "0.71261925", "0.7112904", "0.7089...
0.86017585
0
Get a list of supported ocr langauges
Получить список поддерживаемых языков OCR
public function getSupportedOCRLanguages(){ $_url = $this->constants['SERVICE_ENTRY_POINT'].$this->constants['SERVICE_VERSION'].'/'.$this->constants['MISC_PATH'].'/ocr-languages-list'; $response = $this->getRequests($_url)['response']; return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_desired_languages();", "public function getAvailableLanguages() {}", "protected function getAllAvailableLanguageOptions() {}", "protected function getPreviewLanguages() {}", "public function getLanguages();", "public function parseLanguages()\n {\n $languages = array();\n ...
[ "0.7008079", "0.6938857", "0.668935", "0.66554004", "0.66372114", "0.6533873", "0.6533174", "0.648111", "0.64700586", "0.6355952", "0.6355879", "0.63361186", "0.6285474", "0.6262723", "0.6233479", "0.6200141", "0.6193692", "0.6184868", "0.61637396", "0.61596406", "0.6155486",...
0.8006563
0
function to prevent Direct Accress to php file
функция для предотвращения прямого доступа к файлу php
function noDirectAccess($fileName) { if (preg_match("/{$fileName}/", $_SERVER['SCRIPT_FILENAME'])) { die("Access Denied"); exit; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function blockAccess()\n{\n if(php_sapi_name() != 'cli')\n { die('Restricted'); } \n}", "function access_denied() {\n\t\tif ( ! php_version_at_least( '4.1.0' ) ) {\n\t\t\tglobal $_SERVER;\n\t\t}\n\n\t\t// Si viene por webservice no necesita estar logueado.\n\t\tif($_POST['code']=='14149989'){\...
[ "0.6834534", "0.6742452", "0.6689628", "0.6476839", "0.6416323", "0.640588", "0.62739617", "0.6261971", "0.6218779", "0.6217432", "0.6196353", "0.61788934", "0.61638254", "0.616286", "0.61275625", "0.6102251", "0.6092754", "0.60694104", "0.6063985", "0.6047551", "0.6045975", ...
0.76735777
0
[ FUNCTION TO INSERT AN ELEMENT INTO AN ARRAY AT SPECIFIED POSITION} Note : This function can be called as follows 1. array_insert(, ); for inserting the given position 2. array_insert(, ); Will insert position from the end 3. array_insert(); Will insert at the end
[ФУНКЦИЯ ДЛЯ ВСТАВКИ ЭЛЕМЕНТА В МАССИВ В УКАЗАННОЕ ПОЛОЖЕНИЕ] Примечание: эта функция может быть вызвана следующим образом 1. array_insert(, ); для вставки в указанное положение 2. array_insert(, ); будет вставлять с конца 3. array_insert(); будет вставлять в конец
function array_insert(&$array,$element,$position=NULL) { if(count($array) == 0) { $array[] = $element; } elseif (is_numeric($position) && $position < 0) { if((count($array)+position) < 0) { $array = array_insert($array,$element,0); } else { $array[count($array)+$position...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ArrayInsert( $array, $insert, $position ) {\n return array_slice($array, 0, $position, TRUE) + $insert + array_slice($array, $position, NULL, TRUE);\n}", "function insertArray( &$arr, $offset = 0, $value = '', $replace = false ){\n\n consoleLog( 'insertArray() is deprecated. Switching to arr_insert(...
[ "0.8171483", "0.75517327", "0.7550648", "0.75171363", "0.746454", "0.73714936", "0.7261319", "0.6751309", "0.66598046", "0.66449535", "0.655748", "0.655748", "0.65245277", "0.63326454", "0.6247649", "0.6210628", "0.61893505", "0.6151578", "0.613506", "0.6103149", "0.5983331",...
0.7812635
1
=============================[ FORM VALIDATION FUNCTIONS ] ================================ Can be used as server side form validation Function to check the required fields parameters >1.requiredFields as array like field name and error display message ie. array("txtFirstName" => "Firstname required"); 2. First error M...
=============================[ ФУНКЦИИ ПРОВЕРКИ ВАЛИДАЦИИ ФОРМЫ ] ================================ Могут использоваться как функции валидации формы на стороне сервера. Функция для проверки параметров обязательных полей >1. requiredFields как массив, содержащий имя поля и сообщение об ошибке для отображения, например: a...
function validateRequiredFields($requiredFields, $errorMsg=NULL,$errorLineBreak=false) { $errorOut =""; $errorArray = array(); foreach($requiredFields as $fieldName => $displayName) { if(!isset($_REQUEST[$fieldName]) || empty($_REQUEST[$fieldName])) { if(count($errorArray)> 0) array_push($error...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_fields() {\r\n \r\n $fail = false;\r\n\t\t$empty = true;\r\n\t\t\r\n // if first name contains any non-letter characters, exit\r\n\t\tif($_POST[\"InputFirstName\"] != '') {\r\n\t\t\tif(!filter_var($_POST[\"InputFirstName\"], FILTER_VALIDATE_REGEXP, array(\"options\"=>array(\"reg...
[ "0.7751305", "0.7554645", "0.730436", "0.728519", "0.72230923", "0.7120558", "0.70427567", "0.7034036", "0.7012985", "0.6983117", "0.6968545", "0.69628334", "0.69464916", "0.69401985", "0.6934719", "0.69045967", "0.6894086", "0.6868768", "0.68071055", "0.6796784", "0.6795008"...
0.7786582
0
/ FILED LENGTH CHECKING FUNCTION Function to check the field Length parameters >1. maxLengthFields as array like and its maximum length ie. array("txtFirstName|FirstName" => 30); 2. First error Message as string Return type> String, if any error or an empty String Author: Sandeep Created On: 01/08/2011
ФУНКЦИЯ ПРОВЕРКИ ДЛИНЫ ПОЛЯ Функция для проверки параметров длины полей больше 1. maxLengthFields как массив вида и его максимальная длина, например. array("txtFirstName|FirstName" => 30); 2. Первое сообщение об ошибке как строка Тип возвращаемого значения> Строка, если есть ошибка или пустая строка Автор: Сандип Созда...
function validateMaxLength($maxLengthFields, $errorMsg=NULL) { $errorOut =""; $errorArray = array(); foreach($maxLengthFields as $field => $maxlength) { $fieldAndDisplay = explode("|", $field); $fieldName = $fieldAndDisplay[0]; $displayName = $fieldAndDisplay[1]; if(strlen(trim(cleanUpF...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function validateFieldLength($fieldLength);", "function checkLength($fieldlength){\n\n $formErrors = array();\n foreach($fieldlength as $nameofField => $valueofField){\n\n if(strlen(trim($_POST[$nameofField])) < $valueofField){\n \n $formErrors[] = $nameof...
[ "0.74280494", "0.7321662", "0.6990223", "0.69623756", "0.68926007", "0.6837472", "0.67870617", "0.6751041", "0.6657176", "0.6610275", "0.65791607", "0.65637285", "0.65605307", "0.65569645", "0.65248716", "0.65093905", "0.64649916", "0.6422201", "0.6407393", "0.636394", "0.631...
0.7794963
0
============================================================================================ / INTEGER FIELD CHECKING FUNCTION Function to check the integer field parameters >1.integerFields as array like field name and error display message ie. array("txtAge" =>"dismsg"); 2. First error Message as string Return type> ...
============================================================================================ / ФУНКЦИЯ ПРОВЕРКИ ЦЕЛЫХ ПОЛЕЙ Функция для проверки параметров целочисленных полей >1.integerFields как массив, содержащий имена полей и сообщения об ошибках, например, array("txtAge" =>"dismsg"); 2. Первое сообщение об ошибке ...
function validateIntegerFields($integerFields, $errorMsg=NULL) { $errorOut =""; $errorArray = array(); foreach($integerFields as $fieldName => $displayName) { if(!filter_var($_REQUEST[$fieldName], FILTER_VALIDATE_INT)) { if(count($errorArray)> 0) array_push($errorArray," & ". $displayName); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateNumericFields($integerFields, $errorMsg=NULL)\n{\n\t $errorOut =\"\";\n\t $errorArray =\tarray();\n\t\n\t foreach($numberFields as $fieldName => $displayName)\n\t\t{\n\t\t\tif(!is_numeric($_REQUEST[$fieldName])) \n\t\t\t{\n\t\t\t\tif(count($errorArray)> 0)\n\t\t\t\t\tarray_push($errorArray,\" & \"...
[ "0.7351592", "0.7058237", "0.63973045", "0.63253814", "0.628637", "0.6234257", "0.61812943", "0.61778224", "0.6158752", "0.61519617", "0.61387473", "0.6096598", "0.60902196", "0.60610306", "0.6049102", "0.6027279", "0.60185385", "0.6006634", "0.59885085", "0.59659094", "0.595...
0.7919992
0
============================================================================================ / NUMBER FIELD CHECKING FUNCTION Function to check the number field parameters >1.numberFields as array like field name and error display message ie. array("txtSalary" =>"dismsg"); 2. First error Message as string Return type> ...
============================================================================================ / ФУНКЦИЯ ПРОВЕРКИ ПОЛЕЙ С ЧИСЛОВЫМИ ЗНАЧЕНИЯМИ Функция для проверки параметров полей с числовыми значениями >1. numberFields как массив, содержащий имя поля и сообщение об ошибке для отображения, например: array("txtSalary" =>...
function validateNumericFields($integerFields, $errorMsg=NULL) { $errorOut =""; $errorArray = array(); foreach($numberFields as $fieldName => $displayName) { if(!is_numeric($_REQUEST[$fieldName])) { if(count($errorArray)> 0) array_push($errorArray," & ". $displayName); else array_push...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateIntegerFields($integerFields, $errorMsg=NULL)\n{\n\t $errorOut =\"\";\n\t $errorArray =\tarray();\n\t\n\t foreach($integerFields as $fieldName => $displayName)\n\t\t{\n\t\t\tif(!filter_var($_REQUEST[$fieldName], FILTER_VALIDATE_INT)) \n\t\t\t{\n\t\t\t\tif(count($errorArray)> 0)\n\t\t\t\t\tarray_pu...
[ "0.69181025", "0.6764981", "0.66222787", "0.6521719", "0.64119095", "0.63638866", "0.6335068", "0.6314906", "0.62722856", "0.6260594", "0.6233954", "0.62296957", "0.6228385", "0.6192299", "0.61880094", "0.6183556", "0.6148345", "0.613959", "0.6132641", "0.6083473", "0.6082813...
0.74074787
0
============================================================================================ / EMAIL FIELD CHECKING FUNCTION Function to check the eMail field parameters >1.emailFields as array like field name and error display message ie. array("txtEmail" =>"dismsg"); 2. First error Message as string Return type> Stri...
============================================================================================ / ФУНКЦИЯ ПРОВЕРКИ ПОЛЯ EMAIL Функция проверки параметров поля eMail >1. emailFields как массив, содержащий имя поля и сообщение об ошибке, например. массив("txtEmail" =>"dismsg"); 2. Первое сообщение об ошибке как строка Тип в...
function validateEmailFields($emailFields, $errorMsg=NULL) { $errorOut =""; $errorArray = array(); foreach($emailFields as $fieldName => $displayName) { if(!filter_var($_REQUEST[$fieldName], FILTER_VALIDATE_EMAIL)) { if(count($errorArray)> 0) array_push($errorArray," & ". $displayName); el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isEmail($field_data) \n{ \n\t$fields_ok=preg_match(\"/^([a-zA-Z0-9])+([a-zA-Z0-9\\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\\._-]+)+$/\" , $field_data); \n\treturn $fields_ok; \n}", "function validateEmail($field)\n\t{\n //Make sure field is not blank\n if ($field == \"\") return \"Please specify...
[ "0.75459397", "0.72508043", "0.72286224", "0.6975426", "0.696073", "0.69340146", "0.6842908", "0.68186986", "0.6816431", "0.6763518", "0.6672418", "0.66697043", "0.66693527", "0.66691494", "0.6667557", "0.6665825", "0.66370416", "0.65879655", "0.6568573", "0.65682095", "0.655...
0.8045802
0
============================================================================================ / URL FIELD CHECKING FUNCTION Function to check the eMail field parameters >1.urlFields as array like field name and error display message ie. array("txtUrl" =>"dismsg"); 2. First error Message as string Return type> String, if...
============================================================================================ / ФУНКЦИЯ ПРОВЕРКИ ПОЛЯ URL Функция для проверки параметров поля eMail >1. urlFields как массив, содержащий имя поля и сообщение об ошибке для отображения, например, array("txtUrl" =>"dismsg"); 2. Первое сообщение об ошибке как...
function validateUrlFields($urlFields, $errorMsg=NULL) { $errorOut =""; $errorArray = array(); foreach($urlFields as $fieldName => $displayName) { if(!filter_var($_REQUEST[$fieldName], FILTER_VALIDATE_URL)) { if(count($errorArray)> 0) array_push($errorArray," & ". $displayName); else ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validateEmailFields($emailFields, $errorMsg=NULL)\n{\n\t $errorOut =\"\";\n\t $errorArray =\tarray();\n\t\n\t foreach($emailFields as $fieldName => $displayName)\n\t\t{\n\t\t\tif(!filter_var($_REQUEST[$fieldName], FILTER_VALIDATE_EMAIL)) \n\t\t\t{\n\t\t\t\tif(count($errorArray)> 0)\n\t\t\t\t\tarray_push($...
[ "0.69630474", "0.6889716", "0.64083695", "0.6305381", "0.6237291", "0.6208589", "0.6059407", "0.60236347", "0.5966317", "0.59285235", "0.58890694", "0.5864741", "0.58499104", "0.5823965", "0.58212066", "0.58182114", "0.5811487", "0.5809264", "0.5788157", "0.57680887", "0.5757...
0.78252155
0
============================================================================================ / IP FIELD CHECKING FUNCTION Function to check the IP field parameters >1.ipFields as array like field name and error display message ie. array("txtIP" =>"dismsg"); 2. First error Message as string Return type> String, if any e...
============================================================================================ / ФУНКЦИЯ ПРОВЕРКИ ПОЛЯ IP Функция для проверки параметров поля IP >1. ipFields как массив, содержащий имя поля и сообщение об ошибке, например. array("txtIP" =>"dismsg"); 2. Первое сообщение об ошибке как строка Тип возвращаем...
function validateIpFields($ipFields, $errorMsg=NULL) { $errorOut =""; $errorArray = array(); foreach($ipFields as $fieldName => $displayName) { if(!filter_var($_REQUEST[$fieldName], FILTER_VALIDATE_IP)) { if(count($errorArray)> 0) array_push($errorArray," & ". $displayName); else arra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function geoCheckIP($ip)\n{\n\t if(!filter_var($ip, FILTER_VALIDATE_IP))\n\t {\n\t\t\t throw new InvalidArgumentException(\"IP is not valid\");\n\t }\n\n\t //contact ip-server\n\t \n\t //$response=@file_get_contents('http://www.netip.de/search?query='.$ip);\n\t $response=@file_get_contents('http://...
[ "0.6628185", "0.65101624", "0.64294845", "0.64265585", "0.6214417", "0.61631453", "0.60941076", "0.60931426", "0.60777307", "0.59465146", "0.59450144", "0.5942176", "0.59418565", "0.5937086", "0.5934474", "0.5887381", "0.5866086", "0.5851432", "0.58403295", "0.5831432", "0.58...
0.80951935
0
==============================[FILTERING FUNCTIONS]============================= / SANITISE STRING FUNCTION Function to remove unwanted chars in a String parameters >1.strField as String Return type> String, after filtering String Author: Sandeep Created On: 01/08/2011
==============================[ФУНКЦИИ ФИЛЬТРАЦИИ]============================= / ФУНКЦИЯ ОЧИСТКИ СТРОКИ Функция для удаления нежелательных символов из строки параметры >1.strField как String Тип возвращаемого значения> String, после фильтрации String Автор: Sandeep Создано: 01/08/2011
function sanitiseString($strField) { $strOut = filter_var($strField, FILTER_SANITIZE_STRING); return $strOut; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filterString($string){\n $string = filter_var(trim($string), FILTER_SANITIZE_SPECIAL_CHARS); // Removes a small list of special chars\n // $string = filter_var(trim($string), FILTER_SANITIZE_FULL_SPECIAL_CHARS); // Removes all special chars\n return $string;\n}", "function string_filter($string)\n{\...
[ "0.70485383", "0.69907933", "0.69483936", "0.6888149", "0.6858447", "0.6716674", "0.66371083", "0.663224", "0.6622526", "0.6606343", "0.6580975", "0.6569373", "0.6549355", "0.6541657", "0.65112734", "0.64558846", "0.6455317", "0.6429728", "0.6378171", "0.6374529", "0.6309888"...
0.73159546
0
/ FUNCTION TO CHECK AJAX REQUEST : usage is function isAJAX(__FILE__)
/ ФУНКЦИЯ ДЛЯ ПРОВЕРКИ AJAX-ЗАПРОСА: использование — функция isAJAX(__FILE__)
function isAJAX($script) { $isAjax = isset($_SERVER['HTTP_X_REQUESTED_WITH']) AND strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest'; if(!$isAjax) { exit("Sorry Access denied!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_ajax() { \r\n return isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'; \r\n }", "function is_ajax_request(){\n\treturn isset($_SERVER['HTTP_X_REQUESTED_WITH']) && \n\t\t\t$_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest';\n}", "public...
[ "0.8094077", "0.8060762", "0.8035425", "0.8033482", "0.80265677", "0.80265677", "0.80163294", "0.80130273", "0.8008964", "0.80045193", "0.7993622", "0.7993622", "0.79734176", "0.7964861", "0.79261166", "0.790168", "0.7896632", "0.7874127", "0.7792118", "0.7780407", "0.7761824...
0.8155292
0
ADDING DAYS TO A GIVEN DATE AND returns Date in MySQL FORMAT
ДОБАВЛЕНИЕ ДНЕЙ К УКАЗАННОЙ ДАТЕ И ВОЗВРАЩЕНИЕ ДАТЫ В ФОРМАТЕ MySQL
function addDateDays($mySQLFormatDate, $noOfDaysToAdd) { $ed = strtotime('+' .$noOfDaysToAdd . ' days', strtotime($mySQLFormatDate)); $retDate = date('Y-m-d', $ed); return $retDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addDayswithdate($date,$days){\n $date = new DateTime($date);\n $date->add(new DateInterval('P'.$days.'D'));\n return $date->format('Y-m-d');\n }", "function add_day($date, $day = 1) { \n\t$date = strtotime('+' . $day . ' day', strtotime($date));\n\treturn date('Y-...
[ "0.6569445", "0.64805025", "0.61343306", "0.5983994", "0.5910997", "0.58877724", "0.5837904", "0.57983005", "0.5761096", "0.57328254", "0.5670195", "0.56490237", "0.56399363", "0.55850846", "0.5506523", "0.5506336", "0.5495082", "0.5478876", "0.54756606", "0.54637223", "0.545...
0.72055465
0
ADDING MONTHS TO A GIVEN DATE AND returns Date in MySQL FORMAT
ДОБАВЛЕНИЕ МЕСЯЦЕВ К ЗАДАННОЙ ДАТЕ И ВОЗВРАЩЕНИЕ ДАТЫ В ФОРМАТЕ MySQL
function addDateMonths($mySQLFormatDate, $noOfMonthsToAdd) { $ed = strtotime('+' .$noOfMonthsToAdd . ' months', strtotime($mySQLFormatDate)); $retDate = date('Y-m-d', $ed); return $retDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function mysqlToDate($mydsqlDate) {\r\n\t\t$date = strtotime($mydsqlDate);\r\n\t\treturn date(__('d.m.'), $date);\r\n\t}", "function monthdate($date) {\n #print \"monthdate($date)<br>\\n\";\n return trim(substr($date, 5, 2) . substr($date, 8, 2));\n }", "function _reformat_date($inDate)...
[ "0.63126874", "0.6238432", "0.61281973", "0.58626086", "0.5852315", "0.58512735", "0.5844909", "0.58423114", "0.58341855", "0.5806753", "0.58010465", "0.5640119", "0.5624644", "0.56225157", "0.55971456", "0.5578769", "0.5568255", "0.55481875", "0.5512884", "0.5504426", "0.549...
0.72704715
0
ADDING YEARS TO A GIVEN DATE AND returns Date in MySQL FORMAT
Добавление лет к заданной дате и возврат даты в формате MySQL
function addDateYears($mySQLFormatDate, $noOfYearsToAdd) { $ed = strtotime('+' .$noOfYearsToAdd . ' years', strtotime($mySQLFormatDate)); $retDate = date('Y-m-d', $ed); return $retDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dbdate($date){\n\t\t$date=explode(\"-\",$date);\n\t\t$year=explode(\" \",$date[2]);\n\t\t$date1=$year[0].\"-\";\n\t\tif($date[1]<10 && (substr($date[1],0,1)!=0))\n\t\t\t$date1.=\"0\".$date[1].\"-\";\n\t\telse\n\t\t\t$date1.=$date[1].\"-\";\n\t\tif($date[0]<10 && (substr($date[0],0,1)!=0))\n\t\t\t$date1.=\...
[ "0.63093454", "0.6234258", "0.6137746", "0.5921176", "0.590787", "0.589904", "0.58472985", "0.58117455", "0.57990223", "0.577498", "0.57461953", "0.57349473", "0.57349473", "0.5713055", "0.5709812", "0.5690174", "0.5684513", "0.56712884", "0.564339", "0.56399536", "0.5624534"...
0.76071525
0
this will create a users migration
это создаст миграцию пользователей
public function userTableMigrate() { $isUserTableExist = $this->schema->tableExist('users'); if (!$isUserTableExist) { $fileName = "20210408051901_create_users_table.php"; $dir = $this->migrationFiles . $fileName; $content = file_get_contents($this->stubsPath . "user_migration.stubs"); if (!...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createUsersTableUp(): void\n\t{\n\t\tSchema::create('users', function (Blueprint $table) {\n\t\t\t$table->increments('id');\n\t\t\t$table->dateTime('created_at', 6)->nullable(false);\n\t\t\t$table->dateTime('updated_at', 6)->nullable(false);\n\t\t\t$table->string('username', 100)->nullable(false)-...
[ "0.7631457", "0.7300706", "0.7242652", "0.7107308", "0.709645", "0.7083492", "0.7074934", "0.7049834", "0.701908", "0.69479203", "0.68825924", "0.6871518", "0.6869728", "0.6855908", "0.68552035", "0.6837702", "0.67561036", "0.67407143", "0.6731413", "0.6692993", "0.6680932", ...
0.74373823
1
this will create a roles migration
это создаст миграцию ролей
public function roleTableMigrate() { $isRoleTableExist = $this->schema->tableExist('role'); if (!$isRoleTableExist) { $fileName = "20210408051901_create_roles_table.php"; $dir = $this->migrationFiles . $fileName; $content = file_get_contents($this->stubsPath . "user_roles.stubs"); if (!file_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function install_roles() {\n $db = DB::getInstance();\n if(!$db->query(file_get_contents(CORE_INSTALLER_FILES_PATH.'/db/roles.sql'))->error()) {\n return true;\n }\n else {\n System::addMessage('error', rt('An error occurred during the creation of the default user roles'));\n }\n re...
[ "0.6999229", "0.6903311", "0.67869425", "0.67499197", "0.6701403", "0.6696972", "0.66863316", "0.6673598", "0.6671435", "0.66376686", "0.6635668", "0.66164196", "0.66124725", "0.6608661", "0.6585287", "0.6577373", "0.6573335", "0.6573138", "0.6573138", "0.6566188", "0.6558101...
0.78554946
0
this will create a password_resets migration
этот команды создаст миграцию password_resets
public function passResetTableMigrate() { $isPassResetTableExist = $this->schema->tableExist('password_resets'); if (!$isPassResetTableExist) { $fileName = "20210408051901_create_password_resets_table.php"; $dir = $this->migrationFiles . $fileName; $content = file_get_contents($this->stubsPath . "...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function up()\n {\n Schema::create('password_resets', function (Blueprint $table) {\n $table->string('email')->index();\n $table->string('token')->index();\n $table->timestamp('created_at');\n });\n }", "public function resetPassword();", "public func...
[ "0.6828698", "0.67743295", "0.64428157", "0.6192698", "0.6164864", "0.6101711", "0.609241", "0.6085683", "0.5983898", "0.5982736", "0.59219235", "0.59063125", "0.5897268", "0.58443767", "0.5843564", "0.5841857", "0.5832014", "0.58261544", "0.5817055", "0.5784648", "0.5773578"...
0.7665733
0
Ensure that migration bin is exist before creating scaffold
Убедитесь, что миграционный бин существует перед созданием скелета
public function ensureMigrationBinExist() { if (!file_exists($this->migrationFiles)) { mkdir($this->migrationFiles); chmod($this->migrationFiles, 0777); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ensureSchemaBinExist()\r\n\t{\r\n\t\tif (!file_exists($this->schemaFiles)) {\r\n\t\t\tmkdir($this->schemaFiles);\r\n\t\t\tchmod($this->schemaFiles, 0777);\r\n\t\t}\r\n\t}", "private function createIfNotExists()\n {\n $table = new Table('schema_migration');\n if ($this->info->isTa...
[ "0.68879783", "0.5822867", "0.5793101", "0.5775696", "0.57742906", "0.5724934", "0.57156307", "0.5713262", "0.56516784", "0.5594597", "0.55887437", "0.5577526", "0.553599", "0.5518675", "0.5473048", "0.5463096", "0.54604506", "0.5455441", "0.545317", "0.541724", "0.5409852", ...
0.7396771
0
Ensure that schema bin is exist
Убедитесь, что схема bin существует
public function ensureSchemaBinExist() { if (!file_exists($this->schemaFiles)) { mkdir($this->schemaFiles); chmod($this->schemaFiles, 0777); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ensureMigrationBinExist()\r\n\t{\r\n\t\tif (!file_exists($this->migrationFiles)) {\r\n\t\t\tmkdir($this->migrationFiles);\r\n\t\t\tchmod($this->migrationFiles, 0777);\r\n\t\t}\r\n\t}", "protected function ensureTableExists() {\n try {\n $database_schema = $this->connection->schema();\n ...
[ "0.6723102", "0.6260296", "0.6239138", "0.6059876", "0.60534316", "0.6031926", "0.6011491", "0.60002077", "0.5995162", "0.5981578", "0.5978299", "0.59336954", "0.5880095", "0.5821889", "0.57948595", "0.57699335", "0.57609224", "0.57499987", "0.573967", "0.5728025", "0.5727039...
0.85978556
0
this will remove existimg schema directory
это удалит существующую директорию схемы
public function removeExistingSchema() { $this->rmdir_recursive($this->schemaFiles); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function cleanUp()\n {\n foreach (glob(static::getYamlRoot() . '*') as $file) {\n is_file($file) and unlink($file);\n }\n foreach (glob('{' . static::getEntitiesRoot() . '*,' . static::getProxiesRoot() . '*' . '}', GLOB_BRACE) as $file) {\n is_file($file)...
[ "0.6502987", "0.6485181", "0.6424489", "0.63293195", "0.62607396", "0.62542146", "0.62524605", "0.62106603", "0.618117", "0.61353326", "0.6129337", "0.61043376", "0.60976017", "0.6072546", "0.6068063", "0.60400146", "0.60276455", "0.5979041", "0.59778875", "0.5956992", "0.595...
0.7361263
0
Get the number of rows returned from the previously executed query
Получите количество строк, возвращенных предыдущим выполненным запросом
public function getNumRows() { return $this->previouslyExecuted->num_rows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rowCount()\n {\n return sasql_num_rows($this->result);\n }", "public function getRowsCount()\n {\n if ($this->num_rows === 0 && count($this->resultArray()) > 0) {\n $this->num_rows = count($this->resultArray());\n @oci_execute($this->stmt_id, OCI_DEFAU...
[ "0.8276114", "0.8189612", "0.8139977", "0.81295896", "0.8104236", "0.804683", "0.8038289", "0.8008196", "0.79859376", "0.7927818", "0.7896107", "0.78933764", "0.78819525", "0.7881106", "0.7831389", "0.782795", "0.78193814", "0.78170866", "0.78059924", "0.7805807", "0.7801086"...
0.8385743
0
Get the rows from the most recently executed query, excluding cached queries
Получить строки из последнего выполненного запроса, исключая кэшированные запросы
public function getRows() { return $this->previouslyExecuted->fetch_array(MYSQLI_ASSOC); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFromCache_queryRow() {}", "public function getRows()\n {\n return $this->last->fetch_array(MYSQLI_ASSOC);\n \n }", "private function get_rows()\n {\n // Prompt the expired time to devlog\n $debugTrailLevel = 1;\n $this->pObj->timeTracking_log( $debugTrailLevel, 'begi...
[ "0.68522084", "0.6564581", "0.6436473", "0.6218479", "0.5988909", "0.59709144", "0.59686005", "0.58789265", "0.58728486", "0.5841594", "0.5802327", "0.5778753", "0.5754195", "0.5749553", "0.5740821", "0.57351", "0.57215005", "0.5694598", "0.56928545", "0.5690746", "0.5664345"...
0.70840967
0
Get the number of rows from the cache
Получите количество строк из кэша
public function getNumRowsFromCache( $cache_id ) { return $this->queryCache[$cache_id]->num_rows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count()\n {\n return count($this->_cache);\n }", "public static function size()\n\t{\n\t\treturn count(self::$_cache);\n\t}", "function RowCount() {}", "public function count() {\n return count($this->__rows__);\n }", "public function count()\n {\n return $this...
[ "0.78514326", "0.7548548", "0.74350005", "0.7370386", "0.7364285", "0.73037386", "0.72929", "0.7276119", "0.72657406", "0.72606516", "0.72322", "0.7225877", "0.72105277", "0.7157773", "0.71363765", "0.7129941", "0.7119878", "0.7103736", "0.7101236", "0.71003336", "0.7093108",...
0.78248656
1
Return if current user is blocked
Вернуть, если текущий пользователь заблокирован
public function isBlocked() { return $this->user !== null && $this->user->blocked; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isBlocked()\n {\n if ($this->status == 2) {\n return true;\n } else {\n return false;\n }\n }", "public function isBlocked()\n {\n return $this->getStatus() == self::STATUS_BLOCKED;\n }", "public function getIsBlocked();", "public ...
[ "0.78136003", "0.77743924", "0.7765252", "0.7703508", "0.73656034", "0.72574335", "0.7074309", "0.70387816", "0.69587857", "0.6953584", "0.6919527", "0.68177044", "0.67740357", "0.67397475", "0.67086905", "0.67068523", "0.6684816", "0.6542357", "0.6516807", "0.6513466", "0.65...
0.8369138
0
Check for prioritized countries, and load those
Проверьте приоритетные страны и загрузите их
public function loadPrioritized() { /* handle prioritized countries */ $this->prioritizedCountries = array(); $prioritized = $this->getOption('prioritized',''); if (!empty($prioritized)) { $prioritized = explode(',',$prioritized); foreach ($this->countries as $cou...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadCountry()\n {\n $country = Country::findOne([\n 'code' => 'es'\n ]);\n $this->countryId = $country->id;\n }", "function loadCountriesFromXML() {\n\tglobal $countries;\n\treturn $countries->load_countries_from_xml();\n}", "private function _lo...
[ "0.65697056", "0.6546813", "0.631678", "0.62951076", "0.6222099", "0.61995953", "0.6167668", "0.6154162", "0.6136245", "0.61272436", "0.6012503", "0.60029876", "0.59881973", "0.5966082", "0.5960976", "0.59322286", "0.59195465", "0.5884809", "0.5873396", "0.58530986", "0.58494...
0.79909486
0
Test constructing \Orchestra\FtpUpdater\Uploader when connection is not set.
Тестирование построения \Orchestra\FtpUpdater\Uploader при неустановленном соединении.
public function testConstructMethodWhenConnectionIsNotSet() { $app = $this->app; $client = $this->client; $app['session'] = $this->getSessionMock(); $client->shouldReceive('setUp')->once()->with(['ftpconfig'])->andReturnNull() ->shouldReceive('connect')->once()->andR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct() {\n\t\tif (!isset(self::$uploads)) {\n\t\t\tself::uploadFactory($_FILES);\n\t\t}\n\t}", "public function testConstructMethodThrowsServerException()\n {\n $app = $this->app;\n $client = $this->client;\n\n $app['session'] = $session = $this->getSessionMock();\n\n ...
[ "0.6764872", "0.65768725", "0.6332655", "0.62938267", "0.6180364", "0.5875832", "0.5867031", "0.5805278", "0.58007866", "0.5798361", "0.5788767", "0.57648504", "0.5750522", "0.5710292", "0.56908435", "0.56796056", "0.5679205", "0.56740296", "0.5671044", "0.5657403", "0.565170...
0.74518657
0
Test constructing \Orchestra\FtpUpdater\Uploader throws ServerException.
Тестирование построения \Orchestra\FtpUpdater\Uploader вызывает ServerException.
public function testConstructMethodThrowsServerException() { $app = $this->app; $client = $this->client; $app['session'] = $session = $this->getSessionMock(); $session->shouldReceive('put')->once()->with('orchestra.ftp', [])->andReturnNull(); $client->shouldReceive('setU...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct() {\n\t\tif (!isset(self::$uploads)) {\n\t\t\tself::uploadFactory($_FILES);\n\t\t}\n\t}", "public function setUp()\n {\n $this->vfs = vfsStream::setup('root', null, array_fill_keys(['tmp', 'assets', 'etc', 'bin'], []));\n $this->vfs->getChild('bin')->chmod(0555); // Not writ...
[ "0.63155615", "0.6221405", "0.6080857", "0.5884056", "0.5878104", "0.5820119", "0.5715521", "0.5703151", "0.5664681", "0.5663599", "0.5638423", "0.56314677", "0.5625281", "0.56236976", "0.5597898", "0.5590387", "0.55699116", "0.5567812", "0.5558484", "0.5545195", "0.54770046"...
0.7942163
0
Test \Orchestra\FtpUpdater\Uploader::upload() method chmod vendor folder.
Тестирование метода \Orchestra\FtpUpdater\Uploader::upload() для установки прав доступа к папке vendor.
public function testUploadMethodChmodVendorFolder() { $app = $this->app; $client = $this->client; $app['session'] = $this->getSessionMock(); $app['path.public'] = $path = '/var/foo/public'; $app['files'] = $file = m::mock('\Illuminate\Filesystem\Filesystem'); $app...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function install_plugins_upload()\n {\n }", "public function testUploadFail_Unknown()\n {\n $file = array(\"name\"=>\"zipSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceExtract(false);\n $result = $service->upload($file...
[ "0.6009627", "0.59486264", "0.57883114", "0.5785986", "0.5783671", "0.5781175", "0.5770966", "0.57608676", "0.5748646", "0.5738082", "0.5732923", "0.5657508", "0.5618806", "0.5594093", "0.5593011", "0.5513031", "0.5506209", "0.5478959", "0.5478683", "0.54657465", "0.545812", ...
0.77895945
0
Set swoole server listeners.
Установите слушателей swoole сервера.
protected function setSwooleServerListeners() { foreach ($this->events as $event) { $listener = Str::camel("on_$event"); $callback = method_exists($this, $listener) ? [$this, $listener] : function () use ($event) { $this->triggerEvent($event, func_get_args()); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setSwooleServerListeners()\n {\n foreach ($this->events as $event) {\n $listener = 'on' . ucfirst($event);\n\n if (method_exists($this, $listener)) {\n $this->server->on($event, [$this, $listener]);\n } else {\n $this->serv...
[ "0.87719494", "0.7063486", "0.70605636", "0.63940495", "0.62856305", "0.6220874", "0.613584", "0.61081105", "0.60052496", "0.5997572", "0.59309494", "0.5897523", "0.5896063", "0.5858386", "0.5836619", "0.57983327", "0.57821673", "0.57535744", "0.56075424", "0.5596183", "0.558...
0.86780626
1
Handle the holiday "created" event.
Обработайте событие "created" праздника.
public function created(Holiday $holiday) { $this->updateAllowance($holiday); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createAction()\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"holidays\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $holiday = new Holidays();\n $holiday->d...
[ "0.6292894", "0.6060976", "0.6046988", "0.59285253", "0.58815366", "0.57200724", "0.5696393", "0.56878495", "0.5678354", "0.5670167", "0.56489646", "0.5648628", "0.5623258", "0.56067175", "0.556222", "0.5539608", "0.55044544", "0.548009", "0.5469205", "0.545843", "0.5449532",...
0.7426906
0
Handle the holiday "updated" event.
Обработайте событие "updated" для праздника.
public function updated(Holiday $holiday) { // $this->updateAllowance($holiday, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, Holiday $holiday)\n {\n //\n }", "public function update(Request $request, Holiday $holiday)\n {\n $holiday->fill($request->all());\n if ($holiday->save()) {\n return response()->json([\n 'message' => 'Holiday ...
[ "0.6623435", "0.61784834", "0.5914437", "0.580976", "0.56860465", "0.56334263", "0.55075955", "0.5497556", "0.54855496", "0.54673374", "0.5421982", "0.5395316", "0.5382977", "0.5382579", "0.5328034", "0.5293097", "0.5236212", "0.52338296", "0.52216834", "0.5217421", "0.521308...
0.7429547
0
Handle the holiday "restored" event.
Обработка события "восстановлено".
public function restored(Holiday $holiday) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restored(InDay $inDay)\n {\n //\n }", "public function restored(TradeCancel $tradeCancel)\n {\n //\n }", "public function restored(Auditable $model)\n {\n Auditor::execute($model->setAuditEvent('restored'));\n\n // Once the model is restored, we need t...
[ "0.5722904", "0.56567264", "0.5477623", "0.53264487", "0.52101296", "0.51835865", "0.51506114", "0.51340365", "0.5121024", "0.51057774", "0.50965935", "0.5048687", "0.5045118", "0.504409", "0.4967546", "0.4967546", "0.49547246", "0.49466842", "0.4936942", "0.49311167", "0.492...
0.7558442
0
Handle the holiday "force deleted" event.
Обработка события "силовое удаление" праздника.
public function forceDeleted(Holiday $holiday) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleting(Holiday $holiday)\n {\n $old_allowance = $this->rollBackHolidayAllowance($holiday);\n $meta = UserData::where('user_id', $holiday->user_id);\n $allowance = $old_allowance + $meta->first()->holiday_allowance;\n\n $meta->update(['holiday_allowance' => $allowanc...
[ "0.6590038", "0.62601644", "0.6246656", "0.6228903", "0.6160954", "0.6124484", "0.6124484", "0.6104579", "0.605695", "0.60432553", "0.601802", "0.60173124", "0.5992098", "0.5977606", "0.5950337", "0.59218454", "0.59171826", "0.58903235", "0.5882354", "0.5874858", "0.5860901",...
0.80317885
0
Get a user's level in specificed language.
Получить уровень пользователя на определенном языке.
public static function get_user_language_level($username, $language) { global $DB, $CFG; require_capability('moodle/grade:viewall',context_system::instance()); // Validate parameters passed from webservice. $params = self::validate_parameters(self::get_user_language_level_parameters(),...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_user_language_level_returns() {\n return new external_value(PARAM_INT, 'The user\\'s language level');\n }", "public static function getUserLevel(){\n if (self::isSuper()){\n return \"super\";\n }\n if (self::isAdmin()){\n return \"a...
[ "0.7771704", "0.7273803", "0.69981945", "0.6988038", "0.69376266", "0.68997353", "0.6881707", "0.6812287", "0.6812287", "0.679332", "0.6744411", "0.6678963", "0.66607547", "0.6654344", "0.6654344", "0.6654344", "0.6654344", "0.6654344", "0.6654344", "0.6576357", "0.6538234", ...
0.74692357
1
Returns description of get_user_language_level_returns() result value.
Возвращает описание значения результата вызова get_user_language_level_returns().
public static function get_user_language_level_returns() { return new external_value(PARAM_INT, 'The user\'s language level'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_user_all_languages_levels_returns() {\n return new external_multiple_structure(\n new external_single_structure(\n array(\n 'language' => new external_value(PARAM_ALPHA, 'Language'),\n 'level' => new external_value(...
[ "0.7208336", "0.6208478", "0.5923137", "0.5890362", "0.578154", "0.57565814", "0.57565814", "0.57565814", "0.57565814", "0.57565814", "0.57565814", "0.5690494", "0.56843066", "0.56784695", "0.5662378", "0.56397474", "0.5636029", "0.5612607", "0.56024104", "0.5594215", "0.5579...
0.846769
0
Get a user's levels in all languages.
Получить уровни пользователя по всем языкам.
public static function get_user_all_languages_levels($username) { global $DB, $CFG; require_capability('moodle/grade:viewall',context_system::instance()); // Validate parameters passed from webservice. $params = self::validate_parameters(self::get_user_all_languages_levels_parameters()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_user_all_languages_levels_returns() {\n return new external_multiple_structure(\n new external_single_structure(\n array(\n 'language' => new external_value(PARAM_ALPHA, 'Language'),\n 'level' => new external_value(...
[ "0.7534605", "0.7166845", "0.6953862", "0.67812735", "0.6713208", "0.6689513", "0.66628003", "0.65997523", "0.6581133", "0.6555918", "0.65530324", "0.65250266", "0.6524607", "0.6484553", "0.6466704", "0.64643747", "0.6445601", "0.6431269", "0.63857836", "0.6357953", "0.629089...
0.78501374
0
Returns description of get_user_all_languages_levels() result value.
Возвращает описание значения результата вызова get_user_all_languages_levels().
public static function get_user_all_languages_levels_returns() { return new external_multiple_structure( new external_single_structure( array( 'language' => new external_value(PARAM_ALPHA, 'Language'), 'level' => new external_value(PARAM_INT,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserLanguages() {\n global $dbAccess;\n $this->db = $dbAccess;\n $data = $this->db->SimpleQuery(\"SELECT * FROM \" . TBL_LANGUAGES_USER . \" WHERE status='1' ORDER BY language_name\");\n\n return $data;\n }", "public static function get_user_all_languages_levels($userna...
[ "0.72281986", "0.7107991", "0.68741363", "0.68165725", "0.6789322", "0.67676824", "0.67631567", "0.67253685", "0.6722974", "0.66604143", "0.6652124", "0.66026574", "0.65784454", "0.6568302", "0.6561302", "0.65497977", "0.65470594", "0.65278465", "0.6517114", "0.6517114", "0.6...
0.8186004
0
GET|HEAD: /members/index ROUTE: members.index
GET|HEAD: /members/index ROUTE: members.index
public function testIndexMethod() { $this->authentication(); $this->get(route('members.index')); $this->seeStatusCode(200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n if (($this->target->type == 'NET') && isset($this->network) && $this->network->open && !(isset($this->network->nm_active) && $this->network->nm_active)) {\n $network_members = new network_models_members();\n \n $network_members->insert(...
[ "0.716084", "0.71526915", "0.71434444", "0.70702994", "0.7068987", "0.70399046", "0.7009042", "0.70044446", "0.70014316", "0.69916993", "0.6973009", "0.6971152", "0.6958641", "0.6957417", "0.68811935", "0.6857837", "0.68171364", "0.67409116", "0.67360824", "0.6730909", "0.672...
0.74555457
0
Creates a form to delete a Person entity.
Создает форму для удаления сущности Person.
private function createDeleteForm(Person $person) { return $this->createFormBuilder() ->setAction($this->generateUrl('users_delete', array('id' => $person->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm(Person $person)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_person_delete', ['id' => $person->getId()]))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private function createDeleteForm(Ph...
[ "0.8396936", "0.81607133", "0.7957223", "0.7613033", "0.72216475", "0.69321215", "0.6866702", "0.6862775", "0.6764928", "0.67501", "0.674118", "0.6702454", "0.6648928", "0.66307735", "0.6619381", "0.6598379", "0.6558858", "0.6541585", "0.65224594", "0.6518999", "0.6515676", ...
0.8432097
0
pass an array of CN (like children / directreporters) and return an array with the blacklistedDistinguishedname filtered out
передать массив CN (например, children / directreporters) и вернуть массив с blacklistedDistinguishedname, отфильтрованный
function nonBlacklistedDistunguishednameArray($array,$refused=""){ $cleanArray = array(); foreach ($array as $dn) { if(blacklistedDistinguishedname($dn,$refused)==FALSE){ array_push($cleanArray,$dn); } } return $cleanArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function blacklistedDistinguishedname($distName, $refused=\"\"){\n $blacklisted = FALSE;\n foreach ($refused as $refusedOU) {\n $pattern = '/'.preg_quote($refusedOU, '/') . '/';\n if (preg_match($pattern, $distName)){\n $blacklisted = TRUE;\n }\n }\n return $blacklisted;\n}", "function detecter...
[ "0.6724497", "0.5511027", "0.5460397", "0.543537", "0.53101474", "0.52548397", "0.5239038", "0.52336353", "0.5179727", "0.51358676", "0.50831056", "0.5035752", "0.5032977", "0.5025174", "0.502482", "0.5019396", "0.5014067", "0.49940968", "0.49789864", "0.49305332", "0.4920224...
0.76512814
0
Sets a success message to the provided cell
Устанавливает сообщение о успехе в указанную ячейку
private function setSuccessValue(Cell $cell) { $value = $this->translator->translate(self::TRANSLATION_SUCCESS); $this->setValue($cell, $value, self::STYLE_SUCCESS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setSuccessfulEditMessage()\n\t{\n\t\t$message = str_replace( array(\"%succeed%\", \"%total%\"), array( \"<strong>\".$this->nUpdated.\"</strong>\", \"<strong>\".$this->nSelected.\"</strong>\" ), \"%succeed% out of %total% records updated successfully.\");\n\t\t$this->setMessage( $message );\n\t\t...
[ "0.6812327", "0.6039625", "0.5927536", "0.59151685", "0.5852841", "0.5826138", "0.57624984", "0.57513815", "0.5718789", "0.5718789", "0.5676482", "0.5633155", "0.56227696", "0.56114656", "0.5605029", "0.5544723", "0.55215126", "0.5504508", "0.544197", "0.5427634", "0.5406656"...
0.8287242
0
Sets a failure message to the provided cell
Устанавливает сообщение об ошибке в указанную ячейку
private function setFailureValue(Cell $cell, Exception $e) { $value = $this->translator->translate(self::TRANSLATION_FAILURE, array('message' => $e->getMessage())); $this->setValue($cell, $value, self::STYLE_FAILURE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFailMsg($msg) { $this->_failMsg = $msg; }", "public function setFailedMessage($val)\n {\n $this->_propDict[\"failedMessage\"] = $val;\n return $this;\n }", "private function setSuccessValue(Cell $cell) {\n\t\t$value = $this->translator->translate(self::TRANSLATION_SUCCESS);\n\n\...
[ "0.6578131", "0.63220066", "0.6250098", "0.6176366", "0.58816266", "0.58729404", "0.58729404", "0.5847136", "0.5788916", "0.5664011", "0.5661317", "0.55898345", "0.55483234", "0.5526021", "0.5511558", "0.5511382", "0.5494055", "0.5447471", "0.5414736", "0.5401015", "0.5383893...
0.78865457
0
Normalize the given header name into studlycase.
Приведите заданные имя заголовка к формату studlycase.
protected static function normalizeHeaderName($name) { return str_replace(' ', '-', ucwords(str_replace('-', ' ', $name))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function normalizeHeader(string $name)\n {\n $name = strtolower($name);\n $name = str_replace('-', ' ', $name);\n $name = ucwords($name);\n $name = str_replace(' ', '-', $name);\n return $name;\n }", "protected function normalizeHeaderName($name)\n {\n ...
[ "0.8116494", "0.8061299", "0.8043248", "0.8032363", "0.79346293", "0.7833325", "0.77422374", "0.71547085", "0.6973851", "0.6721405", "0.6697941", "0.668679", "0.6627294", "0.65886813", "0.6517864", "0.65147316", "0.6483626", "0.6477442", "0.6439341", "0.64380807", "0.6423494"...
0.80652386
1
Returns the time in 24hour:minute:second format
Возвращает время в формате 24часа:минута:секунда
public function getTime() : string { return $this->format('H:i:s'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function formatTime()\n { \n return sprintf('%02d:%02d:%02d', ($this->totaltime / 3600), \n ($this->totaltime / 60 % 60), $this->totaltime % 60); \n }", "public function timeSend()\n {\n if ($this->time) {\n return $this->time->format('H:i:s');\n }\n ...
[ "0.7538276", "0.73649186", "0.7350971", "0.7299122", "0.70866925", "0.70404345", "0.6908326", "0.685316", "0.68315816", "0.68072426", "0.6804107", "0.6803267", "0.6678552", "0.6649586", "0.6643241", "0.6614714", "0.6574527", "0.6574255", "0.65631866", "0.6561283", "0.65602577...
0.7553006
0
Get override configuration for a given model/module id
Получить настройки переопределения для заданного идентификатора модели/модуля
protected function getOverrideConfigForModel($moduleId) { return config('pxlcms.generator.override.models.' . (int) $moduleId, []); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModuleConfiguration();", "public function getConfig()\n {\n return Mage::getModel(\"postident/config\");\n }", "public function loadModules()\n {\n parent::loadModules();\n $this->extend($this->_configOverrideModel->getBaseOverride());\n return $this;\n ...
[ "0.58185905", "0.58031183", "0.575874", "0.56258315", "0.55595636", "0.5516978", "0.55011415", "0.5501134", "0.54936945", "0.546012", "0.5411199", "0.54031146", "0.53934723", "0.53713715", "0.53359276", "0.53245646", "0.5313021", "0.5291769", "0.52816385", "0.5229819", "0.522...
0.7251997
0
Creates a new Pelanggaran model. If creation is successful, the browser will be redirected to the 'view' page.
Создает новый объект Pelanggaran. Если создание успешно, браузер будет перенаправлен на страницу просмотра.
public function actionCreate() { $model = new Pelanggaran(); $trans = Yii::$app->db->beginTransaction(); if ($model->loadAll(Yii::$app->request->post()) && $model->save()) { $check = $this->checkDetailPoint($model, 'create'); if( isset($check['fa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new Persyaratan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_persyaratan]);\n }\n\n return $this->render('create', [\n 'model' => $mode...
[ "0.79290575", "0.77352524", "0.7491265", "0.74160904", "0.7376533", "0.73501325", "0.7324134", "0.73045343", "0.7271832", "0.72490704", "0.7244973", "0.72402555", "0.72063", "0.71914726", "0.7191115", "0.7155312", "0.71354747", "0.71250504", "0.7109505", "0.7097276", "0.70936...
0.7781796
1
checking and update detail point siswa
проверка и обновление деталей точки siswa
protected function checkDetailPoint($model, $on = 'create', $point_update = 0, $old_id_siswa = null){ $query = DetailPoint::findOne($model->id_siswa); $point_model = $model->aturan->point_aturan; $ret = []; // return value $new_data = 0;// its new data if($query != null)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function changePoint() {\r\n if ( !$this->session->userdata('isAdminTps') ) {\r\n redirect('public/home','refresh');\r\n }\r\n\r\n if ( empty($_POST) ) {\r\n redirect('admin/data/group','refresh');\r\n } else {\r\n\r\n if ($_POST['n_point'] == '0'...
[ "0.64378667", "0.63458246", "0.6283941", "0.61568403", "0.6150103", "0.61112833", "0.6048015", "0.60459286", "0.59993416", "0.5982519", "0.59792334", "0.5971067", "0.596181", "0.5932191", "0.58830196", "0.58678764", "0.58555514", "0.5850056", "0.5841343", "0.5841297", "0.5838...
0.71533185
0