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
Closes feed item tag
Закрывает тег элемента кормления
private function end_item() { if($this->version == RSS2 || $this->version == RSS1) { echo '</item>'.PHP_EOL; } else if($this->version == ATOM) { echo "</entry>".PHP_EOL; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listitem_close() {\n }", "private function endItem(){\n\t\tif($this->version == Feed::RSS2 || $this->version == Feed::RSS1){\n\t\t\treturn '</item>' . PHP_EOL;\n\t\t}\n\t\telse if($this->version == Feed::ATOM){\n\t\t\treturn '</entry>' . PHP_EOL;\n\t\t}\n\n\t\treturn \"\";\n\t}", "function close_it...
[ "0.7031428", "0.66839635", "0.6603549", "0.65245265", "0.64130545", "0.64130545", "0.6351695", "0.6299909", "0.6220593", "0.6218716", "0.6142987", "0.6138202", "0.6135287", "0.6103487", "0.6090282", "0.60770726", "0.6074853", "0.6072505", "0.6063566", "0.605778", "0.60517573"...
0.70134777
1
Get data Get TrackingResults property from response object.
Получите данные Получите свойство TrackingResults из объекта ответа.
public function getData() { return $this->response->TrackingResults; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_tracking_data()\n {\n }", "public function getTracking() {\n return $this->doRequest();\n }", "private function getData()\n {\n return $this->getResponse()['data'];\n }", "public function getData()\n {\n return json_decode($this->getResponse...
[ "0.63216627", "0.62160987", "0.6214391", "0.61730015", "0.6133314", "0.6131906", "0.6065285", "0.6030124", "0.601176", "0.59510475", "0.59292316", "0.5903998", "0.5851019", "0.5840517", "0.5836253", "0.58302313", "0.58268946", "0.58135223", "0.5807623", "0.5799763", "0.577721...
0.83290493
0
Setup for the Resource CRUD panel. Everything here is applied on ALL operations.
Настройка для панели CRUD ресурса. Все здесь применяется ко всем операциям.
public function setup() { $this->crud->setModel('App\Models\Resource'); $this->crud->setRoute('admin/resource'); $this->crud->setEntityNameStrings('resource', 'resources'); $this->crud->operation(['create', 'update'], function () { $this->crud->addField([ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setup() {\n\t\t/*\n\t\t|--------------------------------------------------------------------------\n\t\t| BASIC CRUD INFORMATION\n\t\t|--------------------------------------------------------------------------\n\t\t*/\n $this->crud->setModel(\"App\\Models\\Slider\");\n $this->crud->se...
[ "0.7699851", "0.7619802", "0.75166225", "0.7369584", "0.72834873", "0.7275174", "0.7253878", "0.7250664", "0.7243038", "0.7230418", "0.7180089", "0.7167174", "0.7069318", "0.7064151", "0.70587", "0.70500195", "0.7036755", "0.7034169", "0.7030049", "0.70151794", "0.70067585", ...
0.8245955
0
Initialization Function Initializes Default_Form_User_Enable instance.
Функция инициализации инициализирует экземпляр Default_Form_User_Enable по умолчанию.
public function init() { parent::init(); /** * form */ $this ->setMethod(Zend_Form::METHOD_POST) ->setAttrib('id', 'formUserEnable') ; /** * * * login * * */ /** * email */ $formEmail = new L8M_Form_Element_Email('email'); $formEmail ->setLabel('Email') ->se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init() {\n\t\t\t\t\t$this->init_form_fields();\n\t\t\t\t}", "public function init()\n {\n if (!Yii::$app->user->isGuest && Yii::$app->user->identity->isAdmin) {\n $this->defaultAllow = true;\n }\n //skip init() to call it in attach()\n }", "public function ...
[ "0.66502035", "0.6598924", "0.6596902", "0.6591688", "0.6550468", "0.65269196", "0.6461088", "0.64388084", "0.64270175", "0.6425113", "0.64162225", "0.64052624", "0.6404609", "0.6399448", "0.638065", "0.6373995", "0.6370642", "0.63122874", "0.6295104", "0.6293855", "0.6293855...
0.7257797
0
Ensure that the cache is cleared when setting a different EntityManager.
Убедитесь, что кэш очищается при установке другого EntityManager.
public function testSetEntityManager_different() { $config = new Config(); $cache = $this->createCacheMock(); $config->setCache($cache); $cache->expects($this->once()) ->method('clear') ; $em1 = $this->createEntityManagerMock(); $em2 = $this->createEntityManagerMock(); // 1st call to `setEntityMan...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetEntityManager_newOrSame() {\n\t\t$config = new Config();\n\t\t$cache = $this->createCacheMock();\n\t\t$config->setCache($cache);\n\n\t\t$cache->expects($this->never())\n\t\t\t->method('clear')\n\t\t;\n\n\t\t$em = $this->createEntityManagerMock();\n\n\t\t// 1st call to `setEntityManager` usin...
[ "0.729828", "0.66212285", "0.654937", "0.6348667", "0.62606895", "0.62076056", "0.5853077", "0.58472717", "0.5795311", "0.57891244", "0.5758342", "0.5758342", "0.57534564", "0.56932676", "0.56891155", "0.5668692", "0.5615326", "0.56085074", "0.5592967", "0.5580824", "0.555973...
0.75612634
0
Delete one or more entities
Удалить одну или несколько сущностей
public function delete(EntityInterface ...$entities);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function entityDelete(){\n // update model\n $this->getModel()->delete();\n }", "public function deleteentityAction();", "public function delete(Entity $entity) {}", "public function delete(Entity $entity) {}", "public function delete($entity){\n $entity->delete();\n }"...
[ "0.7622343", "0.75613105", "0.7548685", "0.7548685", "0.74678636", "0.74181277", "0.73406744", "0.73192376", "0.7308495", "0.72636664", "0.72636664", "0.7176975", "0.7170591", "0.713774", "0.7103192", "0.7103192", "0.7084517", "0.69609594", "0.6946605", "0.6880879", "0.688054...
0.8018072
0
TRUE if a valid cached image is found. Valid:file exists & is newer than the parent file.
Истина, если найдено допустимое кэшированное изображение. Допустимо: файл существует и более новый, чем родительский файл.
private function imageInCache(){ if (file_exists($this->cachedFile) && ( filemtime($this->cachedFile)>filemtime($this->pathToImages.$this->fname)) && ( filectime($this->cachedFile)>filectime($this->pathToImages.$this->fname)) ) { return true; }else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkForCachedFile()\n {\n $filename = Str::after($this->file, '/');\n $pathRaw = Str::before($this->file, $filename);\n $height = $this->height ? $this->height.\"$this->cacheSeperate\" : \"\";\n $width = $this->width ? $this->width.\"$this->cacheSeperate\" : \"\";\...
[ "0.79088897", "0.75609505", "0.7458732", "0.74377286", "0.7372531", "0.7297714", "0.7209273", "0.71782583", "0.7091539", "0.709089", "0.70825255", "0.70025074", "0.6954323", "0.69471425", "0.6896295", "0.68825257", "0.6843642", "0.6802044", "0.67471766", "0.6741678", "0.67243...
0.8274538
0
Print image from cache and end script
Печать изображения из кэша и завершение скрипта
private function cachePrint(){ $img = $this->imageResource($this->cachedFile, $this->type); $this->imagePrint($img, $this->type); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function amty_repopulateImageCache(){\r\n\tamty_populateCache(1);\r\n}", "private static function _showImage() {\n\t\theader('Content-Type: image/jpeg');\n\t\timagejpeg(self::$_image);\n\t\timagedestroy(self::$_image);\n \n $_SESSION['captcha_code'] = self::$_code;\n\t}", "public function display...
[ "0.67751247", "0.6481817", "0.6385631", "0.6150561", "0.613298", "0.6093374", "0.6056953", "0.60431004", "0.6039316", "0.60357064", "0.60282016", "0.5976782", "0.5941432", "0.593112", "0.5905634", "0.58959717", "0.5894888", "0.5892406", "0.5877256", "0.5868544", "0.5825214", ...
0.8531136
0
Sorts the articles by height in reverse order. This is needed because the the first card on top of the heap would be the last in cardmonitor.
Сортирует статьи по высоте в обратном порядке. Это необходимо, потому что первая карточка на вершине стека будет последней в cardmonitor.
private function sortByHeightReverse(): void { foreach ($this->articles_by_position as $articles) { $this->reverseSortArticles($articles); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortByHeight($a) {\n for($i = 0; $i < count($a); $i++)\n {\n for($j = $i+1; $j < count($a); $j++)\n {\n if(($a[$i] > $a[$j])&&($a[$j] != (-1)))\n {\n $f = $a[$j];\n $a[$j] = $a[$i];\n $a[$i] = $f;\n }\n ...
[ "0.64000463", "0.58138865", "0.55542123", "0.5256468", "0.5193325", "0.51365554", "0.50896853", "0.50661844", "0.50511086", "0.50511086", "0.5049905", "0.502374", "0.500011", "0.49767372", "0.49752244", "0.49661517", "0.49350655", "0.49048546", "0.48803666", "0.48402587", "0....
0.78040123
0
Get the account hash.
Получите хэш аккаунта.
public function getAccountHash() { return $this->accountHash; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHash(): string\n {\n return $this->hash;\n }", "public function getHash()\n {\n return $this->hash;\n }", "public function getHash()\n {\n return $this->hash;\n }", "public function getHash()\n {\n return $this->hash;\n }", "public func...
[ "0.7667077", "0.75504833", "0.75504833", "0.75504833", "0.75504833", "0.75152165", "0.7492178", "0.7492165", "0.74882805", "0.7487141", "0.74681646", "0.7440892", "0.74260736", "0.74160194", "0.74160194", "0.7350903", "0.73289794", "0.73289794", "0.73289794", "0.7320644", "0....
0.8906796
0
Registers a filter against this spec. Optionally forwards the filter on to another spec.
Регистрирует фильтр для этого спецификации. Необязательно передает фильтр другому спецификации.
public function registerFilter($filter, BaseSpecification $forwardedSpec = null) { if (isset($forwardedSpec)) { if ($forwardedSpec->hasRegisteredFilter($filter)) { $spec = $forwardedSpec->getRegisteredFilter($filter); } else { throw new \Ex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addFilter(Filter $filter);", "public function register ($filter)\n {\n\n $this->chain[] = $filter;\n\n }", "public function addFilter($filter);", "private function addFilter() {\n\t\t$app = $this->app;\n\n\t\t$app->before(function($request) use ($app) {\n\t\t\t$app['json-routes.r...
[ "0.7218453", "0.7084627", "0.70415884", "0.6554721", "0.6429739", "0.6343357", "0.6335438", "0.6335438", "0.6264801", "0.61968803", "0.61512345", "0.6111848", "0.6080742", "0.6063998", "0.6050999", "0.60504776", "0.59784335", "0.594308", "0.59287727", "0.59218866", "0.5921042...
0.7168292
1
Register (and forward) all filters from the given spec, into this spec.
Зарегистрировать (и переслать) все фильтры из заданного спецификации в эту спецификацию.
public function registerFiltersFromSpec(BaseSpecification $forwardedSpec) { foreach ($forwardedSpec->getAllRegisteredFilters() as $filter => $spec) { $this->registerFilter($filter, $spec); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setupFilters()\n {\n $this->trigger(static::EVENT_BEFORE_FILTER);\n\n foreach ($this->filterHandlers as $handlerClass) {\n /** @var $handler QueryFilter **/\n Yii::createObject([\n 'class' => $handlerClass,\n 'streamQuery' => $...
[ "0.6378156", "0.62491006", "0.62420774", "0.5999069", "0.599876", "0.591978", "0.5816198", "0.57703054", "0.57694924", "0.57454497", "0.5695777", "0.56205964", "0.5614008", "0.5577651", "0.55521095", "0.5541409", "0.55402607", "0.5517537", "0.55161244", "0.55034673", "0.55003...
0.7808663
0
Tests getting the stream
Тестирование получения потока
public function testGettingStream() { $this->assertTrue(is_resource($this->response->getStream())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testStreamIsReadableViaStreamFunctions()\n {\n $content = file_get_contents($this->stream);\n $this->assertEquals(self::INITIAL_CONTENT, $content);\n }", "public function getStream() {}", "public function got(): Stream;", "public function getStream()\n {\n }", "pub...
[ "0.7880205", "0.75204235", "0.744358", "0.7310658", "0.7302227", "0.72823936", "0.72454065", "0.72454065", "0.72454065", "0.6972079", "0.67818636", "0.67227674", "0.6700841", "0.6679808", "0.6605024", "0.65919346", "0.6578187", "0.65249723", "0.6522931", "0.65173215", "0.6507...
0.8119075
0
Tests an invalid stream
Тестирует недопустимый поток
public function testInvalidStream() { $this->expectException(InvalidArgumentException::class); new StreamResponse('foo', $this->compiler); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testReadingDataThrowsExceptionOnNonReadableStream()\n {\n $streamMock = $this->getMockBuilder(Stream::class)\n ->setMethods(['isReadable'])\n ->getMock();\n\n $streamMock->expects($this->once())\n ->method('isReadable')\n ->will($this->re...
[ "0.71050614", "0.70246804", "0.69926167", "0.6842673", "0.6683725", "0.6654048", "0.65959704", "0.6593951", "0.6534416", "0.6485438", "0.6469673", "0.64609796", "0.64603037", "0.64534265", "0.63639104", "0.63254625", "0.63009304", "0.6297513", "0.6295358", "0.62773997", "0.62...
0.7873087
0
Test writing an array message to a line
Тестирование записи массива сообщений в строку
public function testWritelnOnArray() { $this->response->writeln(['foo', 'bar']); rewind($this->response->getStream()); $this->assertEquals('foo' . PHP_EOL . 'bar' . PHP_EOL, stream_get_contents($this->response->getStream())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWriteArray()\n {\n $stub = $this->getMock('\\cliptools\\Writer', array('push'));\n\n $stub->expects($this->any())\n ->method('push')\n ->will($this->returnArgument(0));\n $expected = <<<TXT\nhola\n¿como estas?\nTXT;\n $this->assertEquals($exp...
[ "0.7202257", "0.6667524", "0.6464135", "0.6456172", "0.6447342", "0.63871735", "0.63298744", "0.6321049", "0.61363596", "0.6133038", "0.6110868", "0.6025217", "0.60080934", "0.5913964", "0.5905705", "0.58904636", "0.58342177", "0.5821804", "0.58003557", "0.579471", "0.5784785...
0.7283922
0
Sets up the $order_id_meta array. For AstroPay, we use the ct_id.sequence format because we don't get a gateway transaction ID until the user has actually paid. If the user doesn't return to the result switcher, we will need to use the order_id to find a pending queue message with donor details to flesh out the audit e...
Настройка массива $order_id_meta. Для AstroPay мы используем формат ct_id.sequence, так как мы не получаем идентификатор транзакции шлюза до того момента, пока пользователь не оплатит. Если пользователь не вернётся в результирующий переключатель, нам потребуется использовать order_id, чтобы найти ожидающее сообщение в ...
public function defineOrderIDMeta() { $this->order_id_meta = [ 'alt_locations' => [ 'request' => 'x_invoice' ], 'generate' => true, 'ct_id' => true, 'length' => 20, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function defineOrderIDMeta() {\n\t\t$this->order_id_meta = [\n\t\t\t'alt_locations' => [ 'request' => 'order_id' ],\n\t\t\t'generate' => true, // freaking FINALLY.\n\t\t\t'disallow_decimals' => true, // hacky hack hack...\n\t\t];\n\t}", "function setOrderID( $order )\r\n {\r\n $this->OrderID = $o...
[ "0.7639278", "0.6449252", "0.6345254", "0.6233449", "0.6205025", "0.6107846", "0.5926706", "0.59238774", "0.58957833", "0.5831471", "0.58313274", "0.58313274", "0.58310753", "0.58310753", "0.5824368", "0.58149874", "0.5804945", "0.57960486", "0.57769686", "0.5766516", "0.5756...
0.7606259
1
Check whether a status message has a valid signature.
Проверьте, имеет ли сообщение статуса действительную подпись.
function verifyStatusSignature( $data ) { if ( $this->getCurrentTransaction() === 'ProcessReturn' ) { $login = $this->accountInfo['Create']['Login']; } else { $login = $this->accountInfo['Status']['Login']; } $message = $login . $data['result'] . $data['x_amount'] . $data['x_invoice']; $signat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function validateSignature()\n {\n $signature = Yii::$app->request->headers->get('Signature');\n\n return $signature === $this->token;\n }", "public function isSignValid() {\n $successExists = array_key_exists('SUCCESS', $this->message);\n\n if (!$successExists || ($successExist...
[ "0.735626", "0.72030324", "0.7092922", "0.7091959", "0.699525", "0.68937176", "0.68478394", "0.6824642", "0.68092436", "0.6786417", "0.673106", "0.67221546", "0.6708989", "0.66934454", "0.6678173", "0.6673445", "0.6668584", "0.6668285", "0.6668285", "0.6668285", "0.6668285", ...
0.7265068
1
Required. Label value presented as value corresponding to the above key, in xDS Node Metadata. Generated from protobuf field string label_value = 2 [(.google.api.field_behavior) = REQUIRED];
Обязательно. Значение метки, представленное как значение, соответствующее вышеперечисленному ключу, в xDS Node Metadata. Генерируется из поля protobuf string label_value = 2 [(.google.api.field_behavior) = REQUIRED];
public function setLabelValue($var) { GPBUtil::checkString($var, True); $this->label_value = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLabel($value)\n {\n $this->_fields['Label']['FieldValue'] = $value;\n return $this;\n }", "public function getLabelValue()\n {\n return $this->label_value;\n }", "public static function getLabel($value, $labelAttr = 'label', $defaultValue = null)\n {\n ...
[ "0.63300306", "0.6149145", "0.61103636", "0.6107684", "0.61051863", "0.6025625", "0.6025625", "0.6025625", "0.6025625", "0.6002228", "0.59555024", "0.59096843", "0.59058607", "0.5844655", "0.5838207", "0.5815349", "0.58031553", "0.58031553", "0.58031553", "0.58031553", "0.580...
0.719396
0
Returns the correct widget title url
Возвращает правильный URL заголовка виджета
public static function widgetTitleURL(\Elgg\Hook $hook) { $widget = $hook->getEntityParam(); if (!$widget instanceof \ElggWidget) { return; } switch ($widget->handler) { case 'thewire': return elgg_generate_url('collection:object:thewire:owner', [ 'username' => $widget->getOwnerEntity()->use...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUrl()\n {\n return $this->widgetUrl->getUrl();\n }", "protected function getWidgetUri() {}", "protected function getWidgetUri() {}", "function getWidgetTitle() {\n if (!isset($this->widgetTitle)) {\n if ($_SESSION['glpi_use_mode'] == Session::DEBUG_MODE) {\n ...
[ "0.7017292", "0.6952981", "0.69511944", "0.6791303", "0.6659236", "0.662238", "0.66134906", "0.65982896", "0.6562309", "0.65479314", "0.64750725", "0.6430898", "0.6383843", "0.6364827", "0.6364313", "0.6344676", "0.63359576", "0.62938315", "0.62924415", "0.626876", "0.6259052...
0.71521366
0
Creates a random 43character string from a limited character set
Создает случайную строку из 43 символов из ограниченного набора символов
protected static function createRandomString() : string { $charset = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.'; $max = strlen($charset) - 1; $random = ''; for ($i = 0; $i < 43; $i++) { $random .= substr($charset, rand(0, $max), 1); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateRandomString()\n {\n $characters = 'ABCDEFGHJKMNPQRSTUVWXYZ23456789';\n $stringLength = '4';\n $upperLimit = strlen($characters) - 1;\n $string = '';\n\n for ($i = 0; $i < $stringLength; $i++) {\n $string .= $characters[mt_rand(0, $upperLimi...
[ "0.7599907", "0.75484306", "0.75348294", "0.752589", "0.75073487", "0.74950176", "0.7487512", "0.7457722", "0.74458396", "0.7430402", "0.74125683", "0.73680043", "0.73610276", "0.73581", "0.7348978", "0.73404396", "0.7337893", "0.7311415", "0.7309983", "0.72696894", "0.725165...
0.8067194
0
Gets alarm state JSON object via the SimipliSafe API
Получает JSON-объект состояния сигнализации через API SimipliSafe
public function getAlarmState() { $version = $this->subscription->location->system->version; switch ($version) { case 3: $url = self::API_BASE_URL . '/ss3/subscriptions/' . $this->subscription->sid . '/state'; break; default: th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAlarm()\n {\n return $this->get(self::ALARM);\n }", "public function apiGetState()\n\t{\n\t\treturn $this->sendApiRequest('state/', 'GET');\n\t}", "public function get_state() {\n\n //Connection establishment, processing of data and response from REST API\n $path =...
[ "0.651589", "0.63923216", "0.604344", "0.59997445", "0.5937458", "0.5643335", "0.56414765", "0.56225204", "0.5600447", "0.5550937", "0.54338956", "0.53586745", "0.5338245", "0.52964526", "0.52964526", "0.52964526", "0.52964526", "0.52964526", "0.52964526", "0.52964526", "0.52...
0.77421933
0
Gets the Alexa integration tokens JSON object via the SimpliSafe API
Получает JSON-объект токенов интеграции Alexa через API SimpliSafe
public function getAlexaIntegrationTokens() { return $this->get(self::API_BASE_URL . '/integration/alexa/' . $this->subscription->sid . '/tokens'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTokenAcces()\n {\n $response = Http::withBasicAuth(env('CLIENT_ID'), env('CLIENT_SECRET'))\n ->asForm()\n ->post('https://accounts.spotify.com/api/token', [\n 'grant_type' => 'client_credentials'\n ]);\n\n $element = json_decode($response, true);\...
[ "0.66283447", "0.63564545", "0.6323539", "0.61307406", "0.6100656", "0.6077085", "0.60329926", "0.59681493", "0.59418386", "0.5934087", "0.59174293", "0.5909983", "0.5908267", "0.59047765", "0.5904074", "0.5852349", "0.58312815", "0.58308846", "0.58125323", "0.57662505", "0.5...
0.7420319
0
Gets the August integration info JSON object via the SimpliSafe API
Получает JSON-объект с информацией об интеграции August через API SimpliSafe
public function getAugustIntegrationInfo() { return $this->get(self::API_BASE_URL . '/integration/alexa/' . $this->subscription->sid . '/info'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function info() {\n $workdays = ConfigOptions::getValue('time_workdays');\n\n $this->response->respondWithData(array(\n 'api_version' => AngieApplication::getApiVersion(),\n 'system_version' => AngieApplication::getVersion(),\n 'logged_user' => $this->logged_user,\n 'read_only...
[ "0.64292115", "0.6251145", "0.58714485", "0.58202285", "0.57713157", "0.57648957", "0.57565767", "0.5753049", "0.5744037", "0.573887", "0.5699625", "0.5697931", "0.5689977", "0.5689977", "0.5689977", "0.5689977", "0.5689977", "0.56135315", "0.560893", "0.5589492", "0.5580176"...
0.74272954
0
Gets the email preferences JSON object via the SimpliSafe API
Получает JSON-объект с предпочтениями по электронной почте через API SimpliSafe
public function getEmailPreferences() { return $this->get(self::API_BASE_URL . '/users/' . $this->subscription->uid . '/emailPreferences'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserEmailNotificationSettings()\n {\n $json = array();\n $user_meta = new UserMeta();\n $notifications = $user_meta::select('weekly_alerts', 'message_alerts')\n ->where('user_id', Auth::user()->id)->get()->first();\n if (!empty($notifications)) {\n ...
[ "0.6223864", "0.6099578", "0.60319245", "0.59412277", "0.5935029", "0.5927823", "0.58899176", "0.5777593", "0.5758485", "0.57548285", "0.57373464", "0.5709802", "0.57078767", "0.56759983", "0.5666309", "0.5645144", "0.5642611", "0.5609767", "0.55965406", "0.5574631", "0.55721...
0.77369463
0
Gets the Google integration tokens JSON object via the SimpliSafe API
Получает JSON-объект с токенами интеграции Google через API SimpliSafe
public function getGoogleIntegrationTokens() { return $this->get(self::API_BASE_URL . '/integration/google/' . $this->subscription->sid . '/tokens'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function loginFromJs(){\n\n\t self::getLogger()->debug(\"loginFromJs\");\n\n\t\t$login_successful = false;\n\t\t$client = GoModel::getGoClient();\n\n\t\t// Chiarimento:\n\t\t// $expired = $client->isAccessTokenExpired();\n\t\t// Nota che qui $expired vale sempre TRUE, mentre $has_expired qui è sem...
[ "0.6177027", "0.6120276", "0.6106964", "0.60922474", "0.5924408", "0.59167606", "0.5916093", "0.5914927", "0.5894029", "0.5878641", "0.585352", "0.5839085", "0.58197564", "0.58079225", "0.58020276", "0.5782759", "0.5778534", "0.5776506", "0.57748294", "0.5764432", "0.5722584"...
0.7518853
0
Gets the mobile devices JSON object via the SimpliSafe API
Получает JSON-объект мобильных устройств через API SimpliSafe
public function getMobileDevices() { return $this->get(self::API_BASE_URL . '/users/' . $this->subscription->uid . '/mobileDevices'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function settings_registeredmobiledevices_get()\n\t{\n\t\treturn $this->_request('/my/settings/registeredmobiledevices/','get');\n\t}", "public function getMobileDevice()\n\t{\n\t\tif($this->__checkCredentials())\n\t\t{\n\t\t\treturn simplexml_load_string(@$this->sClient->getMobileDevice($this->__getParam...
[ "0.68894535", "0.66348845", "0.62413245", "0.6232779", "0.6229359", "0.62284154", "0.619787", "0.6187811", "0.61573863", "0.6152746", "0.6083711", "0.6001139", "0.5948167", "0.59032893", "0.58897966", "0.58575916", "0.58385473", "0.582794", "0.581972", "0.5816259", "0.5816259...
0.73975
0
Gets the Nest integration info JSON object via the SimpliSafe API
Получает JSON-объект с информацией о интеграции Nest через API SimpliSafe
public function getNestIntegration() { return $this->get(self::API_BASE_URL . '/integration/nest/' . $this->subscription->sid . '/info'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInfo()\n {\n $result = $this->client->GetInfo();\n if ($this->errorHandling($result, 'Could not get info from FRITZ!Box')) {\n return;\n }\n\n return $result;\n }", "function showInfo() {\n try {\n $response = ClientCreator::getInstance(...
[ "0.6309269", "0.623388", "0.6203913", "0.6171176", "0.6053829", "0.6044981", "0.60252064", "0.6024052", "0.59928375", "0.59639144", "0.59610355", "0.59610355", "0.59610355", "0.59610355", "0.59610355", "0.5958916", "0.58738714", "0.5863317", "0.58457255", "0.5819801", "0.5793...
0.7151565
0
Get the value of Quiz Question
Получить значение Вопроса теста
public function getQuizQuestion() { return $this->quiz_question; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getQuestion();", "public function getAnswerValue()\n {\n return $this->qaEntity->getAnswer($this->applicationStepEntity);\n }", "public function getQnaQuestion() {\n\t\treturn ($this->qnaQuestion);\n\t}", "public function getQuestion()\n {\n return $this->question;\n ...
[ "0.74563074", "0.72163546", "0.71030223", "0.70638186", "0.70638186", "0.70638186", "0.70638186", "0.70638186", "0.7046187", "0.6951813", "0.68319124", "0.67483604", "0.6742627", "0.67314893", "0.67040884", "0.6648707", "0.6648707", "0.65990365", "0.6538105", "0.65349525", "0...
0.7512383
0
All Monitoring tests suite
Все наборы тестов Monitoring
public static function suite() { $suite = new CakeTestSuite('All Monitoring Tests'); $basePath = App::pluginPath('Monitoring') . 'Test' . DS . 'Case' . DS; $suite->addTestDirectoryRecursive($basePath); return $suite; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testHarvestAll()\n {\n\n }", "public function all() {\n\t\t// systems online\n\t\t$this->_init();\n\n\t\t$allTests = array('fdaModelTests');\n\n\t\t// run through each test\n\t\tforeach ($allTests as $test) {\n\t\t\t$this->$test($this->unit);\n\t\t}\n\n\t\t// cleanup\n\t\t$this->_destroy();...
[ "0.68357676", "0.66479695", "0.64943296", "0.6489943", "0.64878356", "0.64445573", "0.64084035", "0.6382715", "0.637251", "0.63390285", "0.6336949", "0.6334297", "0.6334162", "0.63238484", "0.63034475", "0.63006496", "0.6272252", "0.62691694", "0.62620765", "0.62561584", "0.6...
0.7247798
0
/ GetPublicTests() Retrieve all public tests from the databases Format them into an array Return array
GetPublicTests() Получает все публичные тесты из баз данных. Форматирует их в массив. Возвращает массив.
public function GetPublicTests(){ $query = $this->db->get_where('test',array('status'=>0)); $retarray = array(); if ($query->num_rows() == 0) { return $retarray; } else { $res = $query->result_array(); foreach ($res as $key => $testr) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTests()\n {\n $query = $this->db->get('test');\n if ($query->num_rows() == 0) {\n return false;\n } else {\n return $query->result_array();\n }\n }", "public function getTests();", "function get_tests(){\n\tglobal $db;\n\t$query = \"SEL...
[ "0.735394", "0.7203021", "0.6982176", "0.68868244", "0.68137777", "0.6671275", "0.66217077", "0.65187705", "0.6450273", "0.64257854", "0.6388871", "0.6310661", "0.6283082", "0.62810427", "0.61936545", "0.6193088", "0.6183416", "0.61821336", "0.6180815", "0.6166151", "0.614232...
0.7945908
0
/ LoadTestHistory(Unique test ID) Reteive the test based on the uniqueID Look up the test results Store scores and dates in array Return array
/ LoadTestHistory(Уникальный идентификатор теста) Получить тест на основе уникального идентификатора Найти результаты теста Сохранить оценки и даты в массиве Вернуть массив
public function LoadTestHistory($uniq){ $query = $this->db->get_where('test',array('uniqid'=>$uniq)); if ($query->num_rows() == 0) { return false; } else { $noQ = $query->result_array()[0]['noQ']; } $this->db->order_by("datetime", "asc"); $query = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function LoadTestAdmin($uniqID){\n $query = $this->db->get_where('test',array('uniqid'=>$uniqID));\n if ($query->num_rows() == 0) {\n return array('tarray'=>array(),'total'=>0,'ascore'=>0,'noQ'=>0,'highlow'=>array(0,0));\n } else {\n $tID = $query->result_array()[0...
[ "0.6110599", "0.56235677", "0.551607", "0.54974115", "0.54607123", "0.5422798", "0.5381852", "0.53798056", "0.5375143", "0.5340371", "0.5320652", "0.53196365", "0.5314767", "0.52609116", "0.52446234", "0.52159417", "0.5213198", "0.5153333", "0.5133983", "0.5116699", "0.511059...
0.7705905
0
/ LoadQuestionBreakdown(Unique test ID) Gets the testID and number of questions Get the questions and create array of correct answers Get the test results for that test Loop through the results of the query then the results of the test ; O(n^2) Store all question results into 2D array For each result calculate new aver...
/ Загрузка разбивки вопросов (уникальный идентификатор теста) Получает идентификатор теста и количество вопросов Получает вопросы и создает массив правильных ответов Получает результаты теста для этого теста Цикл через результаты запроса, затем через результаты теста; O(n^2) Сохраняет все результаты вопросов в двумерны...
public function LoadQuestionBreakdown($uniq){ $query = $this->db->get_where('test',array('uniqid'=>$uniq)); if ($query->num_rows() == 0) { return array(array(),array()); } else { $noQ = $query->result_array()[0]['noQ']; $tID = $query->result_array()[0]['tid'];...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function retrieveQuestions() {\n\n //set number of desired rounds\n $totalRounds = 10;\n\n // Generate random questions\n // Loop for required number of questions\n // Add question and answer to questions array\n for ($count=0; $count < $totalRounds; $count++) {\n\n // Get random numbers to add\n // al...
[ "0.62212396", "0.620994", "0.617029", "0.6100417", "0.6098415", "0.601429", "0.596482", "0.59097433", "0.5866975", "0.58523107", "0.57605416", "0.57421154", "0.5738349", "0.5705648", "0.56997424", "0.56980824", "0.5667569", "0.5638815", "0.56296045", "0.55977786", "0.55892116...
0.76814187
0
/ LoadTestAdmin(Unique Test ID) Retrieve TestID and Number of Questions Loop through results from database of the tests results O(n) Format each result and calculate average score, max score and low score Once done return array of results
/ LoadTestAdmin(Уникальный идентификатор теста) Получить TestID и количество вопросов Проходить по результатам из базы данных тестов O(n) Форматировать каждый результат и вычислить средний балл, максимальный балл и минимальный балл После завершения вернуть массив результатов
public function LoadTestAdmin($uniqID){ $query = $this->db->get_where('test',array('uniqid'=>$uniqID)); if ($query->num_rows() == 0) { return array('tarray'=>array(),'total'=>0,'ascore'=>0,'noQ'=>0,'highlow'=>array(0,0)); } else { $tID = $query->result_array()[0]['tid']; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function LoadQuestionBreakdown($uniq){\n $query = $this->db->get_where('test',array('uniqid'=>$uniq));\n if ($query->num_rows() == 0) {\n return array(array(),array());\n } else {\n $noQ = $query->result_array()[0]['noQ'];\n $tID = $query->result_array()...
[ "0.7037785", "0.6519666", "0.63641644", "0.6182159", "0.6150813", "0.60790867", "0.6047014", "0.6023701", "0.6023602", "0.59881616", "0.5959527", "0.59592444", "0.5944653", "0.59309995", "0.59036857", "0.58946264", "0.5872926", "0.5862601", "0.58438456", "0.5834806", "0.58333...
0.75444806
0
/ GetNameFromID(Test ID) Lookup in database and return the users username and uniqueID
GetNameFromID(Test ID) Поиск в базе данных и возврат имени пользователя и уникального ID пользователя
private function GetNameFromID($ID){ $query = $this->db->get_where('users',array('uid'=>$ID)); if ($query->num_rows() == 0) { return false; } else { $user = $query->result_array()[0]['username']; $uniqid = $query->result_array()[0]['uniqid']; retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getName($id){\t\t\t\t\t//<-- oma lis�ys Returns the name of the user based on the ID given\r\n\t\t$query= \"SELECT `username` FROM `tbl_auth` WHERE `UID` =$id LIMIT 1;\";\r\n\t\t$result = $this->mdb2->query($query) or die('An unknown error occurred while checking the data');\r\n\t\tif(MDB2::isError($resu...
[ "0.710075", "0.7081065", "0.70757973", "0.703483", "0.70320886", "0.698959", "0.69874144", "0.69245416", "0.6915064", "0.69128615", "0.68470156", "0.68110895", "0.6797249", "0.67915565", "0.67843723", "0.6779111", "0.6766694", "0.66989267", "0.6682196", "0.6658937", "0.665882...
0.73993766
0
/ Check if a user has taken the test already First gets the userID from the username from the database Then check if the user has taken a test previously Returns true if the test is untaken
Проверить, взял ли пользователь тест ранее. Сначала получает userID из имени пользователя из базы данных. Затем проверяет, не брал ли пользователь тест ранее. Возвращает true, если тест не был взят.
public function checkTaken($tID,$user){ $query = $this->db->get_where('users',array('username'=>$user)); if ($query->num_rows() == 0) { return true; } else { $userid = $query->result_array()[0]['uid']; } $query1 = $this->db->get_where('testresults',array('...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function CheckDuplicate() {\n\t\t\n\t\t$pass = true;\n\t\tforeach( $this->users as $user => $data ) {\n\t\t\t\n\t\t\tif( $data['username'] == $this->username ) {\n\t\t\t\t\n\t\t\t\t$pass = false;\n\t\t\t}\n\t\t}\n\t\treturn $pass;\n\t}", "protected function user_exist(){\n \t$number_user = $this::count...
[ "0.6749942", "0.66788536", "0.6575248", "0.65704167", "0.65096855", "0.63946414", "0.6356416", "0.6348912", "0.6279084", "0.621188", "0.6193523", "0.61835474", "0.61786133", "0.6175205", "0.6156167", "0.6144307", "0.61418504", "0.61357254", "0.61236537", "0.60897076", "0.6062...
0.7744496
0
/ GetTestName (Test Unique ID) Return Test name based on uniqueID
/ GetTestName (Test Unique ID) Возвращает название теста на основе уникального ID
public function GetTestName($uniqid){ $query = $this->db->get_where('test',array('uniqid'=>$uniqid)); if ($query->num_rows() == 0) { return false; } else { return $query->result_array()[0]['Name']; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetIdentifier() {\r\n return $this->test_name_identifier;\r\n }", "public function testNameById(): void\n {\n $uid = 101;\n $res = SystemUserMysql::getInstance()->testNameById($uid);\n $res = $res !== false ? $res['name'] : '101';\n\n self::assertEquals('ceshi001...
[ "0.7328551", "0.72492987", "0.71881706", "0.68664825", "0.68059933", "0.66695726", "0.65433276", "0.63746226", "0.6144314", "0.6138013", "0.61374205", "0.6119535", "0.61101073", "0.6072876", "0.6061056", "0.60331774", "0.59695417", "0.59472084", "0.5936958", "0.5927342", "0.5...
0.7594566
0
/ GetTestStatus (Test Unique ID) Return Test status based on uniqueID
/ GetTestStatus (Test Unique ID) Возвращает статус теста на основе уникального ID
public function GetTestStatus($uniqid){ $query = $this->db->get_where('test',array('uniqid'=>$uniqid)); if ($query->num_rows() == 0) { return false; } else { return $query->result_array()[0]['status']; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTestStatus(){\n\t\treturn $this->testStatus;\n\t}", "private function schedToolStatus($unique_id){\n\t\t$data = SchedTool::select('status')->where('delivery_unique_id',$unique_id)->first();\n\t\tif($data == NULL){\n\t\t\treturn \"none\";\n\t\t}\n\t\treturn $data->status;\n\t}", "function get...
[ "0.72062075", "0.6869678", "0.64268696", "0.6388263", "0.63156426", "0.6143153", "0.6109595", "0.60742724", "0.60742724", "0.60740745", "0.60544235", "0.60167086", "0.59929985", "0.59852827", "0.5923105", "0.59009945", "0.59009945", "0.5883076", "0.585485", "0.58080465", "0.5...
0.78738636
0
/ getTestAnswers(test ID) Loop through test questions basec on ID and store in array return array;
/ getTestAnswers(test ID) Проходите по вопросам теста в зависимости от ID и сохраняйте в массив, возвращайте массив;
private function getTestAnswers($test){ $query = $this->db->get_where('testquestions',array('tID'=>$test)); if ($query->num_rows() == 0) { return false; } else { $ansarray = array(); $res = $query->result_array(); foreach ($res as $key => $testq) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTestQuestions($answered_test_id) {\n $test = $this->getTest($answered_test_id);//checa a autorização\n return $test->questions;\n }", "public function getAnswersPerQuestion($id)\n {\n $answers_array=array();\n $this->db->setQuery(\"SELECT * FROM answer WHERE q...
[ "0.7388381", "0.7061942", "0.69233555", "0.672554", "0.6713227", "0.65805405", "0.6513317", "0.6511643", "0.650688", "0.6481807", "0.644235", "0.64413315", "0.6423928", "0.6414907", "0.6411137", "0.63622946", "0.63524693", "0.633954", "0.63337266", "0.62841517", "0.62840605",...
0.78062403
0
CheckTestAuthor(Test uniqueID, Creator username) Check if record exists and return true if so false if not
Проверить автора теста (Test uniqueID, Creator username) Проверить, существует ли запись, и вернуть true, если существует, и false, если нет
public function CheckTestAuthor($test,$user){ $query = $this->db->get_where('test',array('uniqid'=>$test,'CreatorName'=>$user)); if($query->num_rows() >0 ){ return true;} return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkAuthor(Author $author) {\r\n //$selected = mysql_select_db(\"libsystem\",$dbhandle);\r\n $con = mysqli_connect($this->hostname, $this->username, $this->password, \"libsystem\");\r\n $sql = 'SELECT * FROM Author where AuthorName = ?;';\r\n\r\n $stmt = $con->prepare($...
[ "0.68443704", "0.66072816", "0.651306", "0.6386551", "0.6312647", "0.6299934", "0.6187679", "0.6157765", "0.61209035", "0.60972637", "0.6093516", "0.6080056", "0.6049092", "0.60333496", "0.6006968", "0.59768164", "0.5974609", "0.59705764", "0.59543544", "0.5880765", "0.587310...
0.8240334
0
/ ViewTest(Test uniqueID, User username) Get user ID based on username Get test ID based on uniqueID Get test results & score based on userID and testID Get test correct answers Loop through results and sotre in boolean array based on if they got answer correct Store results in array Encode result array using JSON and ...
/ Просмотр теста (Test uniqueID, User username) Получить идентификатор пользователя по имени Получить идентификатор теста по uniqueID Получить результаты теста и оценку по userID и testID Получить правильные ответы на тест Пройти по результатам и сохранить в массиве булевых значений в зависимости от того, правильно ли ...
public function ViewTest($test,$user){ $query = $this->db->get_where('users',array('username'=>$user)); if ($query->num_rows() == 0) { return false; } else { $userid = $query->result_array()[0]['uid']; } $query = $this->db->get_where('test',array('uniqid'=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GradeTest($test,$user,$ans){\n $query = $this->db->get_where('users',array('username'=>$user));\n if ($query->num_rows() == 0) {\n return false;\n } else {\n $userid = $query->result_array()[0]['uid'];\n }\n $query = $this->db->get_where(...
[ "0.69242287", "0.64749175", "0.6444487", "0.63484514", "0.6300789", "0.6289527", "0.6210263", "0.6193763", "0.6175746", "0.6169202", "0.61461073", "0.6112057", "0.6023021", "0.6005125", "0.6000056", "0.59620965", "0.5881944", "0.58726925", "0.5870695", "0.5866891", "0.5824538...
0.83281916
0
/ GradeTest(Test UniqueID, User username, Answer array) Retreive TestID, UserID and Correct Answers Loop through user answer and store in boolean array if correct or incorrect Calculate a score based on correct number of answers Store results in database Return results once JSON encoded
/ Проверка оценки (Test UniqueID, User username, Answer массив) Получить TestID, UserID и правильные ответы Перебрать ответы пользователя и сохранить в массиве булевых значений, указывающих на правильность или неправильность ответа Вычислить оценку на основе количества правильных ответов Сохранить результаты в базе дан...
public function GradeTest($test,$user,$ans){ $query = $this->db->get_where('users',array('username'=>$user)); if ($query->num_rows() == 0) { return false; } else { $userid = $query->result_array()[0]['uid']; } $query = $this->db->get_where('test',array...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function calculateScore($testId, $answers, $user, &$scoreData, $numberOfQuestions){\n\t\t//check if answer is right or not\n\t\t$correctCounter = 0;\n\n\t\t// filter empty-answered questions\n\t\t// user did not tick in the answer\n\t\tfunction emptyAnswerFilter($var){\n\t\t \t// remove with int(0)\n\t\t \t...
[ "0.6732669", "0.67303824", "0.6666326", "0.66109455", "0.64428955", "0.63757014", "0.6320809", "0.62936825", "0.6284416", "0.6270576", "0.6261943", "0.62571865", "0.6226294", "0.6211941", "0.6172309", "0.6106828", "0.60931057", "0.6057455", "0.60523015", "0.59712756", "0.5964...
0.77917194
0
/ Return a test based on ID Queries the database for a specific test from its ID and returns it
Возвращает тест на основе ID. Запрашивает базу данных для конкретного теста по его ID и возвращает его.
public function getTestsByID($id){ $query = $this->db->get_where('test',array('uniqid'=>$id)); if ($query->num_rows() == 0) { return false; } else { return $query->result_array()[0]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getById($id){\n\t\t$query = \"SELECT * FROM \" . $this->tables['tests'] . \" WHERE id = $id AND\";\n\n\t\treturn $this->constructGet($query);\n\t}", "public static function get($id){\n\t\tglobal $handle;\n\t\t\n\t\t// Validate for type and presence\n\t\tif (!is_numeric($id)){\n\t\t\treturn null;\...
[ "0.75971586", "0.74525625", "0.7004189", "0.67219055", "0.6471508", "0.6430168", "0.6393", "0.62411237", "0.62409675", "0.6226136", "0.62235254", "0.6178645", "0.61212903", "0.6120058", "0.60595953", "0.6025079", "0.6014699", "0.60101455", "0.6004924", "0.59970284", "0.598913...
0.74673355
1
Show the form for creating a new joinus_Text.
Показать форму для создания нового joinus_Text.
public function create() { return view('joinus__texts.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return view(\"Texts.create\");\n }", "public function create()\n {\n return view('about__contacts__texts.create');\n }", "public function store(Createjoinus_TextRequest $request)\n {\n $input = $request->all();\n\n $joinusTex...
[ "0.72972983", "0.7065335", "0.67936283", "0.67362803", "0.6651549", "0.659865", "0.6595587", "0.6582689", "0.65541583", "0.6550944", "0.64849126", "0.64532363", "0.6436966", "0.6417595", "0.641405", "0.6411447", "0.63792104", "0.6364167", "0.63633066", "0.6362152", "0.6358149...
0.7421402
0
Store a newly created joinus_Text in storage.
Храните только что созданную joinus_Text в хранилище.
public function store(Createjoinus_TextRequest $request) { $input = $request->all(); $joinusText = $this->joinusTextRepository->create($input); Flash::success('Joinus Text saved successfully.'); return redirect(route('joinusTexts.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(SaveText $request)\n {\n Text::create($request->validated());\n return back()->with('status','Elemento creado con éxito');\n }", "public function saveData($text) {\n $this->data->raw_value = json_encode(array('text' => $text));\n $this->data->save();\n }...
[ "0.6166566", "0.6002876", "0.58939946", "0.5684694", "0.56845874", "0.56548494", "0.5641723", "0.5492959", "0.5481058", "0.5477328", "0.54630566", "0.5456189", "0.5446384", "0.5415937", "0.53860843", "0.5364579", "0.5342044", "0.530589", "0.52930963", "0.52837205", "0.5275141...
0.725181
0
Pass the facebook object for the view to use
Передайте объект facebook для использования в представлении
public function testAction(){ $this->view->facebook = $this->fbAuth->facebook; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _get_facebook_object() {\n\t\tif (!property_exists($this->application,'facebook')) {\n\t\t\t$application = $this->factory('Application');\n\t\t\tif (property_exists($application,'facebook')) {\n\t\t\t\t$this->application->facebook = $application->facebook;\n\t\t\t} else {\n\t\t\t\t$this->applicati...
[ "0.70611304", "0.6927937", "0.6451923", "0.64326656", "0.6411962", "0.6324496", "0.6291737", "0.62646395", "0.6219646", "0.62013704", "0.61721516", "0.61244977", "0.61214817", "0.60834527", "0.6044731", "0.6005822", "0.6005822", "0.5980888", "0.5962951", "0.5922346", "0.59157...
0.75010276
0
CMB2 Default Tags field/metabox
Поле/метабокс CMB2 Default Tags
function cmb2_render_default_tags_field_type( $field, $escaped_value, $object_id, $object_type ) { $taxonomy = $field->args( 'taxonomy' ); $taxonomy = $taxonomy ? $taxonomy : 'post_tag'; if ( 'post' !== $object_type ) { wp_die( 'This won\'t work for non-"post" object types!' ); } wp_enqueue_script( 'tags-box'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setupTagsField()\n {\n // to keep the field's state between requests...\n $tags = $this->getObject()->getTags();\n\n $this->widgetSchema['tags'] = new cqWidgetFormMultipleInputText(array(\n 'label' => 'Tags'\n ), array(\n 'name' => 'collectible[tags][]',\n 'class' => ...
[ "0.72168314", "0.6973711", "0.6683688", "0.6612214", "0.65522933", "0.63957155", "0.638684", "0.6371557", "0.63331825", "0.6261522", "0.6258136", "0.6238396", "0.6236055", "0.6236055", "0.6217387", "0.6212139", "0.6185692", "0.6182413", "0.61721843", "0.6165409", "0.61629725"...
0.70858955
1
This method is responsible for validating the values passed to the setHealth_Savings_Account_Period_Data method This method is willingly generated in order to preserve the oneline inline validation within the setHealth_Savings_Account_Period_Data method
Этот метод отвечает за проверку значений, переданных в метод setHealth_Savings_Account_Period_Data. Этот метод специально генерируется с целью сохранения inline-проверки внутри метода setHealth_Savings_Account_Period_Data.
public static function validateHealth_Savings_Account_Period_DataForArrayConstraintsFromSetHealth_Savings_Account_Period_Data(array $values = array()) { $message = ''; $invalidValues = []; foreach ($values as $worker_Health_Savings_Account_DataTypeHealth_Savings_Account_Period_DataItem) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(array $health_Savings_Account_Period_Data = array())\n {\n $this\n ->setHealth_Savings_Account_Period_Data($health_Savings_Account_Period_Data);\n }", "public function validate()\n {\n if (!self::validLength($this->validateValue)) {\n $this...
[ "0.63958186", "0.59897953", "0.5865558", "0.58369064", "0.58051324", "0.5800244", "0.5789512", "0.5762879", "0.57045233", "0.5684208", "0.56355256", "0.56063735", "0.56040406", "0.5602716", "0.56023175", "0.55970615", "0.55970615", "0.55970615", "0.5594238", "0.55722284", "0....
0.72138333
0
Add item to Health_Savings_Account_Period_Data value
Добавить элемент в значение Health_Savings_Account_Period_Data
public function addToHealth_Savings_Account_Period_Data(\WorkdayWsdl\\StructType\Worker_Health_Savings_Account_Period_DataType $item) { // validation for constraint: itemType if (!$item instanceof \WorkdayWsdl\\StructType\Worker_Health_Savings_Account_Period_DataType) { throw new \Invali...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function addPeriod()\n {\n $conn = $this->_em->getConnection();\n $sql = 'INSERT INTO Periods (LastDate_in_Period)\n SELECT adddate(\n adddate(\n adddate(\n LastDate_in_Period, INTERVAL 1 DAY\n ), INTERV...
[ "0.676027", "0.62633497", "0.6196159", "0.6091431", "0.60147494", "0.58145386", "0.5629627", "0.55846626", "0.54064447", "0.53758603", "0.5336774", "0.52202386", "0.51731086", "0.51188004", "0.50979066", "0.50458616", "0.50076205", "0.49885035", "0.49788436", "0.49408907", "0...
0.7367793
0
Nonprepared statement: set query arguments, for native automated parameter marker substitution or direct substition in the sql string. The base sql remains reusable allowing more >parameters()>execute(), much like a prepared statement (except arguments aren't referred). An $arguments bucket must be integer|float|string...
Неподготовленное выражение: установка аргументов запроса для автоматической подстановки параметров в виде маркера или прямой подстановки в строку SQL. Основная SQL-строка остаётся переиспользуемой, позволяя вызывать >parameters()>execute() много раз, аналогично подготовленному выражению (кроме того, что аргументы не сс...
public function parameters(string $types, array $arguments) : DbQueryInterface { if ($this->isPreparedStatement) { $this->unsetReferences(); throw new \LogicException( $this->messagePrefix() . ' - passing parameters to prepared statement is illegal exc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendRequestWithParams($sql, $types = null, $params = null){\n $stmt = $this->connMySQLi->prepare($sql);\n if($types&&$params)\n {\n $bind_names[] = $types;\n for ($i=0; $i<count($params);$i++)\n {\n $bind_name = 'bind' . $i;\n ...
[ "0.6630068", "0.6516639", "0.64212847", "0.6303406", "0.6281941", "0.62780106", "0.619133", "0.6190881", "0.61664313", "0.60904205", "0.6074459", "0.6074035", "0.6051281", "0.6018545", "0.60148376", "0.600125", "0.59650254", "0.59336627", "0.5933302", "0.58987325", "0.5854665...
0.741819
0
Minify sql string. Transformations: remove carriage return remove leading line space remove line comment remove multiline comment convert newline to single space trim leading/trailing space chars
Сократить строку sql. Преобразования: удалить перевод строки, удалить начальный пробел строки, удалить комментарий строки, удалить многострочный комментарий, преобразовать перевод строки в один пробел, обрезать начальные/конечные пробельные символы
public function sqlMinify(string $sql) : string { return trim( // Convert newline to space. str_replace( "\n", ' ', // Remove multi-line /* */ comment. preg_replace( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function removeComments($sql) {\n return trim(preg_replace(array(\"!/\\*.*?\\*/!s\", \"/--.*\\n?/\", \"/#.*\\n?/\"), array(NULL, NULL, NULL), $sql));\n }", "protected function removeWhitespace(string $sql): string\n {\n return preg_replace('/[\\s\\t\\n\\r]+/', ' ', trim($sql));\n }...
[ "0.6967162", "0.687232", "0.6731553", "0.6633448", "0.66156995", "0.6586151", "0.6448351", "0.64226836", "0.63902664", "0.6358728", "0.63572407", "0.6350481", "0.62979275", "0.627943", "0.617317", "0.61442167", "0.61244637", "0.6121057", "0.6039423", "0.5973891", "0.595639", ...
0.7916158
0
Gets the first request made by the given user for this ad.
Получает первый запрос, сделанный данным пользователем для этой рекламы.
public function getRequestByUser($userId) { if ( !$this->hasRequest() ) { return null; } if(isset($this->requests->item->type)) { $requests=$this->requests; } else { $requests=$this->requests->item; } foreach ( $requests as $request ) { if ( $request->use...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMe(): Requests\\RequestUser\n {\n return new Requests\\RequestUser($this, 'getMe');\n }", "function requestedBy(){\r\n return $this->user_one;\r\n }", "public function getRequests($user)\n {\n $requests = $this->dbh->query(\"SELECT * FROM \" . $this->table . \" WHERE use...
[ "0.6130196", "0.60866785", "0.59403104", "0.5918051", "0.59119236", "0.5908876", "0.5868608", "0.58624274", "0.5750641", "0.5746943", "0.569434", "0.56407404", "0.5633568", "0.5545288", "0.55074257", "0.5496269", "0.54548776", "0.54405427", "0.5436683", "0.54189503", "0.54134...
0.72055936
0
Returns the first accepted request.
Возвращает первый принятый запрос.
public function getAcceptedRequest() { if ( !$this->hasRequest() ) { return null; } if(is_array($this->requests->item)) $requests = $this->requests->item; else $requests = $this->requests; foreach ( $requests as $request ) { if ( $request->accepted ) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function waitForNextRequest()\n {\n $mongrelRequest = $this->handler->receiveRequest();\n\n $request = $this->createSymfony2Request($mongrelRequest);\n\n return $request;\n }", "public function getSentRequest()\t {\n if ( !$this->hasRequest() ) {\n return null...
[ "0.6566226", "0.6292264", "0.62317604", "0.6164554", "0.6157059", "0.6149057", "0.6129276", "0.6119122", "0.61024296", "0.6058961", "0.6033016", "0.60099715", "0.60028535", "0.5999144", "0.59717435", "0.59483373", "0.59207344", "0.591514", "0.59102315", "0.59051585", "0.59051...
0.8323488
0
Returns the first sent request.
Возвращает первый отправленный запрос.
public function getSentRequest() { if ( !$this->hasRequest() ) { return null; } if(is_array($this->requests->item)) $requests = $this->requests->item; else $requests = $this->requests; foreach ( $requests as $request ) { if ( $request->sent ) { return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRequest()\n {\n return $this->request ?: new Request('');\n }", "private function waitForNextRequest()\n {\n $mongrelRequest = $this->handler->receiveRequest();\n\n $request = $this->createSymfony2Request($mongrelRequest);\n\n return $request;\n }", "p...
[ "0.6774921", "0.67372125", "0.6732829", "0.66798526", "0.6676612", "0.66290575", "0.66290575", "0.66232675", "0.6573206", "0.6527396", "0.65177023", "0.6505458", "0.6504675", "0.6493439", "0.64873856", "0.6485667", "0.64757556", "0.6462892", "0.64617556", "0.6459541", "0.6443...
0.73556995
0
Verifies if there is at least one active request. Active requests are not having EXPIRED states, but they are PENDING or ACCEPTED.
Проверяет, есть ли хотя бы один активный запрос. Активные запросы не имеют состояния EXPIRED, но находятся в состоянии PENDING или ACCEPTED.
public function hasActiveRequest() { if ( !$this->hasRequest() ) { return false; } if(isset($this->requests->item)) { if(is_array($this->requests->item)) $requests = $this->requests->item; else $requests = $this->requests; foreach ( $requests as $request ) { if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkRequestConfirmed(): bool\n {\n $currentRequestTime = time();\n $lastConfirmedRequestTime = $this->request->getLastConfirmedTime();\n $capacity = $this->request->getCapacity();\n $capacityLimit = $this->capacityLimit;\n $rateLimit = $this->rateLimit;\n\n ...
[ "0.6644497", "0.63406366", "0.6300797", "0.6193909", "0.6167179", "0.60881424", "0.6024992", "0.600989", "0.600989", "0.600989", "0.600989", "0.6001854", "0.59565544", "0.5948096", "0.5922304", "0.59149766", "0.5897057", "0.5838266", "0.5801575", "0.58000296", "0.5791324", ...
0.78329194
0
Returns the effect name ensured with lowercase.
Возвращает имя эффекта, гарантированно приведенное к нижнему регистру.
public function getImagineEffectName() { return strtolower($this->imagine_name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getLowerNameReplacement()\n {\n return strtolower($this->getName());\n }", "public function getLowerName()\n {\n return strtolower($this->name);\n }", "public function get_name() {\n return ucwords(strtolower($this->name));\n }", "static function keisti($s){\n...
[ "0.66976917", "0.665982", "0.64848113", "0.62322044", "0.6190297", "0.6175662", "0.6162156", "0.61607426", "0.6142589", "0.6142552", "0.6127823", "0.61125565", "0.60866094", "0.60820055", "0.60775983", "0.60256195", "0.600774", "0.59991086", "0.5957376", "0.59437263", "0.5932...
0.75239635
0
permet une recherche ajax dans ses bons d'interventions
позволяет выполнять поиск по заявкам на обслуживание с помощью AJAX
protected function ajaxRechercherUnBonInter() { if ($_SESSION['user']->estTechnicien()) { // si une valeur, on lance la recherche if(isset($_GET['valeur']) and $_GET['valeur'] !== '') $lesBonsInter = $this->odbBonIntervention->searchMesBonIntervention($_GET['valeur'], $_SESSION['user']->getMatricule());...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchHorario()\n\t\t{\n\t\t\tif($this->input->is_ajax_request())\n\t\t\t{\n\t\t\t\t$sql = \"SELECT dmh_cod ,hor_cod , hor_des from vista_asignacion WHERE med_cod = ? and esp_cod = ?\";\n\t\t\t\t$med_cod = $this->input->post('med_cod');\n\t\t\t\t$esp_cod = $this->input->post('esp_cod');\n\t\t\t\t$d...
[ "0.6990712", "0.6883007", "0.68387204", "0.68046445", "0.6739238", "0.6735607", "0.67060405", "0.6679405", "0.6678686", "0.66360056", "0.6615054", "0.6597119", "0.6571011", "0.65631473", "0.6488612", "0.6477326", "0.64761776", "0.6472417", "0.64700466", "0.646753", "0.646615"...
0.70877224
0
Lay doi tuong PayGateService
Разместить объект PayGateService
public static function paygate() { return static::makeService('PayGateService'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function pay()\n {\n }", "public function paygol()\n {\n // Check method\n $method = $this->settings_model->get_dep_method(6);\n\n $secret_key = $method['api_value1']; // Enter secret key for your service.\n // Secret key validation\n if ($secret_key == $_GET['...
[ "0.70066977", "0.67902446", "0.6781859", "0.67353976", "0.65998274", "0.6489214", "0.64706266", "0.6436056", "0.6418112", "0.6355863", "0.63340527", "0.62659436", "0.6242992", "0.6225347", "0.6201601", "0.6183953", "0.61832726", "0.61783874", "0.6139647", "0.6133359", "0.6112...
0.70965743
0
/ Get Data Fund
/ Получение данных фонда
public function getDataFund() { $list = array(); $data = array( 'KEY' => 'A9129A4DF87E1030B8217CB61E71DE05', 'DAYS' => '2', ); try { $dataentity = $this->getData($data, 'DataFundTypePrice.asmx/GetDaysLatestApprovedNAVinXML', 'FundPrice'); r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_data();", "public function get_data();", "public function getdata();", "function getData() ;", "function getData() ;", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "publi...
[ "0.73234355", "0.73234355", "0.7320244", "0.7132883", "0.7132883", "0.7101399", "0.7101399", "0.7101399", "0.7101399", "0.7101399", "0.7101399", "0.7101399", "0.7101399", "0.7101399", "0.7101399", "0.7101399", "0.7101399", "0.7101399", "0.7101399", "0.7101399", "0.7101399", ...
0.778215
0
/ Metodo para validacion de nickname
Метод для проверки никнейма
private static function nicknameValidate($data){ if( preg_match('/^[a-zA-Z0-9\-_]{4,16}$/', $data) ) return 1; else self::$error[] = "nickname_error"; return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isReservedNickname($value, $empty, &$params, &$formvars) {\n\n if (empty($formvars['nickname'])) return false;\n\n if (mb_strtolower($formvars['nickname']) == 'nobody') return false; // Fail\n else return true;\n\n }", "function valid_username($username)\n{\n $maxlength = 20;\...
[ "0.74472356", "0.7137254", "0.70909274", "0.704244", "0.69788533", "0.6957664", "0.6941133", "0.6850762", "0.6835098", "0.6822527", "0.6771048", "0.6768028", "0.67605555", "0.67336214", "0.67097944", "0.669607", "0.6693826", "0.6662237", "0.6639881", "0.6632322", "0.6624711",...
0.7876286
0
/ Plugin Name: wpfullscreenpreviewbutton Plugin URI: Description: Add preview button at fullscreen writing mode. Version: 0.2.0 Author: Tatsuya Fukata Author URI:
Название плагина: wpfullscreenpreviewbutton URI плагина: Описание: Добавить кнопку предварительного просмотра в полноэкранном режиме редактирования. Версия: 0.2.0 Автор: Фука Татсуя URI автора:
function wfpb_add_button_script($hook) { if ( !in_array($hook, array('post.php', 'post-new.php', 'edit.php')) ) { return ; } $plugin_dir = ''; if ( !defined('WP_PLUGIN_DIR') ) { $plugin_dir = str_replace( ABSPATH, '', dirname(__FILE__) ); } else { $plugin_dir = dirname( plugin_basename(__FILE__) ); } wp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function wp_fullscreen_html()\n {\n }", "function _show_post_preview()\n{\n}", "function post_preview()\n{\n}", "function preview_theme()\n{\n}", "function wpgurus_preview() {\n\tif ( isset( $_GET['preview'] ) ) {\n\t\twp_die( __( 'WPGurus requires WordPress 4.7 or higher. Please update...
[ "0.69091535", "0.68099827", "0.6600192", "0.6517396", "0.63957214", "0.631621", "0.63058114", "0.6302461", "0.6295843", "0.628693", "0.6283659", "0.6247492", "0.6247492", "0.6247492", "0.62462515", "0.6216723", "0.6167293", "0.61494815", "0.61396426", "0.61396426", "0.6121565...
0.70689666
0
/ Upload QSO to webADIF When called from the url cloudlog/webadif/upload, the function loops through all station_id's with a webADIF api key defined. All QSOs not previously uploaded, will then be uploaded, one at a time
Загрузка QSO в webADIF При вызове из URL cloudlog/webadif/upload функция последовательно обрабатывает все station_id с определенным ключом API webADIF. Все QSO, которые еще не были загружены, будут загружаться по одному.
public function upload() { $this->setOptions(); $this->load->model('logbook_model'); $station_ids = $this->logbook_model->get_station_id_with_webadif_api(); if ($station_ids) { foreach ($station_ids as $station) { $webadif_api_key = $station->webadifapikey; $webadif_api_url = $station->webadifapi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function upload_station() {\n\t $this->setOptions();\n\t $postData = $this->input->post();\n\t $this->load->model('stations');\n\t if (!$this->stations->check_station_is_accessible($postData['station_id'])) {\n\t\t return;\n\t }\n\n\t $this->load->model('logbook_model');\n\t $result ...
[ "0.79664296", "0.723172", "0.5292753", "0.5252598", "0.52520674", "0.52318245", "0.51108164", "0.5020846", "0.4987389", "0.4966134", "0.493581", "0.49260977", "0.49083877", "0.4882087", "0.487331", "0.48725605", "0.48615232", "0.48600683", "0.48402554", "0.48351455", "0.48182...
0.79515195
1
An item has many sales
Предмет имеет много продаж
public function sales() { return $this->hasMany(Sale::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sales()\n {\n return $this->hasMany( 'App\\Sale' );\n }", "public function sales(){\n return $this->hasMany('App\\Models\\sales');\n }", "public function sales(){\n return $this->hasMany(Sale::class); \n }", "public function sales()\n {\n \treturn...
[ "0.7708826", "0.7703928", "0.7689058", "0.7634245", "0.7617838", "0.74538565", "0.74279666", "0.7366379", "0.73271", "0.7182397", "0.71274453", "0.7114667", "0.70521593", "0.7041457", "0.6994417", "0.68842936", "0.67257935", "0.6698821", "0.6644926", "0.65018", "0.639669", ...
0.7714129
0
An item can have many carts.
Предмет может иметь несколько корзин.
public function carts() { return $this->hasMany(CartItem::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cartItems(){\n\t\treturn $this->hasMany(CartItem::class, 'cart_id');\n\t}", "public function carts()\n\t{\n\t\treturn $this->hasMany(Cart::class);\n\t}", "public function cartItems()\n {\n return $this->hasMany('App\\Model\\CartItem');\n }", "public function carts()\n {\n ...
[ "0.76054305", "0.7476231", "0.746664", "0.7337018", "0.7323506", "0.73159546", "0.7311834", "0.72529393", "0.72529393", "0.72475016", "0.72338915", "0.70876986", "0.7034531", "0.6900662", "0.687464", "0.67121345", "0.6634657", "0.660899", "0.65777886", "0.65100884", "0.649634...
0.77594614
0
Does the item have a primary photo?
Есть ли у элемента основное фото?
public function hasPrimaryPhoto() { return !! $this->primaryPhoto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasFirstphoto(){\n return $this->_has(4);\n }", "public function hasImage(){\n return $this->_has(1);\n }", "public function hasImage(){\n return $this->_has(1);\n }", "public function hasImageid(){\n return $this->_has(9);\n }", "function photochrom_set_get_...
[ "0.7431136", "0.70731", "0.70731", "0.6928404", "0.6915232", "0.6882021", "0.68180233", "0.6802874", "0.6753342", "0.67425287", "0.6671961", "0.66598684", "0.66571283", "0.6637141", "0.6610578", "0.66046804", "0.65520984", "0.65389687", "0.6509413", "0.6474925", "0.6459502", ...
0.7769005
0
Reduce the item stock by qty passed in.
Уменьшить остаток товара на переданное количество.
public function reduceStock($qty = 1) { $newQty = $this->qty - $qty; if ($newQty < 0) { $newQty = 0; } $this->qty = $newQty; return $this->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reduce_order_stock()\n {\n }", "public function ebaySaleStockReduce($product_id, $sku = null){\n $this->log('ebaySaleStockReduce() - Is stock update needed (Item ID: '.$product_id.',SKU: '.$sku.')');\n\n if(!empty($product_id)){\n if($sku == null){\n ...
[ "0.7014619", "0.67916757", "0.6678459", "0.66143286", "0.6609111", "0.65865314", "0.6522964", "0.64937425", "0.64195395", "0.6394323", "0.63606924", "0.6359502", "0.6331214", "0.630429", "0.6298322", "0.6293422", "0.6259377", "0.62340087", "0.61944807", "0.6170117", "0.614162...
0.79537493
0
List authors owned by registered api user
Список авторов, принадлежащих зарегистрированному пользователю API
public function getAuthorsAction() { $user = $this->getUser(); $authors = $this->getDoctrine()->getRepository(Author::class) ->findBy(['owner' => $user->getId()]); $view = $this->view($authors, 200); return $this->handleView($view); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function obtainAuthors()\n {\n return $this->performRequest('GET', 'authors');\n }", "public function getAuthors();", "public function obtainAuthors()\n {\n return $this->perfomRequest(\"GET\", \"/authors\");\n }", "public function authorsList()\n {\n $authors = Author::all...
[ "0.7569455", "0.74780566", "0.7412335", "0.72542727", "0.71737564", "0.71658516", "0.7104451", "0.7032792", "0.6998512", "0.6913099", "0.68933386", "0.68791634", "0.6878688", "0.6871315", "0.6864507", "0.6830739", "0.6755214", "0.6752733", "0.6729685", "0.67186975", "0.670260...
0.7617005
0
Get Author object by id
Получить объект Author по id
public function getAuthorAction($id) { $user = $this->getUser(); $author = $this->getDoctrine()->getRepository(Author::class) ->findBy(['owner' => $user->getId(), 'id' => $id]); $view = $this->view($author, 200); return $this->handleView($view); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorByID($id)\n {\n $get = $this->getData(static::authorShow, $id);\n\n return $get ? $get->author : $get;\n }", "public function show($id)\n {\n $author = Author::find($id);\n\n if (! $author) {\n abort(404, 'not author found');\n }\n\n ...
[ "0.81437373", "0.7874509", "0.78311074", "0.77317464", "0.7714734", "0.74996394", "0.7225735", "0.72247034", "0.71976197", "0.7162298", "0.71366066", "0.71342987", "0.7129746", "0.71024996", "0.70927566", "0.70882994", "0.70734483", "0.70263046", "0.70124173", "0.7008532", "0...
0.7899342
1
Set pcre templates for proper block extractions
Установите шаблоны pcre для корректного извлечения блоков
private function SetPCRE(){ // Simple PCRE to extract full blocks // Simple variables blocks // {$content} $this->pat['var'] = '#{\$([\a-zA-Z\':\\\\0-9]+)}#'; // Included tpl // {tpl:highLevel} // {tpl:index/menu} $this->pat['tpl'] = '#{tpl:([\a-zA-Z\':\\\\0-9]+)}#'; // If (start) // {if $bl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function parse(){\n\n\t\t$array=array();\n\n\t\t// Get template content to variable to begin parsing\n\n\t\t$this -> template = file_get_contents($this->templatePath);\n\n\t\tforeach ($this->pat as $tpl) {\n\t\t\tpreg_match_all($tpl,$this->template,$arrayRes);\n\t\t\t$array=array_merge($array,$arrayRes[0])...
[ "0.6340826", "0.6097721", "0.5946569", "0.5835581", "0.5792503", "0.57850116", "0.56613535", "0.5653066", "0.5648884", "0.5646644", "0.5605646", "0.55784917", "0.55714077", "0.5561139", "0.5511509", "0.5501468", "0.5460211", "0.5454858", "0.5448878", "0.54392", "0.543329", ...
0.74389714
0
Parse blocks structures IFELSE FOREACH
Парсить структуры блоков IFELSE FOREACH
private function parseIfElse(&$block=''){ $arr=array(); if(preg_match($this->pat['if'], $block,$arr)){ // Replace bracing $block = str_replace(array("{","}"),array("<? "," ?>") , $block); // Add skobki $block = str_replace($arr[2],"(".$arr[2]."):", $block); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function parseBlock(&$block=\"\"){\n\n\t\t// If the block is include\n\n\t\t$this->parseValue($block);\n\t\t\n\t\t$this->parseTpl($block);\n\n\t\t$this->parseIfElse($block);\n\n\t\t$this->parseIfElseIf($block);\n\n\t\t$this->parseElse($block);\n\n\t\t$this->parseEndif($block);\n\n\t\t$this->parseForEach($b...
[ "0.73049295", "0.690437", "0.68686706", "0.66463536", "0.65064335", "0.6463603", "0.63045776", "0.61713076", "0.60413736", "0.60385215", "0.60139346", "0.5964551", "0.5944371", "0.59259886", "0.5861761", "0.5854441", "0.58224523", "0.58183295", "0.57964796", "0.57095087", "0....
0.72615695
1
Get parent id for the given menu id.
Получить идентификатор родителя для заданного идентификатора меню.
private function parentId($menuId) { return MenuItem::withoutGlobalScope('not_root') ->where('menu_id', $menuId) ->value('id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_parent($menu_id = NULL)\r\n {\r\n $fields = \"menu_id, menu_parent_id, menu_name, menu_slug, menu_icon, menu_precedence, menu_status\";\r\n $query_string = \"SELECT $fields FROM menu WHERE menu_id = ? ORDER BY menu_precedence\";\r\n $array_data = array($menu_id);\r\n ...
[ "0.7688884", "0.7653139", "0.75148606", "0.7415164", "0.7388274", "0.7346301", "0.7285594", "0.72653866", "0.7257428", "0.7237278", "0.7221022", "0.7214853", "0.71916515", "0.71916515", "0.71868354", "0.71564186", "0.7132607", "0.7132607", "0.7132607", "0.7129657", "0.7095156...
0.77468526
0
function show video in users page by usersid
функция показывает видео на странице пользователей по usersid
function show_v_id2() { $usersid = $this->uri->segment(3); $data['usersvideo'] = $this->show_model->show_video(); $data['single_video'] = $this->show_model->show_v_id($usersid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function userVideosPage() {\n return View::make(\"videos.uservideo\");\n }", "function getVideoByUserId()\r\n\t\t{\r\n\t\t\t$sql = \"select * from video where user_id='?'\";\r\n\t\t\t$types= array('integer');\r\n\t\t\t$res = $this->execute_query($sql,$params,$types);\r\n\t\t\tif(sizeof($res) > 0...
[ "0.703653", "0.6990191", "0.69865775", "0.6977495", "0.69088364", "0.6736795", "0.66265905", "0.6606136", "0.6597006", "0.65838605", "0.6545143", "0.65289426", "0.65165794", "0.6495634", "0.64695466", "0.6449422", "0.6428512", "0.6410035", "0.6406516", "0.6405187", "0.6395806...
0.7648029
0
function for save unlikes
функция для сохранения неудобств
public function saveunlikes() { if ($this->session->userdata('usersid')) { $usersid = $this->session->userdata('usersid'); $usersvideoid = $this->input->post('usersvideoid'); //select unlikes from database by usersvideoid $fetchunlikes = $this->db->query('select unlikes from...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveUsersLikes() {\n\t\tif ($this->me && $this->you) {\n\n\t\t\t//Check blocked user or not for excluding him in my notifications\n\t\t\t$blockedUsers = null;\n\t\t\t$this->table = \"users_profile\";\n\t\t\t$myProfile = $this->findOne($this->returnLikedUser, \"login\");\n\n\t\t\t$blockedUsers = $my...
[ "0.668651", "0.6607524", "0.6577326", "0.64887834", "0.6460164", "0.64598435", "0.64096385", "0.6324859", "0.62392193", "0.61448586", "0.6127774", "0.61276865", "0.6093242", "0.6066202", "0.60592914", "0.59730875", "0.5969992", "0.5930469", "0.59304637", "0.5926791", "0.59094...
0.7017134
0
select comment from database where usersvideoid and usersid cant make comment if you are not login if you comment open new page with message 'thanks for comment'
выберите комментарий из базы данных, где usersvideoid и usersid не могут оставлять комментарий, если вы не вошли в систему, если вы оставляете комментарий, открывается новая страница с сообщением 'спасибо за комментарий'
public function comment_v() { $usersid = $this->session->userdata('usersid'); $usersvideoid = $this->input->post('usersvideoid'); $this->form_validation->set_rules('comment', 'Comment', 'trim|required'); if ($this->form_validation->run() == FAL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function displaycomments($videoid)\n\t{\n\t\tif ($videoid)\n\t\t{\n\t\t\t$db = $this->getDBO();\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$id = $videoid;\n\t\t\t$pageno = 1;\n\t\t\t$length = 10;\n\n\t\t\tif (JRequest::getVar('name', '', 'get', 'string') && JRequest::getVar('message', '', 'get', 'string'))...
[ "0.67943746", "0.6510955", "0.6445732", "0.64229035", "0.63975036", "0.6266628", "0.62517256", "0.620556", "0.6147213", "0.60952103", "0.60789305", "0.6073773", "0.6067207", "0.6056711", "0.5998001", "0.599731", "0.5994511", "0.5983094", "0.59763014", "0.5975918", "0.59714425...
0.72475845
0
Retorna um array dos ids de todos os componentes filhos de um componente.
Возвращает массив идентификаторов всех дочерних компонентов компонента.
public function getIdFilhosComponente($componenteId) { $filhos = $this->findBy([ 'parent' => $componenteId ]); $ids = [0]; foreach ($filhos as $filho){ $ids[] = '"'.$filho['id'].'"'; } return $ids; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buscar_ids()\n\t{\n\t\t$ids = $this->tabla->get_id_fila_condicion($this->condiciones, false);\n\t\t\n\t\tif (! empty($this->padres)) {\n\t\t\tforeach ($this->padres as $tabla_padre => $id_padre) {\n\t\t\t\t$hijas = $this->tabla->get_relacion_con_padre($tabla_padre)->get_id_filas_hijas_de($id_padre);\n\t\t...
[ "0.684231", "0.6799316", "0.67479944", "0.66231227", "0.66019875", "0.65943366", "0.65696275", "0.654038", "0.6487723", "0.64279014", "0.64088523", "0.6400044", "0.63582516", "0.62945", "0.62766266", "0.62749016", "0.62661", "0.6264561", "0.6221759", "0.6219946", "0.6215752",...
0.7020452
0
Generate html for a section summary text
Создать html для текста итоговой секции
protected function format_summary_text($section) { $collapseLevel=0;//testing $context = context_course::instance($section->course); $summarytext = file_rewrite_pluginfile_urls($section->summary, 'pluginfile.php', $context->id, 'course', 'section', $section->id); $options = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function display_section_info(){\n ?>\n <p class=\"section-description\">Section dédiée aux inforamations de contact</p>\n <?php\n }", "function summary()\r\n {\r\n $view = new Template();\r\n echo $view->render('views/summary.html');\r\n }", "publi...
[ "0.69944125", "0.6818056", "0.67391527", "0.6708948", "0.67035544", "0.6628802", "0.6543487", "0.65083474", "0.6475488", "0.6469178", "0.6439129", "0.64215314", "0.6391088", "0.63838077", "0.6382198", "0.6363463", "0.6323159", "0.6321104", "0.631663", "0.6308038", "0.63071424...
0.7470331
0
Display section and all its activities and subsections for editing (called recursively)
Раздел отображения и все его активности и подразделы для редактирования (вызываемые рекурсивно)
public function display_edit_section($course, $section, $sr, $level = 0) { global $PAGE; // $course = course_get_format($course)->get_course(); $section = course_get_format($course)->get_section($section); $context = context_course::instance($course->id); $c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render_section() {\n \n $current = $this->current_page;\n if( $this->current_tab ) {\n $current = $this->current_tab;\n }\n if( isset( $this->sections[$current]['content'] ) ) {\n echo '<p>' . $this->sections[$current]['content'] . '</p>';\n ...
[ "0.68563765", "0.67121774", "0.6651033", "0.6569697", "0.6553787", "0.65428156", "0.63932943", "0.6373441", "0.63076377", "0.62940866", "0.6278499", "0.627284", "0.62705934", "0.622261", "0.6174522", "0.61608166", "0.6123454", "0.6086687", "0.6061062", "0.6058334", "0.6058334...
0.72968954
0
renders HTML for format_singleactivityperpage_edit_control
рендерит HTML для format_singleactivityperpage_edit_control
protected function render_format_singleactivityperpage_edit_control(format_singleactivityperpage_edit_control $control) { if (!$control) { return ''; } if ($control->class === 'movehere') { $icon = new pix_icon('movehere', $control->text, 'moodle', array('class' => 'movet...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function render_format_default_edit_control(format_default_edit_control $control) {\n $template = new stdClass();\n $template->inactivity = true;\n return $this->render_from_template('format_default/courseadmintabs', $template);\n }", "public function content() {\n\n if( ...
[ "0.57197005", "0.56077814", "0.5587414", "0.5560359", "0.5495984", "0.5491734", "0.544268", "0.54137665", "0.53842765", "0.5366712", "0.5361233", "0.5358493", "0.5356728", "0.53523415", "0.53370845", "0.5334978", "0.5316071", "0.5314685", "0.5313274", "0.53121644", "0.5304667...
0.7317338
0
If section is not visible, display the message about that ('Not available until...', that sort of thing). Otherwise, returns blank. For users with the ability to view hidden sections, it shows the information even though you can view the section and also may include slightly fuller information (so that teachers can tel...
Если раздел не виден, отображается сообщение об этом ('Доступно не раньше...', и т.д.). В противном случае возвращается пустая строка. Для пользователей, которым разрешено просматривать скрытые разделы, информация отображается, даже если раздел виден, и может включать немного более подробную информацию (чтобы преподава...
protected function section_availability_message($section, $canviewhidden) { global $CFG; $o = ''; if (!$section->uservisible) { // Note: We only get to this function if availableinfo is non-empty, // so there is definitely something to print. $formattedinfo = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function course_section_cm_availability(cm_info $mod, $displayoptions = array()) {\n global $CFG;\n $output = '';\n if (!$mod->is_visible_on_course_page()) {\n return $output;\n }\n if (!$mod->uservisible) {\n // this is a student who is not allowed t...
[ "0.66760194", "0.63723415", "0.63253796", "0.62058985", "0.61702394", "0.6160832", "0.6013413", "0.5964741", "0.59187", "0.58916485", "0.5865679", "0.5834264", "0.5822977", "0.57780266", "0.5777621", "0.5760278", "0.5737664", "0.57288384", "0.57181114", "0.5715451", "0.569083...
0.73331034
0
Retrieve a user by the given credentials.
Получить пользователя по заданным учетным данным.
public function retrieveByCredentials(array $credentials) { // Get and return a user by looking up the given credentials if (empty($credentials) || (count($credentials) === 1 && array_key_exists('password', $credentials))) { return; } $userName =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrieveByCredentials(array $credentials){\n\t\t$user = $this->model->where('username', '=', $credentials['Username'])->first();\n\t\treturn $user;\t\n\t}", "public static function getUser($credentials){\n\t\treturn \\Illuminate\\Auth\\Reminders\\PasswordBroker::getUser($credentials);\n\t}", "p...
[ "0.7481661", "0.7469158", "0.7430235", "0.732353", "0.7317828", "0.73145354", "0.7275446", "0.7257889", "0.7235908", "0.72153157", "0.7184209", "0.7178235", "0.71555924", "0.7126936", "0.7091145", "0.70718294", "0.70575064", "0.7044982", "0.70390755", "0.6995875", "0.69626266...
0.7671796
0
/ Adding a new disease_category
/ Добавление новой категории заболеваний
function add() { $this->load->library('form_validation'); $this->form_validation->set_rules('disease_category_name','Disease Category Name','required|max_length[30]'); $this->form_validation->set_rules('disease_category_description','Disease Category Description','required'); if($this->form_val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function categoryAdd()\n {\n $params = filter_input_array(INPUT_POST, [\n 'title' => filterOptions(0,'full_special_chars'),\n 'caption' => filterOptions(0,'full_special_chars'),\n 'description' => filterOptions(1,'boolean'),\n 'reproduce' => filterOptio...
[ "0.75582075", "0.69962287", "0.6982404", "0.68602633", "0.68300265", "0.68140054", "0.680881", "0.68074584", "0.67788315", "0.6721586", "0.6701498", "0.6691724", "0.666892", "0.66484195", "0.664738", "0.66319114", "0.6619799", "0.6592775", "0.6585839", "0.6568822", "0.6564387...
0.72668344
1
/ Editing a disease_category
/ Редактирование категории заболевания
function edit($disease_category_code) { // check if the disease_category exists before trying to edit it $data['disease_category'] = $this->Disease_category_model->get_disease_category($disease_category_code); if(isset($data['disease_category']['disease_category_code'])) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update_category($cateID, $newCategory){\n $select_category = category::find($cateID);\n $select_category->title = $newCategory;\n $select_category->save(); \n }", "function updateCategory($id, $category, $new_category){\n }", "public function edit(ScrapedCategory $scr...
[ "0.71694356", "0.6891359", "0.6624596", "0.6588305", "0.6572236", "0.6480624", "0.64491034", "0.64491034", "0.64491034", "0.64491034", "0.64491034", "0.64491034", "0.6443517", "0.6370707", "0.6351482", "0.6351482", "0.6351482", "0.6351482", "0.6351482", "0.6351482", "0.635148...
0.71780825
0
Performs Solr Search on a provided text content Uses search api server, Only basic settings are provided, advanced settings such as Connectivity, fq and facets etc are detalt by search_api_solr
Выполняет поиск в Solr на предоставленном текстовом содержимом. Использует сервер поискового API. Только базовые настройки предоставлены, продвинутые настройки, такие как соединение, fq и фасеты и т.д., подробно описаны в search_api_solr
function _cmc_products_get_instruments_solr_content($content) { $indx = "sitewide"; $conditions = $conditions = array('class' => 'search_api_solr_service', 'enabled' => TRUE); // Set server $index = search_api_index_load_multiple(array($indx)); foreach (search_api_server_load_multiple(FALSE, $conditions) a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _perform_solr_search($queryparam = 'dummy') {\n\n // TODO: needs tidying.\n // encode the queryparam?\n\n $params = array();\n $params['rows'] = 50;\n $params['start'] = 0;\n $params['indent'] = 'on';\n $params['q'] = $queryparam;\n $params['version'] = '2.2';\n\n $params['fl'] = \"*\";\n $param...
[ "0.737252", "0.70994896", "0.68731797", "0.6701273", "0.6432407", "0.6320151", "0.6306265", "0.625858", "0.6258238", "0.6256008", "0.62536967", "0.6196324", "0.6173972", "0.6172864", "0.6140622", "0.61316395", "0.6119922", "0.6097718", "0.60944116", "0.6071305", "0.6068028", ...
0.71523875
1
Get the IDs of all forms in our table.
Получите идентификаторы всех форм в нашей таблице.
public function get_form_ids() { return $this->wpdb->get_col( "SELECT `id` FROM {$this->prefixed_table_name}" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function itg_save_get_form_ids() {\n $this->data = array();\n $this->itg_query = db_select('itg_autosave_forms', 'itg');\n $this->itg_query->fields('itg', array('form_name'));\n $this->itg_result = $this->itg_query->execute()->fetchAll();\n \n // Make array of form ids from result object\n...
[ "0.75270915", "0.709265", "0.6874168", "0.6708968", "0.6478681", "0.63956857", "0.6352032", "0.6352032", "0.63476175", "0.6250193", "0.6206459", "0.6188527", "0.6144683", "0.61323434", "0.6117", "0.6095085", "0.6017767", "0.60173565", "0.6014462", "0.6001252", "0.59768826", ...
0.86720365
0
Generate a format array based on the present form data.
Создайте массив формата на основе текущих данных формы.
protected function get_format_array( $form_data ) { $formats = array(); foreach ( $form_data as $key => $value ) { switch ( $key ) { case 'impressions': case 'submissions': case 'redirect_user_on_submit': case 'redirect_page': case 'id': $formats[] = '%d'; break; de...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function formatData() {\n\t\t$data = $this->data;\n\t\tif(is_object($data) && $data instanceof Form) {\n\t\t\t$form = $data;\n\t\t\t$data = array();\n\t\t\tforeach($form->Fields()->dataFields() as $field) {\n\t\t\t\t$name = $field->getName();\n\t\t\t\tif($name && $name != 'SecurityID') {\n\t\t\t\t\tif($fie...
[ "0.6629421", "0.64507115", "0.64017093", "0.6394575", "0.63170916", "0.6212382", "0.6160724", "0.6126415", "0.61004514", "0.60963756", "0.6092726", "0.607493", "0.6053213", "0.6037397", "0.60334724", "0.5966878", "0.5949492", "0.5936624", "0.593596", "0.59004045", "0.58876866...
0.76185614
0
Get all data for all forms.
Получить все данные для всех форм.
public function get_all_forms() { $form_ids = $this->get_form_ids(); $return_data = array(); foreach ( $form_ids as $form_id ) { $return_data[ $form_id ] = $this->get_form( $form_id ); } return $return_data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAll()\n {\n return is_array($this->forms ) ? $this->forms : [];\n }", "public function getDataForms() : array\n {\n return $this->dataForms;\n }", "public function getAllForms() {\n $req = myPDO()->query('SELECT * FROM forms');\n $object = $req->fetch...
[ "0.77280796", "0.73052174", "0.7203049", "0.7113212", "0.69972175", "0.68885666", "0.68602943", "0.6765777", "0.67258763", "0.66683245", "0.6549251", "0.65321994", "0.6527621", "0.6521405", "0.6498109", "0.6484106", "0.64830035", "0.64745814", "0.6462627", "0.6441902", "0.643...
0.7826878
0
Test that $expected_keys are extracted from $regex
Тест, проверяющий, что $expected_keys извлекаются из $regex
public function testGetKeys(string $regex, array $expected_keys): void { $expected = self::toArraySet($expected_keys); $actual = RegexKeyExtractor::getKeys($regex); $this->assertSame($expected, $actual, "wrong patterns parsed for $regex"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testKeyMatcherWithValidData()\n {\n $keyMatcher = $this->_instance->get([\n 'number' => ':number',\n 'string' => ':string',\n ]);\n\n $this->assertTrue($keyMatcher('number', 1));\n $this->assertTrue($keyMatcher('other', 1));\n $this->asser...
[ "0.64767545", "0.6442847", "0.61369765", "0.6019624", "0.5874889", "0.57796896", "0.5691959", "0.5652847", "0.5566897", "0.5551398", "0.5435331", "0.5431961", "0.54259634", "0.5413291", "0.53771985", "0.53084826", "0.5307802", "0.5307497", "0.5302775", "0.5275634", "0.5272873...
0.8199939
0
Internal function for querying a node's parent based on their node ID.
Внутренняя функция для запроса родительского узла на основе идентификатора узла.
private function loadParent($nid) { // SELECT n.nid, n.title // FROM node_field_data AS n // INNER JOIN node__field_as_parent AS f // ON f.field_as_parent_target_id = n.nid // WHERE f.entity_id = 10;. $parent_query = \Drupal::database()->select('node_field_data', 'n'); $parent_query->join('n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function _getParentNode();", "function socialwiki_get_parent($pid) {\n Global $DB;\n $sql = 'SELECT parent\n FROM {socialwiki_pages}\n WHERE id=?';\n return $DB->get_record_sql($sql, array($pid));\n}", "function parent_id($parent_id=null)\n {\n if (is...
[ "0.7290551", "0.71859115", "0.7073336", "0.70097023", "0.6904456", "0.68427676", "0.68427676", "0.68266976", "0.681898", "0.68181705", "0.6812542", "0.678378", "0.67813915", "0.67442304", "0.6704779", "0.6697184", "0.66793877", "0.66582423", "0.6654061", "0.6637267", "0.66275...
0.7262307
1
/ $model = stringa che indica il tipo di scheda $code = identificativo univoco ICCD $institute = istituto di appartenenza
$model = строка, указывающая тип карты $code = уникальный идентификатор ICCD $institute = принадлежащий институт
function execute($model, $code, $institute) { header('Content-Type: application/json'); if(!__Config::get('metafad.getIccd.activate')) { return 'Servizio non disponibile.'; } $dam = pinax_ObjectFactory::createObject('metafad.dam.services.ImportMedia', $institute); $availableModels = json_decode(__Confi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __getISC (&$model, $result)\n {\n\n if (!empty($result)) {\n if (array_key_exists('SectionA', $result) && isset($result['SectionA'])) $SectionA = $result['SectionA']; else $SectionA = '';\n\n if (is_array($SectionA)) {\n App::import('Model', 'Isc');\n $this->Isc = new I...
[ "0.52619207", "0.523661", "0.5195747", "0.5181999", "0.51688427", "0.5110446", "0.50727683", "0.5020888", "0.50076437", "0.49852717", "0.49833962", "0.49803367", "0.49531904", "0.49511835", "0.49228242", "0.49140567", "0.49115396", "0.49076173", "0.4906865", "0.48939076", "0....
0.73946583
0
TODO: Implement cartItems() method.
TODO: Реализовать метод cartItems().
public function cartItems() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_items_from_cart()\n {\n }", "public function getCartItems()\n {\n return $this->cartItems;\n }", "public function getCartItems()\n {\n return $this->cartItems;\n }", "public function getItemsInCart($cart);", "protected function getCartItems()\n...
[ "0.8337134", "0.8006839", "0.8006839", "0.7800699", "0.77763265", "0.7678666", "0.7500308", "0.74880606", "0.7417441", "0.7369845", "0.72749484", "0.72413063", "0.72295284", "0.7205886", "0.7163844", "0.71583307", "0.71566254", "0.71307343", "0.70916337", "0.7079306", "0.7072...
0.8438541
0
/ $this>db>where('to',$id_pegawai); $status=0; $this>db>select('pegawai1.nama as nama_pengirim, pegawai2.nama as nama_penerima, notif.'); $this>db>order_by('id desc'); $this>db>from('notif'); $this>db>join('pegawai as pegawai1','notif.from=pegawai1.id_pegawai'); $this>db>join('pegawai as pegawai2','notif.to=pegawai2.id...
$this>db>where('to',$id_pegawai); $status=0; $this>db>select('pegawai1.nama as nama_pengirim, pegawai2.nama as nama_penerima, notif.'); $this>db>order_by('id desc'); $this>db>from('notif'); $this>db>join('pegawai as pegawai1','notif.from=pegawai1.id_pegawai'); $this>db>join('pegawai as pegawai2','notif.to=pegawai2.id_p...
function get_detail_notif($id_pegawai=null) { $query = $this->db->get('notif'); echo $this->db->last_query($query); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function notif_belum(){\n\n $this->db->select('*');\n $this->db->from('tb_transaksi');\n $this->db->where('status_notif', 0);\n\n $query = $this->db->get();\n\n return $query;\n\n }", "public function get_save_trx_pos(){ \n $query = $this->db->query(\"\n SELECT no_save,no_...
[ "0.715806", "0.669064", "0.65690565", "0.6535394", "0.65343654", "0.6449432", "0.6414176", "0.63887", "0.63750124", "0.6358487", "0.6356249", "0.6342779", "0.6246902", "0.62413245", "0.61914134", "0.61891544", "0.61868995", "0.61854154", "0.6180589", "0.61790985", "0.6166738"...
0.7809083
0
Creates a form to delete a Ordenantza entity.
Создает форму для удаления сущности Ordenantza.
private function createDeleteForm ( Ordenantza $ordenantza ) { return $this->createFormBuilder() ->setAction( $this->generateUrl( 'ordenantza_delete', array ( 'id' => $ordenantza->getId() ) ) ) ->setMethod( 'DELETE' ) ->getForm(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm(ContaCorrente $contaCorrente)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('contacorrente_delete', array('id' => $contaCorrente->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private f...
[ "0.7505156", "0.74407065", "0.7321984", "0.72879624", "0.7274381", "0.72712016", "0.7256306", "0.7206919", "0.7197458", "0.7194337", "0.71905136", "0.7183002", "0.71713394", "0.7170844", "0.7167617", "0.71663153", "0.71569073", "0.7136611", "0.71286744", "0.71275425", "0.7112...
0.81092596
0
Check Product has URL
Проверить, что у продукта есть URL
public function hasProductUrl($product) { if ($product->getVisibleInSiteVisibilities()) { return true; } if ($product->hasUrlDataObject()) { if (in_array($product->hasUrlDataObject()->getVisibility(), $product->getVisibleInSiteVisibilities())) { return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUrl()\n {\n //get product instance\n /** @var \\Library\\Consume\\ProductList $product */\n $product = $this->getDi()['\\Library\\Consume\\Product'];\n\n //set url\n $product->setUrl('http://www.test.com');\n\n //get url\n $result = $product->...
[ "0.74186265", "0.7210314", "0.7114122", "0.69758695", "0.6877637", "0.6844147", "0.6789925", "0.67251056", "0.67199826", "0.66369176", "0.6577004", "0.6560605", "0.65298635", "0.6460474", "0.64555746", "0.6432128", "0.64167327", "0.64026064", "0.63945127", "0.63290566", "0.63...
0.7701604
0
returns new row number
возвращает новый номер строки
public function getRowNumber() { return $this->rowNumber = 1 - $this->rowNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRowNumber()\n {\n return $this->row_number;\n }", "public function rownum()\n\t{\n\t}", "public function getRowNumber()\n {\n return count($this->getAll());\n }", "function add_row()\n\t{\n\t\t$this->cur_row++;\n\t}", "public function getRowNum(){\n\t\t\treturn ...
[ "0.72466093", "0.7145477", "0.7004028", "0.6944369", "0.68782073", "0.68742144", "0.68297815", "0.67478126", "0.6650341", "0.66033924", "0.6579794", "0.6560057", "0.655381", "0.6488155", "0.6446635", "0.64314926", "0.6409248", "0.63534164", "0.63125277", "0.63083655", "0.6303...
0.7608539
0
Appends the given $action_name to the viewDir and appends the resulting string
Добавляет заданный $action_name в viewDir и добавляет получившуюся строку
function getView($action_name) { return $this->getViewDir() . $action_name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function viewPath($controllerName, $action)\n {\n return VIEWSPATH.$controllerName. DIRECTORY_SEPARATOR .$action.'.php';\n }", "protected function getDestinationViewName($action)\n {\n return sprintf('%s.blade.php', $action);\n }", "function _getViewFn($action) {\n\t\treturn V...
[ "0.680833", "0.63997453", "0.6226065", "0.619539", "0.61912555", "0.6087512", "0.6037501", "0.58530384", "0.5800295", "0.57149935", "0.56724036", "0.55843765", "0.5477209", "0.5459249", "0.545787", "0.54541975", "0.5450652", "0.5433165", "0.5427285", "0.5422297", "0.5354485",...
0.70259875
0
Register the Swift Transport instance.
Зарегистрируйте экземпляр Swift Transport.
protected function registerSwiftTransport() { $this->app->singleton('swift.transport', function ($app) { return new ExtendedTransportManager($app); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function registerLogTransport()\n {\n $this->app->bind('swift.transport', function ($container) {\n return new LogTransport($container['log']->getMonolog());\n });\n }", "protected function registerSmtpTransport($config)\n\t{\n\t\t$this->app['kotakin.swift.transport'] = $...
[ "0.6986802", "0.645702", "0.6443522", "0.6274017", "0.6178966", "0.6141951", "0.6116646", "0.6114911", "0.6016844", "0.59988904", "0.5997535", "0.59513754", "0.585994", "0.58507", "0.58492917", "0.5829739", "0.5772646", "0.57383007", "0.56975484", "0.5633229", "0.5591216", ...
0.8413458
0
Tests if $source filename exists in the cache
Проверяет, существует ли файл $source в кэше
public function isCached($source) { $cache_id = sha1_file($source); $fn = realpath($this->options['save_path']) . DIRECTORY_SEPARATOR . self::PREFIX . '_' . sha1($source . '/' . self::VERSION . '/' . $cache_id); $cached = file_exists($fn); if ($cached) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isCached($source);", "private function _cached_exists()\n {\n return file_exists($this->cached_file);\n }", "public function isCached($filename);", "public function exists(string $source)\n {\n return file_exists($this->resource($source));\n }", "public function ge...
[ "0.75067997", "0.7143087", "0.7099743", "0.6857452", "0.67046", "0.6701047", "0.66656274", "0.6657362", "0.66552967", "0.66203487", "0.66042376", "0.6581191", "0.6517933", "0.64970374", "0.6445023", "0.6440108", "0.63985723", "0.63728404", "0.63561267", "0.6350031", "0.634556...
0.809675
0
Returns contents of $source filename parsed data from the cache
Возвращает содержимое файла $source, проанализованные данные из кэша
public function getCache($source) { $cache_id = sha1_file($source); if (!isset($this->cache[$cache_id]) || !file_exists($this->cache[$cache_id]) ) { return false; } $contents = file_get_contents($this->cache[$cache_id]); return unserialize($c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCache($source);", "public function getSource($path)\n {\n $key = md5(__CLASS__ . __METHOD__ . $path);\n $item = $this->pool->getItem($key);\n if ($item->isMiss()) {\n $item->lock();\n\n // Cache expires 5 minutes.\n $item->expiresAfter(s...
[ "0.70507765", "0.6643372", "0.6605611", "0.65989083", "0.6424432", "0.6321067", "0.62782043", "0.6274618", "0.62284344", "0.62126905", "0.619934", "0.6112943", "0.60897064", "0.606317", "0.5958846", "0.59064424", "0.59018916", "0.58803886", "0.5872815", "0.5863459", "0.585641...
0.7079015
0
Polls all registered feeds. The actual polling is performed by the retrieved Models, so all we do here is get those Models and setup Zend_Feed_Reader caching/conditional GET support if configured. Polling is NOT performed for feeds which have a confirmed Pubsubhubbub subscription active.
ПOLLING всех зарегистрированных фидов. Фактическое опросование выполняется выделенными моделями, поэтому здесь мы просто получаем эти модели и настраиваем поддержку кэширования и условного GET Zend_Feed_Reader, если это настроено. Опрос не выполняется для фидов, у которых активно подтверждено подключение Pubsubhubbub.
public function pollAction() { try { $feeds = Doctrine_Query::create() ->from('Zfplanet_Model_Feed f') ->where( 'f.uri NOT IN (SELECT s.topic_url FROM Zfplanet_Model_Subscription s' . ' WHERE s.subscription_state = ?)', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function poll() {\n\t\t$model = $this->_classes['model'];\n\t\t$responses = array();\n\n\t\tforeach ($this->_config['feeds'] as $name => $path) {\n\t\t\t$responses = array_merge($responses, $model::find('new', compact('name', 'path')));\n\t\t}\n\t\treturn $responses;\n\t}", "private function refresh()\n\t...
[ "0.73417103", "0.63367873", "0.61681557", "0.59308743", "0.58465314", "0.58219063", "0.5782037", "0.5743989", "0.5739232", "0.5736287", "0.57000744", "0.56532186", "0.5617018", "0.56084013", "0.5595677", "0.5579558", "0.5525439", "0.5519791", "0.55111367", "0.54918176", "0.54...
0.746491
0
Registers a namespace and also loads the namespace directory into the autoload register.
Регистрирует пространство имен и также загружает каталог пространства имен в регистр автозагрузки.
public function register($namespace, $dir) { $this->registerNamespace($namespace, $dir); spl_autoload_register(array($this, 'autoload')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register($namespace)\n {\n if (array_key_exists($namespace, $this->namespaces)) {\n return false;\n }\n\n $classLoader = new \\SplClassLoader($namespace, $this->path);\n $classLoader->register();\n\n $this->namespaces[$namespace] = $classLoader;\n re...
[ "0.7234685", "0.70227796", "0.68750465", "0.68349314", "0.67676246", "0.6750561", "0.67403096", "0.6731763", "0.6622493", "0.6618318", "0.6572857", "0.6570777", "0.65669703", "0.65348864", "0.6526234", "0.64680296", "0.63865155", "0.63838637", "0.6378005", "0.6353015", "0.632...
0.7573326
0
Returns the WebLibraryManager object that can be used to add JS/CSS files to this template.
Возвращает объект WebLibraryManager, который можно использовать для добавления файлов JS/CSS в этот шаблон.
public function getWebLibraryManager() { return $this->webLibraryManager; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getWebLibraryManager(): WebLibraryManager;", "public function getWebpageManager()\n\t{\n\t\treturn new Inx_Apiimpl_Webpage_WebpageManagerImpl( $this );\n\t}", "public function getWebsiteManager()\n {\n return $this->get('presta_cms.website_manager');\n }", "public function getAss...
[ "0.7831496", "0.6824416", "0.6270343", "0.62553483", "0.62011606", "0.61911607", "0.59992045", "0.59730256", "0.5970172", "0.58326244", "0.5775418", "0.5719744", "0.56890607", "0.56591815", "0.56381184", "0.5628357", "0.56243056", "0.56243056", "0.56072366", "0.55895746", "0....
0.7832668
0