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
Converts a variable to a scalar value.
Преобразует переменную в скалярное значение.
public static function toScalar($var) { if (is_null($var)) { return ''; } if (is_scalar($var)) { return $var; } if (is_object($var)) { if (method_exists($var, '__toString')) { return (string)$var; } if (isset($var->scalar) && is_scalar($var->scalar)) { // scalar value was cast to o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static protected function evaluateScalar($scalar) {\n\t\t$scalar = trim ( $scalar );\n\t\t\n\t\tswitch (true) {\n\t\t\tcase 'null' == strtolower ( $scalar ) :\n\t\t\tcase '' == $scalar :\n\t\t\tcase '~' == $scalar :\n\t\t\t\treturn null;\n\t\t\tcase 0 === strpos ( $scalar, '!str' ) :\n\t\t\t\treturn ( string ) sub...
[ "0.5872674", "0.57156223", "0.5449324", "0.5415701", "0.5337742", "0.52232647", "0.5219007", "0.5212948", "0.5205071", "0.5195838", "0.5123414", "0.5072284", "0.5055016", "0.5003515", "0.49509922", "0.49500135", "0.49260035", "0.49083427", "0.49083427", "0.49037972", "0.49020...
0.7311709
0
If $var is a Closure, evaluates and returns the return value. Otherwise, returns the original argument.
Если $var является Closure, оценивает и возвращает значение возврата. В противном случае возвращает исходный аргумент.
public static function result($var) { return ($var instanceof \Closure) ? $var() : $var; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function always($value): \\Closure\n{\n return function () use ($value) {\n return $value;\n };\n}", "function isnull($var): Closure\n{\n return function () use ($var): bool {\n return is_null($var);\n };\n}", "function always($value): Closure\n{\n return function () use ($value) {...
[ "0.63737434", "0.6299943", "0.6295451", "0.61849964", "0.6106343", "0.5983311", "0.5968115", "0.5865486", "0.5865486", "0.5865486", "0.5865486", "0.5865486", "0.5865486", "0.5865486", "0.5865486", "0.5865486", "0.5865486", "0.5865486", "0.5831175", "0.5753537", "0.56882113", ...
0.7267279
0
Returns the type name of a variable. If $var is an object, returns the class name. Otherwise, returns the same as gettype()
Возвращает имя типа переменной. Если $var является объектом, возвращает имя класса. В противном случае возвращает то же самое, что и gettype()
public static function type($var) : string { return is_object($var) ? get_class($var) : gettype($var); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getType($var)\n {\n if (is_object($var)) {\n return get_class($var);\n }\n if ($var === null) {\n return 'null';\n }\n if (is_string($var)) {\n return 'string';\n }\n if (is_array($var)) {\n retur...
[ "0.8356495", "0.7042373", "0.6606883", "0.6592608", "0.645371", "0.6380048", "0.61915976", "0.61215675", "0.6031986", "0.59909", "0.59512436", "0.5842569", "0.5829121", "0.5816714", "0.57777584", "0.57411796", "0.57229203", "0.57026947", "0.57010126", "0.5695517", "0.5668362"...
0.86613107
0
Get the associated chapter.
Получить связанную главу.
public function chapter() { return $this->belongsTo('App\Chapter'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_chapters() {\n return $this->chapters;\n }", "public function getHsnChapter(){\n return $this->db->get('hsn_chapter')->result();\n }", "private function getChapter(int $idNovel, int $no):Chapter {\n\t\t$this->loadServiceChapter();\n\t\treturn $this->chapterService->get($idNovel, $no);\...
[ "0.68319416", "0.6810776", "0.66572505", "0.64437675", "0.5981315", "0.5850259", "0.5808765", "0.57463914", "0.5710639", "0.55863786", "0.55651003", "0.55477977", "0.5516943", "0.5465467", "0.5375832", "0.5359794", "0.5352105", "0.529311", "0.5289622", "0.5272175", "0.5252650...
0.7158367
0
Push a new HTTP provider to the list.
Добавить новый HTTP-провайдер в список.
public function pushHttpProvider(DataProviderContract $provider): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function add_providers() {\n\t\t$args = func_get_args();\n\t\tif($args) {\n\t\t\tif(is_array($args[0])) {\n\t\t\t\tself::$providers += $args[0];\n\t\t\t} elseif(count($args) == 2) {\n\t\t\t\tself::$providers[$args[0]] = $args[1];\n\t\t\t} else {\n\t\t\t\tuser_error(__METHOD__ . ' expects either an ar...
[ "0.64068884", "0.62557006", "0.60094243", "0.56231743", "0.55035245", "0.5433533", "0.5433152", "0.54096913", "0.5398299", "0.537337", "0.53505987", "0.53505987", "0.52864873", "0.5260346", "0.52599317", "0.5248244", "0.52331513", "0.5221947", "0.52078545", "0.5155926", "0.51...
0.7143965
0
Push a new console provider to the list.
Добавить новый провайдер консоли в список.
public function pushConsoleProvider(DataProviderContract $provider): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function push();", "public function push();", "public function provider( $provider ) {\n\n\t\tif ( is_string( $provider ) ) {\n\t\t\t$provider = $this->resolveProvider( $provider );\n\t\t}\n\n\t\t$this->providers[] = $provider;\n\t}", "private function pushDevCommand(): void\n {\n $dev_command = [...
[ "0.5719427", "0.5719427", "0.5634359", "0.55038524", "0.53602344", "0.53602344", "0.5350281", "0.5257758", "0.5246319", "0.5183328", "0.517651", "0.5165124", "0.515675", "0.5141183", "0.51295507", "0.5092004", "0.50509876", "0.5026488", "0.5025707", "0.50201803", "0.5019257",...
0.73635244
0
Takes a query result and formats it into a table.
Принимает результат запроса и форматирует его в таблицу.
function print_table($query_result) { echo "<table>"; echo "<tr>"; for ($i = 0; $i < pg_num_fields($query_result); $i++) { $fieldname = pg_field_name($query_result, $i); echo "<th>$fieldname</th>"; } echo "</tr>"; while ($row = pg_fetch_row($query_result)) { echo "<tr>"; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTable($result) {\n $table = \"<table class='table table-bordered'>\";\n $row = $result->fetch_assoc();\n $table .= \"<tr>\";\n foreach(array_keys($row) as $field) {\n $table .= \"<th class='text-center'>$field</th>\";\n }\n $table .= \"</tr>\";\n ...
[ "0.7546733", "0.7267441", "0.7225932", "0.7051632", "0.7046881", "0.6996069", "0.69519454", "0.6938067", "0.6902518", "0.6811539", "0.6720683", "0.6667683", "0.64559174", "0.6438298", "0.6432954", "0.63362986", "0.633145", "0.62518454", "0.62476355", "0.6178045", "0.6130993",...
0.7401979
1
Display the results of a user name query.
Показать результаты запроса имени пользователя.
function print_user_name_results($display_count, $count, $query_result) { // Get the total number of matches $count_row = pg_fetch_row($count); $total_count = $count_row[0]; // Update the display count to be the minimum between display count and total count. $display_count = $total_count < $display_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showUser($name)\n {\n //fetch data from the Users class\n $models = $this->getUser($name); // array of UserModel\n foreach ($models as $user) {\n echo \"Full name: \" . $user->getFirstName() . \" \" . $user->getLastName(); // <---- here. there is a forEach loop he...
[ "0.67888", "0.67819476", "0.64828914", "0.647911", "0.64179677", "0.6415327", "0.6382498", "0.63683456", "0.6346945", "0.6333486", "0.63172036", "0.6245898", "0.622633", "0.61939543", "0.61691374", "0.61612785", "0.6140424", "0.61322796", "0.6095642", "0.60260415", "0.6025442...
0.7000463
0
Prints the error code if verbose is set to true and returns false.
Выводит код ошибки, если verbose установлен в true, и возвращает false.
function print_error($verbose, $error) { if ($verbose) { echo $error; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display_errors($verbose = 1)\n{\n if($verbose == 0)\n {\n\tini_set('display_errors', False);\n }\n elseif($verbose == 1)\n {\n\t//echo '[V] error_reporting is on</br>';\n\t\n\t$msgline = '[V] error_reporting is on</br>';\n\tfile_put_contents('debug.log', $msgline, FILE_APPEND | LOCK_EX);\n\...
[ "0.65685487", "0.61233616", "0.6110867", "0.60417664", "0.58784175", "0.5857621", "0.5848269", "0.5731975", "0.5700397", "0.5700397", "0.56801885", "0.5667134", "0.56624", "0.56558686", "0.5617334", "0.5603146", "0.55937284", "0.55801886", "0.5551804", "0.5534243", "0.548377"...
0.7512609
0
Test starting the timer B
Тест запуска таймера B
public function testStart() { $timer = new timer( false ); // It should return a starting number $this->assertGreaterThan( 0, $timer->start() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function timer_start()\n {\n }", "public function testGetStart() {\n // It should return an int\n $this->assertGreaterThan( 0, $this->timer->get_start() );\n }", "public function startTimer(): void;", "private function startTimer()\n\t{\n\t\t// Keep statistics\n\t\tself:...
[ "0.6480689", "0.6469081", "0.6379434", "0.6379294", "0.63775146", "0.63111115", "0.6261152", "0.61972296", "0.6184958", "0.614815", "0.60239637", "0.5996606", "0.5928951", "0.5925792", "0.58873445", "0.5881893", "0.58683294", "0.5867278", "0.58059907", "0.5790499", "0.5760963...
0.7353298
0
Test to see if we can stop the timer
Тест на то, чтобы остановить таймер
public function testStop() { // It should return the elapse timed (not testing yet) $this->assertGreaterThan( 0, $this->timer->stop() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function timer_stop()\n {\n }", "public function delTimer(): bool {}", "public function testGetStop() {\n // Stop the timer\n $this->timer->stop();\n\n // It should return an int\n $this->assertGreaterThan( $this->timer->get_start(), $this->timer->get_stop() );\...
[ "0.736313", "0.7299347", "0.72529936", "0.7163522", "0.7138485", "0.7136494", "0.69982713", "0.6873292", "0.68374383", "0.68090653", "0.6721368", "0.67200875", "0.67180204", "0.66622186", "0.66604525", "0.65359885", "0.6522636", "0.6447906", "0.64264405", "0.64021474", "0.639...
0.7721145
0
Returns top authors by books count
Возвращает топ-авторов по количеству книг
public function top(): Collection { return $this->authorModel ->select('name') ->withCount('books') ->orderBy('books_count', 'desc') ->get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPopularAuthors($limit)\n {\n return User::withCount(['posts' => function ($query) {\n $query->published();\n }])\n ->whereHas('posts', function ($query) {\n $query->published();\n })\n ->where('privilege', '>', 1...
[ "0.6637502", "0.64517355", "0.62411505", "0.59475476", "0.5942306", "0.5879611", "0.5716194", "0.56829715", "0.5679331", "0.5665362", "0.5634187", "0.55811083", "0.5537887", "0.5530099", "0.5505476", "0.5464198", "0.54470587", "0.5441375", "0.54167664", "0.5385503", "0.536872...
0.76267403
0
Parses the request string and provides an array of requested packages.
Парсит строку запроса и предоставляет массив запрашиваемых пакетов.
private function parseRequestedPackages(string $packagesRequestString) { $packages = []; foreach (explode(';', rtrim($packagesRequestString, ';')) as $requestedPackage) { $packageDetails = explode(',', $requestedPackage); if (count($packageDetails) < 3) { thr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function providePackages(string $packagesRequestString)\n {\n $requestedPackages = $this->parseRequestedPackages($packagesRequestString);\n\n return $this->packagesCompiler->compilePackagesResponseArray(\n $requestedPackages,\n $this->getLocalRecipes($requestedPackages...
[ "0.64113945", "0.6129281", "0.6017329", "0.5862845", "0.5683598", "0.56789887", "0.5654124", "0.5523979", "0.55161387", "0.551472", "0.5350588", "0.52917117", "0.52509147", "0.5226223", "0.5208514", "0.5197694", "0.51931953", "0.51471555", "0.5141016", "0.5110307", "0.5081214...
0.7854958
0
Converts TTL to expiration
Преобразует TTL в срок действия
private function ttlToExpiration($ttl): int { $ttl = $this->normalizeTtl($ttl); if ($ttl === null) { $expiration = static::EXPIRATION_INFINITY; } elseif ($ttl <= 0) { $expiration = static::EXPIRATION_EXPIRED; } else { $expiration = $ttl + time(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function expirationTime()\n {\n $ttl = $this->getOptions()->getTtl();\n if ($ttl > 2592000) {\n return time() + $ttl;\n }\n return $ttl;\n }", "public function getExpiration();", "protected function expire_time($ttl)\r\n\t{\r\n\t\tif ($ttl === null) {\r\n\...
[ "0.70838225", "0.68849397", "0.6675005", "0.6621294", "0.6528164", "0.64849526", "0.642353", "0.6413085", "0.6357215", "0.63477534", "0.63477534", "0.6329257", "0.63220507", "0.63132006", "0.6288581", "0.6254423", "0.62318957", "0.6231011", "0.6228728", "0.621848", "0.618771"...
0.71191174
0
Converts iterable to array. If provided value is not iterable it throws an InvalidArgumentException
Преобразует итерируемый объект в массив. Если предоставленное значение не является итерируемым, выбрасывается исключение InvalidArgumentException
private function iterableToArray($iterable): array { if (!is_iterable($iterable)) { throw new InvalidArgumentException('Iterable is expected, got ' . gettype($iterable)); } return $iterable instanceof \Traversable ? iterator_to_array($iterable) : (array)$iterable; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function castToArray(iterable $value)\n {\n if ($value instanceof \\Traversable) {\n return iterator_to_array($value);\n }\n return (array)($value);\n }", "public function toArray(): iterable;", "public static function toIterable($value) : iterable\n\t{\n\t\treturn...
[ "0.75854313", "0.71193695", "0.70542103", "0.70512414", "0.6545788", "0.6537482", "0.6305452", "0.6236204", "0.62122303", "0.6128183", "0.6116135", "0.6115269", "0.6110052", "0.6060201", "0.60504574", "0.6047421", "0.60326844", "0.60326844", "0.60326844", "0.60326844", "0.603...
0.7432343
1
Increment cart item quantity
Увеличить количество товара в корзине
public function incrementCartItem() { cart()->incrementQuantityAt(request('id')); return redirect()->route('cart');; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update_quantity()\n\t{\n\t\t$item = ORM::factory('cart_item', $this->input->post('id'));\n\t\t$quantity = $this->input->post('quantity');\n\t\t$this->cart->update_quantity($item->product, $item->variant, $quantity);\n\t\t\n\t\turl::redirect('cart');\n\t}", "public function updateQuantity() {\n\t\...
[ "0.7803723", "0.7661656", "0.74726623", "0.7409008", "0.7266238", "0.726451", "0.72541964", "0.71934456", "0.7058537", "0.70367944", "0.701413", "0.70096034", "0.6868857", "0.6854708", "0.6848814", "0.68415564", "0.6827144", "0.6815302", "0.6788352", "0.6771234", "0.6753999",...
0.77067256
1
Decrement cart item quantity
Уменьшение количества товара в корзине
public function decrementCartItem() { cart()->decrementQuantityAt(request('id')); return redirect()->route('cart'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function decrement_quantity(){\n\t\t$mysql = mysql_connection::get_instance();\n\t\t\n\t\t$stmt = $mysql->prepare('UPDATE `items` SET `item_quantity` = `item_quantity` - 1 WHERE `item_id` = ?');\n\t\t$stmt->bind_param('i', $this->id);\n\t\t$stmt->execute();\n\t\t$stmt->close();\n\t}", "public function dec...
[ "0.8232484", "0.70812875", "0.6846517", "0.68097913", "0.6748205", "0.6667769", "0.6557444", "0.6545755", "0.6524643", "0.65169275", "0.64959943", "0.6491484", "0.6476946", "0.6458247", "0.6424398", "0.6357805", "0.63416797", "0.6314608", "0.6220782", "0.6219285", "0.62112373...
0.7760525
1
Applies the discount to the cart
Применяет скидку к корзине
public function applyDiscount() { if (request('discountType') == 1) { cart()->applyDiscount($percentage = request('red')); return $this->getCartDetails(); } cart()->applyFlatDiscount($amount = request('discountInput')); return redirect()->route('cart'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function calculateDiscount() : void{\r\n $percentage = ($this->discounted_value * 100) / $this->order->getTrueTotal();\r\n $new_total = $this->order->getTrueTotal() - $this->discounted_value;\r\n\r\n $this->order_discount_value = $this->discounted_value;\r\n $this->order_disco...
[ "0.77069736", "0.7238078", "0.71250015", "0.68227285", "0.67855835", "0.6759153", "0.6737952", "0.6719037", "0.6685202", "0.6653821", "0.6574884", "0.65736943", "0.6567165", "0.65115255", "0.6477446", "0.6456189", "0.6451551", "0.6437476", "0.63921845", "0.6389409", "0.633894...
0.7240735
1
Converts brazilian money format to database float format (two decimals separated by dot, thousands without separator)
Преобразует бразильский формат денежных средств в формат числа с плавающей точкой базы данных (два десятичных знака, разделенных точкой, тысячи без разделителя)
public static function dbFormatMoney(string $value): float { // Remove the dots thousands separator $valueWithoutDots = str_replace('.', '', $value); // Change the comma thousands separator to commas $valueWithDotDecimal = str_replace(',', '.', $valueWithoutDots); // Return as float return number_format(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function MoneyToFloat($zMoney) {\n\n /*--- Local Variables ---*/\n\n $laundermoney = null;\n $dollars = null;\n $cents = null;\n\n /*--- Start of Processing ---*/\n\n $zMoney = str_replace(\"$\",\"\",$zMoney);\n\n if(strrchr($zMoney,\",\") )\n {\n $g...
[ "0.7161408", "0.69326025", "0.6698708", "0.6582556", "0.6509094", "0.65001976", "0.6463686", "0.644497", "0.6441933", "0.64336425", "0.6412092", "0.6341945", "0.633232", "0.63025326", "0.6286098", "0.62487274", "0.62335753", "0.6201329", "0.6200112", "0.6194549", "0.61889553"...
0.7419914
0
Check if CPF is valid
Проверить, является ли CPF действительным
public static function checkCpf(string $cpf): bool { // Number only extraction $cpf = self::getOnlyNumbers($cpf); // Check if it has 11 characters if (strlen($cpf) != 11) { return false; } // Calculates the verification digit for ($t = 9; $t < 11; $t++) { for ($d = 0, $c = 0; $c < $t; $c++) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function ensureIsValidCpf(string $cpf): void\n {\n if (strlen($cpf) != 11) {\n throw new \\UnexpectedValueException(\n sprintf('%s is not a valid CPF', $cpf)\n );\n }\n // Verifica se foi informada uma sequência de digitos repetidos. Ex: 111.111....
[ "0.73283625", "0.71492624", "0.70643276", "0.688722", "0.6868513", "0.6744608", "0.6727586", "0.6715444", "0.6715444", "0.6715444", "0.6715444", "0.66852015", "0.66852015", "0.66852015", "0.66852015", "0.66852015", "0.66852015", "0.66852015", "0.66852015", "0.6584633", "0.651...
0.7471894
0
Get the doctorDocuments associated with the doctor.
Получить документы врача, связанные с врачом.
public function doctorDocuments(): HasMany { return $this->hasMany(DoctorDocument::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_documents() \n {\n $endpoint_name = \"/documents/\";\n $request_arguments = [];\n $documents = $this->request(\"GET\", $endpoint_name, $request_arguments);\n if (array_key_exists(\"documents\", $documents)) {\n return $documents[\"documents\"];\n ...
[ "0.66203576", "0.6362939", "0.6270385", "0.6263678", "0.6203288", "0.6152731", "0.61302286", "0.6122433", "0.5977023", "0.5936911", "0.5925478", "0.5855853", "0.5852203", "0.57897735", "0.57807684", "0.57705647", "0.577025", "0.5740055", "0.5717935", "0.56927985", "0.5675818"...
0.7570732
0
Resolve a transformer binding instance.
Разрешить экземпляр привязки трансформатора.
public function resolveTransformer() { if (\is_string($this->resolver)) { return $this->container->make($this->resolver); } elseif (\is_callable($this->resolver)) { return \call_user_func($this->resolver, $this->container); } elseif (\is_object($this->resolver)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function resolveBinding($key, $value)\n {\n // Explicit binding\n if (isset($this->bindings[$key])) {\n list($binder, $errorHandler) = $this->bindings[$key];\n\n $callable = $this->getBindingCallable($binder, $value);\n\n return $this->callBindingCallable...
[ "0.5256706", "0.5196224", "0.5072192", "0.49890056", "0.49346626", "0.48775575", "0.4769516", "0.47541508", "0.4705428", "0.46656606", "0.46584222", "0.46465555", "0.46247375", "0.46012947", "0.45983317", "0.4581748", "0.45813248", "0.4572735", "0.455843", "0.45557314", "0.45...
0.7497439
0
Add a meta data key/value pair.
Добавьте пару ключ/значение метаданных.
public function addMeta($key, $value) { $this->meta[$key] = $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_meta( $key, $value, $unique = false );", "function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = \\false)\n {\n }", "public function addMeta($key, $value)\n {\n return add_user_meta($this->getID(), $key, $value);\n }", "public function addMeta(s...
[ "0.79702365", "0.7628295", "0.7604111", "0.7585033", "0.74185854", "0.7351638", "0.7249091", "0.7131536", "0.6986267", "0.69053894", "0.68962854", "0.68290865", "0.6762298", "0.6705974", "0.6689951", "0.66225654", "0.65983623", "0.6576418", "0.6572117", "0.6547683", "0.653538...
0.7930372
1
Returns the predicate being used with this fetch request
Возвращает предикат, используемый с этим запросом fetch
public function predicate() { return $this->predicate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPredicate();", "public function getPredicateType()\n {\n return $this->predicate_type;\n }", "public function getCartPredicate()\n {\n if (is_null($this->cartPredicate)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_CART_PRE...
[ "0.7499757", "0.65683067", "0.64205474", "0.6129724", "0.60826164", "0.60501266", "0.6047283", "0.584148", "0.58034116", "0.56315637", "0.5620643", "0.5423987", "0.5392057", "0.5388851", "0.53774154", "0.5311484", "0.5306208", "0.52631706", "0.52323514", "0.5188546", "0.50817...
0.81018305
0
Test duplicating a text field
Тест дублирования текстового поля
public function test_duplicating_text_field() { $this->assertTrue( current_user_can( 'frm_edit_forms' ), 'User does not have permission' ); $format = '^([a-zA-Z]\d{4})$'; $original_field = $this->factory->field->create_and_get( array( 'form_id' => $this->form_id, 'type' => 'text', '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function duplicate_field($field)\n {\n }", "public function check_duplicate()\n {\n }", "public function testUniqueFields() {\n $account = $this->drupalCreateUser();\n\n $edit = ['mail' => 'test@example.com', 'name' => $account->getAccountName()];\n $this->drupalGet('user/register');\n ...
[ "0.68943334", "0.6285381", "0.6147125", "0.61214334", "0.60358924", "0.59893817", "0.5909464", "0.58222383", "0.58222383", "0.58072877", "0.5787446", "0.5728162", "0.57223874", "0.5712684", "0.57110727", "0.5652403", "0.5649298", "0.5615864", "0.5603098", "0.55704397", "0.556...
0.8004315
0
Check in_section variable prior to duplication
Проверьте переменную in_section перед дублированием
protected function check_field_prior_to_duplication( $field ) { $this->assertTrue( isset( $field->field_options['in_section'] ), 'The in_section variable is not set correctly on import.' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function check_section() {\n $cond = NULL;\n if($this->type_post != 'add') {\n $cond = \"AND sec_id != {$this->get_id}\";\n }\n $ch = $this->select(\"*\", \"jops_sections\", \"WHERE sec_unique = ? {$cond}\");\n $ch->execute(array($this->unique));\n $info = $ch->rowCount();\n if($i...
[ "0.7198021", "0.6094608", "0.60270613", "0.5985211", "0.5980228", "0.5880933", "0.5866945", "0.5866945", "0.58440363", "0.58261245", "0.5824877", "0.57604915", "0.5701868", "0.5689047", "0.5603507", "0.5593529", "0.5582326", "0.5576961", "0.55696994", "0.5559928", "0.5484277"...
0.71352303
1
Constructor method for LoyalPrograms
Метод конструктора для LoyalPrograms
public function __construct(array $loyalProgram = array()) { $this ->setLoyalProgram($loyalProgram); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct( $data=array() ) {\n\t \n\t//program basic information\n if ( isset( $data['programID'] ) ) $this->programID = (int) $data['programID'];\n if ( isset( $data['programName'] ) ) $this->programName = (string) $data['programName'];\n\tif ( isset( $data['programStart'] ) ) $this->prog...
[ "0.71825975", "0.7020753", "0.67094713", "0.67094713", "0.6703161", "0.65990204", "0.65637195", "0.65008646", "0.6419749", "0.6414347", "0.6394519", "0.6388076", "0.6373788", "0.63716036", "0.63469195", "0.6258196", "0.62565625", "0.6234318", "0.62128836", "0.62091047", "0.61...
0.73810583
0
Returns true if the system has openssl_random_pseudo_bytes()
Возвращает true, если система имеет openssl_random_pseudo_bytes()
protected static function hasOpensslRandomPseudoBytes() { return (function_exists('openssl_random_pseudo_bytes') && !self::$forceNoOpensslRandomPseudoBytes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function sslRandPoll(): bool {}", "function openssl_random_pseudo_bytes($length, &$strong)\n {\n global $mockRandomPseudoBytes;\n if (isset($mockRandomPseudoBytes) && $mockRandomPseudoBytes === true) {\n $strong = false;\n\n return 12345;\n } else {\n ...
[ "0.6469277", "0.6355411", "0.61543685", "0.6062836", "0.59935004", "0.58254886", "0.5808629", "0.58083004", "0.5773035", "0.57636106", "0.5738561", "0.5712781", "0.56947076", "0.5655866", "0.5632027", "0.56192213", "0.56066173", "0.5564799", "0.5550737", "0.55026066", "0.5436...
0.85888386
0
Store the file from a base64
Сохраните файл из base64
public function storeBase64($base64) { list($baseType, $image) = explode(';', $base64); list(, $image) = explode(',', $image); $image = base64_decode($image); $extension = $this->getBase64Extension($baseType); $imageName = rand(111111111, 999999999) . '.' . $extension; $e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function saveBase64Data($data)\n {\n global $CFG;\n\n $folder = run('folders:instance', array('id' => $this->folder));\n\n // Decode the file and store it\n $filename = time() . \"_\" . preg_replace(\"/[^\\w.-]/i\",\"_\",$this->originalname);\n $storage...
[ "0.7153443", "0.7093986", "0.696272", "0.68782914", "0.6872652", "0.68136954", "0.67413825", "0.67220116", "0.6557407", "0.65306705", "0.65031296", "0.6471873", "0.6440296", "0.6434783", "0.6424624", "0.64186084", "0.63381076", "0.63239795", "0.6321328", "0.6311641", "0.62673...
0.776797
0
Returns the file path from the public disk
Возвращает путь к файлу с публичного диска
public function getPath() { return str_replace(Storage::disk('public')->url(''), '', $this->url); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPublicPath(): string\n {\n return Path::unifyPath(Environment::getPublicPath());\n }", "public function public_path();", "private function getFileUrl() {\n return Storage::disk('public')->url('/uploads/' . $this->file_name);\n }", "public function getPublicPath()\n ...
[ "0.7583897", "0.7430275", "0.74012876", "0.7235516", "0.7203828", "0.71521854", "0.71178377", "0.70986116", "0.7075605", "0.70687246", "0.7032705", "0.7032705", "0.69791365", "0.6918541", "0.6860721", "0.68547237", "0.6849838", "0.6849838", "0.6849838", "0.6849838", "0.684983...
0.7616902
0
Create thumbnails if is image and if not defaults
Создавать миниатюры, если это изображение, и если не задано по умолчанию
private function createThumbs() { if (preg_match('/image/', $this->mime_type)) { Thumb::add($this->id); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateThumbnailImagick(){\n\t}", "protected function makeThumbnails()\n {\n $sizes = [\n 'image_211' => [\n 'width' => 211,\n 'mode' => ImageInterface::THUMBNAIL_OUTBOUND,\n ],\n ];\n $data = $this->image;\n if ...
[ "0.7222554", "0.7013576", "0.69796777", "0.69796777", "0.69745046", "0.6929125", "0.6739254", "0.66870654", "0.6669143", "0.6627088", "0.66261214", "0.6551537", "0.65159774", "0.64897394", "0.6479309", "0.64692515", "0.6468734", "0.6459414", "0.64257014", "0.64163154", "0.638...
0.7428959
0
Lists all TfLunas models.
Список всех моделей TfLunas.
public function actionIndex() { $searchModel = new TfLunasSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function viewallunitmodelsAction() {\n\n\t\t$model = new Unit_Model_UnitModel();\n\t\t$this->view->records = $model->fetchAll( 'name','ASC' );\n \n\t\tif( $this->view->records ) {\n $attached = $model->getAttachedModels();\n $this->view->attached = $attached;\n...
[ "0.5743609", "0.5635639", "0.55953366", "0.55060035", "0.5412326", "0.5412326", "0.54043895", "0.54021484", "0.53775126", "0.5372159", "0.5368922", "0.53329545", "0.529359", "0.5287762", "0.52853674", "0.52820444", "0.527135", "0.52282596", "0.51826626", "0.517424", "0.515194...
0.7332935
0
Creates a new TfLunas model. If creation is successful, the browser will be redirected to the 'view' page.
Создает новый модель TfLunas. Если создание успешно, браузер будет перенаправлен на страницу 'view'.
public function actionCreate() { $model = new TfLunas(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id_tf_lunas]); } return $this->render('create', [ 'model' => $model, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate() {\r\n $model = new Fltr();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'mode...
[ "0.73648274", "0.6874092", "0.6804236", "0.6782465", "0.6760849", "0.6744389", "0.6742049", "0.672245", "0.6674454", "0.6672038", "0.6654147", "0.663545", "0.6621296", "0.66003686", "0.6578786", "0.65727353", "0.65529317", "0.653653", "0.6517779", "0.65105116", "0.65059984", ...
0.87542415
0
Updates an existing TfLunas model. If update is successful, the browser will be redirected to the 'view' page.
Обновляет существующую модель TfLunas. Если обновление успешно, браузер будет перенаправлен на страницу 'view'.
public function actionUpdate($id) { $model = $this->findModel($id); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id_tf_lunas]); } return $this->render('update', [ 'model' => $model, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdate() {\n $model = $this->loadModel();\n $modelAmbienteUso = new Ambiente_Uso;\n $modelUsuario = new Usuario();\n $modelAmbiente = new Ambiente();\n $modelPredio = new Predio();\n\n // Uncomment the following line if AJAX validation is needed\n ...
[ "0.65713", "0.6325423", "0.62141985", "0.61873704", "0.6140599", "0.6137025", "0.6130122", "0.6108028", "0.6103959", "0.598931", "0.5976574", "0.5967207", "0.5956739", "0.59529513", "0.5944925", "0.59319556", "0.5931914", "0.5921792", "0.5919761", "0.5915545", "0.5910747", ...
0.7167312
0
Check if the PHP version is supported
Проверьте, поддерживается ли версия PHP
public function is_supported_php() { if (version_compare(PHP_VERSION, $this->min_php, '<=')) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isPhpVersionSupported()\n {\n $app = App::instance();\n $php_value = phpversion();\n $php_error = (version_compare($php_value, App::REQUIRED_PHP_VERSION) != -1) ? false : true;\n $checking_result = ($php_error == false) ? true : false;\n\n if (!$checking_result...
[ "0.8412079", "0.81716883", "0.8164885", "0.8062999", "0.805457", "0.80430037", "0.7832383", "0.7669777", "0.76607007", "0.75711775", "0.75550413", "0.7538162", "0.74916786", "0.7433246", "0.74117196", "0.7411013", "0.73361135", "0.73070323", "0.72100043", "0.7184737", "0.7159...
0.8420043
0
Convert storage (StorageInterface) to array.
Преобразовать хранилище (StorageInterface) в массив.
public function toArray(StorageInterface $storage);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function all(): array\n {\n return $this->storage;\n }", "protected function _splObjectStorageToArray(SplObjectStorage $storage)\n {\n $result = array();\n foreach ($storage as $_observer) {\n $result[] = array(\n 'obj' => $_observer,\n ...
[ "0.6785306", "0.6656431", "0.6571599", "0.65673155", "0.6560366", "0.651005", "0.6425395", "0.6425395", "0.6424551", "0.64185065", "0.64185065", "0.64185065", "0.64185065", "0.64185065", "0.64185065", "0.64093536", "0.64093536", "0.64093536", "0.64093536", "0.64087707", "0.64...
0.80999774
0
Get storage list by filter.
Получить список хранилищ по фильтру.
public function getStorageList($page, $filter = null);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetStorageLocations($filter = \"\")\r\n\t{\r\n if (!isset($this->_storageLocationCache[$this->_dbCatalog]))\r\n {\r\n $this->_storageLocationCache[$this->_dbCatalog] = [];\r\n $sql\t\t = \"select table_name,table_type,auto_increment from information_schema.tables...
[ "0.67115164", "0.6206993", "0.61942136", "0.61761814", "0.61460435", "0.6124812", "0.61082184", "0.61082184", "0.6040529", "0.5832512", "0.58021605", "0.5801275", "0.58009213", "0.57716423", "0.5683991", "0.56813294", "0.56526005", "0.56364334", "0.5581415", "0.55730915", "0....
0.7391992
0
The name of the object in source that is being mapped. Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingKey source = 1;
Имя объекта в источнике, который отображается. Генерируется из поля protobuf .google.cloud.bigquery.migration.v2.NameMappingKey source = 1;
public function setSource($var) { GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\NameMappingKey::class); $this->source = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSourceName();", "public function setTarget($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\BigQuery\\Migration\\V2\\NameMappingValue::class);\n $this->target = $var;\n\n return $this;\n }", "public function getSourceName() {\n return $this->source;\...
[ "0.6340571", "0.624394", "0.5983663", "0.5911057", "0.58358604", "0.5834029", "0.5748028", "0.5741729", "0.56145453", "0.55985683", "0.5593899", "0.5509201", "0.5502186", "0.5502186", "0.5502186", "0.5502186", "0.5502186", "0.5459867", "0.541938", "0.53842425", "0.53517264", ...
0.78222924
0
The desired target name of the object that is being mapped. Generated from protobuf field .google.cloud.bigquery.migration.v2.NameMappingValue target = 2;
Желаемое имя целевого объекта, который отображается. Генерируется из поля protobuf .google.cloud.bigquery.migration.v2.NameMappingValue target = 2;
public function setTarget($var) { GPBUtil::checkMessage($var, \Google\Cloud\BigQuery\Migration\V2\NameMappingValue::class); $this->target = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSource($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\BigQuery\\Migration\\V2\\NameMappingKey::class);\n $this->source = $var;\n\n return $this;\n }", "public function testMapToName() {\n\t\t$name = 'some_name';\n\t\t$otherName = 'other_name';\n\n\t\t$this-...
[ "0.5776411", "0.5760581", "0.5581853", "0.5234588", "0.5179256", "0.5139018", "0.50189894", "0.50096434", "0.50078624", "0.49932653", "0.49437234", "0.49317688", "0.4913886", "0.490865", "0.490865", "0.48977304", "0.4883067", "0.4883067", "0.4883067", "0.4883067", "0.4883067"...
0.7973254
0
allow author pane to use gravatar images
разрешить панели автора использовать изображения Gravatar
function alpine_bootstrap_preprocess_author_pane(&$variables) { if (module_exists('gravatar')) { gravatar_preprocess_user_picture($variables); $variables['picture'] = $variables['user_picture']; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scribbles_add_author_avatar() {\n\n\t?>\n\t<div class=\"avatar-container\">\n\n\t\t<?php echo get_avatar( get_the_author_meta( 'user_email' ), '128' ); ?>\n\n\t</div>\n\t<?php\n\n}", "function setup_author_box_gravatar( $size ) {\n\treturn 90;\n}", "function netfunktheme_author_img_shortcode( $atts ){...
[ "0.7171469", "0.708282", "0.66206664", "0.66017544", "0.65099585", "0.6466049", "0.64591664", "0.6415343", "0.63772595", "0.6367738", "0.63654035", "0.63654035", "0.63654035", "0.63654035", "0.63654035", "0.6326781", "0.62864226", "0.6264184", "0.6254016", "0.6212574", "0.620...
0.71793777
0
Indexes the given entity in the CloudSearch server.
Индексирует заданный сущность на сервере CloudSearch.
public function index(IndexableEntity $entity);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function doIndexDocument() {\n if ($this->showRecordInSearch())\n {\n $this->service->index($this->owner);\n }\n }", "public function refreshEntitySearchIndex()\n {\n return $this->start()->uri(\"/api/entity/search\")\n ->put()\n ->go();\n }", "pu...
[ "0.61306924", "0.6000072", "0.59422493", "0.57433504", "0.5645183", "0.56442475", "0.5603792", "0.55988103", "0.5423894", "0.53675914", "0.53498626", "0.53468955", "0.53205687", "0.5286377", "0.5277735", "0.52412146", "0.5235422", "0.5212465", "0.5212162", "0.5202282", "0.519...
0.7540748
0
this method fetch restaurant info on condition
этот метод получает информацию о ресторане при условии
public function fetch_restaurant_on_condition($query) { $this->db->select('*')->from('restaurants'); if (isset($query['restaurant_id']) && !empty($query['restaurant_id'])) { $this->db->where('restaurant_id', $query['restaurant_id']); } if (isset($query['restaura...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getResturantDetails(){\n // $endPrice = $this->_request['endPrice'] != \"undefined\" ? intval ($this->_request['endPrice']) : -1;\n \n $sql = \"select * from resturants r join city c on r.CityId = c.CityID\";\n // if($startPrice!=\"undefined\")\n // {\n ...
[ "0.6390761", "0.630026", "0.61182195", "0.6092397", "0.60705966", "0.6018026", "0.5981519", "0.59712243", "0.59513587", "0.5905322", "0.58931744", "0.58736324", "0.58610785", "0.58515716", "0.5835097", "0.58236235", "0.5774649", "0.5737682", "0.57373077", "0.5736257", "0.5732...
0.7120754
0
this method fetch restaurants by creator
этот метод получает рестораны по создателю
function fetch_all_restaurants_of_user($restaurant_creator) { return $this->db->select('*') ->from($this->table) ->where(array( 'restaurant_creator' => $restaurant_creator, )) ->get() ->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRestaurants(){\n \n $result = self::where([\n \"status\" => \"Active\"\n ])\n ->select([\"id\",\"name\",\"has_gst\"])\n ->orderBy(\"name\")\n ->get();\n \n return $result;\n }", ...
[ "0.69574755", "0.68841285", "0.6522583", "0.64014614", "0.63299245", "0.61821294", "0.6121668", "0.60613126", "0.5982563", "0.597178", "0.5893338", "0.5868274", "0.58376396", "0.58309567", "0.58063114", "0.5781448", "0.5771841", "0.57713634", "0.57586575", "0.5723061", "0.569...
0.7526603
0
this method fetch restaurants by tag
этот метод получает рестораны по тегу
function fetch_all_restaurants_of_tag($tag_id) { return $this->db->select('restaurants.*') ->from('restaurants') ->join('restaurant_tags', 'restaurants.restaurant_id=restaurant_tags.restaurant_id') ->where(array( 'restaurant_tags.tag_id' => $tag_id, 'restaurant_status' => 1 )...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRestaurants(){\n \n $result = self::where([\n \"status\" => \"Active\"\n ])\n ->select([\"id\",\"name\",\"has_gst\"])\n ->orderBy(\"name\")\n ->get();\n \n return $result;\n }", ...
[ "0.64026237", "0.6133151", "0.6131598", "0.6126055", "0.57649356", "0.5764616", "0.5732065", "0.5632504", "0.55604464", "0.55197674", "0.5466987", "0.5451568", "0.5319742", "0.5306126", "0.5272748", "0.5262143", "0.5248554", "0.52443004", "0.5243413", "0.52419645", "0.5212691...
0.71965015
0
Get Mediator Name Get the IMediator instance name
Получить имя медиатора Получить имя экземпляра IMediator
public function getMediatorName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMediatorID();", "public function getMediator();", "public function getID()\n {\n return '[Mediator:Symfony]';\n }", "function getName() {\n return $this->instance->getName();\n }", "public function getHandlerName();", "public function getHandlerName();", "public func...
[ "0.7205299", "0.65702176", "0.65694803", "0.650204", "0.6290846", "0.6290846", "0.6248207", "0.6248207", "0.618102", "0.61005145", "0.6055896", "0.603991", "0.603991", "0.6039474", "0.603803", "0.6025794", "0.6025794", "0.60125256", "0.59838635", "0.5971606", "0.5971606", "...
0.91077447
0
Get View Component Get the IMediator's view component.
Получить компонент представления Получите компонент представления IMediator.
public function getViewComponent();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getView()\n {\n return $this->getService('view');\n }", "public function getView()\n {\n if ($this->_view === null) {\n $this->_view = Yii::$app->getView();\n }\n\n return $this->_view;\n }", "public function getView()\n {\n return $t...
[ "0.69300026", "0.6911393", "0.68869126", "0.68869126", "0.68869126", "0.68764305", "0.68665963", "0.6864158", "0.6834605", "0.6831408", "0.68129253", "0.68129253", "0.6810843", "0.68052304", "0.68052304", "0.68052304", "0.68052304", "0.68052304", "0.68052304", "0.68052304", "...
0.71406966
0
Set View Component Set the IMediator's view component.
Установите компонент представления. Установите компонент представления IMediator.
public function setViewComponent( $viewComponent );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setView(View &$view) {\n\t\t$this->view = $view;\n\t}", "public function setView(FW_Mvc_View $view){\n\t\t$this->view = $view;\n\t}", "protected function setView()\n {\n $view = 'Src\\Modules\\\\' . $this->module_name . '\\Views\\\\' . $this->class . 'View';\n $this->view = new...
[ "0.64861476", "0.63950694", "0.6366993", "0.61776656", "0.61760265", "0.61201906", "0.61083895", "0.6073669", "0.60672015", "0.6044446", "0.60372204", "0.60372204", "0.60372204", "0.60372204", "0.60372204", "0.60359645", "0.6034892", "0.6034892", "0.6033531", "0.6023755", "0....
0.7584859
0
List Notifications Interests. List INotification interests.
Список уведомлений интересов. Список INotification интересов.
public function listNotificationInterests( );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInterests()\n {\n return $this->interests;\n }", "public function interests(Request $request){\n return Interest::all();\n }", "public function interests()\n {\n $this->markTestSkipped();\n $interests = [\"ac16479d5f\" => true, \"d9e354e0b4\" => true, \"...
[ "0.6774499", "0.67656344", "0.63427085", "0.6296383", "0.6173743", "0.6156628", "0.6131624", "0.59031713", "0.5874466", "0.5841326", "0.5787659", "0.5776781", "0.5735955", "0.57184", "0.5717387", "0.5712566", "0.56782925", "0.56154656", "0.5607299", "0.5602839", "0.5575779", ...
0.86144465
0
Handle Notification Handle an INotification.
Обработка уведомления Обработка INotification.
public function handleNotification( INotification $notification );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function handleNotificationEvent(NotificationEvent $event);", "public function handle(\\Inhere\\Event\\EventInterface $event)\n {\n }", "abstract protected function processNotification($responseObject);", "public function handleNotification(Notification $notification, $lambda)\n {\n ...
[ "0.7884955", "0.6733051", "0.64197415", "0.6415128", "0.6380006", "0.62416357", "0.62406975", "0.61635154", "0.61616814", "0.61225784", "0.61213815", "0.6017116", "0.6016046", "0.6014741", "0.59558815", "0.5880997", "0.5880997", "0.5872574", "0.5827442", "0.5794562", "0.57852...
0.9127161
0
onRegister event Called by the View when the Mediator is registered.
Событие onRegister вызывается View при регистрации Mediator.
public function onRegister();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function onRegister(): void;", "public function register()\n {\n add_meta_box($this->id, $this->title, array( $this, 'render' ), $this->screens );\n }", "public function register()\n {\n parent::register();\n }", "public function register()\n {\n ...
[ "0.70055324", "0.67705286", "0.6643107", "0.6643107", "0.6643107", "0.6643107", "0.65983254", "0.65394133", "0.64474815", "0.6436595", "0.6379998", "0.6379998", "0.63722074", "0.63665485", "0.6356361", "0.6356361", "0.6356361", "0.6356361", "0.6356361", "0.6356361", "0.635636...
0.7555406
0
onRemove event Called by the View when the Mediator is removed.
Событие onRemove вызывается представлением при удалении медиатора.
public function onRemove();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove() {\n\t\t$this->setRemoved(TRUE);\n\t}", "public function afterRemove()\n\t{}", "protected function afterRemoving()\n {\n }", "public function onRelationManageRemove()\n {\n $this->beforeAjax();\n\n $recordId = post('record_id');\n $sessionKey = $this->def...
[ "0.6774853", "0.6684885", "0.64413714", "0.64246714", "0.6316496", "0.6316496", "0.61492264", "0.61490875", "0.60675514", "0.5952155", "0.5952155", "0.5952155", "0.5952155", "0.5862185", "0.5858468", "0.58379745", "0.58140516", "0.5806171", "0.579718", "0.57801265", "0.575391...
0.76870465
0
Lists all Alert models.
Список всех моделей Alert.
public function actionIndex() { $searchModel = new AlertSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetAlerts()\n\t{\n\t\t\n\t\t$alertresult = $this->find('all',array('order' => 'Alert.id ASC')); \n\t\treturn $alertresult;\n\t}", "public function index()\n {\n $alertants= Alertants::all();\n\n return AlertantsResource::collection($alertants);\n }", "public function index()...
[ "0.7139501", "0.67555153", "0.6608129", "0.6511806", "0.64860547", "0.63306415", "0.63207364", "0.63078696", "0.62741494", "0.6273876", "0.62521935", "0.6241226", "0.6218836", "0.6209108", "0.6200719", "0.6190573", "0.6190573", "0.6190573", "0.6181404", "0.6169199", "0.616011...
0.7287034
0
Finds the Alert model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
Находит модель Alert по значению первичного ключа. Если модель не найдена, будет выброшено исключение HTTP 404.
protected function findModel($id) { if(($model = Alert::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function findModel($id)\n {\n if (($model = Alerts::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "public abstract function find($primary_key, $model);", "protec...
[ "0.6576921", "0.65379894", "0.6471084", "0.6461526", "0.6454981", "0.64292526", "0.6297627", "0.6262687", "0.6242543", "0.62064326", "0.620378", "0.62028813", "0.6154456", "0.61475974", "0.6075236", "0.60726416", "0.6049106", "0.6042832", "0.6041444", "0.60402787", "0.603215"...
0.7352018
0
////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// Convert labels into fields. This function is used if the form field names can't be set. Eg GravityForms Conversion: All characters other than 09azAZ_ are changed ...
////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// Преобразование меток в поля. Эта функция используется, если не удается задать имена полей формы. Например, преобразование GravityForms: все символы, кроме 09azAZ_...
public function label_to_field($label) { return preg_replace ( "/[^a-zA-Z0-9_]/" , "_" , $label); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addNamesLabelsValues() {\n foreach ($this->__fields() as $field) {\n $this->$field->__name = $field;\n if (!$this->$field->label && $this->$field->label !== '') $this->$field->label = strtoupper($field[0]) . substr ($field, 1);\n $this->setFieldValue($field);\n $this->$fie...
[ "0.71804816", "0.70277804", "0.6520999", "0.634132", "0.63398635", "0.6234416", "0.61825424", "0.6166025", "0.60952014", "0.6086169", "0.6049958", "0.6044477", "0.6008866", "0.60035735", "0.59353983", "0.5931402", "0.5919031", "0.59083056", "0.59046274", "0.5844834", "0.58231...
0.7059771
1
////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// Spinner html
////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// Spinner html
private function spinner_html() { // From See more at: http://cssload.net/#sthash.CYIDmZ69.dpuf ?> <div id="floatingBarsG" class="spinner-root"> <div class="blockG" id="rotateG_01"></div> <div class="blockG" id="rotateG_02"></div> <div class="blockG" id="rotateG_03"></div> <div class="blockG" id="rotateG_04">...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_spinner_preview() {\n if (! isset($_POST)) wp_die();\n\n $type = isset($_POST['type']) ? $_POST['type'] : '';\n\n $wfc_preloader_options = $this->wfc_preloader_options();\n WFC_Preloader_Spinners::spinner($type, $wfc_preloader_options['spinner_size'], $wf...
[ "0.59997123", "0.5498907", "0.54532385", "0.53662235", "0.53506935", "0.5299988", "0.5224769", "0.51847464", "0.51838887", "0.51771796", "0.5170841", "0.51570296", "0.5141821", "0.5116238", "0.5076497", "0.5047854", "0.5027032", "0.5020488", "0.498682", "0.4963386", "0.491010...
0.7428299
0
////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// Show please_wait_page
////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// Показать страницу "Пожалуйста, подождите"
private function please_wait_page($UID) { cfs_show_header(plugins_url( '', __FILE__ ), "Please wait"); ?> <div class="container theme-showcase" role="main"> <!-- Main jumbotron for a primary marketing message or call to action --> <div class="jumbotron"> <?php $this->spinner_html(); ?> <h2 id...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function show_wait_message()\n\t\t{\n\t\t\tif(!@is_object($GLOBALS['egw']->js))\n\t\t\t{\n\t\t\t\t$GLOBALS['egw']->js =& CreateObject('phpgwapi.javascript');\n\t\t\t}\n\t\t\t$please_wait=lang('Please wait, task in progress ...');\n\t\t\t$GLOBALS['egw_info']['flags']['java_script'] .= '<script type=\"text/javascrip...
[ "0.7739489", "0.64375514", "0.64206886", "0.63197523", "0.6219417", "0.61558354", "0.6148081", "0.61470157", "0.6142919", "0.6073609", "0.60586274", "0.5932944", "0.5932944", "0.58593035", "0.5853535", "0.58284974", "0.5822982", "0.5822814", "0.58162344", "0.57771146", "0.576...
0.77200204
1
////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// Util...
////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// Инст...
public function gc_files_dir() { // clean_files_dir -- remove all files older than GC_TIME $dir_name = $this->signed_files_dir(); // Create recursive dir iterator which skips dot folders $it = new RecursiveDirectoryIterator($dir_name, FilesystemIterator::SKIP_DOTS); // Maximum depth is 1 level deeper th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function gc()\n\t{\n\t\tif ($handle = opendir(DIR_SERVER_ROOT . DIR_TMP_NAME . '/' . DIR_DATASTORE_NAME . '/'))\n\t\t{ \n\t\t\t$dir_array = array(); \n\t\t\twhile (false !== ($file = readdir($handle)))\n\t\t\t{ \n\t\t\t\tif ($file != '.' AND $file != '..')\n\t\t\t\t{\n\t\t\t\t\tif (file_exists(DIR_SERVER_R...
[ "0.69016427", "0.64175427", "0.6387498", "0.62130994", "0.61356235", "0.61306", "0.6089376", "0.6082086", "0.6080803", "0.60761434", "0.6061157", "0.6052766", "0.6042974", "0.6016554", "0.6004116", "0.59994036", "0.59432685", "0.5926843", "0.5893241", "0.5810346", "0.57979846...
0.72715133
0
signed_files_dir return full path of the dir for caching signed files Does NOT include final /
signed_files_dir возвращает полный путь к каталогу для кэширования подписанных файлов. Не включает окончательный /
public function signed_files_dir() { return plugin_dir_path( __FILE__ ) . CFS_SIGNED_FILES_DIR; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_files_directory() {\n return '../data/files/' . hash_secure($this->name);\n }", "public function getCacheDir();", "protected function getFileSnapshotDirectory(): string\n {\n return $this->getSnapshotDirectory().\n DIRECTORY_SEPARATOR.\n 'files';\n }",...
[ "0.6740016", "0.61078787", "0.583903", "0.579882", "0.5785997", "0.5766882", "0.57173413", "0.57054406", "0.5692409", "0.5681586", "0.56623185", "0.5645704", "0.5641187", "0.56337833", "0.56246525", "0.5613577", "0.55681014", "0.5527162", "0.5513348", "0.5504178", "0.54855984...
0.7908847
0
Tests whether or not a given path matches the start of a given pattern up to the first "". This is not a general purpose test and should only be used if you can live with false positives. For example, pattern=\a and str=b will yield true.
Проверяет, соответствует ли заданный путь началу заданного шаблона до первого "". Это не является общим способом проверки и должно использоваться только в том случае, если вы можете мириться с ложными срабатываниями. Например, pattern=\a и str=b дадут true.
public static function matchPatternStart($pattern, $str, $isCaseSensitive = true) { // When str starts with a DIRECTORY_SEPARATOR, pattern has to start with a // DIRECTORY_SEPARATOR. // When pattern starts with a DIRECTORY_SEPARATOR, str has to start with a // DIRECTORY_SEPARATOR. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected final function stringStartsWith ($string, $pattern) {\n\t\treturn (strcmp(substr($string, 0, strlen($pattern)), $pattern) === 0);\n\t}", "public function isFirstPartOfStrReturnsTrueForMatchingFirstPartDataProvider() {}", "public static function matchPath($pattern, $str, $isCaseSensitive = true) {\n ...
[ "0.68162113", "0.62970084", "0.6285252", "0.60830736", "0.60291684", "0.60086894", "0.5980705", "0.5899225", "0.5873044", "0.57985234", "0.5793729", "0.57893866", "0.5698168", "0.5682721", "0.5664732", "0.5659287", "0.5642561", "0.5641358", "0.5641358", "0.56057745", "0.55908...
0.71689254
0
Convert all applicable data to HTML entities
Преобразуйте все применимые данные в HTML-сущности
private static function entities($data) { return strtr($data, array( '<' => '&lt;', '>' => '&gt;', '"' => '&quot;' )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function entities($data, $strategy = 'html', $encoding = null)\n {\n return foil('escaper')->escape($data, $strategy, $encoding);\n }", "public function displayData()\r\n {\r\n $htmlContent = '';\r\n $htmlContent .= html_entity_decode($this->content);\r\n return $htmlContent;...
[ "0.7261957", "0.7101929", "0.7057487", "0.7004228", "0.691445", "0.6859511", "0.6727443", "0.67263514", "0.67068064", "0.66817194", "0.6625756", "0.6623253", "0.65545005", "0.65477824", "0.6519467", "0.6503407", "0.64887166", "0.64837945", "0.64236015", "0.6412909", "0.639696...
0.7707775
0
Send an APIRequest to register a new user.
Отправьте APIRequest для регистрации нового пользователя.
public function registerUserRequest() { $user = factory(User::class)->make(); return $this->json('POST', '/api/v2/user', array_merge($user->toArray(), ['password' => 'secret1234', 'agb_check' => true])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register (RegisterAPIRequest $request)\n {\n $data = $request->all();\n $user = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n ]);\n\n return $this->sendRe...
[ "0.7756098", "0.7272192", "0.7232198", "0.71306956", "0.7093613", "0.70883375", "0.70315117", "0.69618726", "0.6926003", "0.69045305", "0.68858457", "0.68808234", "0.68793327", "0.68291473", "0.6810185", "0.6802316", "0.6802165", "0.679566", "0.67911667", "0.6779006", "0.6759...
0.82167983
0
Send APIRequests to register and activate a new user.
Отправьте APIRequests для регистрации и активации нового пользователя.
public function registerAndActivateUserRequest() { $this->registerUserRequest(); return $this->get('/api/v2/user/activate/' . User::first()->activation_key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registerUserRequest()\n {\n $user = factory(User::class)->make();\n\n return $this->json('POST', '/api/v2/user', array_merge($user->toArray(), ['password' => 'secret1234', 'agb_check' => true]));\n }", "public function registerAction()\n {\n // specify required field...
[ "0.7677174", "0.68404907", "0.6840026", "0.6826261", "0.67964417", "0.6638485", "0.6628902", "0.661661", "0.65921307", "0.65912676", "0.65703285", "0.6551322", "0.6533102", "0.6514498", "0.65127766", "0.6505589", "0.6482658", "0.64632213", "0.64024067", "0.63775975", "0.63763...
0.8056475
0
== protected functions ============================================================= Getter for name of database platform assigned for received task
== защищенные функции ============================================================= Получатель имени платформы базы данных, назначенной для полученного задания
protected function getPlatformName(/*string*/ $task) { if (!is_string($task)) { throw new DbControlException("Ilegal parameter task. Must be string."); } if (is_string($this->platformName)) { return $this->platformName; } $platformName = $this->getX...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getDatabasePlatform(): string;", "function GetNameFromPlatform($platform)\n {\n return $this->Platforms[$platform]; \n }", "public function getPlatform()\n {\n return $this->database ? $this->database->getPlatform() : null;\n }", "public function getPlatform()\n ...
[ "0.7571455", "0.6943411", "0.6855987", "0.6834765", "0.67824924", "0.6675191", "0.6626151", "0.65339255", "0.64851797", "0.6484669", "0.6466", "0.644799", "0.64338183", "0.64297646", "0.64185643", "0.6405972", "0.6392395", "0.6390562", "0.6376059", "0.6370782", "0.6366779", ...
0.70112884
1
Permite setear el xsl a utilizar desde fuera de la clase
Позволяет задать используемый xsl извне класса
function set_xsl($xsl) { $this->xsl_proyecto = $xsl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setXSL($xsl){\r\n\t\t$this->xsl_file = $xsl;\r\n\t}", "public function setXSLDocument($xsl) {\n libxml_get_last_error() && libxml_clear_errors();\n $this->stylesheet= $xsl;\n strlen($this->_base) && $this->stylesheet->documentURI= $this->_base;\n \n $this->_checkErrors($x...
[ "0.6820812", "0.6605446", "0.63215226", "0.61578923", "0.5903276", "0.583666", "0.57833034", "0.57712096", "0.57365006", "0.5735803", "0.57303816", "0.56359005", "0.562761", "0.5598982", "0.558445", "0.5580216", "0.5576628", "0.55380934", "0.5534463", "0.55265033", "0.5497878...
0.73257643
0
Devuelve el nombre del archivo xml con ruta absoluta
Возвращает имя файла xml с абсолютным путем
function get_nombre_archivo_xml() { return $this->xml_proyecto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function get_xml_filename() {\n return null;\n }", "public function generateFileName() {\n $this->filename = ($this->getName(TRUE, TRUE, TRUE, \".\").\".xml\");\n\n return $this->filename;\n }", "protected function getFileName() {\n return $this->_dateTime->format('YmdHis') . ...
[ "0.6704165", "0.66759175", "0.66623", "0.6576088", "0.65268385", "0.647894", "0.63256013", "0.6295221", "0.6272406", "0.62035245", "0.61012787", "0.610097", "0.60725033", "0.60125047", "0.59884906", "0.597715", "0.5969852", "0.5956149", "0.5946763", "0.5929004", "0.5893873", ...
0.7229772
0
Devuelve el nombre del archivo xsl con ruta absoluta
Возвращает имя файла xsl с абсолютным путем
function get_nombre_archivo_xsl() { return $this->xsl_proyecto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getXslFilename() {\n return HBO_PLUGIN_DIR. '/include/settings.xsl';\n }", "public function getFileName()\n {\n\n $fileName = \"sitemap\";\n\n if (is_multisite()) {\n $fileName .= \"-\" . get_current_blog_id();\n }\n\n $fileName .= \".xml\";\n\n ...
[ "0.685674", "0.6101002", "0.6016709", "0.59138954", "0.5779051", "0.57660174", "0.5697036", "0.5690133", "0.5650096", "0.5640468", "0.5637735", "0.56224656", "0.5577127", "0.5561835", "0.55570364", "0.551724", "0.54924977", "0.54815596", "0.5472422", "0.54665875", "0.54288906...
0.70119464
0
Main Tutorial Instance. Insures that only one instance of Tutorial exists in memory at any one time. Also prevents needing to define globals all over the place.
Основной учебный пример. Обеспечивает, что в памяти всегда существует только один экземпляр Tutorial. Также предотвращает необходимость определять глобальные переменные везде по коду.
public static function instance() { if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Tutorial ) ) { self::$instance = new Tutorial(); self::$instance->define_constants(); self::$instance->includes(); self::$instance->dependency_class_instance(); } return self::$instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tutorial() {\n\treturn Tutorial::instance();\n}", "protected function initializeTceMain() {}", "public function instantiateSession()\n {\n session_start();\n\n if (isset($_SESSION['instanceID']) === false && defined('DOING_CRON') === false) {\n $this->genera...
[ "0.72061074", "0.57535833", "0.56798506", "0.56745404", "0.55985993", "0.55350536", "0.551571", "0.5492681", "0.5479191", "0.5478897", "0.5472324", "0.54589045", "0.54491776", "0.5446383", "0.54103434", "0.5393586", "0.53815764", "0.5376704", "0.5359835", "0.5355975", "0.5355...
0.75991404
0
The main function for that returns Tutorial
Основная функция, которая возвращает Tutorial
function tutorial() { return Tutorial::instance(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function main(){\n\t\t\t\n\t\t}", "public function main()\n\t{\n\t}", "public static function main()\n\t{\n\t\trequire_once \"PHPUnit/TextUI/TestRunner.php\";\n\n\t\t$suite = new PHPUnit_Framework_TestSuite(\"EssentialsTest\");\n\t\t$result = PHPUnit_TextUI_TestRunner::run($suite);\n\t}", "pub...
[ "0.66103196", "0.6503696", "0.64991486", "0.6495224", "0.6495224", "0.6495224", "0.6495224", "0.6495224", "0.6495224", "0.6495224", "0.6495224", "0.6495224", "0.6495224", "0.6495224", "0.6495224", "0.6495224", "0.6495224", "0.6495224", "0.6495224", "0.6495224", "0.6495224", ...
0.71136147
0
/ Genera nombre de archivo para el reporte
/ Генерация имени файла для отчета
private function nameReportFile(){ $name= str_replace(' ','_',$this->nombrereporte).'_'. $this->id.'_'.h::userId().'_'.uniqid().'.'.$this->type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function filename()\n {\n return 'Reports_' . date('YmdHis');\n }", "protected function filename()\n {\n return 'Export_' . date('YmdHis');\n }", "protected function filename() {\n return 'Passport_report_' . date('YmdHis');\n }", "protected function filename()\n...
[ "0.777352", "0.7409933", "0.73905957", "0.73286694", "0.72718716", "0.71785945", "0.71755785", "0.7143409", "0.7138826", "0.71285284", "0.7128478", "0.7093671", "0.7032536", "0.70247054", "0.701972", "0.700695", "0.6998154", "0.69969225", "0.69806486", "0.6971452", "0.6943273...
0.7823543
0
Check that the testReplaceFormLines method returns correct lines
Проверьте, что метод testReplaceFormLines возвращает корректные строки
public function testReplaceFormLines() { $translator = new Translator(); $translator->replaceFormLines(); $this->assertSame(__('Reset Password'), 'Set Password'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testEditLineItems()\n {\n }", "public function testReplaceResponseLines()\n {\n $translator = new Translator();\n $translator->replaceResponseLines();\n\n $this->assertSame(__('passwords.reset'), 'Your password has been set!');\n $this->assertSame(__('password...
[ "0.6366029", "0.6190379", "0.591088", "0.58317035", "0.5825976", "0.58118415", "0.57639533", "0.5571433", "0.54758966", "0.5446499", "0.5438021", "0.5433231", "0.5312103", "0.53029287", "0.53009284", "0.5292851", "0.52727896", "0.5258159", "0.51991045", "0.51832384", "0.51793...
0.7340064
0
Check that the testReplaceResponseLines method returns correct response lines
Проверьте, что метод testReplaceResponseLines возвращает корректные строки ответа
public function testReplaceResponseLines() { $translator = new Translator(); $translator->replaceResponseLines(); $this->assertSame(__('passwords.reset'), 'Your password has been set!'); $this->assertSame(__('passwords.token'), 'This token is invalid.'); $this->assertSame(__...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAssertResponseRegExp(): void\n {\n $this->_response = new Response();\n $this->_response = $this->_response->withStringBody('Some content');\n\n $this->assertResponseRegExp('/cont/');\n }", "public function testSendingOutputWithMismatchedLineEndings() {\n\t\t$test ...
[ "0.6248706", "0.60979235", "0.6060384", "0.60083586", "0.5956141", "0.59068364", "0.58974403", "0.5825999", "0.5697471", "0.5689114", "0.56822884", "0.56388545", "0.5630463", "0.56228834", "0.56042135", "0.55879337", "0.5559991", "0.5497007", "0.54911083", "0.5466754", "0.546...
0.7769014
0
GETTING TOTAL WISHED PRODUCTT BY USER
ПОЛУЧЕНИЕ ОБЩЕГО КОЛИЧЕСТВА ЖЕЛАЕМЫХ ТОВАРОВ ПОЛЬЗОВАТЕЛЕМ
function total_wished($product_id) { $num = 0; $users = $this->db->get('user')->result_array(); foreach ($users as $row) { $wishlist = json_decode($row['wishlist']); if (is_array($wishlist)) { if (in_array($product_id, $wishlist)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function total_wished($product_id)\n {\n $num = 0;\n $users = $this->db->get('user')->result_array();\n foreach ($users as $row) {\n $wishlist = json_decode($row['wishlist']);\n if (is_array($wishlist)) {\n if (in_array($product_id, $wishlist)) {\n ...
[ "0.6986321", "0.6581975", "0.6566863", "0.6481209", "0.642387", "0.6366783", "0.62041575", "0.61731255", "0.6130769", "0.60884696", "0.60876495", "0.60658807", "0.60539997", "0.6030096", "0.6009274", "0.5932885", "0.59248424", "0.5923682", "0.59028244", "0.58725655", "0.58576...
0.7007352
0
Lists all Book models.
Список всех моделей Book.
public function actionIndex() { $searchModel = new BookSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allBooks ()\n {\n $books = $this->book->findAll();\n $this->show('admin/allbooks', ['books' => $books]);\n }", "public function actionIndex()\n {\n $searchModel = new BookSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n ...
[ "0.76664925", "0.7213623", "0.70416456", "0.6949415", "0.6945329", "0.6896678", "0.6887055", "0.687784", "0.6853417", "0.6848874", "0.6779173", "0.6770208", "0.6682905", "0.66732544", "0.66053665", "0.65833354", "0.65583825", "0.6555047", "0.6546265", "0.6530709", "0.6497462"...
0.7255016
1
Deletes an existing Book model changing book status to deleted. If deletion is successful, the browser will be redirected to the 'index' page.
Удаляет существующую модель Book, изменяя статус книги на удалённый. Если удаление успешно, браузер будет перенаправлен на страницу 'index'.
public function actionDelete($id) { $book = $this->findModel($id); $book->status_id = Yii::$app->params['status']['deleted']; $book->update(false); Yii::info($id . '_delete', 'book'); Yii::$app->session->addFlash('success', Yii::t('app', 'Book was deleted successfully.')); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($id){\n\t\t$this->book_model->delBook($id);\n\t\t// arahkan ke method 'books' di kontroller 'dashboard'\n\t\tredirect('dashboard/books');\n\t}", "public function delete($id)\n\t{\n\t\t$this->book_model->delBook($id);\n\t\t// arahkan ke method 'books' di kontroller 'dashboard'\n\t\tredirect...
[ "0.725049", "0.7093025", "0.7031109", "0.69947845", "0.6927318", "0.6923787", "0.68625015", "0.6853587", "0.6852764", "0.6852316", "0.6831358", "0.6830576", "0.67986673", "0.67744684", "0.6765235", "0.6758664", "0.6739757", "0.66881746", "0.6682747", "0.66811925", "0.66808045...
0.7204237
1
Determine whether the user can view the empresa.
Определите, может ли пользователь просматривать empresa.
public function view(User $user, Empresa $empresa) { return $user->hasRole('Admin'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n { \n if($this->user()->hasRole(['unidadeEnsino', 'articulador', 'superadministrador']))\n {\n return true;\n }else {\n $this->error = 'Desculpe, voce nao possui permissão para adicionar espaços';\n return false;\n }\n ...
[ "0.71160966", "0.703079", "0.6954252", "0.69475627", "0.6935735", "0.68629783", "0.68605703", "0.6855957", "0.6846922", "0.68081886", "0.68053174", "0.67964935", "0.676147", "0.6745882", "0.6740132", "0.67396444", "0.6731143", "0.6705006", "0.66977507", "0.6683756", "0.668370...
0.7170343
0
Returns a array of database clusters.
Возвращает массив базовых кластеров базы данных.
public function getDatabaseClusters() { return $this['db_clusters']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClusters() {\n global $conn;\n $query = \"select cluster_name from front_cluster\";\n $result = mysqli_query($conn, $query);\n $results = array();\n while($row = $result->fetch_array(MYSQLI_ASSOC)) {\n array_push($results, $row['cluster_name']);\n }\n return $results;\n}", ...
[ "0.70354885", "0.6111655", "0.60235626", "0.5857161", "0.58276695", "0.5766799", "0.5756905", "0.57493985", "0.56386244", "0.5613457", "0.55602044", "0.55582917", "0.55422646", "0.5481164", "0.5474639", "0.54695046", "0.54357487", "0.5406721", "0.5382529", "0.5369647", "0.535...
0.8409325
0
Tests for the presence of a Go button and clicks it if present. Used for the hathor accessible template when filtering on lists in back end.
Тесты на наличие кнопки Go и нажатие её, если она существует. Используется для шаблона hathor, доступного для использования, при фильтрации списков на бэкенде.
function clickGo() { if ($this->isElementPresent("filter-go")) { $this->click("filter-go"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSeeButtons(){\n $this->drupalLogin($this->homeUser);\n $this->drupalGet('connect-four');\n $this->assertSession()->buttonExists('Play');\n\n $this->click('input[type=\"submit\"]:first-child');\n $this->assertSession()->buttonNotExists('Play');\n\n $this->drupalLogin($this->awa...
[ "0.660751", "0.6243338", "0.6043717", "0.6040654", "0.5999463", "0.59204835", "0.58895093", "0.58458924", "0.57991266", "0.57565147", "0.57430583", "0.57312614", "0.5712093", "0.56793797", "0.56458807", "0.5642203", "0.5619572", "0.5606467", "0.5604404", "0.5595054", "0.55942...
0.7091917
0
Sets permissions in Global Configuration or Component for a group
Устанавливает разрешения в Глобальной конфигурации или Компоненте для группы
function setPermissions($component, $group, $actions, $permissions) { $this->jClick($component); if ($component == 'Global Configuration') { $this->click('permissions'); } else { $this->jClick('Options'); $this->click("//dt[contains(span,'Permissions')]"); } if (!is_array($actions)) { $acti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setGroup() {\n if (Request::has(\"include-group-read\") && Request::input(\"include-group-read\") === \"true\") { $permissionRead = 4; } else { $permissionRead = 0; }\n if (Request::has(\"include-group-write\") && Request::input(\"include-group-write\") === \"true\") { $permissionWri...
[ "0.702396", "0.66336", "0.6584417", "0.6508724", "0.63586307", "0.62987643", "0.62608665", "0.6260667", "0.6185675", "0.61802965", "0.6178002", "0.6075191", "0.60731006", "0.6062881", "0.6043727", "0.6032742", "0.60247624", "0.6011373", "0.6009546", "0.59909797", "0.5962552",...
0.70731807
0
Get the time left in millisecconds until the maximum script execution time is reached.
Получить оставшееся время в миллисекундах до достижения максимального времени выполнения скрипта.
public static function getTimeLeft() { return (ini_get("max_execution_time") - self::getExecutionTime()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTimeLeft()\n\t{\n\t\treturn $this->max_exec_time - $this->getRunningTime();\n\t}", "public function getMaxExecutionTime()\n\t{\n\t\tif(!isset($this->_maxExecutionTime)){\n\t\t\t$this->_maxExecutionTime = $this->dontHardcodeService->searchDontHardcodeByParamNameAndFilterName(__CLASS__,'maxExecu...
[ "0.74137264", "0.68965083", "0.6862643", "0.6862643", "0.67986435", "0.67966545", "0.6681861", "0.6548904", "0.6517269", "0.64553046", "0.6454422", "0.64491135", "0.64318335", "0.6393526", "0.637923", "0.636082", "0.63515115", "0.6003605", "0.5966316", "0.5907118", "0.5900568...
0.7664284
0
Cron Test whether the script is executed as a cron task. Execution as a cron task doesn't ensure that the script was initiated by an internel scheduled server call, just that the script was executed in the context of wpcron.php.
Тестирование крона Проверьте, выполняется ли скрипт как задача крона. Выполнение как задача крона не гарантирует, что скрипт был запущен через внутренний запланированный вызов сервера, просто то, что скрипт был выполнен в контексте wpcron.php.
public static function doingCron() { return (defined("DOING_CRON") && DOING_CRON); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function doCron() {\n\t\t$lc = new DateTime(Preferences::value(\"lastCron\"));\n\t\t$now = new DateTime();\n\t\t\n\t\t$diff = $now->diff($lc, true);\n\t\tif($diff->i >= 1) return true;\n\t\treturn false;\n\t}", "function CheckCron()\n\t{\n\t\t$cronok = false;\n\t\t$query = \"SELECT * FROM \" . SENDSTUDIO_...
[ "0.7303063", "0.72047865", "0.71501034", "0.712129", "0.71010035", "0.7057831", "0.7011702", "0.68741035", "0.6845459", "0.68327785", "0.68131846", "0.6798553", "0.6780302", "0.6682024", "0.6672472", "0.6597141", "0.6586093", "0.6568166", "0.6567651", "0.6560085", "0.6555136"...
0.7778557
0
/ Get imagemfrase by idImagemFrase
/ Получить imagemfrase по idImagemFrase
function get_imagemfrase($idImagemFrase) { return $this->db->get_where('ImagemFrase',array('idImagemFrase'=>$idImagemFrase))->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_imagemfrase($idImagemFrase)\n {\n return $this->db->delete('ImagemFrase',array('idImagemFrase'=>$idImagemFrase));\n }", "function update_imagemfrase($idImagemFrase,$params)\n {\n $this->db->where('idImagemFrase',$idImagemFrase);\n return $this->db->update('ImagemFras...
[ "0.6710469", "0.63563603", "0.60329175", "0.5913692", "0.5910733", "0.5901322", "0.58817863", "0.5876828", "0.58616096", "0.58524376", "0.5850936", "0.58424604", "0.58186585", "0.5768078", "0.57540655", "0.57427824", "0.5722255", "0.57182044", "0.56966716", "0.56641155", "0.5...
0.84538716
0
/ Get all imagemfrase
Получить все imagemfrase
function get_all_imagemfrase() { $this->db->order_by('idImagemFrase', 'desc'); return $this->db->get('ImagemFrase')->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetImages(){\n\t\t$this->MediaType = 'image/jpeg';\n\t\t$this->SetFileName();\n\t\treturn $this->get();\n\t}", "public function get_images()\r\n\t\t{\r\n\t\t\t$images = $this->obj->result;\r\n\t\t\treturn $images;\r\n\t\t}", "function get_images() \t{\n \t\treturn $this->getImages();\n \t}", "pub...
[ "0.70751745", "0.6957428", "0.695184", "0.6638546", "0.66219074", "0.65722114", "0.6549451", "0.6467593", "0.6421075", "0.64158285", "0.6376245", "0.63729286", "0.6364751", "0.63627636", "0.6329742", "0.631839", "0.6304378", "0.62982786", "0.62935406", "0.6277065", "0.6265006...
0.7853137
0
/ function to delete imagemfrase
Функция для удаления изображения mfrase
function delete_imagemfrase($idImagemFrase) { return $this->db->delete('ImagemFrase',array('idImagemFrase'=>$idImagemFrase)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function deleteImage(){}", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "function imageAllDelete();", "public function deleteImage(){\n if(file_exists($this->getImage())){\n unlink($this->getImage());\n }\n $this->setImage(null);...
[ "0.7966985", "0.74800575", "0.74756503", "0.7331362", "0.71760446", "0.7175717", "0.7152173", "0.7135248", "0.712234", "0.7120507", "0.7098053", "0.70798784", "0.70557046", "0.6969624", "0.694102", "0.6937676", "0.6896233", "0.68800235", "0.68426013", "0.68105483", "0.6787916...
0.75528336
1
If TYPO3 branch is above 4.3
Если ветка TYPO3 находится выше 4.3
public static function isTypo3VersionAboveTypo343() { if(!defined('TX_MULTICOLUMN_TYPO3_4-3')) return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isTypo3VersionAboveTypo344() {\r\n\t\tif(!defined('TX_MULTICOLUMN_TYPO3_4-5_OR_ABOVE')) return true;\r\n\t}", "public static function getCurrentTypo3Version() {}", "public function hasVersion(){\n return $this->_has(3);\n }", "function alertcloud_component_checkversion()\n{\n ...
[ "0.70379573", "0.65331656", "0.6378021", "0.63328475", "0.6249626", "0.62489796", "0.61881435", "0.6169281", "0.6151118", "0.6149869", "0.61020565", "0.6039378", "0.5980483", "0.59742564", "0.59530956", "0.5945927", "0.58929026", "0.58694243", "0.586862", "0.5868087", "0.5852...
0.71200347
0
Evaluates the total width of padding in colum
Определяет общую ширину отступов в столбце
public static function getPaddingTotalWidth($columnPadding) { $padding = preg_split('/ /', trim($columnPadding)); //how many css attributes are set? $paddingNum = count($padding); //calculate total width $paddingTotalWidth = ($paddingNum == 2) ? intval($padding[1]) * 2 : (intval($padding[1]) + int...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function calculateColumnsWidth()\r\n {\r\n if ($this->_columns > 0)\r\n return ($this->Width / $this->_columns);\r\n else\r\n return 1;\r\n }", "private function calculateColumnWidth()\r\n {\r\n foreach ($this->data as $y => $row) {\r\n if ...
[ "0.6922878", "0.67309785", "0.64985436", "0.63288647", "0.6273669", "0.6239164", "0.6237961", "0.6190752", "0.6126579", "0.61156225", "0.6053951", "0.5953469", "0.59327245", "0.59248465", "0.590153", "0.5790142", "0.57739884", "0.57739884", "0.57739884", "0.57739884", "0.5773...
0.7135087
0
Returns default Layout configuration options
Возвращает настройки конфигурации Layout по умолчанию
public static function getDefaultLayoutConfiguration() { return array ( 'layoutKey' => null, 'layoutCss' => null, 'columns' => 2, 'containerMeasure' => '%', 'containerWidth' => 100, 'columnMeasure' => '%', 'columnWidth' => null, 'columnMargin' => null, 'columnPadding' => null, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOptionsLayout()\n {\n return $this->_optionsLayout;\n }", "public function getLayoutOptions()\n {\n $theme = \\Cms\\Classes\\Theme::getActiveTheme();\n\n $path = $theme->getPath() . '/partials/tiles';\n\n if (file_exists($path) === false) {\n ret...
[ "0.73887765", "0.71099746", "0.68747395", "0.672043", "0.6627551", "0.6603559", "0.6602448", "0.6550778", "0.6545", "0.6502258", "0.6497905", "0.6463715", "0.6420437", "0.6392325", "0.6372457", "0.63720405", "0.63629836", "0.6326974", "0.6326974", "0.63150907", "0.6293816", ...
0.7794757
0
Checks if backend user has the rights to see multicolumn container
Проверяет, имеет ли пользователь бэкенда право видеть контейнер с несколькими колонками
public static function beUserHasRightToSeeMultiColumnContainer () { $hasAccess = true; $TSconfig = t3lib_BEfunc::getPagesTSconfig($GLOBALS['SOBE']->id); // check remove items if(!empty($TSconfig['TCEFORM.']['tt_content.']['CType.']['removeItems'])) { $hasAccess = t3lib_div::inList($TSconfig['TCEFOR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function batch_items_permissions_check() {\n return current_user_can( 'manage_options' );\n }", "public static function CHECK_ACCESS_PERMISSION(){\n\t $SQL_String = \"SELECT uid,gid FROM permission_matrix WHERE uid=:uid AND master=1;\";\n\t return $SQL_String;\n\t}", "private function canDis...
[ "0.59503585", "0.5918448", "0.58139586", "0.5655623", "0.5649974", "0.56305647", "0.56047994", "0.5591164", "0.5568941", "0.55599594", "0.55419666", "0.5516448", "0.5503931", "0.5471195", "0.5470143", "0.5460841", "0.54562944", "0.54367274", "0.5432485", "0.5423763", "0.54207...
0.8375641
0
Check if the file exists on the remote server.
Проверьте, существует ли файл на удаленном сервере.
public function isFileExistsRemotely();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function remoteFileExists($url) {\n\t\t$f = @fopen($url, 'r');\n\t\tif($f) {\n\t\t\tfclose($f);\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "function remoteFileExists($url) {\n $curl = curl_init($url);\n\n //don't fetch the actual page, you only want to check the connection ...
[ "0.8037423", "0.76637936", "0.75951886", "0.75857776", "0.7463022", "0.7388737", "0.7298444", "0.72480386", "0.7151696", "0.70878065", "0.708143", "0.7032959", "0.7032959", "0.7011962", "0.69929844", "0.6845205", "0.6737671", "0.66810566", "0.66792893", "0.6663581", "0.665422...
0.80195224
1
Download the file from the remote server.
Скачайте файл с удаленного сервера.
public function downloadFile();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function fetch_remote_file($url){\n\t\t// get host name and url path //\n\t\t$parsedUrl = parse_url($url);\n\t\t$host = $parsedUrl['host'];\n\t\tif (isset($parsedUrl['path'])) {\n\t\t\t$path = $parsedUrl['path'];\n\t\t} else {\n\t\t\t// url is pointing to host //\n\t\t\t$path = '/';\n\t\t}\n\t\tif (i...
[ "0.7169748", "0.71152854", "0.70529056", "0.6961752", "0.69351304", "0.68350965", "0.6810164", "0.6628874", "0.6623734", "0.65867996", "0.65182036", "0.64847857", "0.64665127", "0.64501333", "0.64304864", "0.64299667", "0.6429404", "0.6388416", "0.6327049", "0.63238674", "0.6...
0.77349156
0
Method to get all methods and their annotations by class tag
Метод для получения всех методов и их аннотаций по метке класса
public function getMethodAnnotationsByClasstag(string $tag) : array { $annotations = array(); $classes = $this->containerService->getDefinitionsByTag($tag); if (empty($classes)) { return $annotations; } foreach ($classes as $class) { $classMethodsAnnotations = $this->getMethodsAnnotationsByClass($clas...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClassMethodAnnotations(string $class, string $method, string $annotation): array;", "public function getMethodAnnotations(string $class, string $method): array;", "public function getMethods($class);", "function getClassAnnotations(\\ReflectionClass $class);", "public function getClassAn...
[ "0.7085407", "0.6915837", "0.68538606", "0.671886", "0.6684017", "0.64828116", "0.6370307", "0.6238005", "0.60920763", "0.6039663", "0.6009792", "0.5934431", "0.5934431", "0.5934431", "0.57911205", "0.57832265", "0.57832265", "0.57831144", "0.565437", "0.5653961", "0.56383175...
0.75651944
0
Method to load all annotation in a given file path
Метод для загрузки всех аннотаций по заданному пути к файлу
public function loadAnnotionsInPath(string $path) : void { if (!is_dir($path) || !is_readable($path)) { throw new \Exception('Given path ( ' . $path . ' ) does not exist', 500); } $files = glob($path . '/*'); if (!is_array($files) || empty($files)) { return; } foreach ($files as $file) { if (is_f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadMappings($filepath);", "public function load($path);", "public function load($path);", "public function load($path);", "public static function injectAnnotations(string $filePath) {\n if (!static::$annotationKey) {\n return static::$annotationKey;\n } else {\n ...
[ "0.67494434", "0.64598906", "0.64598906", "0.64598906", "0.62559426", "0.6247763", "0.6247763", "0.61916584", "0.61457825", "0.6059852", "0.60555977", "0.5931012", "0.5877076", "0.58538437", "0.5831546", "0.5790998", "0.57894486", "0.57867634", "0.57755697", "0.5759573", "0.5...
0.7941402
0
Stock History Report info
Информация о историческом отчете по акциям
public function stock_history(){ return $stock_info = $this->db->select('*') ->from('store') ->where('isactive',1) ->get() ->result(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getHistory()\n {\n $history = [];\n\n foreach ($this->getResponse()->data as $k => $v) {\n $history[$k]['tanggal'] = Utils::setDate($v->Tanggal);\n\n switch ($v->StatusInternal) {\n case 'Baru':\n $history[$k]['posisi'] = pre...
[ "0.6593868", "0.64708704", "0.63215876", "0.6276206", "0.62220514", "0.61634654", "0.6103687", "0.6102987", "0.6100848", "0.6057149", "0.60072434", "0.59893835", "0.59893835", "0.59893835", "0.5949569", "0.59295326", "0.59129965", "0.5907829", "0.5895037", "0.58629394", "0.58...
0.7205132
0
Validates Employee model on create
Проверяет модель Employee при создании
public function actionValidateCreate(){ $model = new Employee(); $model->load(Yii::$app->request->post()); Yii::$app->response->format = Response::FORMAT_JSON; return ActiveForm::validate($model); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(Request $request)\n {\n $validate = $request->validate(['company'=>'required',\n 'first_name'=>'required','last_name'=>'required',\n 'email'=>'required','phone'=>'required']);\n employee::create($validate);\n return back();\n }", "public function create...
[ "0.714988", "0.7053822", "0.69906235", "0.6970113", "0.69393486", "0.6809051", "0.6755437", "0.6754653", "0.6695676", "0.66695637", "0.6662576", "0.6654153", "0.66360825", "0.6616554", "0.6609354", "0.66091764", "0.65872645", "0.6549933", "0.6532749", "0.65297127", "0.6505239...
0.7406496
0
Finds the Employee model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
Находит модель Employee по значению первичного ключа. Если модель не найдена, будет выброшено исключение HTTP 404.
protected function findModel($id) { if (($model = Employee::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function findModel($id)\n {\n if (($model = PaidEmployment::findOne($id)) !== null) {\n return $model;\n } else {\n throw new HttpException(404);\n }\n }", "public abstract function find($primary_key, $model);", "public function find($id) {\n\t\treturn...
[ "0.6881876", "0.68585646", "0.68095785", "0.67929894", "0.6775221", "0.6765697", "0.66552734", "0.6615259", "0.6607076", "0.6596937", "0.6552083", "0.64888185", "0.63899755", "0.63777125", "0.635778", "0.63345385", "0.6313997", "0.62598795", "0.6252255", "0.6249551", "0.62495...
0.7037634
0
Which type of jobs will use the reservation. Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3;
Какой тип задач будет использовать резервирование. Сгенерировано из поля protobuf .google.cloud.bigquery.reservation.v1.Assignment.JobType job_type = 3;
public function setJobType($var) { GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Assignment\JobType::class); $this->job_type = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getJobType()\n {\n return $this->job_type;\n }", "public function getjobTypeId()\n {\n return $this->jobtype_id;\n }", "public function getJobType()\n\t{\n\t\tif (!isset($this->_jobType))\n\t\t{\n\n\t\t\t$component = Craft::createComponent(\"Craft\\\\\".$this->type);\n...
[ "0.6615168", "0.57985675", "0.5775277", "0.5752609", "0.5481669", "0.53694826", "0.51609886", "0.5076592", "0.50576985", "0.49227986", "0.4824566", "0.48240176", "0.47860822", "0.47616607", "0.47613087", "0.47231326", "0.46823424", "0.465777", "0.4652567", "0.45893458", "0.45...
0.8307604
0
Output only. State of the assignment. Generated from protobuf field .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
Только для вывода. Состояние назначения. Генерируется из поля protobuf .google.cloud.bigquery.reservation.v1.Assignment.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
public function setState($var) { GPBUtil::checkEnum($var, \Google\Cloud\BigQuery\Reservation\V1\Assignment\State::class); $this->state = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_state( $ignore_assignments = false )\n {\n if( is_null( $this->id ) )\n {\n log::warning( 'Tried to determine state for appointment with no id.' );\n return NULL;\n } \n \n // if the appointment's reached column is set, nothing else matters\n if( !is_null( $this->re...
[ "0.5909293", "0.56932575", "0.5589122", "0.55271995", "0.55101085", "0.5394372", "0.53849846", "0.53849846", "0.53849846", "0.53849846", "0.53849846", "0.53849846", "0.53849846", "0.53849846", "0.53849846", "0.53849846", "0.53849846", "0.53849846", "0.53849846", "0.53849846", ...
0.8106524
0
Write some bytes to the socket.
Запишите несколько байтов в сокет.
public function write($bytes) { fwrite($this->rawSocket, $bytes); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function write($bytes) {}", "public function write($bytes) {}", "public function write($bytes) {}", "public function write($bytes)\n {\n return fwrite($this->socket, $bytes, strlen($bytes));\n }", "public function write($bytes);", "public function writeSocket()\n {\n socket_...
[ "0.7485108", "0.7485108", "0.7483987", "0.73490465", "0.72827387", "0.6893955", "0.68749136", "0.68362427", "0.6679053", "0.6642012", "0.6607083", "0.65957403", "0.65556484", "0.65219593", "0.6456769", "0.6430591", "0.64144415", "0.6353631", "0.62841666", "0.62684876", "0.624...
0.806627
0
Creates a copy of $srcFilePath from DFS to $dstFilePath on DFS
Создает копию $srcFilePath из DFS в $dstFilePath на DFS
public function copyFromDFSToDFS( $srcFilePath, $dstFilePath ) { $this->accumulatorStart(); $srcFilePath = $this->makeDFSPath( $srcFilePath ); $dstFilePath = $this->makeDFSPath( $dstFilePath ); if(strpos($srcFilePath,'/storage/') !== FALSE ) { $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function copyToDFS( $srcFilePath, $dstFilePath = false )\n { \n $this->accumulatorStart();\n\n if ( $dstFilePath === false )\n {\n $dstFilePath = $srcFilePath;\n }\n $dstFilePath = $this->makeDFSPath( $dstFilePath );\n \n if(strpos($dstFilePath,...
[ "0.7958589", "0.7857977", "0.68413675", "0.6615108", "0.66130495", "0.65538716", "0.6538626", "0.6509402", "0.6483046", "0.6456326", "0.63990575", "0.63812065", "0.6372038", "0.63670826", "0.6339124", "0.63113606", "0.63000315", "0.625881", "0.62482023", "0.62161124", "0.6119...
0.8098628
0
Copies the DFS file $srcFilePath to FS
Копирует DFS-файл $srcFilePath в FS
public function copyFromDFS( $srcFilePath, $dstFilePath = false ) { $this->accumulatorStart(); if ( $dstFilePath === false ) { $dstFilePath = $srcFilePath; } if(strpos($srcFilePath,'/storage/') !== FALSE ) { $result = $this->s3->getObject(arr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function copyFromDFSToDFS( $srcFilePath, $dstFilePath )\n {\n \n $this->accumulatorStart();\n\n $srcFilePath = $this->makeDFSPath( $srcFilePath );\n $dstFilePath = $this->makeDFSPath( $dstFilePath );\n \n if(strpos($srcFilePath,'/storage/') !== FALSE )\n {...
[ "0.7507081", "0.74448395", "0.651058", "0.6134183", "0.5847209", "0.5809098", "0.5809027", "0.571684", "0.56478566", "0.56407595", "0.56397855", "0.5634046", "0.56207734", "0.55819094", "0.5530398", "0.5520525", "0.5496371", "0.54863447", "0.54568285", "0.5447893", "0.5425976...
0.747154
1
Creates the file $filePath on DFS with content $contents
Создает файл $filePath на DFS с содержимым $contents
public function createFileOnDFS( $filePath, $contents ) { $this->accumulatorStart(); $filePath = $this->makeDFSPath( $filePath ); $ret = $this->createFile( $filePath, $contents, false ); $this->accumulatorStop(); return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeFile($filepath, $file_contents) {\n $parent = dirname($filepath);\n if (!is_dir($parent)) {\n mkdir($parent, 0777, TRUE);\n }\n if (file_put_contents($filepath, $file_contents) === FALSE) {\n Logger::log(dt('Error while writing to file @file', array('@file' => $filepath)), 'erro...
[ "0.63690203", "0.6314311", "0.6138239", "0.61100495", "0.5959729", "0.5895083", "0.5892167", "0.5878571", "0.5810776", "0.5768913", "0.5761182", "0.57514125", "0.57099336", "0.5693256", "0.5653704", "0.5632675", "0.5622722", "0.55693936", "0.5543051", "0.55363345", "0.5526769...
0.8652069
0