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
Gets as employeeLevel Level in employer organization (e.g. seniority) that coveys privileges.
Получает уровень сотрудника в организации работодателя (например, стаж) который передает привилегии.
public function getEmployeeLevel() { return $this->employeeLevel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOfficerLevel()\r\n\t{\r\n\t\t//find the current logged in user in the tbl_users table\r\n\t\t$_officer = Officers::model()->findByPk($this->getOfficerID());\r\n\t\treturn $_officer->level;\r\n\t}", "public static function getLevel()\n\t{\n\t\t#if(in_array($_SERVER['SERVER_NAME'], array('localh...
[ "0.7232882", "0.689521", "0.67355937", "0.65768415", "0.65056545", "0.6449014", "0.64421535", "0.64190865", "0.63951635", "0.6339074", "0.63342655", "0.6295008", "0.6295008", "0.6295008", "0.6295008", "0.62866825", "0.62317765", "0.62102085", "0.6198166", "0.6149653", "0.6149...
0.7952893
0
Gets as employeeTitle Title of employee in the employer company that conveys rank or privileges.
Получает как employeeTitle заголовок сотрудника в компании работодателя, который передает ранг или привилегии.
public function getEmployeeTitle() { return $this->employeeTitle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInviteeTitle()\n {\n if ($this->isForSite()) {\n if (!$sites = \\UNL\\VisitorChat\\Controller::$registryService->getSitesByURL($this->getSiteURL())) {\n return false;\n }\n\n if ($site = $sites->current()) {\n $name = $site...
[ "0.6596187", "0.6477081", "0.646578", "0.64633363", "0.64355665", "0.6397314", "0.6377381", "0.635238", "0.6297675", "0.6257634", "0.62200314", "0.6194823", "0.61940664", "0.6165913", "0.6165432", "0.6139672", "0.61156297", "0.60968316", "0.6088938", "0.6087858", "0.6085296",...
0.79287994
0
Gets as employeeStatus Status of employment. Refer to OpenTravel Code List Employee Status (EMP).
Получает статус занятости как employeeStatus. См. OpenTravel Code List Employee Status (EMP).
public function getEmployeeStatus() { return $this->employeeStatus; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmploymentType();", "public function getEstatus()\r\n {\r\n return $this->estatus;\r\n }", "public function getEstatus()\n {\n return $this->estatus;\n }", "public function getIsEmployee() {\n return Yii::$app->user->identity->account_type === self::EMPLOYE...
[ "0.6517611", "0.64172596", "0.63972133", "0.62793124", "0.6128497", "0.6058934", "0.59927917", "0.5987944", "0.5979864", "0.59511423", "0.59100515", "0.58964556", "0.58959556", "0.5832794", "0.5825822", "0.5774935", "0.5774005", "0.5749654", "0.5706346", "0.5703844", "0.56672...
0.81077886
0
Gets the cycle duration in seconds.
Получает продолжительность цикла в секундах.
public function getCycleDuration() { return $this->_cycleDuration; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDuration()\n {\n return $this->getElapsedTime();\n }", "public function getDurationSeconds()\n {\n return $this->duration_seconds;\n }", "public function getDurationSeconds()\n {\n return $this->duration_seconds;\n }", "public function get_duration() ...
[ "0.7310449", "0.72468275", "0.72468275", "0.71915567", "0.7132078", "0.7121448", "0.7106983", "0.708454", "0.706457", "0.706457", "0.706457", "0.70577717", "0.7056416", "0.7048085", "0.7042854", "0.70217407", "0.7017536", "0.70077574", "0.70056695", "0.70056695", "0.70056695"...
0.85365146
0
Sets the cycle duration for this recurring billing.
Устанавливает продолжительность цикла для этого повторяющегося платежа.
public function setCycleDuration($cycleDuration) { $cycleDuration = (int)$cycleDuration; if ($cycleDuration && $this->_cycleDuration != $cycleDuration) { $this->_cycleDuration = $cycleDuration; $this->touch(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCycle($cycle) {\n $this->cycle = $cycle;\n }", "public function setCycle($cycle = '', $interval = '', $interval_count = '') {\n\t\tif (!$cycle instanceof StripeBillingCycle) {\n\t\t\t$cycle = new StripeBillingCycle($cycle, $interval, $interval_count);\n\t\t}\n\t\t$this->billing_cycle = $cy...
[ "0.6916038", "0.63421196", "0.61832434", "0.5843635", "0.5799451", "0.557453", "0.54511523", "0.5416586", "0.5415895", "0.53358537", "0.5089027", "0.5063236", "0.5032221", "0.5024186", "0.49980965", "0.49873948", "0.49783045", "0.48997405", "0.48956412", "0.4886532", "0.48865...
0.7148748
0
Sets the item type.
Устанавливает тип элемента.
public function setItemType($itemType) { $itemType = trim($itemType); if ($itemType && $this->_itemType != $itemType) { $this->_itemType = $itemType; $this->touch(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setItemType($type);", "public function setItemType($value) {\r\n $this->_data[\"ItemType\"] = $value;\r\n return $this;\r\n }", "public function setType($type) {\n $this->_type = $type;\n }", "function setType($type) { $this->type = $type; }", "public function setType( $type );",...
[ "0.8730595", "0.7650889", "0.72596484", "0.7239074", "0.72104174", "0.71738386", "0.7152066", "0.7150826", "0.7148462", "0.71330255", "0.7129749", "0.7129749", "0.7129749", "0.7129749", "0.7129749", "0.7129749", "0.7129749", "0.7129749", "0.7129749", "0.7129749", "0.7129749",...
0.81239486
1
Gets the main order item attached to the order for this recurring billing, or boolean false if not..
Получает основной элемент заказа, привязанный к заказу для этого регулярного платежа, или логическое значение false, если его нет.
public function getOrderItem() { if (!is_object($this->getOrder())) { //no order, can't get order item for order return false; } $order = $this->getOrder(); if ($order) { return $order->getItem('recurring'); } //no main order item f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOrderItem() {\n return $this->orderItem;\n }", "public function getQueueObject($order)\n {\n $filter = array('OrderID' => $order->ID);\n $existingEntry = OrderProcessQueue::get()->filter($filter)->first();\n if($existingEntry) {\n return $existingEntry;\n...
[ "0.6179213", "0.5887895", "0.5800059", "0.5796229", "0.5782247", "0.5754539", "0.574853", "0.5719705", "0.5708707", "0.5677778", "0.5631474", "0.5629589", "0.5620677", "0.55958533", "0.55871147", "0.5551323", "0.5536099", "0.55291456", "0.5527168", "0.5524672", "0.5503515", ...
0.8391972
0
Set the order attached to this recurring billing.
Установите порядок, связанный с этим повторяющимся платежом.
public function setOrder($order) { if (!is_object($order)) { //must be an id, clean it $order = (int)$order; $id = $order; } else { $id = $order->getId(); } if (is_object($this->getOrder()) && $this->getOrder()->getId() == $id) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOrder(Order $order)\n {\n $this->order = $order;\n }", "public function setOrder(Order $order): void\n {\n $this->order = $order;\n }", "public function setOrder(Order $order): void\n {\n $this->order = $order;\n }", "public function setOrder(OrderAda...
[ "0.72358435", "0.7186585", "0.7186585", "0.69170636", "0.6894742", "0.6893517", "0.68220764", "0.68181777", "0.67088914", "0.67088914", "0.67088914", "0.6675615", "0.665708", "0.6601304", "0.6601304", "0.660017", "0.6592789", "0.6535922", "0.65294", "0.64794344", "0.64128274"...
0.77455205
0
Get the paid until timestamp currently set.
Получить текущее время окончания действия подписки.
public function getPaidUntil() { return (int)$this->_paidUntil; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPaidAt() \n\t{\n\t\treturn $this->_paidAt;\n\t}", "public function getPaidExpiry()\n\t{\n\t\treturn $this->paidExpiry; \n\n\t}", "public function getPaidAt() : \\DateTime\n {\n return $this->paidAt;\n }", "public function getPaidTime() {\n return $this->_getField(\"pai...
[ "0.6787263", "0.6450446", "0.62607336", "0.62024534", "0.6064727", "0.5992261", "0.59501934", "0.5902183", "0.58327097", "0.5825484", "0.5806252", "0.57828206", "0.577407", "0.57002586", "0.56973827", "0.5692371", "0.56829834", "0.5659773", "0.5645414", "0.5645414", "0.562364...
0.7227808
0
Gets the price charge per cycle.
Получает цену за цикл.
public function getPricePerCycle() { return $this->_pricePerCycle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCharge()\r\n {\r\n if (!$this->locator->has('change')) {\r\n $this->locator->set('charge', '\\yii\\twocheckout\\TwoCheckoutCharge');\r\n }\r\n return $this->locator->get('charge');\r\n }", "public function getCptCharge() {\n return $this->cptCharge;...
[ "0.64750385", "0.6335001", "0.62779105", "0.62144667", "0.6178538", "0.6084874", "0.6084874", "0.60647804", "0.60318214", "0.60110754", "0.6008871", "0.59878653", "0.5976386", "0.5952242", "0.58821267", "0.58818406", "0.5874179", "0.5873729", "0.58690345", "0.584123", "0.5799...
0.77020866
0
Sets the price per cycle for this recurring billing.
Устанавливает цену за цикл для этого повторяющегося платежа.
public function setPricePerCycle($price) { if ($this->getPricePerCycle() === $price) { //prevent un-necessary setting return; } $this->touch(); //there are new pending changes $price = round(floatval($price), 4);//force cost to be float, 4 decimal places ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPricePerCycle()\n {\n return $this->_pricePerCycle;\n }", "public function setCycle($cycle) {\n $this->cycle = $cycle;\n }", "public function setPaymentCycle($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Channel\\V1\\Period::class);\n $this->payme...
[ "0.6267942", "0.60759777", "0.5927417", "0.57288074", "0.5636739", "0.56126535", "0.56065965", "0.55921733", "0.5574323", "0.5557344", "0.55301446", "0.5508961", "0.55028564", "0.54633474", "0.54572636", "0.5456", "0.5456", "0.5456", "0.5456", "0.54493517", "0.5442692", "0....
0.76353043
0
Get the secondary ID for this recurring billing.
Получите вторичный идентификатор для этого повторяющегося платежа.
public function getSecondaryId() { return $this->_secondaryId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSecondPartyIdentifier()\n {\n return $this -> secondPartyIdentifier;\n }", "public function get_subscription_id() {\n\t\treturn $this->subscription->sub_id();\n\t}", "public function getSecondaryCode()\n {\n return $this->secondaryCode;\n }", "public function getR...
[ "0.64102995", "0.6214737", "0.6181744", "0.60683876", "0.60605145", "0.60536665", "0.6052867", "0.6000827", "0.59995455", "0.59538704", "0.5947887", "0.58980185", "0.58655304", "0.5847507", "0.5811133", "0.58033335", "0.5789626", "0.57792944", "0.577758", "0.57202595", "0.571...
0.7264355
0
Get a recurring billing object according to it's ID
Получить объект периодической оплаты по его ID
public static function getRecurringBilling($id) { if (!geoPC::is_ent()) { return false; } //see if transaction exists in array of transactions. if (is_numeric($id) && isset(self::$_recurringBillings[$id])) { return self::$_recurringBillings[$id]; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createRecurringBillingDriver()\r\n {\r\n return new RecurringBilling;\r\n }", "public function getBilling($id){\n $dealersIds = $this->container->get(\"numa.dms.user\")->getAvailableDealersIds();\n $billing = $this->em->getRepository('NumaDOADMSBundle:Billing')->findOne...
[ "0.65333635", "0.64034414", "0.6391113", "0.63825494", "0.61951774", "0.61639386", "0.6141018", "0.611035", "0.611035", "0.6013347", "0.60125405", "0.59557986", "0.5898058", "0.5876661", "0.5867058", "0.58560646", "0.584832", "0.5844762", "0.5840071", "0.5818861", "0.5787879"...
0.7936302
0
Touch this recurring billing object, indicating that there are changes to be saved on serialize.
Нажмите на этот объект периодической оплаты, указывая, что изменения необходимо сохранить при сериализации.
public function touch() { $this->_pendingChanges = true; //touch anything this object is "attached" to $order = $this->getOrder(); if ($order) { $order->touch(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function touch() {\n\t\t\t$this->updated = date('Y-m-d H:i:s');\n\t\t\t$this->_dirty = true;\n\t\t}", "public function touch()\n {\n $this->updateTimestamp();\n $this->save();\n }", "public function touch()\n {\n $model = $this->getRelated();\n\n if (! $model::isIgno...
[ "0.66132766", "0.6031078", "0.59559095", "0.5910413", "0.5850599", "0.5701557", "0.57006556", "0.56985617", "0.5697615", "0.56257844", "0.5613649", "0.5597431", "0.5588905", "0.5569317", "0.5426944", "0.54161775", "0.5410294", "0.54081273", "0.54024357", "0.5400585", "0.53878...
0.7053366
0
This calls on the gateway to cancel the recurring billing, and then calls the order item to let it know the recurring billing has been canceled so it can act accordingly.
Это вызывает шлюз для отмены регулярного списания, а затем вызывает элемент заказа, чтобы сообщить ему о том, что регулярное списание было отменено, и чтобы он мог действовать соответственно.
public function cancel($reason = '', $alreadyCanceledInGateway = false) { //first let gateway update the recurring billing status $gateway = $this->getGateway(); if (!$gateway) { //Oops! Something wrong return false; } if (!$alreadyCanceledInGateway) {...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function recurringCancel($recurring, $reason = '')\n {\n //Up to each gateway to implement\n }", "function cancelStartedOrderPayment() ;", "function cancelStartedOrderPayment() ;", "public function cancelAction()\n {\n if (Mage::getSingleton('checkout/session')->getLastRealOrder...
[ "0.7268395", "0.6990666", "0.6990666", "0.69711876", "0.6955191", "0.6945078", "0.6903907", "0.6869642", "0.68478054", "0.67851764", "0.6782664", "0.6723856", "0.672383", "0.6722231", "0.670573", "0.66553426", "0.662688", "0.65936565", "0.6540042", "0.6535927", "0.6530211", ...
0.701547
1
Adds a transaction to this recurring billing. The transaction CAN be not serialized yet, if that is the case it will be added to the new array inside of the transactions array.
Добавляет транзакцию в эту регулярную оплату. Транзакция может быть ещё не сериализованной, в таком случае она будет добавлена в новый массив внутри массива транзакций.
public function addTransaction($transaction) { if (!is_object($transaction)) { //item that is being added needs to be an object. return false; } $this->initTransactions(); $id = $transaction->getId(); if ($id > 0) { //item already has it's...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addToTransactions(\\StructType\\TransactionDetails $item)\n {\n // validation for constraint: itemType\n if (!$item instanceof \\StructType\\TransactionDetails) {\n throw new \\InvalidArgumentException(sprintf('The Transactions property can only contain items of \\Struct...
[ "0.60160416", "0.5862999", "0.5773702", "0.5763931", "0.5650169", "0.5625961", "0.55117583", "0.5504915", "0.542967", "0.54296345", "0.53810704", "0.52878714", "0.52808213", "0.52726793", "0.52396715", "0.52366996", "0.5223541", "0.52218354", "0.52101725", "0.5206008", "0.519...
0.7160883
0
initializes transactions, used internally.
инициализирует транзакции, используется внутренне.
public function initTransactions() { if (isset($this->_transactions) && is_array($this->_transactions) || !$this->_id) { return; } $db = DataAccess::getInstance(); //Unserialize transactions $this->_transactions = array(); //get the transactions attached t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _transactionInit() {\n $this->_transactionList = array();\n }", "function startTransaction() {\n\t\t$this->_queries = array();\n\t\t$this->_inTransaction = true;\n\t}", "public function __construct() {\n\t\t\t$this->databaseTransaction = new DatabaseTransaction();\n\t\t}", "publi...
[ "0.7863427", "0.7240518", "0.71085376", "0.69855064", "0.6896623", "0.6879663", "0.6879663", "0.68608826", "0.6847814", "0.6847376", "0.6846387", "0.6813815", "0.6780562", "0.6780562", "0.6778588", "0.6778588", "0.6778588", "0.6778588", "0.6773232", "0.675205", "0.6745141", ...
0.73217124
1
Convenience method to detect if at least one valid gateway has Recurring Billing turned on
Удобный метод для определения того, включен ли Recurring Billing хотя бы для одного действительного шлюза
public static function RecurringBillingIsAvailable() { //easy way to get any active payment gateways $r = geoPaymentGateway::getPaymentGatewayOfType('recurring'); return (bool)(count($r) > 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isRecurringPaymentEnabled() ;", "function isRecurringPaymentEnabled() ;", "public function hasBillingEnabled(){\n return $this->_has(4);\n }", "public function hasBillingAccounts(){\n return $this->_has(1);\n }", "public function isRecurring(): bool\n {\n return $this->pa...
[ "0.7282724", "0.7282724", "0.6725331", "0.65259963", "0.64676654", "0.6393916", "0.63585", "0.6200053", "0.61936855", "0.6175084", "0.6173179", "0.61537033", "0.614555", "0.61400765", "0.6127208", "0.6123376", "0.609924", "0.6018818", "0.5946724", "0.5932204", "0.59153533", ...
0.7754379
0
Get Excel Mime Types
Получить типы MIME Excel
public function getExcelMimeTypes() { return [ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-excel', 'application/excel', 'application/x-excel', 'application/x-msexcel', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSupportedMimeTypes();", "public function getMimeTypes(): array;", "public function supportedMimeTypes(): array;", "public function getMimetype();", "public function getMimeTypes() {\n if (!isset(self::$mime_types)) {\n $headers = array('Content-Type: application/json', 'Cont...
[ "0.8088053", "0.7922332", "0.77733904", "0.7601469", "0.7538678", "0.7439305", "0.7437571", "0.7417692", "0.73764545", "0.7366161", "0.73543197", "0.7318009", "0.72428304", "0.7160836", "0.7141555", "0.71286696", "0.7120585", "0.7120585", "0.71125966", "0.7110099", "0.7107804...
0.8420408
0
Get Sheets from Reader
Получить листы из читателя
abstract function getSheets($filestream, $reader);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadSheets()\n {\n $index = 1;\n foreach ($this->sheet_info as $id => $name) {\n if (!isset($this->relationships[$id])) {\n throw new XLSXReaderException('Spreadsheet is malformed - refers to non-existing relationship');\n }\n\n if...
[ "0.66598856", "0.6644148", "0.6281376", "0.6253949", "0.62359536", "0.6233864", "0.6047534", "0.6047283", "0.6031336", "0.59320575", "0.5895801", "0.589341", "0.58610415", "0.58488107", "0.5841478", "0.5818176", "0.5798563", "0.5776738", "0.5763967", "0.5685373", "0.56502837"...
0.75447947
0
Collate data inside Sheets to an Array
Сбор данных внутри Sheets в массив
abstract function convertSheetsToArray($sheets);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSheetAsArray(){\n\t$document = PHPExcel_IOFactory::load(dirname(__FILE__).'\\000_sample_data.xls');\n\t\n\t// Get the active sheet as an array\n\t$activeSheetData = $document->getActiveSheet()->toArray(null, true, true, true);\n\t\n\t// var_dump($activeSheetData);\n\treturn $activeSheetData;\n\t\n}", ...
[ "0.7148362", "0.64975834", "0.6464251", "0.6309392", "0.6296608", "0.6227592", "0.6195007", "0.6059375", "0.59932107", "0.59555596", "0.5941992", "0.5891591", "0.5877219", "0.58514863", "0.58321655", "0.5808795", "0.57855785", "0.5751488", "0.5739931", "0.5733568", "0.5722086...
0.7809335
0
Sets the channel for this stream query
Устанавливает канал для этого запроса потока
public function channel($channel) { $this->_channel = $channel; $this->_query->andWhere(['content.stream_channel' => $channel]); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function channel($channel)\n {\n $this->channel = $channel;\n $this->_query->andWhere(['content.stream_channel' => $channel]);\n return $this;\n }", "public function setChannel($var)\n {\n GPBUtil::checkString($var, True);\n $this->channel = $var;\n\n ret...
[ "0.73674804", "0.6817511", "0.6715065", "0.6683877", "0.6676602", "0.6556439", "0.64778835", "0.62717915", "0.6243818", "0.6197875", "0.6183324", "0.61222327", "0.60429037", "0.5998685", "0.597298", "0.59599084", "0.5950404", "0.5918481", "0.5875676", "0.5765669", "0.57221156...
0.73539865
1
Merges any number of arrays / parameters recursively, replacing entries with string keys with values from latter arrays. If the entry or the next value to be assigned is an array, then it automagically treats both arguments as an array. Numeric entries are appended, not replaced, but only if they are unique calling: re...
Объединяет любое количество массивов / параметров рекурсивно, заменяя элементы с строковыми ключами значениями из последующих массивов. Если элемент или следующее значение, которое нужно назначить, является массивом, то он автоматически рассматривает оба аргумента как массивы. Числовые элементы добавляются, а не заменя...
public static function array_merge_recursive_distinct() { $arrays = func_get_args(); $base = array_shift($arrays); if (!is_array($base)) $base = empty($base) ? array() : array($base); foreach ($arrays as $append) { if (!is_array($append)) $append = array($append); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function mergeRecursiveDistinct()\n {\n $prepare = function ($arg) {\n return ! is_array($arg) ? array($arg) : $arg;\n };\n $arguments = func_get_args();\n $base = $prepare(array_shift($arguments));\n\n foreach ($arguments as $argument) {\n\n ...
[ "0.73815745", "0.71044314", "0.70468843", "0.69891965", "0.6948098", "0.69475454", "0.68140274", "0.6782816", "0.67606014", "0.67449117", "0.6732628", "0.6715576", "0.66736275", "0.6641703", "0.6621471", "0.6602101", "0.65631247", "0.6553166", "0.6550349", "0.6533432", "0.648...
0.78773475
0
Get i18n label from id
Получить метку i18n по идентификатору
public static function labelI18n($id) { return Unitkit::t('unitkit', 'u_i18n_' . $id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function id_for_label( $id ) {\n return $id;\n }", "function get_label($msg_id) {\n\t$msg = $GLOBALS ['CI']->lang->line ( 'FL00' . $msg_id );\n\treturn (empty ( $msg ) == false ? $msg : $msg_id);\n}", "public function getLabel($field,$language_id=1,$id='') \n {\n $label=$this->getLabels($fi...
[ "0.80464745", "0.78648436", "0.7664309", "0.7415964", "0.7263756", "0.71128297", "0.71092385", "0.70269734", "0.7024315", "0.70040894", "0.6991951", "0.6962601", "0.69583553", "0.6898862", "0.6876311", "0.6828589", "0.6826041", "0.67788106", "0.6749451", "0.67455965", "0.6724...
0.8274227
0
Retourne le nombre de total de modules finis
Возвращает общее количество завершенных модулей
function get_count_modules_finished() { global $modules; $i = 0; foreach( $modules as $mod ) { if( $mod->done !== true ) continue; $i++; } return $i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function size():int{\n\t\treturn $this->moduleCount;\n\t}", "function mosCountModules( $position='left' )\n{\n\treturn count(JModuleHelper::getModules($position));\n}", "public static function countModules($position) {\r\n\t\t\tself::fetchModules();\t\r\n\t\t\t$curmods=self::$curmodules;\r\n\t\t\t$n_blo...
[ "0.71918315", "0.7029459", "0.6862399", "0.68096995", "0.6798525", "0.67503446", "0.67483354", "0.66248876", "0.65959966", "0.6320789", "0.6271244", "0.6236745", "0.6226929", "0.6198209", "0.6198209", "0.6198209", "0.6198209", "0.6087476", "0.6068245", "0.6068245", "0.6066938...
0.7555291
0
Get the external sources
Получить внешние источники
public function getExternalSources() { return $this->getSources(self::SOURCE_TYPE_EXTERNAL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExternalSources();", "public function getSources();", "public static function get_sources() {\n\t\treturn self::$sources;\n\t}", "static function getSources() {\n\t\treturn self::$sources;\n\t}", "public static function getAllSources() {\n return self::$_sources;\n }", "prote...
[ "0.91703343", "0.80738294", "0.7822295", "0.777778", "0.7656787", "0.75635445", "0.75166196", "0.7449651", "0.7449651", "0.7449651", "0.7449651", "0.7449651", "0.7357313", "0.7311529", "0.72762096", "0.7216738", "0.71313345", "0.6890092", "0.68800527", "0.67987907", "0.679844...
0.81295717
1
Get the internal source names
Получить внутренние имена источников
public function getInternalSourceNames() { return $this->getSourceNames(self::SOURCE_TYPE_INTERNAL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllSourceNames()\n {\n return $this->getSourceNames(self::SOURCE_TYPE_BOTH);\n }", "public function getExternalSourceNames()\n {\n return $this->getSourceNames(self::SOURCE_TYPE_EXTERNAL);\n }", "public static function getAllSourceNames() {\n $names = [];\n ...
[ "0.77035093", "0.750763", "0.73885787", "0.6944038", "0.6841679", "0.6787502", "0.6605689", "0.6571078", "0.65048975", "0.64536476", "0.64433575", "0.64296913", "0.63072765", "0.62955046", "0.62907964", "0.6286078", "0.62587875", "0.62587446", "0.6256437", "0.6220641", "0.620...
0.85290885
0
Get the external source names
Получить имена внешних источников
public function getExternalSourceNames() { return $this->getSourceNames(self::SOURCE_TYPE_EXTERNAL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExternalSources();", "public function getInternalSourceNames()\n {\n return $this->getSourceNames(self::SOURCE_TYPE_INTERNAL);\n }", "public function getAllSourceNames()\n {\n return $this->getSourceNames(self::SOURCE_TYPE_BOTH);\n }", "public static function getA...
[ "0.8190315", "0.74384224", "0.73563105", "0.7338366", "0.73124653", "0.6972322", "0.6806933", "0.6676525", "0.6553861", "0.6515216", "0.64417815", "0.64392644", "0.6437653", "0.64219606", "0.64075357", "0.63776183", "0.63437164", "0.6278528", "0.6278528", "0.6278528", "0.6278...
0.8418636
0
Get the source names
Получить имена источников
public function getAllSourceNames() { return $this->getSourceNames(self::SOURCE_TYPE_BOTH); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getAllSourceNames() {\n $names = [];\n \n foreach (self::getAllSources() as $source) {\n $names[$source->getName()] = rtrim($source->getBaseUrl(), '/');\n }\n\n return $names;\n }", "public function getExternalSourceNames()\n {\n r...
[ "0.7979105", "0.7479066", "0.736311", "0.73253417", "0.7238045", "0.7155027", "0.6922597", "0.6911589", "0.69015884", "0.685991", "0.68293166", "0.6825191", "0.6668397", "0.6668397", "0.6668397", "0.6668397", "0.6668397", "0.6665667", "0.6630556", "0.6627691", "0.6617266", ...
0.841078
0
/ function addItem($type, $elementID, $link = "", $static = NULL)
/ функция addItem($type, $elementID, $link = "", $static = NULL)
public function addItem($type, $name, $id, $link = "#", $icon, $static = NULL, $description) { $obj = NULL; $obj->type = $type; $obj->id = $id; $obj->name = $name; $obj->link = $link; $obj->icon = $icon; $obj->static = $static; $obj->description = $des...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add($item);", "public function add( $item );", "abstract public function add($item);", "abstract public function add($item);", "public function add($item);", "public function add($item);", "public function add_item($item)\n {\n }", "function AddItem($item) {\n\t\t$this->ItemDat...
[ "0.721058", "0.7107284", "0.69492656", "0.69492656", "0.69411546", "0.69411546", "0.6938389", "0.68108225", "0.6780068", "0.673795", "0.6707375", "0.6663822", "0.665472", "0.6629753", "0.65175027", "0.65109205", "0.64810044", "0.6462277", "0.6430574", "0.64157677", "0.6387664...
0.7738184
0
Test using the method webhooksList
Тестирование с использованием метода webhooksList
public function testWebhooksList() { $client = static::getInsalesApiClient(); $response = $client->webhooksList(); static::checkResponse($response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function webhooks()\n {\n\n }", "public function listWebHooks()\n {\n $this->apiEndPoint = 'v1/notifications/webhooks';\n\n $this->verb = 'get';\n\n return $this->doPayPalRequest();\n }", "public function testGetWebhooks()\n {\n }", "function listWebhooks...
[ "0.7181545", "0.7123217", "0.7117902", "0.698359", "0.68594605", "0.6813403", "0.6773385", "0.6657304", "0.6626634", "0.6551108", "0.6539757", "0.64569896", "0.64415586", "0.6375333", "0.6349002", "0.6336105", "0.63161427", "0.6282077", "0.62688977", "0.6261292", "0.62608683"...
0.8593616
0
Test using the method webhookGet to give exception
Тестирование с использованием метода webhookGet для получения исключения
public function testWebhookGetException($webhookId) { $client = static::getInsalesApiClient(); $client->webhookGet($webhookId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetWebhook()\n {\n }", "public function testGetWebhooks()\n {\n }", "public function testSetWebhook()\n {\n }", "public function testPfsWebhookPost()\n {\n }", "public function testGetWebhookLogs()\n {\n }", "public function fetchResourceByEventWithEmptyR...
[ "0.71857226", "0.6899936", "0.6878399", "0.66351974", "0.6411321", "0.63999426", "0.6322964", "0.62240535", "0.6111542", "0.611013", "0.6102342", "0.6093325", "0.60873896", "0.6066229", "0.6036318", "0.60131633", "0.5999098", "0.59919053", "0.5987361", "0.59845304", "0.597898...
0.7263672
0
Test using the method webhookCreate to give exception
Тестирование с использованием метода webhookCreate для получения исключения
public function testWebhookCreateException($webhookId, $webhook) { $client = static::getInsalesApiClient(); $client->webhookCreate($webhook); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create(&$webhook)\n {\n }", "public function testSetWebhook()\n {\n }", "public function testPfsWebhookPost()\n {\n }", "public function testGetWebhook()\n {\n }", "public function testWebhookCreate()\n {\n $client = static::getInsalesApiClient();\n...
[ "0.756627", "0.72103035", "0.7072118", "0.6994312", "0.6975827", "0.6831276", "0.6814851", "0.6675978", "0.6657095", "0.6582037", "0.6573309", "0.65035415", "0.6457718", "0.645403", "0.6430753", "0.6416908", "0.6352631", "0.6312507", "0.6308762", "0.6288735", "0.6265728", "...
0.7575067
0
Test using the method webhookUpdate to give exception
Тестирование с использованием метода webhookUpdate для вызова исключения
public function testWebhookUpdateException($webhookId, $webhook) { $client = static::getInsalesApiClient(); $client->webhookUpdate($webhookId, $webhook); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetWebhook()\n {\n }", "public function testPfsWebhookPost()\n {\n }", "public function testGetWebhook()\n {\n }", "public function testEventUpdateValidation()\n {\n $event = $this->createEventForToday();\n\n $result = $this->actingAs($this->user)\n ...
[ "0.68484956", "0.65591073", "0.65169907", "0.64685786", "0.6444286", "0.6419872", "0.63960403", "0.6190898", "0.6187923", "0.61842954", "0.61607844", "0.6133458", "0.61289936", "0.61100674", "0.6109519", "0.6092468", "0.60872376", "0.60706705", "0.60705984", "0.6049964", "0.6...
0.72598916
0
Creates a form to delete a Paciente entity.
Создает форму для удаления сущности Paciente.
private function createDeleteForm(Paciente $paciente) { return $this->createFormBuilder() ->setAction($this->generateUrl('paciente_delete', ['id' => $paciente->getId()])) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createDeleteForm(Experiencia $experiencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('experiencia_delete', array('id' => $experiencium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "private functio...
[ "0.75626326", "0.75272304", "0.74851", "0.7484352", "0.7477365", "0.7424809", "0.74202865", "0.7420125", "0.7408197", "0.74025726", "0.73511297", "0.7323786", "0.72930616", "0.72717613", "0.7268162", "0.72456086", "0.72436535", "0.72412986", "0.7223026", "0.72202444", "0.7219...
0.7978251
0
Saves userId for session on login etc
Сохраняет userId для сессии при входе и т.д.
private static function _saveToSession($userId) { self::_session_start(); $_SESSION['id'] = $userId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveUserId($idd)\n{\n// sessions_start();\n $_SESSION[\"USER_ID\"] = $idd;\n}", "public function setUserId($userId){\n\t\t$_SESSION['userId'] = $userId;\n\t}", "private function setUserId($userId) {\n\t\t$_SESSION[self::SESSION_FIELD_USER_ID] = intval($userId);\n\t}", "private function saveSes...
[ "0.77745914", "0.7708633", "0.76126736", "0.7333634", "0.7235646", "0.7131752", "0.70734936", "0.70547724", "0.70534277", "0.70160776", "0.7010482", "0.7010482", "0.7010482", "0.696843", "0.6955153", "0.6928581", "0.6915024", "0.6883465", "0.687729", "0.6861584", "0.6850921",...
0.7725472
1
Initialize a new bucket. If the given bucket does not exist, the bucket will be automatically created.
Инициализируйте новый бакет. Если заданный бакет не существует, он будет автоматически создан.
public function initBucket(string $bucket) { return new Bucket( $bucket, $this->read_key, $this->write_key ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function initializeBucket() {\n $this->bucket = [];\n }", "public function __construct() {\n $this->initializeBucket();\n }", "public static function createBucket()\n {\n $ossClient = self::getOssClient();\n if (is_null($ossClient)) exit(1);\n $bucket = self:...
[ "0.71540755", "0.70426214", "0.6971456", "0.6848551", "0.6848551", "0.6848551", "0.68431467", "0.6670792", "0.66568774", "0.65655917", "0.6376241", "0.63586944", "0.6314544", "0.6301958", "0.6276324", "0.6242422", "0.62146455", "0.61650795", "0.6086712", "0.6067601", "0.60284...
0.7896305
0
get all active schedules' tickets
получить все активные расписания билетов
function get_schedule_tickets($id) { $this->db->where('scheduleId', $id); $this->db->where('ticketStatus', 1); $this->db->order_by('ticketId', 'desc'); $queryActive = $this->db->get('TICKET'); return $queryActive->result(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetTickets(){\t\n\t\t$this->tickets = array();\n\t\t$where = array('cid = '. (int)$this->id);\n\t\t$today = $this->datefn->SQLDate();\n\t\t\n\t\tif ($this->liveonly){\n\t\t\t$where[] = 'live=1';\n\t\t}\n\t\t\n\t\t$sql = 'SELECT * FROM coursetickets WHERE ' . implode(' AND ', $where);\n\t\tif($resul...
[ "0.726635", "0.72190773", "0.7132579", "0.7008115", "0.7006019", "0.6831369", "0.67905235", "0.67510116", "0.66863674", "0.6550492", "0.64351153", "0.64228266", "0.6402264", "0.6383277", "0.636636", "0.63639504", "0.6335052", "0.6323758", "0.6320892", "0.6309733", "0.6305035"...
0.75236446
0
Get the value of titreOffre
Получить значение titreOffre
public function getTitreOffre() { return $this->titreOffre; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTitel()\n {\n return $this->titel;\n }", "public function getTitre()\r\n {\r\n return $this->titre;\r\n }", "public function getTitre()\r\n {\r\n return $this->titre;\r\n }", "public function getTitre()\r\n {\r\n return $this->titre;\r\n ...
[ "0.7404526", "0.73180187", "0.73180187", "0.73180187", "0.7293961", "0.7290513", "0.7281005", "0.7281005", "0.7281005", "0.7281005", "0.7281005", "0.72574186", "0.72550833", "0.7250988", "0.72469413", "0.7218383", "0.72055155", "0.69919145", "0.69526964", "0.6938259", "0.6927...
0.7974321
0
Get the value of mailUser
Получить значение mailUser
public function getMailUser() { return $this->mailUser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserMail(){\n\t\treturn $this->userMail;\n\t}", "public function getUserMail()\n {\n return $this->_user_mail;\n }", "public function getMail()\n {\n return $this->_validate($this->getUserDbUser()->getSingle('mail'));\n }", "function _getUserEmail()\r\n {\r\n ...
[ "0.78509414", "0.75646764", "0.7237266", "0.7178489", "0.71730816", "0.716319", "0.71550834", "0.70426166", "0.7000751", "0.6969412", "0.69576955", "0.69576955", "0.6873882", "0.68518186", "0.68474203", "0.68278134", "0.6812051", "0.68119794", "0.68053705", "0.68049943", "0.6...
0.76498824
1
Get the value of mailEntreprise
Получить значение mailEntreprise
public function getMailEntreprise() { return $this->mailEntreprise; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMail()\n {\n return $this->identite['mail'];\n }", "public function getMail();", "public function getMail();", "public function getMail() {\n return ($this->mail);\n }", "public function getPersonMail();", "public function getMail()\n {\n return $this->...
[ "0.7306837", "0.7231416", "0.7231416", "0.7094731", "0.7057672", "0.7042929", "0.70258874", "0.70258874", "0.70258874", "0.6944758", "0.6927094", "0.691855", "0.6898425", "0.68701166", "0.6842996", "0.6839824", "0.6814391", "0.68131995", "0.6780661", "0.6780661", "0.6780661",...
0.79917425
0
Load the BP Attachments plugin.
Загрузите плагин BP Attachments.
function _load_bp_attachments_plugin() { add_filter( 'bp_rest_api_is_available', '__return_false' ); // Make sure BP is installed and loaded first. require BP_TESTS_DIR . '/includes/loader.php'; // Load our plugin. require_once dirname( __FILE__ ) . '/../../class-bp-attachments.php'; // Set version. bp_update...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function load(){\n\n\n\n\t\tif ( ! method_exists( 'GFForms', 'include_feed_addon_framework' ) ) {\n\n\t\t\treturn;\n\n\t\t}\n\t\t\n\t\trequire_once( 'class-gf-buddy.php' );\n\n\t\tGFAddOn::register( 'GFBuddy' );\n\n\n\t}", "public static function load(){\n\n\t\tif ( ! method_exists( 'GFForms', 'inc...
[ "0.6251123", "0.61288965", "0.60099345", "0.599669", "0.57347596", "0.5709991", "0.5632323", "0.5592298", "0.5583404", "0.5560662", "0.5473555", "0.5429927", "0.5416161", "0.53463197", "0.532766", "0.5316972", "0.5269295", "0.5263837", "0.52517104", "0.5234772", "0.52336854",...
0.8290149
0
/ It removes the brand information from the database and returns the json format operation messages
Удаляет информацию о бренде из базы данных и возвращает сообщения операции в формате JSON
public function remove() { if(!in_array('deleteBrand', $this->permission)) { redirect('dashboard', 'refresh'); } $brand_id = $this->input->post('brand_id'); $response = array(); if($brand_id) { $delete = $this->model_brands->remove($brand_id); if($delete == true) { $response['success'] = tru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy($brandName): JsonResponse\n {\n $unwantedBrand = brands::find($brandName);\n if(is_null($unwantedBrand)){\n return response()->json([\"message\"=>\"not found\"],401);\n }\n if(!$unwantedBrand){\n return response()->json([\"message\" => \...
[ "0.6682397", "0.66507536", "0.638148", "0.62495285", "0.6245824", "0.62370586", "0.59158885", "0.58953756", "0.589242", "0.5881049", "0.5862865", "0.5837636", "0.58299196", "0.58289444", "0.5768771", "0.5746334", "0.5713327", "0.5703716", "0.5693558", "0.5690791", "0.56893015...
0.7177809
0
Test the fixture structured_with_attachment.eml
Проверьте фикстуру structured_with_attachment.eml
public function testFixture() : void { $message = $this->getFixture("structured_with_attachment.eml"); self::assertEquals("Test", $message->getSubject()); self::assertEquals("Test", $message->getTextBody()); self::assertFalse($message->hasHTMLBody()); self::assertEquals("2017-0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFixture() : void {\n $message = $this->getFixture(\"attachment_long_filename.eml\");\n\n self::assertEquals(\"\", $message->subject);\n self::assertEquals(\"multipart/mixed\", $message->content_type->last());\n self::assertFalse($message->hasTextBody());\n sel...
[ "0.7542253", "0.7470875", "0.61411494", "0.61201316", "0.61201316", "0.59865844", "0.5979724", "0.59167004", "0.58733755", "0.5822624", "0.5759439", "0.57477015", "0.57259554", "0.5698473", "0.56700206", "0.5649504", "0.564594", "0.56323606", "0.55994457", "0.5572222", "0.551...
0.79556304
0
Lists all presentation entities.
Список всех представительских сущностей.
public function indexAction() { $em = $this->getDoctrine()->getManager(); $presentations = $em->getRepository('App:Presentation')->findAll(); return $this->render('presentation/index.html.twig', array( 'presentations' => $presentations, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listAction()\n {\n $entityRepository = $this->getRepository();\n $entities = $entityRepository->findAll();\n\n return $this->render(\n $this->getTemplate(__FUNCTION__),\n [\n 'entities' => $entities,\n ]\n );\n\n }", ...
[ "0.7296068", "0.7213132", "0.71060777", "0.68753463", "0.6800109", "0.67790276", "0.67732114", "0.6728132", "0.67273", "0.6683506", "0.666041", "0.6628924", "0.66285527", "0.66140896", "0.66063935", "0.66006655", "0.6589493", "0.6588583", "0.6584185", "0.6571437", "0.6570471"...
0.73916477
0
Creates a form to delete a presentation entity.
Создает форму для удаления сущности презентации.
private function createDeleteForm(Presentation $presentation) { return $this->createFormBuilder() ->setAction($this->generateUrl('presentation_delete', array('id' => $presentation->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createNewDeleteAdForm(): DeleteAdForm;", "protected function templateForDeleteAction()\n {\n return 'UnitedOneBundle:Form:form.html.twig';\n }", "protected function createComponentDeleteForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addHidden('id_produkt');\r\n\t\t$form->addS...
[ "0.7144958", "0.7033312", "0.68958837", "0.6890874", "0.68649197", "0.6834342", "0.68277353", "0.6813891", "0.68078697", "0.6805958", "0.68033445", "0.6803135", "0.6734122", "0.6732836", "0.67326105", "0.6732238", "0.6716265", "0.67053354", "0.6676884", "0.66724133", "0.66437...
0.80355144
0
Function: browse() Description: Extracts a list of all contact data records and displays it.
Функция: browse() Описание: Извлекает список всех записей данных контактов и отображает его.
function browse() { $this->user_group_model->can_access(VIEW_LIST_CONTACT, null, null); $start = (int)$this->uri->segment(3,0); $limit_per_page = 20; $this->load->model('contact_model'); // Instantiate the model //$user_id = $this->session->userdata('userid'); $filte...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n $data=Contact::paginate(20);\n return Voyager::view('vendor.voyager.contacts.browse',compact('data'));\n \n }", "public function browseAction() {\n\n $records = $this->_getFiles();\n $this->view->records = $records;\n }", "public static ...
[ "0.6699721", "0.65410066", "0.6526252", "0.64552563", "0.63392967", "0.62271893", "0.6126655", "0.6086256", "0.5984609", "0.59708726", "0.58967435", "0.58436126", "0.57764167", "0.5776336", "0.5775714", "0.57578796", "0.5739017", "0.5728611", "0.5722333", "0.57020557", "0.569...
0.7251082
0
Get count of forecast days
Получить количество дней прогноза
public function getDayCount() { return count($this->session->elements($this->_daySelector[0], $this->_daySelector[1])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotalNumberOfDays(): int\n {\n return count($this->gifts);\n }", "function GetVFTDayCount() {\n return $this->posnetResponse->vft_daycount;\n }", "public function getNumberOfDays()\n\t{\n\t\treturn count(self::$week);\n\t}", "function getNumDays()\n {\n ret...
[ "0.7031341", "0.6770644", "0.66546583", "0.6579967", "0.65304923", "0.6506748", "0.6457023", "0.64190054", "0.63845694", "0.63746744", "0.63650566", "0.6353014", "0.6339607", "0.6317117", "0.62950206", "0.62580323", "0.6200738", "0.6193072", "0.6148613", "0.6107008", "0.60937...
0.71226364
0
/ Get the number of minutes since a pull
/ Получить количество минут с момента последнего запуска
public function getLastPull() { $minutes_since = null; $sql='SELECT last_pull_start FROM ' . self::tablename . ' WHERE id = ' . $this->id; $this->db->query($sql); if ( $temp = $this->db->fetchAssoc() ) { $now = strtotime('now'); $then = strtotime($temp['last_p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function minutesSince(): int\n {\n return \\absint($this->secondsSince() / MINUTE_IN_SECONDS);\n }", "public function getMinutes()\n {\n return $this->startTimeStamp ['minutes'];\n }", "public function getMinutes() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"m...
[ "0.6229821", "0.6049156", "0.604592", "0.604592", "0.60288453", "0.60126936", "0.6007738", "0.59190553", "0.59051514", "0.5888567", "0.5888567", "0.5884508", "0.5840612", "0.5808005", "0.58065295", "0.5802454", "0.579338", "0.5775601", "0.5756529", "0.5750166", "0.57402563", ...
0.7858824
0
Fetch a session by key
Получить сессию по ключу
public function getSession (string $key) : Session;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFromSession($key);", "public function get($key)\n {\n return $this->sessioning->get($this->domain, $key);\n }", "public static function read($key) {\n \t$val = self::$redis->hget(\"sessions\",$key); \t\n \treturn (false !== $val) ? $val : null;\n }", "public functio...
[ "0.8527134", "0.7632624", "0.75008816", "0.7492802", "0.7465605", "0.7462605", "0.7449223", "0.7365673", "0.7361332", "0.7332958", "0.72974986", "0.72779125", "0.72122526", "0.7191648", "0.714428", "0.71329516", "0.71275765", "0.71212155", "0.70972085", "0.7083645", "0.703006...
0.78480214
1
Create a new session by key
Создать новую сессию по ключу
public function createSession (string $key) : Session;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSession (string $key) : Session;", "public function create($key);", "public function create($key, $value)\n {\n return $this->session->offsetSet($key, $value);\n }", "private function createSessionKey(){\n\t\t$sessionData = $GLOBALS['TSFE']->fe_user->getKey('ses', 'wx_lottery'...
[ "0.7412281", "0.7099694", "0.698052", "0.6727263", "0.65773076", "0.6566511", "0.6444245", "0.63707924", "0.63496166", "0.63381124", "0.6290472", "0.62574863", "0.62550765", "0.62522745", "0.6245442", "0.62125564", "0.6197686", "0.6191485", "0.61816186", "0.6177916", "0.61432...
0.877404
0
View and modify notification settings
Просмотр и изменение настроек уведомлений
function settings() { $this->validate(); $this->setupTemplate(); $user = Request::getUser(); if(isset($user)) { import('classes.notification.form.NotificationSettingsForm'); $notificationSettingsForm = new NotificationSettingsForm(); $notificationSettingsForm->display(); } else PKPRequest::redirect...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bp_notifications_screen_settings() {}", "public function email_notification_setting()\n {\n }", "public function notification()\n {\n return view('setting.notification');\n }", "public function notifications()\n\t{\n\t\t$active = 'notifications';\n\t\t$title = 'Notificatio...
[ "0.7094562", "0.68777436", "0.68273485", "0.6739225", "0.67093074", "0.669972", "0.66687655", "0.6545789", "0.65193814", "0.6462864", "0.6436798", "0.6378299", "0.63773173", "0.6377282", "0.6377282", "0.63381493", "0.63363373", "0.6323459", "0.6318449", "0.6309775", "0.630795...
0.7192903
0
Save user notification settings
Сохранить настройки уведомлений пользователя
function saveSettings() { $this->validate(); $this->setupTemplate(true); import('classes.notification.form.NotificationSettingsForm'); $notificationSettingsForm = new NotificationSettingsForm(); $notificationSettingsForm->readInputData(); if ($notificationSettingsForm->validate()) { $notificationSetti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function integrate_save_modify_mention_settings()\n\t{\n\t\t$req = HttpReq::instance();\n\n\t\t$notification = new UserNotification(database(), User::$info);\n\t\t$req->post = $notification->validate($req->post);\n\t}", "public function save_user_settings() {\n \n // Saves user settin...
[ "0.7622645", "0.7270344", "0.7249951", "0.7176785", "0.70438087", "0.6986552", "0.69196963", "0.69196963", "0.6853919", "0.68214685", "0.6763105", "0.67105734", "0.6674457", "0.65977234", "0.65811217", "0.6567465", "0.65557915", "0.6555773", "0.6552816", "0.6531205", "0.65234...
0.7445728
1
Display the public notification email subscription form
Показать форму подписки на публичное уведомление по электронной почте
function subscribeMailList() { $this->setupTemplate(); $user = Request::getUser(); if(!isset($user)) { import('lib.pkp.classes.notification.form.NotificationMailingListForm'); $notificationMailingListForm = new NotificationMailingListForm(); $notificationMailingListForm->display(); } else PKPRequest:...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function show_subscribe_widget() {\n\t\t\n\t\tif( isset( $_POST[ 'btn-subscribe' ] ) ) {\n\t\t\t\n\t\t\t$status = WPPUtils::new_subscriber( $_POST[ 'txt-email-address' ] );\n\t\t\t\n\t\t\tif( $status == 'inserted' ) {\n\t\t\t\t\n\t\t\t\t$status = '<span class=\"help-inline\">You are now subscribed.</...
[ "0.7027471", "0.68852144", "0.6861115", "0.6827101", "0.67193294", "0.6639939", "0.66389775", "0.6550307", "0.6453501", "0.642221", "0.6400888", "0.6392412", "0.6383347", "0.63824433", "0.6349231", "0.63477737", "0.63065153", "0.62897027", "0.6271574", "0.6268326", "0.6261331...
0.7169661
0
Save the public notification email subscription form
Сохранить форму подписки на публичное уведомление по электронной почте
function saveSubscribeMailList() { $this->validate(); $this->setupTemplate(true); import('lib.pkp.classes.notification.form.NotificationMailingListForm'); $notificationMailingListForm = new NotificationMailingListForm(); $notificationMailingListForm->readInputData(); if ($notificationMailingListForm->val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _as_lift_form_dfs_obio_subscribe_form_submit(array &$form, FormStateInterface $form_state) {\n $address = $form_state->getValue('email');\n $cookie_id = $_COOKIE['tc_ptid'];\n $event_data = [\n ['person', '10', TRUE],\n ];\n _as_lift_create_event($cookie_id, 'tracking', [$address => 'email'], 'New...
[ "0.68406516", "0.6562153", "0.65067196", "0.64631563", "0.6455136", "0.6427697", "0.6361228", "0.6314912", "0.6295848", "0.6193781", "0.61170834", "0.6090698", "0.6064241", "0.6020191", "0.6018071", "0.60162526", "0.60119116", "0.60029477", "0.5996313", "0.59739804", "0.59578...
0.7556489
0
Return an array with null values the context depth
Вернуть массив с null значениями глубины контекста
function getContextDepthArray() { $contextDepthArray = array(); $application = PKPApplication::getApplication(); $contextDepth = $application->getContextDepth(); for ($i=0; $i < $contextDepth; $i++) { array_push($contextDepthArray, null); } return $contextDepthArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getContext()\n {\n $n = count($this->contextStack);\n if ($n > 0)\n {\n // Return last context (top of stack)\n return $this->contextStack[$n-1];\n }\n\n // Return an empty array\n return array();\n }", "public function getCon...
[ "0.6359259", "0.6293812", "0.62794226", "0.6251752", "0.58978343", "0.5861206", "0.58233166", "0.58190906", "0.5770946", "0.5748977", "0.5649426", "0.5649392", "0.56398237", "0.5637249", "0.56310827", "0.56042343", "0.56025296", "0.5582055", "0.5581766", "0.5581482", "0.55759...
0.76799643
0
Tests decrypting data without a cipher
Тестирование расшифровки данных без шифра
public function testDecryptingDataWithoutCipher() { $this->expectException(EncryptionException::class); $data = [ 'version' => '1', 'iv' => 'bar', 'keySalt' => 'baz', 'value' => 'blah', 'hmac' => 'foo' ]; $this->encrypterWit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testValidationCaseForAttemptingToDecryptDefectedCipherData()\n {\n $crypter = $this->getAsymmetricEncryptionAlgorithmInstanceForTesting();\n\n $crypter->setCipherFormat($crypter::ENCRYPTION_OUTPUT_HEX_UPPER);\n $cipherData = $crypter->encryptData('');\n\n $cipherData ...
[ "0.8253867", "0.7937316", "0.78384966", "0.78384966", "0.78384966", "0.78384966", "0.77151406", "0.77058256", "0.767239", "0.76350325", "0.7620389", "0.7537676", "0.75277734", "0.7495392", "0.746293", "0.7365769", "0.7365141", "0.73645216", "0.7342212", "0.7303344", "0.721217...
0.8074345
1
Tests decrypting data without an HMAC
Тестирование расшифровки данных без HMAC
public function testDecryptingDataWithoutHmac() { $this->expectException(EncryptionException::class); $data = [ 'version' => '1', 'ciper' => Ciphers::AES_256_CTR, 'iv' => 'foo', 'keySalt' => 'bar', 'value' => 'baz' ]; $this-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function decrypt($data);", "public function decrypt($data);", "public function decrypt($data);", "public function decrypt($data);", "public function testDecryptingDataWithoutCipher()\n {\n $this->expectException(EncryptionException::class);\n $data = [\n 'version' => '1',...
[ "0.7646613", "0.7646613", "0.7646613", "0.7646613", "0.74587184", "0.7442433", "0.7434652", "0.74282205", "0.7333694", "0.7239177", "0.71739703", "0.71052915", "0.7042289", "0.69775444", "0.69316417", "0.69279027", "0.6907213", "0.68857265", "0.68498856", "0.6839553", "0.6813...
0.7966766
0
Tests decrypting data without an IV
Тестирование расшифровки данных без IV
public function testDecryptingDataWithoutIV() { $this->expectException(EncryptionException::class); $data = [ 'version' => '1', 'ciper' => Ciphers::AES_256_CTR, 'keySalt' => 'bar', 'value' => 'baz', 'hmac' => 'foo' ]; $this-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDecryptingDataWithoutVersion()\n {\n $this->expectException(EncryptionException::class);\n $data = [\n 'cipher' => Ciphers::AES_256_CTR,\n 'iv' => 'bar',\n 'keySalt' => 'baz',\n 'value' => 'blah',\n 'hmac' => 'foo'\n ...
[ "0.76721936", "0.76317626", "0.75300306", "0.7511068", "0.7511068", "0.7511068", "0.7511068", "0.7437578", "0.74278617", "0.7409408", "0.7374872", "0.73588413", "0.72777784", "0.72415006", "0.7224254", "0.72129256", "0.72081184", "0.71551037", "0.715462", "0.7136001", "0.6997...
0.81921923
0
Tests decrypting data without a key salt
Тестирование расшифровки данных без соли ключа
public function testDecryptingDataWithoutKeySalt() { $this->expectException(EncryptionException::class); $data = [ 'version' => '1', 'ciper' => Ciphers::AES_256_CTR, 'iv' => 'bar', 'value' => 'baz', 'hmac' => 'foo' ]; $this-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDecryptingDataWithoutCipher()\n {\n $this->expectException(EncryptionException::class);\n $data = [\n 'version' => '1',\n 'iv' => 'bar',\n 'keySalt' => 'baz',\n 'value' => 'blah',\n 'hmac' => 'foo'\n ];\n $thi...
[ "0.78983766", "0.77861446", "0.7766155", "0.7693617", "0.76154196", "0.7549919", "0.7294658", "0.72768134", "0.7255168", "0.7255168", "0.7255168", "0.7255168", "0.7235372", "0.72298586", "0.7214799", "0.71121913", "0.7085772", "0.70780563", "0.706212", "0.7006534", "0.6964894...
0.816255
0
Tests decrypting data without a value
Тестирование расшифровки данных без значения
public function testDecryptingDataWithoutValue() { $this->expectException(EncryptionException::class); $data = [ 'version' => '1', 'ciper' => Ciphers::AES_256_CTR, 'iv' => 'bar', 'keySalt' => 'baz', 'hmac' => 'foo' ]; $this-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testValidationCaseForAttemptingToDecryptDefectedCipherData()\n {\n $crypter = $this->getAsymmetricEncryptionAlgorithmInstanceForTesting();\n\n $crypter->setCipherFormat($crypter::ENCRYPTION_OUTPUT_HEX_UPPER);\n $cipherData = $crypter->encryptData('');\n\n $cipherData ...
[ "0.7956766", "0.7808933", "0.7661975", "0.76346797", "0.76346797", "0.76346797", "0.76346797", "0.75724226", "0.75446385", "0.7540148", "0.74887335", "0.7455819", "0.7388216", "0.7329107", "0.7314009", "0.7098547", "0.7080747", "0.7080747", "0.6993386", "0.6966635", "0.695075...
0.7957867
0
Tests decrypting data without a version
Тестирование расшифровки данных без указания версии
public function testDecryptingDataWithoutVersion() { $this->expectException(EncryptionException::class); $data = [ 'cipher' => Ciphers::AES_256_CTR, 'iv' => 'bar', 'keySalt' => 'baz', 'value' => 'blah', 'hmac' => 'foo' ]; $t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testValidationCaseForAttemptingToDecryptDefectedCipherData()\n {\n $crypter = $this->getAsymmetricEncryptionAlgorithmInstanceForTesting();\n\n $crypter->setCipherFormat($crypter::ENCRYPTION_OUTPUT_HEX_UPPER);\n $cipherData = $crypter->encryptData('');\n\n $cipherData ...
[ "0.7947403", "0.7760902", "0.77269393", "0.77269393", "0.77269393", "0.77269393", "0.77039593", "0.7536968", "0.7536192", "0.7474361", "0.7392308", "0.73752457", "0.7321636", "0.7295979", "0.72538805", "0.71444786", "0.7126336", "0.71166426", "0.7087282", "0.7080091", "0.7023...
0.8026587
0
Tests decrypting that is not valid JSON
Тесты расшифровки, которая не является допустимым JSON
public function testDecryptingInvalidJson() { $this->expectException(EncryptionException::class); $this->encrypterWithPassword->decrypt('foo'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDecryptingDataWithoutCipher()\n {\n $this->expectException(EncryptionException::class);\n $data = [\n 'version' => '1',\n 'iv' => 'bar',\n 'keySalt' => 'baz',\n 'value' => 'blah',\n 'hmac' => 'foo'\n ];\n $thi...
[ "0.7282491", "0.72205824", "0.71425015", "0.71172065", "0.70367026", "0.6939965", "0.691436", "0.6679706", "0.66397804", "0.6482434", "0.64564943", "0.64292455", "0.641868", "0.63729304", "0.6371128", "0.6339543", "0.6332471", "0.63182515", "0.6296012", "0.6296012", "0.629601...
0.78366363
0
Tests decrypting a value that used a cipher that is different from the encrypter's
Тестирование расшифровки значения, которое использовало шифр, отличный от шифрования расшифровщика
public function testDecryptingWithCipherThatIsDifferentFromEncrypters() { $key = str_repeat('a', 16); $encrypter1 = new Encrypter(new Key($key), Ciphers::AES_128_CBC); $encryptedValue = $encrypter1->encrypt('foo'); $encrypter2 = new Encrypter(new Key($key), Ciphers::AES_128_CTR); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDecrypt()\n {\n $this->setEncrypterOnMock();\n $encrypted = $this->model->encrypt('plain text');\n\n // Check if the decrypted value matches the plain text\n $decrypted = $this->model->decrypt($encrypted);\n $this->assertEquals('plain text', $decrypted);\n ...
[ "0.7626142", "0.75988007", "0.7566199", "0.75242376", "0.74631983", "0.74631983", "0.7437639", "0.7382742", "0.73546505", "0.7320941", "0.7310482", "0.7303275", "0.72405136", "0.7200736", "0.716093", "0.71199", "0.705084", "0.69820297", "0.6839204", "0.6832727", "0.68317246",...
0.82106656
0
Tests empty password throws an exception
Тест пустого пароля вызывает исключение
public function testEmptyPasswordThrowsException() { $this->expectException(EncryptionException::class); new Encrypter(new Password('')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPasswordIsEmptyString()\n {\n $this->assertPropertyEmpty('password');\n }", "public function testMissPasswordInput()\n {\n $requestBody = [\n 'username' => \"kaya.reilly@example.org\",\n ];\n\n $this->json('POST', 'user/auth', $requestBody, ['Ac...
[ "0.7947947", "0.74882954", "0.74740225", "0.7442149", "0.7418739", "0.729338", "0.7276609", "0.7203616", "0.718885", "0.7147315", "0.7127628", "0.7104561", "0.7085039", "0.7079048", "0.7063625", "0.70030403", "0.698528", "0.69358414", "0.6887798", "0.68707067", "0.68512005", ...
0.75945616
1
Tests encrypting and decrypting a value
Тестирование шифрования и расшифровки значения
public function testEncryptingAndDecryptingValue() { $decryptedValue = 'foobar'; $encryptedValueWithPassword = $this->encrypterWithPassword->encrypt($decryptedValue); $encryptedValueWithKey = $this->encrypterWithKey->encrypt($decryptedValue); $this->assertNotEquals($decryptedValue, $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testEncryption()\n {\n $settings = new SettingsManager();\n $testedString = 'hello';\n $encryptedString = $settings->passwordEncrypt($testedString);\n $decryptedString = $settings->passwordDecrypt($encryptedString);\n\n print \"Input string : $testedString\...
[ "0.7832467", "0.7479927", "0.7420216", "0.7420216", "0.72451764", "0.7201885", "0.7201885", "0.7198464", "0.7141524", "0.71007913", "0.6975706", "0.68514395", "0.6816898", "0.67935485", "0.67929906", "0.6676773", "0.664585", "0.6592768", "0.6589556", "0.6586597", "0.6536718",...
0.85682875
0
Tests an incorrect length key throws an exception
Проверяет, что ключ с неправильной длиной вызывает исключение
public function testIncorrectLengthKeyThrowsException() { $this->expectException(EncryptionException::class); new Encrypter(new Key(str_repeat('a', 16)), Ciphers::AES_256_CTR); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function check_keylength()\n {\n $key = self::ENCODE_KEY;\n if (strlen($key) > 32) return false;\n // set sizes\n $sizes = array(16,24,32);\n // loop through sizes and pad key\n foreach ($sizes as $s) {\n while(strlen($key) < $s) $key = $key.\"\...
[ "0.78418493", "0.74133843", "0.7147419", "0.7096249", "0.6997712", "0.68737376", "0.6772997", "0.67652243", "0.6700904", "0.6667945", "0.6581597", "0.6574626", "0.6530524", "0.6468381", "0.64553714", "0.6438852", "0.64158404", "0.6400272", "0.637473", "0.6367565", "0.63514614...
0.767944
1
Tests passing a custom cipher through the constructor
Тесты, передающие пользовательский шифр через конструктор
public function testPassingCustomCipherThroughConstructor() { $approvedCiphersToKeyByteLengths = [ Ciphers::AES_128_CBC => 16, Ciphers::AES_192_CBC => 24, Ciphers::AES_256_CBC => 32, Ciphers::AES_128_CTR => 16, Ciphers::AES_192_CTR => 24, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createCipher();", "public function cryptGetCipher(UnitTester $I)\n {\n $I->wantToTest('Crypt - getCipher()');\n\n $cipher = 'aes-256-cfb';\n $crypt = new Crypt($cipher);\n $I->assertEquals($cipher, $crypt->getCipher());\n }", "public function testConstructor()...
[ "0.7495801", "0.6755414", "0.6652363", "0.6633406", "0.65565217", "0.65095174", "0.62359494", "0.6232441", "0.6168274", "0.6086583", "0.6046526", "0.59942025", "0.5988982", "0.59493935", "0.59371626", "0.59191173", "0.59069294", "0.5896228", "0.58893836", "0.58802265", "0.587...
0.8372838
0
Tests setting an invalid cipher
Тестирование установки недопустимого шифра
public function testSettingInvalidCipher() { $this->expectException(EncryptionException::class); new Encrypter(new Password('foo'), 'bar'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testValidationCaseForSettingAnInvalidCipherOutputFormat()\n {\n $crypter = $this->getAsymmetricEncryptionAlgorithmInstanceForTesting();\n\n // Backward compatible for different versions of PHPUnit\n if (method_exists($this, 'expectException')) {\n $this->expectExc...
[ "0.70273054", "0.68787503", "0.6665565", "0.66315925", "0.66043323", "0.65406835", "0.65001434", "0.64803475", "0.6343425", "0.6308849", "0.62601054", "0.6243674", "0.622051", "0.6114562", "0.6101655", "0.60928357", "0.60559714", "0.5952458", "0.59150964", "0.59067047", "0.58...
0.7494295
0
Start the xvfb process.
Запустите процесс xvfb.
public static function startXvfb() { static::$xvfbProcess = static::buildXvfbProcess(); static::$xvfbProcess->start(); ProvidesBrowser::afterClass(function () { static::stopXvfb(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function buildXvfbProcess()\n {\n return (new Process([\n 'Xvfb',\n ':10',\n '-ac'\n ]));\n }", "public static function stopXvfb()\n {\n if (static::$xvfbProcess) {\n static::$xvfbProcess->stop();\n }\n }", "st...
[ "0.75722927", "0.6918089", "0.6818639", "0.5299339", "0.5073654", "0.5028644", "0.50062495", "0.49318814", "0.49316153", "0.49094227", "0.48893276", "0.48268753", "0.47788787", "0.47059005", "0.46756995", "0.4617558", "0.4592554", "0.45868796", "0.45757413", "0.45138645", "0....
0.8767215
0
Stop the xvfb process.
Остановите процесс xvfb.
public static function stopXvfb() { if (static::$xvfbProcess) { static::$xvfbProcess->stop(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function kill_xvfb() {\n\t\t$process = shell_exec(\"ps aux | grep 'Xvfb'\");\n\t\tpreg_match('#(?P<process>.*Xvfb.*)#', $process, $matches);\n\t\tpreg_match('#(\\S+)[ ]+(?P<pid>\\S+)#', take($matches, 'process'), $matches);\n\t\t$pid = take($matches, 'pid');\n\t\tif (strlen($pid > 3)) {\n\t\t\tshell_exec(\"...
[ "0.7562101", "0.65862775", "0.6402022", "0.6243325", "0.618821", "0.61212456", "0.6070991", "0.5983811", "0.5912429", "0.5912429", "0.5912429", "0.5912429", "0.5912429", "0.5912429", "0.5912429", "0.5912429", "0.5872186", "0.5786124", "0.5778386", "0.5717727", "0.5682475", ...
0.9138953
0
Build the process to run the xvfb.
Создайте процесс для запуска xvfb.
protected static function buildXvfbProcess() { return (new Process([ 'Xvfb', ':10', '-ac' ])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function startXvfb()\n {\n static::$xvfbProcess = static::buildXvfbProcess();\n static::$xvfbProcess->start();\n ProvidesBrowser::afterClass(function () {\n static::stopXvfb();\n });\n }", "static function kill_xvfb() {\n\t\t$process = shell_exec(\"ps au...
[ "0.743201", "0.60228604", "0.5834949", "0.5030569", "0.4945635", "0.4923861", "0.48251444", "0.48133698", "0.4807794", "0.4762381", "0.47623563", "0.47517008", "0.4747371", "0.47342926", "0.4715422", "0.4705256", "0.4704807", "0.46895912", "0.46786842", "0.46173358", "0.46116...
0.8552977
0
TCO Setup ============================================================================= Accessor
Настройка TCO ============================================================================= Аксессор
function x_tco() { return TCO_1_0::instance(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCtr() {\n\n }", "public function getCor()\n {\n }", "public function getTela()\n {\n }", "public function __construct()\n {\n $this->cor = \"preto\";\n }", "public function __construct() {\n // trait method.\n return $this->variable_get('config_value');\...
[ "0.6198606", "0.58898836", "0.5656824", "0.5581825", "0.5498627", "0.5495283", "0.5495283", "0.5495283", "0.5474795", "0.5472928", "0.5445719", "0.5429619", "0.5394575", "0.53902304", "0.53879297", "0.53863025", "0.53790236", "0.53775424", "0.53775424", "0.5376865", "0.536836...
0.71070606
0
List an account's transactions $id: id of the account related to the transactions
Перечислить транзакции счета $id: идентификатор счета, связанного с транзакциями
public function list($id){ $account = DB::table('transactions') ->where('from',$id) ->orWhere('to',$id) ->get(); return $account; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function transactions($id)\n {\n $account = Account::findOrFail($id);\n\n $transactions = $account->transactions()\n ->sortable()->paginate();\n\n return $this->compileView('accounts.transactions', compact('account', 'transactions'), trans('transactions.title'));\n }", ...
[ "0.80416113", "0.71811867", "0.71108365", "0.70130634", "0.69912547", "0.69787025", "0.6939533", "0.6857249", "0.6846772", "0.6816066", "0.6700348", "0.6659898", "0.65974593", "0.65974593", "0.6576637", "0.65701234", "0.6563754", "0.6553048", "0.65196913", "0.6513744", "0.650...
0.7578015
1
Retrieve an account's balance $id: id of the account
Получить баланс счета $id: идентификатор счета
private function getBalance($id){ $balance = DB::table('accounts') ->select('balance') ->where('id', $id) ->get()[0]; return $balance->balance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBalance($account_id) {\n\t\t$q = $this->bdd->prepare('SELECT SUM(amount) FROM transactions WHERE account_id = :account_id');\n\t\t$q->bindValue(':account_id', $account_id, PDO::PARAM_INT);\n\t\t$q->execute();\n\t\treturn $q->fetch(PDO::FETCH_COLUMN);\n\t}", "public function getBalance()\n {...
[ "0.7645175", "0.75558037", "0.75293255", "0.7510543", "0.75020105", "0.7366471", "0.7303972", "0.72184664", "0.7201081", "0.7094987", "0.7074762", "0.70482343", "0.69470644", "0.692095", "0.68553555", "0.6839941", "0.68367386", "0.6831598", "0.68260354", "0.6804885", "0.67923...
0.8736642
0
Update an account's balance $id: id of the account to be updated $amount: amount credited or debited to an account $operator: credit or debit to an account
Обновить баланс счета $id: идентификатор счета, который нужно обновить $amount: сумма, зачисленная или списанная со счета $operator: зачисление или списание со счета
private function updateBalance($id, $amount, $operator){ $balance = $this->getBalance($id); $newAmount = $operator === 'credit' ? $balance + $amount : $balance - $amount; $account = DB::table('accounts') ->where('id', $id) ->update(['balance' => $newAmount]); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function updateAccount()\n {\n $query = 'UPDATE bank_account SET balance = ? WHERE account_number = ?';\n\n $statement = $this->pdo->prepare($query);\n $statement->execute([$this->balance, $this->accountNumber]);\n }", "public function updateBalance(Account $account): void\n ...
[ "0.685066", "0.6829736", "0.6748181", "0.6741069", "0.6694171", "0.6694171", "0.6694171", "0.66402227", "0.6623867", "0.66149044", "0.6599598", "0.6591297", "0.6583727", "0.654247", "0.6521299", "0.6491283", "0.64847326", "0.64329094", "0.6419417", "0.6418254", "0.6387046", ...
0.82745725
0
Verify if the amount sent is less than or equal to the remaining remaining balance in the users account $id: id of the account $amount: amount to be debited from the account
Проверьте, является ли отправленная сумма меньше или равной оставшемуся балансу в счете пользователя $id: идентификатор счета $amount: сумма, которая должна быть списана со счета
private function sufficientBalance($id, $amount){ $balance = floatval($this->getBalance($id)); return ($amount <= $balance); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkBalance($id, $amount)\n {\n $account = Account::find($id); // get account id\n $balance=$account->balance; // get balance\n if ($amount> $balance) // check if user has enough balance\n {\n return 0; // not enought :(\n }\n else\n {...
[ "0.7758288", "0.6789872", "0.67107856", "0.66736007", "0.6663827", "0.6641573", "0.6639479", "0.65305966", "0.6449562", "0.643789", "0.6420176", "0.63920337", "0.6384677", "0.63746303", "0.63465846", "0.6317135", "0.62857676", "0.6279511", "0.6279511", "0.62638277", "0.625855...
0.73145354
1
Verify if the receiving account exists $id: id of the account
Проверить, существует ли получатель с идентификатором $id: идентификатор учетной записи
private function accountExists($id){ $account = DB::table('accounts') ->where('id', $id) ->get(); return $account->count() > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _check_validAccountId($id)\n {\n if(!$this->accounts->get_account($id))\n {\n $this->form_validation->set_message('_check_validAccountId', sprintf(lang('location:account_id_not_valid')));\n return FALSE;\n }else\n {\n return TR...
[ "0.6929605", "0.6805508", "0.6772902", "0.66482246", "0.65881485", "0.6539109", "0.64978445", "0.64941823", "0.6487665", "0.6477858", "0.64635646", "0.644312", "0.644312", "0.644312", "0.64032567", "0.6392746", "0.6379068", "0.6354084", "0.6350785", "0.6346524", "0.6345387", ...
0.7703466
0
Record a transaction made with an account $id: sender of the money $to: receiver of the money $amount: sent amount $details: transaction details
Записать транзакцию, выполненную с использованием счёта $id: отправитель средств $to: получатель средств $amount: отправленная сумма $details: детали транзакции
private function recordTransaction($id, $to, $amount, $details){ DB::table('transactions')->insert( [ 'from' => $id, 'to' => $to, 'amount' => $amount, 'details' => $details ] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function transfer ($from_id,$to_id,$amount);", "public function transaction($id_from, $id_to, $amount)\n {\n \n if($id_from==0)\n {\n $account = Account::find($id_to); // get user account \n $balance=$account->balance; //get account balance\n $balan...
[ "0.6458307", "0.6179513", "0.61477005", "0.60358536", "0.60071075", "0.60008746", "0.598075", "0.5900625", "0.5881189", "0.5860014", "0.5855082", "0.58285034", "0.5820806", "0.5793576", "0.57840747", "0.57803667", "0.5747347", "0.56962585", "0.5682421", "0.5673083", "0.566933...
0.83611846
0
Counts the number of rows matching $filters in the $table table.
Посчитывает количество строк, соответствующих $filters в таблице $table.
public function countTableRows($table, $filters = false) { $query = "SELECT COUNT(*) FROM $table "; if($filters != false) { if(!is_array($filters)) $filters = array($filters); $query .= "WHERE (".implode(") AND (", $filters).") "; } return $this->firstResult($this->query($query)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function countReg($table, $filter, $field = '*'){\n\t\t$Sql = \"SELECT count(\".$field.\") AS table_counter FROM \".$table.\" WHERE 1=1 \".$filter; //echo $Sql.\"<br />\";\n\t\tif (($result = self::execute_query($Sql)) !== false){\n\t\t\t$row = self::get_result($result);\n\t\t\treturn $row['table_cou...
[ "0.7399295", "0.7385791", "0.73231566", "0.7262209", "0.7209766", "0.7110956", "0.6989789", "0.6972564", "0.69649816", "0.6889687", "0.6864772", "0.6861219", "0.68256956", "0.681852", "0.6780019", "0.6777826", "0.677061", "0.6709502", "0.66234195", "0.65604454", "0.64846236",...
0.81999505
0
Updates the table $table to the given array $data (assumes validity), optionally, on rows that match the conditions given in the array $filters and limited to $limit rows.
Обновляет таблицу $table по заданному массиву $data (предполагается, что данные корректны), при этом, по желанию, только для строк, соответствующих условиям, указанным в массиве $filters, и ограничено $limit строками.
public function tableUpdate ($table, $data, $filters = false, $limit = false) { $set = array(); //What is going to be set foreach($data as $key => $value) { //Generate what is going to be set $set[] = "$key = '$value'"; } $query = "UPDATE $table SET ".implode(", ", $set); //Generate the query if($filters...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update($table, $data, $filters)\n {\n if (empty($data)) {\n return true;\n }\n\n $fields = array();\n foreach ($data as $field => $value) {\n // sanity checks\n if (!array_key_exists($field, $this->tables[$table]['fields'])) {\n ...
[ "0.708809", "0.7023611", "0.62870777", "0.62165403", "0.60326993", "0.60291636", "0.59874505", "0.5957657", "0.5953734", "0.58820295", "0.5860706", "0.5856603", "0.5853426", "0.5794772", "0.5786767", "0.5783932", "0.5778593", "0.5765934", "0.57602036", "0.5742255", "0.5698184...
0.8236436
0
Deletes all rows rows from the table $table which optionally match $filters, limited to $limit rows. WARNING: calling this function with only one paramter is equivalent to TRUNCATEing it.
Удаляет все строки из таблицы $table, которые необязательно соответствуют $filters, ограничивая количество строк $limit. ВНИМАНИЕ: вызов этой функции с одним параметром эквивалентен TRUNCATE.
public function tableDelete ($table, $filters = false, $limit = false) { $query = "DELETE FROM $table"; if($filters != false) { if(!is_array($filters)) $filters = array($filters); $query .= " WHERE (".implode(") AND (", $filters).") "; } if($limit != false) $query .= " LIMIT $limit"; ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function DeleteRecords($table, $filters)\r\n\t{\r\n\t\treturn db_delete_records($table, $filters);\r\n\t}", "abstract public function delete($table = '', $where = '', $limit = NULL, $resetData = TRUE);", "function delete_query($table, $where=\"\", $limit=\"\");", "function delete($table, $filters)\n ...
[ "0.70688295", "0.6696372", "0.66091466", "0.6442333", "0.64149815", "0.6227463", "0.6203197", "0.61984015", "0.61770463", "0.61203426", "0.61145085", "0.60948175", "0.60728097", "0.6065171", "0.6038608", "0.60290366", "0.60181785", "0.5962358", "0.59446913", "0.5883603", "0.5...
0.7871215
0
Returns the number of fields in a given result
Возвращает количество полей в заданном результате
static public function numFields($result) { return mysql_num_fields($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function numFields($result) {\n return $result->field_count;\n }", "function getFieldsNum($result)\r\n\t{\r\n\t\treturn mysql_num_fields($result);\r\n\t}", "function field_num($result) {\n\t$num_fields= mysql_num_fields($result);\n\treturn $num_fields;\n}", "function num_fields()\n\t{\n\t\treturn $thi...
[ "0.93013346", "0.8577796", "0.8417821", "0.83866775", "0.8267074", "0.8262295", "0.8244732", "0.8206911", "0.81752944", "0.8172865", "0.81667304", "0.8100061", "0.8046502", "0.80200577", "0.80181557", "0.79933244", "0.7979367", "0.7945172", "0.79426914", "0.7921528", "0.79197...
0.86224097
1
Will set a onetime override for the result of foundRows()
Установит временный перекрытие для результата foundRows()
public function setFoundRowsOverride($t) { $this->foundRowsOverride = $t; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function useCachedRows(): void\n {\n $this->useCache = true;\n }", "abstract protected function setRows();", "public function calcFoundRows() {\n\t if($this->foundRowsOverride != false) {\n\t $t = $this->foundRowsOverride;\n $this->foundRowsOverride = false;\n ...
[ "0.6440039", "0.6321916", "0.626871", "0.62618124", "0.6200571", "0.61918986", "0.60780185", "0.6022954", "0.5993664", "0.5987341", "0.59545606", "0.59447324", "0.5893408", "0.5874612", "0.58744293", "0.5860856", "0.5849031", "0.5835893", "0.5802643", "0.57860744", "0.5767489...
0.72386205
0
Add Company metadata for a Topic
Добавить метаданные компании для темы
static function add_topic_company_metadata($post_id, $company) { // Company try { add_post_meta($post_id, 'gs.topic.company.name', trim($company['fn'])); add_post_meta($post_id, 'gs.topic.company.logo_url', trim($company['logo'])); add_post_met...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add(TopicEntity $entity): void\n {\n }", "function author_metadata( $metadata ) {\n// Add Twitter\n$metadata['twitter'] = 'Twitter';\n// Add Facebook\n$metadata['facebook'] = 'Facebook';\n// Add LinkedIn\n$metadata['linkedin'] = 'LinkedIn';\n\n \nreturn $metadata;\n}", "protected function...
[ "0.5936756", "0.5916502", "0.5551903", "0.5362297", "0.5244247", "0.51761526", "0.5156263", "0.5154094", "0.5136662", "0.5121293", "0.5095528", "0.50544065", "0.5021315", "0.5015614", "0.49976087", "0.49754965", "0.4955042", "0.49472213", "0.4943846", "0.49105448", "0.4893895...
0.74512506
0
Add Get Satisfaction specific metadata to comment such as title of the reply and photo_url of the author
Добавьте специфические метаданные Get Satisfaction в комментарий, такие как заголовок ответа и photo_url автора
static function add_comment_metadata($comment_id, $reply) { global $gs_url; try { add_comment_meta($comment_id, 'gs.reply.id', $reply['id'], true); add_comment_meta($comment_id, 'gs.reply.title', $reply['title'], true); add_comment_meta($comment_id...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function beans_comment_metadata() {\n\n\techo beans_open_markup( 'beans_comment_meta', 'div', array( 'class' => 'uk-comment-meta' ) );\n\n\t\techo beans_open_markup( 'beans_comment_time', 'time', array(\n\t\t\t'datetime' => get_comment_time( 'c' ),\n\t\t\t'itemprop' => 'commentTime'\n\t\t) );\n\n\t\t\techo beans_o...
[ "0.6955655", "0.6292536", "0.61709136", "0.60767627", "0.59501874", "0.5863755", "0.58427733", "0.58393806", "0.58222514", "0.57634646", "0.5758693", "0.5740123", "0.5670094", "0.5670094", "0.5670094", "0.5613843", "0.5613411", "0.56101084", "0.55942726", "0.5593766", "0.5588...
0.7431319
0
Parse url to get company id
Разобрать url для получения идентификатора компании
static function get_company_id($company_url) { try { $url = parse_url($company_url); $path = $url[path]; $path_array = explode ("/" , $path); $company_id = end($path_array); return $company_id; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_id_by_url($comp_url){\n\tif ($comp_url!=\"\"){\n\t\t$result = mysql_query(\"SELECT id FROM companies WHERE comp_url='\".clean_data($comp_url).\"'\");\n\t\t$row = mysql_fetch_assoc($result);\n\t\treturn $row[\"id\"];\n\t}\n}", "function get_url_by_id($comp_id){\n\tif (is_numeric($comp_id)){\n\t\t$res...
[ "0.6820564", "0.64768153", "0.62938404", "0.6194806", "0.61873287", "0.6129294", "0.61046314", "0.60560715", "0.6053584", "0.5987644", "0.58823615", "0.58665496", "0.581775", "0.5804409", "0.5802688", "0.580141", "0.579097", "0.5788862", "0.5746163", "0.5744087", "0.57306004"...
0.8327504
0
Sets a list of languages by extracting it from a given input array.
Устанавливает список языков, извлекая его из заданного входного массива.
private function setLanguagesFromArray(array $input): void { $this->languages = is_null($languages = ArrayAccess::getArray($input, 'languages')) ? new LanguageList() : new LanguageList($languages); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLanguages( array $lang );", "private function setLanguages()\n {\n $this->languages = ArrayHelper::map(Language::find()->all(), 'name', 'id');\n }", "public function setLanguages()\r\n {\r\n $sOcmDb = $this->_sOcmDb;\r\n $sQ = \"SELECT * FROM $sOcmDb.languages\"...
[ "0.6869831", "0.68401426", "0.6817708", "0.6441866", "0.6390677", "0.6359231", "0.6298898", "0.62772095", "0.627375", "0.62177896", "0.61994034", "0.6150333", "0.614924", "0.6146221", "0.61149603", "0.6073729", "0.5952207", "0.5947401", "0.59243894", "0.5910246", "0.5895666",...
0.77565914
0
Constructor Pass it a an array with the following configuration options: scriptPath: the directory where your templates reside compileDir: the directory where you want your compiled templates (must be writable by the webserver) configDir: the directory where your configuration files reside both scriptPath and compileDi...
Конструктор принимает массив с следующими параметрами конфигурации: scriptPath: директория, в которой находятся ваши шаблоны compileDir: директория, в которую вы хотите компилировать шаблоны (должна быть доступна для записи веб-сервером) configDir: директория, в которой находятся ваши файлы конфигурации оба scriptPath ...
public function __construct($config = array()) { $this->_smarty = new Smarty(); // Compiler that allows usage of chaining methods inside templates $this->_smarty->compiler_file = "Oxy/View/Smarty/Compiler.php"; $this->_smarty->compiler_class = "Oxy_View_Smarty_Compiler"; //smarty object if (! array_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->setTemplateDir(Registry::getInstance()->rootDirectory . '/templates/');\n\t\t$this->setCompileDir(Registry::getInstance()->rootDirectory . '/templates/compiled/');\n\t\t$this->setConfigDir(Registry::getInstance()->rootDirectory . '/templa...
[ "0.76067245", "0.7209491", "0.7197044", "0.70544624", "0.70440936", "0.6913272", "0.6911234", "0.6878735", "0.6851261", "0.6831268", "0.6780485", "0.67283523", "0.66692215", "0.6665095", "0.6648537", "0.6645542", "0.66242296", "0.66136444", "0.6565348", "0.65558606", "0.65514...
0.7538247
1
return DB::select('call pListarMedidores(?)', [$con])>lists('concatname', 'id');
return DB::select('call pListarMedidores(?)', [$con])>lists('concatname', 'id');
public static function Listar($con=0) { $queri = DB::select('call pListarMedidores(?)', [$con]); foreach ($queri as $query) { $listado[$query->id] = $query->concatname; } return $listado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function proveedorCompras($id){\n\t$query = DB::table('INV_Proveedor')->lists('INV_Proveedor_Nombre', 'INV_Proveedor_Codigo', 'INV_Proveedor_Direccion', 'INV_Proveedor_Email', \n\t\t'INV_Proveedor_ID');\n\t$arreglo = $query;\n\treturn $arreglo;\n}", "function getVermifugesListe(){\n $database = new Database()...
[ "0.65027255", "0.6502272", "0.6476248", "0.64222026", "0.64040434", "0.6388394", "0.63090277", "0.62480605", "0.6228071", "0.6186147", "0.61826795", "0.6154172", "0.6150629", "0.61328506", "0.6132281", "0.6111124", "0.6097139", "0.6079764", "0.60771734", "0.6075939", "0.60732...
0.73548824
0
We test that given true, isBool returns true
Мы проверяем, что при истинном значении isBool возвращает истину
public function testIsBool() { test_bool_let('__bool__')->be(true); $predicate = test_bool_boolx('__bool__')->isBool(); $this->assertTrue($predicate->evaluate(), "Failed to assert that isBool returns true when the bound symbol is true."); // We test that given false, isBool returns ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testBool()\n {\n $this->assertInternalType('boolean', true);\n }", "function IsBool($boolean) {\n return $boolean === true || $boolean == 't' ? true : false;\n}", "public function testBool() {\n // wont as we'd like to keep it more user-data realistic.\n $this->var...
[ "0.7774407", "0.769542", "0.7693984", "0.76148915", "0.7604411", "0.75829285", "0.7477524", "0.7452374", "0.74495447", "0.7410638", "0.7390586", "0.7381436", "0.73579895", "0.7321691", "0.73159623", "0.7298189", "0.7277293", "0.7228456", "0.7221525", "0.72140205", "0.72062457...
0.81082135
0
Assert that the [render] method converts [AuthenticationException] exceptions to the package's [UnauthenticatedException].
Убедитесь, что метод [render] преобразует исключения [AuthenticationException] в исключения [UnauthenticatedException] пакета.
public function testRenderMethodConvertsUnauthenticationExceptions() { $exception = new AuthenticationException; $this->expectException(UnauthenticatedException::class); $this->handler->render($this->request, $exception); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRenderMethodConvertsUnauthorizedExceptions()\n {\n $exception = new AuthorizationException;\n $this->expectException(UnauthorizedException::class);\n\n $this->handler->render($this->request, $exception);\n }", "public function testUnauthenticatedActionsMismatchActio...
[ "0.82115704", "0.70840836", "0.67672974", "0.67013365", "0.6685738", "0.6606023", "0.64791304", "0.6420819", "0.63175213", "0.6314346", "0.6301166", "0.6244116", "0.6190454", "0.61806715", "0.60489404", "0.6030357", "0.6016884", "0.60157096", "0.6008069", "0.6007221", "0.5994...
0.897876
0
Assert that the [render] method converts [AuthorizationException] exceptions to the package's [UnauthorizedException].
Убедитесь, что метод [render] преобразует исключения [AuthorizationException] в исключения [UnauthorizedException] пакета.
public function testRenderMethodConvertsUnauthorizedExceptions() { $exception = new AuthorizationException; $this->expectException(UnauthorizedException::class); $this->handler->render($this->request, $exception); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRenderMethodConvertsUnauthenticationExceptions()\n {\n $exception = new AuthenticationException;\n $this->expectException(UnauthenticatedException::class);\n\n $this->handler->render($this->request, $exception);\n }", "protected function failedAuthorization()\n {...
[ "0.7760332", "0.6986962", "0.6632821", "0.66016465", "0.6574753", "0.65467924", "0.6461403", "0.64228386", "0.6420875", "0.63992554", "0.6393359", "0.63876516", "0.63817436", "0.63516283", "0.6350776", "0.633728", "0.62615865", "0.62508917", "0.62506205", "0.624498", "0.62071...
0.8811053
0
Assert that the [render] method converts [ModelNotFoundException] exceptions to the package's [PageNotFoundException].
Убедитесь, что метод [render] преобразует исключения [ModelNotFoundException] в исключения [PageNotFoundException] пакета.
public function testRenderMethodConvertsModelNotFoundExceptions() { $exception = new ModelNotFoundException; $this->expectException(PageNotFoundException::class); $this->handler->render($this->request, $exception); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRenderMethodConvertsRelationNotFoundExceptions()\n {\n $exception = new BaseRelationNotFoundException;\n $this->expectException(RelationNotFoundException::class);\n\n $this->handler->render($this->request, $exception);\n }", "public function testTemplateNotFound()\n...
[ "0.7552488", "0.73422295", "0.6963816", "0.6813712", "0.68116546", "0.67888856", "0.66198444", "0.6601008", "0.64553416", "0.6418872", "0.6394113", "0.6388335", "0.63809544", "0.6375441", "0.63742644", "0.6362968", "0.6337139", "0.63187075", "0.6287028", "0.62764883", "0.6274...
0.88251454
0
Assert that the [render] method converts [RelationNotFoundException] exceptions to the package's [RelationNotFoundException].
Убедитесь, что метод [render] преобразует исключения [RelationNotFoundException] в исключения [RelationNotFoundException] пакета.
public function testRenderMethodConvertsRelationNotFoundExceptions() { $exception = new BaseRelationNotFoundException; $this->expectException(RelationNotFoundException::class); $this->handler->render($this->request, $exception); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRenderMethodConvertsModelNotFoundExceptions()\n {\n $exception = new ModelNotFoundException;\n $this->expectException(PageNotFoundException::class);\n\n $this->handler->render($this->request, $exception);\n }", "public function testTemplateNotFound()\n {\n ...
[ "0.73779666", "0.6600344", "0.6345327", "0.6252339", "0.62380934", "0.6052494", "0.6028517", "0.5925631", "0.59109026", "0.5895154", "0.57295257", "0.571858", "0.571858", "0.57023954", "0.56950516", "0.5663763", "0.56215054", "0.5599186", "0.5596176", "0.55780876", "0.557207"...
0.86531085
0
Assert that the [render] method converts [ValidationException] exceptions to the package's [ValidationFailedException].
Убедитесь, что метод [render] преобразует исключения [ValidationException] в исключения [ValidationFailedException] пакета.
public function testRenderMethodConvertsValidationExceptions() { $validator = Mockery::mock(Validator::class); $validator->shouldReceive('errors')->andReturn(collect(['foo' => 'bar'])); $exception = new ValidationException($validator); $this->expectException(ValidationFailedException...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function throwValidationException();", "protected function failedValidation(): void\n {\n throw ValidationException::withMessages($this->allErrors->messages())\n ->errorBag($this->getErrorBagName())\n ->redirectTo($this->getRedirectUrl());\n }", "public function validation...
[ "0.7333723", "0.6779224", "0.66697586", "0.6615756", "0.66116905", "0.6587505", "0.6563299", "0.6509123", "0.6498866", "0.64748293", "0.64699465", "0.63575196", "0.63506895", "0.63378555", "0.6272676", "0.617729", "0.61638814", "0.61635643", "0.613895", "0.613576", "0.6135086...
0.8160613
0
Assert that the [render] method converts [HttpException] exceptions to responses.
Убедитесь, что метод [render] преобразует исключения [HttpException] в ответы.
public function testRenderMethodConvertsHttpExceptionsToResponses() { $exception = Mockery::mock(HttpException::class); $exception->shouldReceive('errorCode')->andReturn($errorCode = 'test_error'); $exception->shouldReceive('message')->andReturn($message = 'A test error has occured.'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRenderMethodConvertsValidationExceptions()\n {\n $validator = Mockery::mock(Validator::class);\n $validator->shouldReceive('errors')->andReturn(collect(['foo' => 'bar']));\n $exception = new ValidationException($validator);\n $this->expectException(ValidationFaile...
[ "0.79673994", "0.79560804", "0.74382615", "0.72239584", "0.7193675", "0.71431583", "0.6908908", "0.68790764", "0.68249714", "0.6713562", "0.66877383", "0.6685978", "0.66373634", "0.66238284", "0.66164744", "0.6587424", "0.654965", "0.6513161", "0.64846385", "0.64349896", "0.6...
0.8537063
0
Adds custom patterns for parser
Добавляет пользовательские шаблоны для парсера
public function addCustomPatterns() { foreach ($this->customPatterns as $name => $pattern) { $this->parser->setParser($name, $pattern['pattern'], $pattern['replace'], $pattern['content']); } $this->addSmiles(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _add() {\n\t\t$arguments = func_get_args();\n\t\t$this->_patterns[] = $arguments;\n\t}", "protected function adding() \n\t{\n\t\t$arguments = func_get_args();\n\t\t$this->patterns[] = $arguments;\n\t}", "function add($pattern, $rule) {}", "public function addPattern ($pattern, $path = '.', a...
[ "0.7072841", "0.69677675", "0.6543112", "0.6495616", "0.62346905", "0.623178", "0.60956025", "0.60583735", "0.5980762", "0.5980762", "0.5978236", "0.5928664", "0.59281343", "0.59171534", "0.5872083", "0.5863895", "0.5854387", "0.57677436", "0.57516044", "0.57304317", "0.57195...
0.8693684
0
Check if user has ANY roles OR permissions indicated in $this>access property.
Проверьте, имеет ли пользователь ANY роли или разрешения, указанные в свойстве $this>access.
protected function hasAccess(): bool { if (isset($this->access) && is_array($this->access)) { $permissions = Arr::get($this->access, 'permissions', []); $roles = Arr::get($this->access, 'roles', []); return $this->user()->hasAnyRole($roles) || $this->user()->hasAnyPermis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasAccess($access, $resource = null)\n\t{\n\t\tif($access == 'users')\n\t\t{\n\t\t\tif(zbase_auth_has())\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tif(preg_match('/\\,/', $access) > 0)\n\t\t{\n\t\t\t$accesses = explode(',', $access);\n\t\t\tif(!empty($accesses))\n\t\t\t{\n\t\t\t\tforeach (...
[ "0.71907824", "0.71596867", "0.71327776", "0.70271474", "0.69797534", "0.69797534", "0.69171077", "0.6819347", "0.6818379", "0.6810735", "0.6744627", "0.6743737", "0.67103577", "0.6705316", "0.66079146", "0.66030335", "0.6600271", "0.6578747", "0.65646255", "0.6556938", "0.65...
0.7659128
0
Utils constructor. Retrieve the locales from the JSON file and store them in an object, to be used in this class.
Конструктор утилит. Получить локали из файла JSON и сохранить их в объект, чтобы использовать в этой классе.
function __construct() { $intlRoot = dirname(dirname(dirname(__FILE__))); $localesJson = file_get_contents($intlRoot.'/locales.json'); $this->locales = json_decode($localesJson, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function initLocales() {\n if (!isset($this->locales)) {\n $this->locales = $this->io->getLocales();\n }\n }", "private function loadTranslations()\n {\n if (\n !file_exists($this->translationFile) ||\n !file_exists($this->defaultTranslationFile...
[ "0.6612089", "0.62343866", "0.62088233", "0.6203448", "0.6131795", "0.6078054", "0.6078054", "0.60433084", "0.6026925", "0.5926401", "0.5873643", "0.5873643", "0.5873643", "0.5873442", "0.5858653", "0.58431727", "0.5833694", "0.58326745", "0.58003944", "0.57996637", "0.578443...
0.81834656
0