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
method create when called should returnNewCastilloBetIdNumericData
метод create при вызове должен возвращать NewCastilloBetIdNumericData
public function test_create_called_returnNewCastilloBetIdNumericData() { $actual = CastilloBetId::create(); $this->assertTrue(is_numeric($actual->id())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_create_called_returnNewCastilloBetIdDifferent()\n {\n $expected = CastilloBetId::create();\n usleep(1);\n $actual = CastilloBetId::create();\n $this->assertNotEquals($expected->id(),$actual->id());\n }", "public function createData()\n {\n // TODO:...
[ "0.6127825", "0.6096855", "0.60131717", "0.59802353", "0.59798795", "0.5970064", "0.59501827", "0.5911682", "0.59113854", "0.59061766", "0.59061766", "0.59061766", "0.59061766", "0.59061766", "0.59027594", "0.58687437", "0.5862389", "0.5857081", "0.5804852", "0.5804852", "0.5...
0.79303217
0
method create when called should returnNewCastilloBetIdDifferent
метод create при вызове должен возвращать новый CastilloBetId, отличный от других
public function test_create_called_returnNewCastilloBetIdDifferent() { $expected = CastilloBetId::create(); usleep(1); $actual = CastilloBetId::create(); $this->assertNotEquals($expected->id(),$actual->id()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_create_called_returnNewCastilloBetIdNumericData()\n {\n $actual = CastilloBetId::create();\n $this->assertTrue(is_numeric($actual->id()));\n }", "public function test_create_called_returnNewCastilloBetIdWithLength20()\n {\n $expected = 20;\n $actual = Cas...
[ "0.7130377", "0.6689811", "0.59826845", "0.5961747", "0.5959445", "0.59348357", "0.59306127", "0.59210324", "0.59210324", "0.59210324", "0.59210324", "0.59210324", "0.59053856", "0.59044826", "0.5899335", "0.58713746", "0.58656996", "0.58249336", "0.578412", "0.57710296", "0....
0.8171824
0
Starts a PHP session, stores the session id, and generates an unique hash using the IP address and the User Agent.
Запускает PHP-сессию, сохраняет идентификатор сессии и генерирует уникальный хеш с использованием IP-адреса и User Agent.
public function startSession() { // Start session and store session id. @session_start(); $this->SessionID = session_id(); // Create verification hash. $plaintext = $this->getIpAddress() . $this->getText('HTTP_USER_AGENT', 'SERVER'); $hash = hash('sha512', $plaintex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function start()\n {\n session_id() || session_start();\n }", "public static function start() {\n session_start();\n // for your safety!\n session_regenerate_id();\n }", "public function start()\n {\n session_start();\n session_set_cookie_para...
[ "0.71327937", "0.70822436", "0.67345", "0.6704214", "0.66645527", "0.66465366", "0.6585171", "0.6576794", "0.65526533", "0.64797693", "0.646203", "0.64542705", "0.64316535", "0.64122087", "0.6406408", "0.64035237", "0.63891697", "0.63860416", "0.63860416", "0.63860416", "0.63...
0.7545193
0
Ends a session by deleting the session cookie, destroying the session, and resetting the $_SESSION superglobal.
Завершает сессию, удаляя куки сессии, уничтожая сессию и сбрасывая суперглобальную переменную $_SESSION.
public function endSession() { if (isset($_COOKIE[session_name()])) { setcookie(session_name(), '', time()-42000, '/'); } unset($this->SessionID, $this->VerifyID); @session_destroy(); $_SESSION = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function endSession()\n\t{\n\t\tsetcookie(session_name(), '', time()-3600);\n\t\tsession_destroy();\n\t\tsession_unset(); // unset $_SESSION variable for the run-time \n\t}", "public static function endSession() {\t\t\n\t\t\n\t\t//sets the session to inactive\n\t\tself::write('is_loggedin', 0);\n\t\t\...
[ "0.86034644", "0.8435707", "0.81918126", "0.810342", "0.8044608", "0.799443", "0.79577446", "0.78890294", "0.7797936", "0.77891713", "0.7787238", "0.7758517", "0.77395374", "0.77379227", "0.7721894", "0.7677835", "0.7675496", "0.76542604", "0.7623229", "0.76129174", "0.759339...
0.8568114
1
AbstractSerializer constructor Builder is initialized with debug and cache setup depending on provided configuration and with default listeners and handlers
Конструктор AbstractSerializer Builder инициализируется с отладкой и настройкой кэша в зависимости от предоставленной конфигурации, а также с дефолтными слушателями и обработчиками
public function __construct() { /** @var \Illuminate\Config\Repository $config */ $config = app(Repository::class); $this->builder = SerializerBuilder::create() ->setDebug($config->get('app.debug')) ->addDefaultHandlers() ->addDefaultListeners(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this->encoders_json = [new XmlEncoder(), new JsonEncoder()];\n $this->normalizers_json = [new ObjectNormalizer()];\n $this->serializer_json = new Serializer($this->normalizers_json, $this->encoders_json);\n\n /* Array to Object */\n $this->...
[ "0.6685755", "0.6349659", "0.6278445", "0.61027867", "0.60058683", "0.59902936", "0.57888633", "0.5743177", "0.57415915", "0.56835586", "0.56414884", "0.5621349", "0.56204414", "0.557893", "0.5571366", "0.5554972", "0.5553509", "0.5540094", "0.5529317", "0.5497589", "0.549588...
0.73112273
0
Gets the builder instance
Получает экземпляр построителя
public function getBuilderInstance() { return $this->builder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBuilder()\n {\n return $this->builder;\n }", "public function getBuilder()\n {\n return $this->builder;\n }", "public function getBuilder()\n {\n return $this->builder;\n }", "public function getBuilder()\n {\n return $this->builder;\n }"...
[ "0.8335783", "0.8335783", "0.8335783", "0.8335783", "0.8335783", "0.8335783", "0.8302373", "0.8101376", "0.80631626", "0.80209076", "0.7884639", "0.78412646", "0.7831155", "0.7677375", "0.7449351", "0.73424697", "0.727761", "0.7235233", "0.71518785", "0.7138812", "0.7138812",...
0.86276126
0
Set the socket to blocking / non blocking.
Установите сокет в режим блокировки / неблокировки.
public function setBlocking($bool) { if ($bool) { @socket_set_block($this->resource); } else { @socket_set_nonblock($this->resource); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function socket_set_nonblock(Socket $socket): bool {}", "function socket_set_block(Socket $socket): bool {}", "public function setBlocking($blocking = true)\n {\n // set socket in blocking mode\n return stream_set_blocking($this->socket, true);\n }", "public static function setBlocking($s...
[ "0.7873303", "0.75398624", "0.752833", "0.74148864", "0.69310707", "0.69205385", "0.68539596", "0.67030996", "0.63393533", "0.59247905", "0.5902396", "0.5758651", "0.5685846", "0.5636747", "0.5626059", "0.5513918", "0.53890663", "0.5387594", "0.52712053", "0.5256809", "0.5241...
0.76135427
1
Return an empty configuration object.
Вернуть пустой объект конфигурации.
public function getEmptyConfig() { return GeneralDataConfigDefault::init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmptyConfig();", "public function getPluginconfigOrEmpty()\n {\n try {\n return $this->getPluginconfig();\n } catch (NoPluginconfigException $e) {\n return new Pluginconfig();\n }\n }", "protected function createEmptyConfiguration()\n {\n ...
[ "0.8182823", "0.72194123", "0.71436584", "0.70901567", "0.7069342", "0.6968612", "0.6640422", "0.6526539", "0.6526025", "0.64755297", "0.6423773", "0.6423773", "0.6423773", "0.6423773", "0.6423773", "0.64133155", "0.6379064", "0.6329019", "0.63281316", "0.6264993", "0.6245926...
0.790398
1
Check if two models have the same values in all properties.
Проверьте, имеют ли два модели одинаковые значения во всех свойствах.
public function sameModels($objModel1, $objModel2) { foreach ($objModel1 as $key => $value) { if ($key == "id") { continue; } if (is_array($value)) { if (!is_array($objModel2->getProperty($key))) { return false; } if (serialize($value) != serialize($objModel2->getProperty(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sameModels($objModel1 , $objModel2);", "public function compareTwoModel($modelA, $modelB)\n {\n $hasDifferent = false;\n foreach ($modelA->getFillable() as $key) {\n if ($modelB[$key] !== $modelA[$key]) {\n $hasDifferent = true;\n break;\n...
[ "0.6670823", "0.6356874", "0.6356828", "0.60986084", "0.60666436", "0.59671396", "0.5939944", "0.593864", "0.5834459", "0.5769251", "0.574253", "0.5728239", "0.57099754", "0.57064617", "0.5694528", "0.56762475", "0.56344455", "0.5622739", "0.5589528", "0.5560544", "0.5560544"...
0.7335667
0
Delete one job from current jobs. Exemple of use: $crontab = new CrontabManager(); $crontab>deleteJob("ms8xjs"); $crontab>save(false);
Удалить одну задачу из текущих задач. Пример использования: $crontab = new CrontabManager(); $crontab>deleteJob("ms8xjs"); $crontab>save(false);
function deleteJob($job = null) { $jobsDeleted = 0; if (!is_null($job)) { $data = array(); $oldJobs = explode("\n", $this->listJobs()); // get the old jobs if (is_array($oldJobs)) { foreach ($oldJobs as $oldJob) { if ($oldJob != '')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete()\n {\n $this->job->delete();\n }", "public static function customer_delete_job($mysqli, $job_id) \r\n {\r\n // session_start();\r\n $sql = \"DELETE FROM jobs WHERE id = $job_id\";\r\n $result = $mysqli->query($sql) or die($mysqli->error);\r\n \r\...
[ "0.74768984", "0.7226404", "0.7109018", "0.69915676", "0.69082105", "0.67964053", "0.67086035", "0.6690594", "0.65789425", "0.657244", "0.6561716", "0.6537608", "0.65201104", "0.6509292", "0.6468735", "0.64541", "0.6452422", "0.6375027", "0.6360719", "0.6347256", "0.63073987"...
0.7315456
1
Verify if a job exists or not. Exemple of uses: $crontab = new CrontabManager(); $result = $crontab>jobExists(" /path/to/job");
Проверьте, существует ли задание. Пример использования: $crontab = new CrontabManager(); $result = $crontab->jobExists(" /path/to/job");
function jobExists($job = null) { if (!is_null($job)) { $jobs = explode("\n", $this->listJobs()); // get the old jobs if (is_array($jobs)) { foreach ($jobs as $oneJob) { if ($oneJob != '') { if (preg_match('/' . $job . '/', $one...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cronjob_exists( $command ){ \n $cronjob_exists=0;\n exec('crontab -l', $crontab);\n if(isset($crontab) && is_array($crontab)){\n if(!empty( array_search($command, $crontab ) )) {\n $cronjob_exists=1;\n } \n }\n return $cronjob_exis...
[ "0.73550326", "0.71517277", "0.676185", "0.6675446", "0.664596", "0.6493691", "0.6262171", "0.6182363", "0.6103752", "0.59532994", "0.5832063", "0.58209336", "0.58114624", "0.5743519", "0.5732561", "0.5717721", "0.5683756", "0.5683756", "0.56367475", "0.5623693", "0.56223285"...
0.7272897
1
Checks if the user account is verified.
Проверяет, является ли учетная запись пользователя проверенной.
public function isVerified(UserAccountInterface $account): bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ifAccountVerified(): bool\n {\n return $this->checkIfAccountIsVerified();\n }", "public function isVerified() \n {\n return $this->verified == User::VERIFIED_USER;\n }", "public function testUserCanVerifyAccount()\n {\n $user = User::orderByRaw('RAND()')->bas...
[ "0.80738723", "0.7724177", "0.7561987", "0.7517417", "0.7156238", "0.7155348", "0.709881", "0.70189387", "0.6992289", "0.69793206", "0.69649625", "0.69618386", "0.6935264", "0.6909838", "0.6895051", "0.6891172", "0.6854955", "0.6839469", "0.6781449", "0.676648", "0.67538035",...
0.7751944
1
Checks if user account verification token has expired.
Проверяет, истек ли срок действия токена проверки учетной записи пользователя.
public function verificationExpired(UserAccountInterface $account): bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testVerifyExpiredToken()\n {\n $this->markTestSkipped();\n $this->configSuper();\n\n $user = array(\n 'username' => 'foo',\n 'email' => 'foo@test.com',\n 'password' => 'test1234'\n );\n\n $token = $this->createToken($user,...
[ "0.7721386", "0.7598105", "0.74871176", "0.7455964", "0.73463374", "0.72654593", "0.72617567", "0.7188779", "0.7046774", "0.6971293", "0.6921564", "0.6889563", "0.6887327", "0.6884579", "0.6878403", "0.6876999", "0.68764895", "0.68582284", "0.6834454", "0.6826255", "0.6822227...
0.7655156
1
Mark user account as verified.
Пометить учетную запись пользователя как проверенную.
public function markAsVerified(UserAccountInterface $account);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function markEmailAsVerified() {}", "public function accountVerified(User $user): void;", "public function verified()\n {\n $this->verified = 1;\n $this->email_token = null;\n $this->save();\n }", "public function verified()\n {\n $this->status = 1;\n $this->ve...
[ "0.8049704", "0.780051", "0.76912427", "0.766339", "0.72295725", "0.71524477", "0.71448016", "0.697654", "0.6910293", "0.6910293", "0.6864582", "0.6768719", "0.674195", "0.67237604", "0.67067045", "0.66006535", "0.6599351", "0.65754616", "0.6541465", "0.6517208", "0.65134084"...
0.80948514
0
Create user from user account instance. If a callback is provided, the callback is invoked with the user account as 1st parameter and the user as second parameter.
Создать пользователя из экземпляра учетной записи пользователя. Если предоставлен обратный вызов, он вызывается с учетной записью пользователя в качестве первого параметра и пользователем в качестве второго параметра.
public function createUser(UserAccountInterface $account, \Closure $callback = null);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createUser(User $user);", "public function createUser()\n {\n $class = $this->getClass();\n $user = new $class;\n\n // notify listeners\n $this->eventDispatcher->dispatch('esenio_security.user.user_created', new UserEvent($user));\n\n return $user;\n }", ...
[ "0.69383943", "0.6933117", "0.68796104", "0.6859817", "0.6750501", "0.664108", "0.65705884", "0.6518359", "0.6513965", "0.6462232", "0.64549536", "0.64528656", "0.6391259", "0.63867176", "0.63661367", "0.6359023", "0.6291758", "0.6289616", "0.6277518", "0.626885", "0.6241869"...
0.8218661
0
Gets the value of an environment variable. Supports boolean, empty and null.
Получает значение переменной окружения. Поддерживает boolean, пустые и null.
function env($key, $default = null) { $value = getenv($key); if ($value === false) { return value($default); } switch ( strtolower($value) ) { case 'true': case '(true)': return true; case 'false': case '(false...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function env($key, $default = null)\n {\n $value = getenv($key);\n\n if ($value === false) {\n return value($default);\n }\n\n switch (strtolower($value)) {\n case 'true':\n case '(true)':\n return true;\n case 'false':\n ...
[ "0.73594016", "0.73594016", "0.73594016", "0.7354187", "0.73538", "0.73508745", "0.7346621", "0.73436815", "0.7340206", "0.7340206", "0.73343253", "0.7332138", "0.73250574", "0.73218775", "0.7311645", "0.72937477", "0.72856355", "0.72677875", "0.71594495", "0.703208", "0.7023...
0.7421467
0
Compare two string hashes
Сравнить два хеша строк
function hash_compare($a, $b) { if ( !is_string($a) || !is_string($b) ) { return false; } $len = strlen($a); if ($len !== strlen($b)) { return false; } $status = 0; for ($i = 0; $i < $len; $i++) { $status |= o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function hash_equals($str1, $str2){\n if(strlen($str1) != strlen($str2))\n {\n return false;\n }\n else\n {\n $res = $str1 ^ $str2;\n $ret = 0;\n for($i = strlen($res) - 1; $i >= 0; $i--)\n {\n $ret |= ...
[ "0.726367", "0.72000694", "0.7180071", "0.71377116", "0.7109932", "0.7034008", "0.7006944", "0.7004325", "0.6958886", "0.6819881", "0.6711803", "0.6638272", "0.66370094", "0.66048473", "0.65966535", "0.6560247", "0.65543103", "0.64500606", "0.6446963", "0.6401509", "0.638724"...
0.7473956
0
Lists all Price models.
Список всех моделей цен.
public function actionIndex() { $searchModel = new PriceSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return Price::all();\n }", "public function actionPricelist() {\n $action = Yii::$app->request->get('action', Yii::$app->request->post('action', null));\n\n switch ($action){\n case 'save':\n $data = Yii::$app->request->post();\n\...
[ "0.77463776", "0.72744477", "0.7031104", "0.6980966", "0.6761114", "0.67471606", "0.66691804", "0.66630006", "0.6612244", "0.66048485", "0.65865517", "0.65248907", "0.6506012", "0.6504054", "0.6501187", "0.6412851", "0.6412825", "0.6411344", "0.6404264", "0.6393247", "0.63874...
0.73357785
1
Creates a new Price model. If creation is successful, the browser will be redirected to the 'view' page.
Создает новый модель Price. Если создание успешно, браузер будет перенаправлен на страницу 'view'.
public function actionCreate() { $model = new Price(); //List of customers $customerList = Customers::find()->all(); $customers = array(); foreach($customerList as $customer) { $customers[$customer->customer_id] = $customer->name; } //Product Lis...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new PriceList();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model...
[ "0.81440526", "0.75064594", "0.724823", "0.7231932", "0.72178847", "0.72121316", "0.71611756", "0.71011657", "0.7084285", "0.70460856", "0.7040771", "0.703608", "0.7008642", "0.6944481", "0.69417316", "0.6927193", "0.68741214", "0.6855249", "0.68521535", "0.6846705", "0.68368...
0.80872214
1
Updates an existing Price model. If update is successful, the browser will be redirected to the 'view' page.
Обновляет существующую модель Price. Если обновление успешно, браузер будет перенаправлен на страницу 'view'.
public function actionUpdate($id) { $model = $this->findModel($id); //List of customers $customerList = Customers::find()->all(); $customers = array(); foreach($customerList as $customer) { $customers[$customer->customer_id] = $customer->name; } /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, Price $price, $id)\n {\n $this->validate($request, [\n 'id_role' => 'required|min:1',\n 'price' => 'required|min:1',\n 'dicsount' => 'required|min:1',\n 'tax' => 'required|min:1',\n ]);\n\n $price = Price::...
[ "0.6962047", "0.6955125", "0.69421035", "0.69352263", "0.69292724", "0.68966234", "0.6886045", "0.6793443", "0.6787707", "0.6778149", "0.6763858", "0.6757511", "0.6755318", "0.67546785", "0.67037135", "0.67037135", "0.67037135", "0.67037135", "0.6700883", "0.66811556", "0.666...
0.7140951
0
/ Get price of the selected product and customer
/ Получить цену выбранного продукта и клиента
public function actionGetPrice(){ $product_id = $_POST['product_id']; $customer_id = $_POST['customer_id']; $product = Products::findOne($product_id); $customer = Customers::findOne($customer_id); $prdtCustMapp = Price::find() ->where('customer_id=:cid',[':cid'=>$cu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_product_price($product)\n {\n }", "public function catalog_actual_product_price(){\n\t}", "public function getPrice();", "public function getPrice();", "public function getPrice();", "public function get_price($context = 'view')\n {\n }", "public function...
[ "0.729364", "0.70692605", "0.7034531", "0.7034531", "0.7034531", "0.6923888", "0.6923829", "0.6903032", "0.68627566", "0.68514913", "0.6826298", "0.68240106", "0.682304", "0.6791009", "0.6779839", "0.6743234", "0.6738357", "0.6738357", "0.672301", "0.6715743", "0.66851836", ...
0.7784063
0
read blog post file
чтение файла с блогом
function readBlogPost($file) { $path_parts = pathinfo($file); $resPost = array(); $path_dir = pathinfo($path_parts['dirname']); $dirname = $path_dir["filename"]; $resPost["publish"] = get_date($dirname); $resPost["name"] = get_name($dirname); $postFile = fopen($file, "r") or die("Unable to open file!"); $fi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createPostFromFile()\n {\n // find the path to the file on the server\n $path = $this->dir . '/' . $this->file_name . '.md';\n\n // if the post doesn't exists, throw an exception back to the controller\n try {\n $data = file_get_contents($path);\n } ...
[ "0.6891979", "0.6885734", "0.66901094", "0.6649564", "0.6603078", "0.65267426", "0.6370715", "0.6333596", "0.6248836", "0.62295365", "0.6227371", "0.6179143", "0.61325264", "0.61324346", "0.61285985", "0.6125159", "0.6096712", "0.60676396", "0.6040133", "0.59940106", "0.59427...
0.78779835
0
check if post folder satisfy
проверить, удовлетворяет ли папка post
function checkPostFolder($postFolder) { if (contains_date($postFolder)) { // check if folder name satisfy if (checkContent($postFolder)) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkFolder() {\n\t\tFolder::find_or_make('Galleries/');\n\t}", "private function check_custom_dir(){\n\n\t\t$url = WP_CONTENT_DIR . '/uploads/wpttcustom';\n\n\t\tif ( file_exists( $url ) ){\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\n\t}", "function checkContent($postFolder) {\n\tglobal $blogF...
[ "0.65756327", "0.638264", "0.63240725", "0.6183379", "0.6171232", "0.6163774", "0.61597514", "0.60837793", "0.60817784", "0.60764885", "0.6052088", "0.595766", "0.59507483", "0.5945123", "0.5934896", "0.5921547", "0.58592993", "0.58051646", "0.58022815", "0.5800126", "0.57663...
0.81014055
0
check if post folder content satisfy
проверить, удовлетворяет ли содержимое папки post
function checkContent($postFolder) { global $blogFolderPath; $contents = ls(joinPaths($blogFolderPath, $postFolder)); $viFile = false; foreach ($contents as $value) { if (strpos("vi.md", $value) !== FALSE) { $viFile = true; } } return $viFile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkPostFolder($postFolder) {\n\tif (contains_date($postFolder)) { // check if folder name satisfy\n\t\tif (checkContent($postFolder)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "function hasContentFile()\n\t{\n\t\treturn true;\n\t}", "public function hasContent();", "public function h...
[ "0.79127705", "0.64758265", "0.6386693", "0.6386693", "0.6239318", "0.6216201", "0.61640954", "0.61523104", "0.6065568", "0.60468984", "0.59851754", "0.59693164", "0.5941242", "0.5938153", "0.59220713", "0.5900363", "0.5894542", "0.58509064", "0.5847256", "0.58331364", "0.581...
0.7385141
1
9 Get the most recent $how_many orders
9 Получить самые последние $how_many заказов
public static function GetMostRecentOrders($how_many) { // Build the SQL query $sql = 'CALL orders_get_most_recent_orders(:how_many)'; // Build the parameters array $params = array (':how_many' => $how_many); // Execute the query and return the results return DatabaseHandler::GetAll($sql, $p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_recent_orders(){\n\t $time = new TimeHelper();\n\t \t \n $dayAgo = time() - 86400;\n \n $formatedDayAgo = $time->format(\"Y-m-d H:i:s\",$dayAgo);\n\t $result = $this->find('all', array('conditions' => array('od_date >=' => $formatedDayAgo)));\n\t \n\t return $re...
[ "0.6227231", "0.60747355", "0.60477996", "0.6008045", "0.58981013", "0.5820059", "0.57908213", "0.5772955", "0.5739451", "0.5720587", "0.57147557", "0.57087624", "0.57087624", "0.56827074", "0.56570345", "0.56540495", "0.56487", "0.5645061", "0.5622402", "0.56201077", "0.5620...
0.7013422
0
Gets orders by status
Получает заказы по статусу
public static function GetOrdersByStatus($status) { // Build the SQL query $sql = 'CALL orders_get_orders_by_status(:status)'; // Build the parameters array $params = array (':status' => $status); // Execute the query and return the results return DatabaseHandler::GetAll($sql, $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function GetAllOrdersByStatus($status) {\n $ret = array();\n $sqlStatement = \"Select * from Orders where isCart = 0 and status = '$status'\";\n $result = Order::$conn->query($sqlStatement);\n if ($result->num_rows > 0) {\n while ($row = $result->fetch_assoc()) ...
[ "0.7753698", "0.7380283", "0.7279567", "0.72026914", "0.71946573", "0.7159609", "0.70685995", "0.70326155", "0.7017676", "0.69149745", "0.6864176", "0.6787583", "0.6779691", "0.6777272", "0.6769055", "0.67580956", "0.6715077", "0.6710572", "0.6709848", "0.6698994", "0.6689574...
0.8052268
0
Get short details for an order
Получить краткие сведения о заказе
public static function GetOrderShortDetails($orderId) { // Build the SQL query $sql = 'CALL orders_get_order_short_details(:order_id)'; // Build the parameters array $params = array (':order_id' => $orderId); // Execute the query and return the results return DatabaseHandler::GetAll($sql, $p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function order_preview_get_order_details($order)\n {\n }", "public function orderDetail() {\n\t}", "function orderInfo($order_id) {\n\n\tglobal $api;\n\n\t$params = array(\n\t\t'order_id' => $order_id\n\t);\n\n\treturn $api->apiCall(\"BTCEUR/money/order/result\", $params);\n}", "p...
[ "0.7523186", "0.72427064", "0.7238931", "0.70055616", "0.69447213", "0.69075435", "0.68947047", "0.6820717", "0.68195903", "0.68023443", "0.67681783", "0.6767698", "0.6738179", "0.6734592", "0.6724273", "0.6710634", "0.66965795", "0.6683218", "0.6675056", "0.6675056", "0.6614...
0.73762447
1
Retrieves the shipping details for a given $shippingRegionId
Получает детали доставки для заданного $shippingRegionId
public static function GetShippingInfo($shippingRegionId) { // Build the SQL query $sql = 'CALL orders_get_shipping_info(:shipping_region_id)'; // Build the parameters array $params = array (':shipping_region_id' => $shippingRegionId); // Execute the query and return the results return Datab...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDetail($shippingMethodId)\n {\n }", "public function getShippingDetailAction(){\r\n\r\n\t\t$request = $this->getRequest();\r\n\t\t$common_orders_shipping_id = $request->getParam('id');\r\n\r\n\t\t$shipModel = Base::getModel('Common_Orders_Shipping');\r\n\t\t$shipping_detail = $shipMod...
[ "0.7432328", "0.677726", "0.6567571", "0.63812584", "0.635603", "0.6344296", "0.63348716", "0.6316647", "0.6305682", "0.62307227", "0.61978817", "0.61896825", "0.6188049", "0.61760557", "0.61469287", "0.6106545", "0.61043364", "0.60828155", "0.60774827", "0.606816", "0.605227...
0.78806555
0
Set order's ship date
Установить дату отправки заказа
public static function SetDateShipped($orderId) { // Build the SQL query $sql = 'CALL orders_set_date_shipped(:order_id)'; // Build the parameters array $params = array (':order_id' => $orderId); // Execute the query DatabaseHandler::Execute($sql, $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_order_date ($order_date ){\n $this->order_date = $order_date ;\n return $this->order_date ;\n }", "public function set_date_shipping($p_date_shipping){\n if($p_date_shipping==NULL)\n $this->v_date_shipping = NULL;\n else\n\t\t $this->v_date_shipping = new MongoD...
[ "0.7271325", "0.7039875", "0.650839", "0.6473384", "0.6454936", "0.64512694", "0.6424448", "0.64089435", "0.63780767", "0.6348814", "0.62575454", "0.6257191", "0.6153212", "0.6130349", "0.61181384", "0.6117181", "0.61119384", "0.6071553", "0.60594696", "0.6048255", "0.6015392...
0.71412677
1
Fetch the profile data for the pokemon.
Получите профильные данные для покемона.
protected function fetchProfileData($pokemonUrl) { try { return json_decode($this->client->get($pokemonUrl)->getBody()); } catch (ClientException $e) { $this->error('Error when retrieving pokemons with status:'. $e->getMessage()); exit(1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _profile_get()\n {\n }", "public function get_profile()\n {\n $this->token_checker();\n\n $call = \"profile\";\n $key = ($call.$this->_hash);\n $result = $this->_get_cache($key);\n\n if(!$result)\n {\n $this->_api_headers();\n ...
[ "0.66799295", "0.66316515", "0.66106385", "0.64827025", "0.6478489", "0.6424392", "0.64172155", "0.6413692", "0.64098406", "0.64063495", "0.637711", "0.63753366", "0.63077307", "0.6284914", "0.6270854", "0.62444925", "0.62381905", "0.62284464", "0.61971885", "0.61323", "0.607...
0.7326192
0
Store the pokemon profile to database
Сохраните профиль покемона в базу данных
protected function storePokemonProfile($pokemon, $profile) { $pokemon->profile()->save( new PokemonProfiles(compact('profile')) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save(){\n $db = Db::instance();\n\n $db_properties = array(\n 'id' => $this->picid,\n 'username' => $this->username,\n 'numvotes' => $this->numvotes,\n 'numflags' => $this->numflags,\n 'date' => $this->date,\n 'file' =>...
[ "0.6810241", "0.65810394", "0.6287668", "0.62653416", "0.6236436", "0.62061", "0.61599445", "0.61245", "0.60989803", "0.59879833", "0.5973211", "0.5953486", "0.5921343", "0.5907038", "0.5888088", "0.5885346", "0.58426183", "0.5834136", "0.5812215", "0.57568526", "0.5754718", ...
0.74948394
0
Get instance of Bcrypt
Получить экземпляр Bcrypt
protected static function init() { if (!self::$bcrypt instanceof Password\Bcrypt) { self::$bcrypt = new Password\Bcrypt; } return self::$bcrypt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bcrypt($value, $options = [])\n {\n return app('hash')->driver('bcrypt')->make($value, $options);\n }", "function bcrypt($value, array $options = [])\n {\n return Container::getInstance()->make('hasher')->make($value, $options);\n }", "function bcrypt($value, $options = [])\n...
[ "0.7322115", "0.7313682", "0.70320845", "0.70320845", "0.70320845", "0.68493146", "0.6838418", "0.65993124", "0.64866686", "0.64526147", "0.64310926", "0.62566274", "0.61619604", "0.6143817", "0.6118344", "0.61095667", "0.60988736", "0.6065309", "0.6054999", "0.60140765", "0....
0.80733556
0
if databaseIsBackedUp is false, attempts to backup the database provided using mysqldumpphp
если databaseIsBackedUp равно false, попытается выполнить резервное копирование базы данных, предоставленной с помощью mysqldumpphp
public function backupDatabase() { if ($this->databaseIsBackedUp) { $this->log->add("Database already backed up!"); return true; } else { $this->log->add("Backing up database..."); if(!is_dir($this->backupPath. "database/")) { $this->log->add("Creating database backup folder in...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function backup_db($gzip = FALSE);", "public function backup() {\n set_time_limit(0);\n $pw = $this->_helper->config()->db->params->password;\n $username = $this->_helper->config()->db->params->username;\n // Dump them\n $name = self::NAME;\n $backupdb = exec(\"...
[ "0.7310218", "0.72105515", "0.7208981", "0.70917326", "0.69171387", "0.69153845", "0.6912977", "0.68641484", "0.68336344", "0.6773616", "0.6724899", "0.6712112", "0.66863614", "0.667888", "0.6668094", "0.66577846", "0.6626948", "0.6610336", "0.65857685", "0.656726", "0.648781...
0.7945574
0
Run Phinx against migrations in the cms folder.
Запустите Phinx против миграций в папке cms.
public function checkMigrationsForCore() { // TODO: Add configurable cms folder to Phinx $this->log->add("Checking for new migrations using Phinx()"); $phinx = $this->getPhinx(); $_SERVER['PHINX_MIGRATION_PATH'] = "%%PHINX_CONFIG_DIR%%/cms/migrations"; $this->log->add(" - Checking for migrations...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function runMigrations()\n {\n $this->clearDatabase();\n $phinxApp = new PhinxApplication;\n $phinxTextWrapper = new TextWrapper($phinxApp);\n\n $phinxTextWrapper->setOption('configuration', Path::getAppPath() . '/phinx.yml');\n $phinxTextWrapper->setOption('parser', 'Y...
[ "0.73459554", "0.6746134", "0.6654634", "0.6606152", "0.65693396", "0.63349754", "0.6242598", "0.6170135", "0.6169809", "0.6088777", "0.607847", "0.60549694", "0.6039596", "0.6029997", "0.60209167", "0.6012032", "0.6005331", "0.6003305", "0.597699", "0.59727234", "0.59525263"...
0.706829
1
Run Phinx against migrations in modules/$moduleName/migrations.
Запустите Phinx против миграций в модулях/$moduleName/migrations.
public function checkMigrationsForModule($moduleName) { $this->log->add("Checking for new migrations using Phinx()"); $phinx = $this->getPhinx(); $_SERVER['PHINX_MIGRATION_PATH'] = "%%PHINX_CONFIG_DIR%%/modules/{$moduleName}/migrations"; $this->log->add(" - Checking for migrations in '%%PHINX_CONFIG...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function runMigrations()\n {\n $this->clearDatabase();\n $phinxApp = new PhinxApplication;\n $phinxTextWrapper = new TextWrapper($phinxApp);\n\n $phinxTextWrapper->setOption('configuration', Path::getAppPath() . '/phinx.yml');\n $phinxTextWrapper->setOption('parser', 'Y...
[ "0.726445", "0.6900521", "0.66893077", "0.66623336", "0.6644023", "0.66041315", "0.6592175", "0.64360094", "0.6389385", "0.6351383", "0.6274386", "0.6273292", "0.6261082", "0.62020695", "0.61976135", "0.619275", "0.61593556", "0.6133257", "0.61140704", "0.6112767", "0.6104289...
0.75173724
0
Delete a section of the configuration file
Удалить раздел файла конфигурации
private function config_delete_section($sectionToSkip) { $config_data = parse_ini_file(__DIR__ . "/" . $this->configPath . 'config.ini', true); $new_content = ''; foreach ($config_data as $section => $section_content) { if ($section != $sectionToSkip) { $section_content = array_map(function(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_section($section = CONFIG_PRIMARY_SECTION)\n\t{\n\t\tif ( ! $this->section_exists($section))\n\t\t{\n\t\t\tthrow new Exception('Undefined configuration section');\n\t\t}\n\n\t\tunset($this->config[$section]);\n\t}", "public function remove_section() {\n\t\t$this->use_layout=false;\n\t\t$th...
[ "0.7604502", "0.69104934", "0.6823523", "0.6600711", "0.6596391", "0.65556437", "0.655389", "0.6432677", "0.639448", "0.63870287", "0.6326313", "0.6268791", "0.62533545", "0.62106943", "0.61659884", "0.6163864", "0.6163864", "0.6163864", "0.6163864", "0.6163864", "0.61564034"...
0.7206112
1
Disable automatic updates. This function should only be called when the updateprocess fails.
Отключить автоматические обновления. Эта функция должна вызываться только в случае сбоя процесса обновления.
private function disableAutomaticUpdates() { $this->log->add("disabling automatic updates. Warning! This setting cannot be automatically disabled, and requires the 'updatable' flag in the .ini file to be reset to 1..."); $this->config_set("general", "updatable", "0"); $this->changeRemoteInstanceSetting("a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function disable_auto_updates() {\n\n\t\t\tupdate_option( 'monstroid_dashboard_disable_auto_updates', true );\n\t\t\tdelete_option( 'monstroid_dahboard_need_update' );\n\t\t\twp_redirect( esc_url( remove_query_arg( 'md_disable_auto_updates' ) ) );\n\t\t\tdie();\n\n\t\t}", "public function enable_auto_upda...
[ "0.81428254", "0.71706", "0.7050525", "0.6942884", "0.69275844", "0.69086766", "0.6877936", "0.6695343", "0.6666882", "0.6666882", "0.6666581", "0.66425407", "0.6627693", "0.6627693", "0.6615197", "0.6597069", "0.6516187", "0.64885926", "0.6485973", "0.6485973", "0.64795125",...
0.8186281
0
Rollback migrations for the module specified
Откат миграций для указанного модуля
public function rollbackMigrationsForModule($moduleName, $target) { $phinx = $this->getPhinx(); $_SERVER['PHINX_MIGRATION_PATH'] = "%%PHINX_CONFIG_DIR%%/modules/{$moduleName}/migrations"; $output = call_user_func([$phinx, 'getRollback'], NULL, $target); $error = $phinx->getExitCode() > 0; //$res...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rollback($module)\n{\n\n\t$migrator = new Migrator($module, $this->laravel);\n\n\t$migrated = $migrator->reset();\n\n\tif (count($migrated)) {\n\t\tforeach ($migrated as $migration) {\n\t\t\t$this->line(\"Rollback: <info>{$migration}</info>\");\n\t\t}\n\t\treturn;\n\t}\n\n\t$this->comment('Nothing ...
[ "0.785615", "0.6897324", "0.669608", "0.6455173", "0.6455173", "0.6455173", "0.6455173", "0.6455173", "0.6455173", "0.6455173", "0.6455173", "0.6455173", "0.6364005", "0.6364005", "0.6331243", "0.6287312", "0.6271569", "0.6271569", "0.6264435", "0.6264435", "0.6232799", "0....
0.74416065
1
Send an automated email to DJVB for help when an update fails. This might mean the developer that built this f'd up :P
Отправьте автоматическое электронное письмо DJVB для получения помощи при сбое обновления. Это может означать, что разработчик, который построил это, всё напутал :P
public function sendHelp($msg = "Not Provided") { $message = "There was an error while updating an instance. Reverting was successful, but automatic updating has been disabled. The custom message was:\r\n {$msg}"; $message = wordwrap($message, 70, "\r\n"); $to = $this->config['general']['support_email']; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function send_core_update_notification_email($item)\n {\n }", "function bp_core_update_message() {\r\n\techo '<p style=\"color: red; margin: 3px 0 0 0; border-top: 1px solid #ddd; padding-top: 3px\">' . __( 'IMPORTANT: <a href=\"http://codex.buddypress.org/getting-started/upgrading-from-10x/\">Re...
[ "0.6538345", "0.6388346", "0.63540566", "0.6329968", "0.6305328", "0.6300699", "0.61550784", "0.6152972", "0.61168045", "0.6111568", "0.60782546", "0.6076875", "0.6060985", "0.6053214", "0.6040669", "0.6011823", "0.5973172", "0.5961378", "0.59266794", "0.59182537", "0.5915284...
0.73660326
0
TODO: Add this feature Will set maintenance mode to the value provided.
TODO: Добавить эту функцию Установит режим обслуживания в значение, предоставленное.
public function setMaintenanceMode($value) { if ($value === true) { $this->log->add("Maintenance mode enabled!"); } else { $this->log->add("Maintenance mode disabled!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function maintenance_mode($enable = \\false)\n {\n }", "public function maintenance()\n {\n $this->load->library('form_validation');\n $this->load->model('admin_model');\n\n $data['config'] = $this->bw_config->status();\n\n // Check if form was submitted.\n if (...
[ "0.73506284", "0.73137134", "0.7178134", "0.7017592", "0.67708176", "0.67121553", "0.67097646", "0.6702609", "0.6691025", "0.6686921", "0.6578089", "0.655088", "0.65229553", "0.6469742", "0.6386351", "0.63370985", "0.63241994", "0.62974274", "0.6190337", "0.6158847", "0.61373...
0.7635341
0
Create a new request with the given method.
Создайте новый запрос с заданным методом.
function createRequest(string $method): Request { $request = new Request(); $request->setMethod($method); return $request; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createRequest($method = 'GET', array $headers = array());", "protected function &createRequest($method) {\n $request = $this->_api->createRequest(\n $this->getUrl($method),\n $this->getParams()\n );\n $request->setRestMethod($this->_restMethod);\n ...
[ "0.77331716", "0.76408976", "0.73766774", "0.73766774", "0.72699004", "0.7256266", "0.70853496", "0.7049708", "0.7043509", "0.7034182", "0.7025295", "0.70098585", "0.69775057", "0.68952614", "0.6887224", "0.68199736", "0.68173134", "0.68155396", "0.68155396", "0.6812219", "0....
0.79875094
0
Create a new response with the given statusCode.
Создайте новый ответ с заданным statusCode.
function createResponse(int $statusCode, string $contentType = 'text/html; charset=UTF-8'): Response { $response = new Response(); $response ->setStatusCode($statusCode) ->headers->set('Content-Type', $contentType); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function createResponse($data, $statusCode);", "public function createResponse($code = 200)\n {\n return (new Response())->withStatus($code);\n }", "public function setStatusCode($statusCode)\n {\n $this->statusCode = $statusCode;\n\n return $this;\n ...
[ "0.78462297", "0.71719766", "0.71294904", "0.7119855", "0.7050266", "0.7048862", "0.7048862", "0.7048862", "0.7048862", "0.70231354", "0.6979971", "0.69758254", "0.69758254", "0.69758254", "0.69758254", "0.69346225", "0.6934059", "0.69245213", "0.6914053", "0.6899204", "0.688...
0.76603985
1
Display a listing of students enrolled in a course.
Показать список студентов, записанных на курс.
public function index(Course $course) { $this->allowedAdminAction(); $students = $course->enrollments() ->with('student') ->get() ->pluck('student'); return $this->showAll($students); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function withdraw_students_list()\n {\n $page_title = \"Students Listing\";\n $page_description = \"Search a specific or all students\";\n\n // $class = new ClassesService();\n // $classes = $class->get_all_classes();\n\n // $section = new SectionService();\n // ...
[ "0.7022564", "0.69970304", "0.6995992", "0.69835407", "0.6936582", "0.6875922", "0.68316025", "0.6828029", "0.68257916", "0.681962", "0.6774124", "0.6742158", "0.67411697", "0.67382246", "0.6704959", "0.6663952", "0.6630793", "0.6629138", "0.66200835", "0.6609277", "0.6609001...
0.7978964
0
The method that returns lyrics for specific song.
Метод, возвращающий текст песни для конкретной песни.
public function getLyrics(Song $song): JsonResponse { // return success response with lyrics of the song if (!$song->lyrics) { $result = getSongLyrics($song->artist()->name, $song->title); return response_success($result); } return response_success($song->lyr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLyrics(): string\n {\n $bottlesRemaining = $this->getNumberOfBottles();\n\n if ($bottlesRemaining == 1 ) {\n return $this->lastBottleRemainingLyrics();\n }\n\n if ($bottlesRemaining == 0) {\n return $this->noBottlesRemainingLyrics();\n ...
[ "0.69395876", "0.64665025", "0.63265973", "0.59709716", "0.5970277", "0.5947964", "0.5928713", "0.586129", "0.583983", "0.5789121", "0.5787722", "0.5785588", "0.57838184", "0.575836", "0.571965", "0.5711686", "0.56401443", "0.5609625", "0.56062603", "0.5589596", "0.55783397",...
0.7370286
0
The method that likes a specific song.
Метод, который лайкает конкретную песню.
public function like(Song $song): JsonResponse { // like the song $song->like(); // return success response return response_success(response_message('The record successfully updated!')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function likes(){\n }", "public function likeSong(Request $request)\n {\n\n $handle_like = $this->handleLike('App\\Models\\Song', $request->get('id'));\n return response(['data'=> $handle_like], 200);\n }", "public function like()\n\t{\n\t}", "public function fanwirelikesAction() ...
[ "0.69490373", "0.6922818", "0.67576647", "0.65013605", "0.63900846", "0.63796693", "0.63346404", "0.631668", "0.6230339", "0.6202265", "0.61900276", "0.6124257", "0.6100173", "0.6097085", "0.607983", "0.6016768", "0.59570706", "0.5952593", "0.59390384", "0.5917709", "0.589483...
0.72166044
0
The method that un match a specific song.
Метод, который не совпадает с конкретной песней.
public function unMatch(Song $song): JsonResponse { // un match song $song->unMatch(); // return success response return response_success(response_message('The record successfully updated!')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function UnloadMusicStream(\\raylib\\Music $music): void { }", "public function unmute(): OMXPlayer;", "function unignore(){\n\t\t\tglobal $x7s, $db, $prefix;\n\t\t\t$db->DoQuery(\"DELETE FROM {$prefix}muted WHERE user='$x7s->username' AND ignored_user='$this->user'\");\n\t\t}", "function unmute(){\n\t\t\tg...
[ "0.60156286", "0.5937972", "0.5922113", "0.5719808", "0.55351555", "0.5530873", "0.5473176", "0.54451925", "0.5355996", "0.53505576", "0.5346601", "0.53294724", "0.5320884", "0.5319105", "0.5297275", "0.52729493", "0.5247128", "0.5246325", "0.52197933", "0.51841795", "0.50878...
0.71125865
0
shorter excerpt length for custom post types (lookbook, product)
более короткая длина выдержки для пользовательских типов записей (lookbook, product)
function excerpt_length_post_type($length) { global $post; if ($post->post_type == 'post' ) return 55; else return 35; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function excerpt_length_custom_post( $length ) {\n\treturn 40;\n}", "function tn_custom_excerpt_length( $length ) {\nreturn 50;\n}", "function cs_custom_excerpt_length( $length ) {\n return 200;\n}", "function cardealer_custom_excerpt_length( $length )\r\n{\r\n\tglobal $post;\t\r\n\tif( isset($post ->post...
[ "0.836839", "0.82520264", "0.82504684", "0.8230073", "0.82155603", "0.8197106", "0.81888485", "0.81869084", "0.81710637", "0.81604195", "0.81580865", "0.81580865", "0.81526995", "0.81476176", "0.81304806", "0.8126588", "0.81264794", "0.81264794", "0.81264794", "0.8124871", "0...
0.8338734
1
Get the value of Accion Id
Получить значение Accion Id
public function getAccionId() { return $this->accion_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdac()\n {\n return $this->idac;\n }", "public function getIdValue();", "public function getAccident()\n {\n return $this->accident;\n }", "public function get_cus_id() {\n $db = GetGlobal('db');\n\t\t$UserName = GetGlobal('UserName');\t\t\n\t\t$user = deco...
[ "0.72530025", "0.70082897", "0.69051343", "0.674093", "0.6696511", "0.6690117", "0.6675169", "0.66664904", "0.6547319", "0.6490439", "0.64277005", "0.6422059", "0.6419187", "0.6397681", "0.6382791", "0.63706154", "0.63706154", "0.63706154", "0.63706154", "0.636955", "0.636814...
0.80714583
0
Get the value of Texto
Получить значение Texto
public function getTexto() { return $this->texto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getTexto() {\n return $this->texto;\n }", "public function getTexto() {\n return $this->texto;\n }", "public function getTextao()\r\n\t{\r\n\t\treturn $this->textao;\r\n\t}", "public function getTextValue()\n {\n return $this->textValue;\n }", "function GetValueTex...
[ "0.73741156", "0.7363499", "0.7188766", "0.7062345", "0.7013824", "0.68785244", "0.6721565", "0.666201", "0.66282415", "0.6625516", "0.6620878", "0.6603362", "0.6603362", "0.6598929", "0.6575241", "0.6575241", "0.6575241", "0.6575241", "0.6558415", "0.6554649", "0.6552931", ...
0.7377353
1
the original data before any modification
данные до любых изменений
public function setOriginalData() { $this->originalData = $this->all(); // load the original key $this->dataKey(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function merge()\n\t{\n\t\t$this->_originals = $this->_data;\n\t}", "function setOldData($data) {\n\t\t$this->old_data=$data;\n\t}", "private function modified()\n\t{\n\t\t$this->dataModified = true;\n\t}", "public function reset() {\n\t\t$this->data = $this->old_data;\n\t}", "public function transf...
[ "0.7123542", "0.69524586", "0.69484186", "0.69081205", "0.6833457", "0.6821477", "0.6694353", "0.668799", "0.6673444", "0.66276723", "0.659389", "0.6509049", "0.64659315", "0.6448215", "0.641611", "0.6356069", "0.635448", "0.63511413", "0.6343171", "0.6321615", "0.6314788", ...
0.79348475
0
Receive detailed information for the hotel ids you send. You can send up to 250 hotel ids in a single request. !! Non existing hotel ids do not return any information. [code:] getHotelDetails(1009075); getHotelDetails([1009075, 1000740]) [code]
Получите подробную информацию для отелей с указанными идентификаторами. Вы можете отправить до 250 идентификаторов отелей за один запрос. !! Идентификаторы отелей, которые не существуют, не возвращают никакой информации. [code:] getHotelDetails(1009075); getHotelDetails([1009075, 1000740]) [code]
function getHotelDetails($hotelId) { $method = new ReqMethod(['method' => __FUNCTION__]); if (!is_array($hotelId)) $hotelId = [$hotelId]; /* * <HotelIds> * <HotelId>1009075</HotelId> * <HotelId>1000740</HotelId> * ..... * </HotelI...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hotelDetail($id){\n\n $query = \"SELECT * FROM hotel_info WHERE id = :id\";\n $pdostmt = $this->db->prepare($query);\n $pdostmt->bindValue(':id', $id, PDO::PARAM_INT);\n $pdostmt->execute();\n $hotelDetail = $pdostmt->fetchAll(PDO::FETCH_OBJ);\n return $hot...
[ "0.6233676", "0.61013436", "0.6080527", "0.60358036", "0.5916723", "0.5884966", "0.58713967", "0.5860197", "0.5860197", "0.5819573", "0.57884365", "0.57615846", "0.57612115", "0.5672352", "0.5655603", "0.56343746", "0.56123513", "0.55942565", "0.5562615", "0.55441153", "0.552...
0.7389877
0
migrate all extendeds tables
переместить все расширенные таблицы
public static function migrateAll(){ foreach(get_declared_classes() as $class){ if(is_subclass_of($class,"\System\Database\Model\Base")){ $class::migrate(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadExtensionTablesWithoutMigration() {}", "protected function installDatabaseTables() {\r\n }", "private function migrateDatabaseData(): void\n\t{\n\t\t// First, we will mass-migrate the data\n\t\t$tableMap = [\n\t\t\t'#__ak_profiles' => '#__akeebabackup_profiles',\n\t\t\t'#__ak_stats' =...
[ "0.69028664", "0.688283", "0.6606404", "0.641232", "0.63792837", "0.63781077", "0.63759565", "0.6353503", "0.633854", "0.6323624", "0.6302901", "0.6236492", "0.6228058", "0.61868984", "0.61777246", "0.61746615", "0.6130592", "0.61237484", "0.61191976", "0.6116422", "0.6114731...
0.7092804
0
checks if the object is a instanceof a subclass of base or the base class itself
проверяет, является ли объект экземпляром подкласса base или самого класса base
public static function is($obj){ if( $obj instanceof Base || is_subclass_of($obj,Base::class) || $obj === Base::class ){ return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_subclass_of($object,$class_name)\n{\n\treturn true;\n}", "protected function _isClassOf($class, $base) {\n if ($class == $base) {\n return true;\n }\n return is_subclass_of($class, $base);\n }", "function is_instance_of($sub, $super)\n{\n $sub = is_object($sub)...
[ "0.74036056", "0.7393172", "0.7374563", "0.72640663", "0.6804496", "0.67774445", "0.67748445", "0.67351294", "0.672273", "0.6633346", "0.6572354", "0.65224", "0.6428381", "0.62981045", "0.6225231", "0.6166685", "0.6146391", "0.6138688", "0.61051613", "0.61029387", "0.60976785...
0.764601
0
/ Setting the bodyclass
/ Установка класса body
function bb_body_class() { do_action('bb_body_class'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function body_class($class)\n {\n $this->_data['bodyclass'] = $class;\n }", "public function setBodyClass($class)\n {\n $this->bodyClass = $class;\n }", "function admin_body_class($classes)\n {\n }", "function bb_set_body_class() {\n\n\t$inst = new Backboned();\n\n\tif ...
[ "0.84120005", "0.78826874", "0.76828843", "0.76661634", "0.7635722", "0.7623003", "0.7487421", "0.74557376", "0.7451218", "0.74196786", "0.74154055", "0.73714566", "0.7326656", "0.7262167", "0.72466147", "0.72252196", "0.719012", "0.71332324", "0.7132154", "0.71262467", "0.71...
0.7991719
1
Get a Merchant by ID
Получить продавца по ID
public function getMerchant($id) { if(!isAdmin()) return ""; return Merchant::find($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMyMerchant() {\n if(!isMerchantApproved())\n return \"Not allowed\";\n\n $id_merchant_auth = Auth::guard('merchant')->user()->id;\n return Merchant::find($id_merchant_auth);\n\n }", "public function getById($id){\n\t\t$Payment = \\Payment::where(\"id\",\"=\",...
[ "0.6969649", "0.67485297", "0.674689", "0.670501", "0.66270363", "0.659686", "0.6576574", "0.65093684", "0.64879024", "0.64385164", "0.64299023", "0.64269406", "0.6422654", "0.6417801", "0.6390947", "0.63879424", "0.6377409", "0.63672817", "0.6360342", "0.6358531", "0.6355883...
0.7799955
0
Save a profile from imported configuration data. The $data array must contain the keys description (profile description), configuration (engine configuration INI data) and filters (inclusion and inclusion filters JSON configuration data).
Сохраните профиль из импортированных данных конфигурации. Массив $data должен содержать ключи description (описание профиля), configuration (данные конфигурации двигателя в формате INI) и filters (конфигурационные данные JSON для включений и исключений).
public function import(array $data) { // Check for data validity $isValid = !empty($data) && array_key_exists('description', $data) && array_key_exists('configuration', $data) && array_key_exists('filters', $data); if (!$isValid) { throw new RuntimeException(Text::_('COM_AKEEBABACKUP_PROFILES_E...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveProfile($data)\r\n {\r\n\r\n if ($data['acl'] == ('superadmin' || 'admin')) {\r\n $profile = $this->model->table('user_profiles')->find($data['id']);\r\n }\r\n\r\n $profile->name = $data['names'];\r\n $profile->mobile_no = $data['mobileno'];\r\n ...
[ "0.66527003", "0.6073766", "0.59357953", "0.58798844", "0.5803987", "0.5803581", "0.5764705", "0.57640696", "0.57546276", "0.56570745", "0.5647151", "0.56436014", "0.5614333", "0.55758107", "0.5547726", "0.55386764", "0.55281687", "0.55094624", "0.55062246", "0.54952914", "0....
0.7531371
0
parent::executeAjaxRows(); // TODO: Change the autogenerated stub
parent::executeAjaxRows(); // TODO: Change the autogenerated stub
public function executeAjaxRows() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _ajax_action() {\n\t}", "public function ajax_request()\n {\n ;\n }", "abstract public function process_ajax();", "public function adminAjax()\r\n\t{\r\n\t\treturn;\r\n\t}", "public function adminAjax()\r\n\t{\r\n\t\treturn;\r\n\t}", "public function adminAjax()\r\n\t{\r\n...
[ "0.67831564", "0.66575223", "0.65741074", "0.6517462", "0.6517462", "0.6517462", "0.6517462", "0.6305732", "0.62122697", "0.6204431", "0.61814004", "0.6139229", "0.6121214", "0.6077515", "0.60611284", "0.60611284", "0.60508335", "0.60315955", "0.6014285", "0.5949917", "0.5934...
0.84158003
0
"UPDATE DevInfo SET first_seen='".$date_time."' WHERE mac_addr='".$dev_mac."' AND first_seen=''";
UPDATE DevInfo SET first_seen='".$date_time."' WHERE mac_addr='".$dev_mac."' AND first_seen='';
function check_and_set_first_seen($mac) { $date_time = date("Y-m-d H:i:s"); $model = new Device(); $model::updateAll(['first_seen'=>$date_time],['and', ['mac_addr'=>$mac], ['=','first_seen','']]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hitUserActivity() {\r\n mysql_query(\"UPDATE `\" . PREFIX . \"_user_info_tb` SET `user_activity` = NOW(), `user_logout` = '' WHERE `user_id` = \" . USERID);\r\n}", "function updateTimeDevice($device){\n GLOBAL $con;\n $sql=\"UPDATE dispositivos SET TimeStamp = NOW() WHERE Maquina = '$device' \"...
[ "0.6163791", "0.6082723", "0.5805004", "0.56614083", "0.5638716", "0.562865", "0.56285864", "0.56202376", "0.55945456", "0.55922246", "0.55476177", "0.5540773", "0.5537019", "0.54914755", "0.54107374", "0.54080147", "0.538701", "0.53704906", "0.5364997", "0.53493935", "0.5342...
0.7702832
0
Returns the link element relating to video responses.
Возвращает элемент ссылки, относящийся к видео-ответам.
public function getVideoResponsesLink() { return $this->getLink(Zend_Gdata_YouTube::VIDEO_RESPONSES_REL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVideoDownloadLink(){\n //parse the string separated by '&' to array\n parse_str($this->getVideoInfo(), $data);\n \n if ($data['status'] === 'ok') {\n\n //set video title\n $this->video_title = $data[\"title\"];\n \n //Get the youtube root link that...
[ "0.6808246", "0.67963135", "0.6678178", "0.6529219", "0.6409374", "0.630881", "0.6184632", "0.61073524", "0.60994387", "0.6079342", "0.6056182", "0.6056182", "0.60484165", "0.6043477", "0.6041422", "0.6038766", "0.6038766", "0.59907466", "0.5978719", "0.5965421", "0.59482217"...
0.80386674
0
Returns the link element relating to video ratings.
Возвращает элемент ссылки, связанный с рейтингом видео.
public function getVideoRatingsLink() { return $this->getLink(Zend_Gdata_YouTube::VIDEO_RATINGS_REL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_linkrating($link)\n{\n}", "public function ratings() {\n return $this->hasMany('App\\VideoRating');\n }", "public function column_rating($link)\n {\n }", "public function getAvRating()\n {\n return $this->avRating;\n }", "function ratting($videoid) {\n $db ...
[ "0.6648053", "0.6132147", "0.61172086", "0.5978975", "0.5970581", "0.5870762", "0.5862295", "0.58357674", "0.5828345", "0.5690768", "0.5642138", "0.56336707", "0.56303495", "0.56093115", "0.55776453", "0.55776453", "0.55776453", "0.55776453", "0.55776453", "0.5546527", "0.551...
0.83479923
0
Returns the link element relating to video complaints.
Возвращает элемент ссылки, связанный с жалобами на видео.
public function getVideoComplaintsLink() { return $this->getLink(Zend_Gdata_YouTube::VIDEO_COMPLAINTS_REL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVideoRatingsLink()\n {\n return $this->getLink(Zend_Gdata_YouTube::VIDEO_RATINGS_REL);\n }", "public function getVideoResponsesLink()\n {\n return $this->getLink(Zend_Gdata_YouTube::VIDEO_RESPONSES_REL);\n }", "function cGetVideoLink($content, $videoWidth='425', $vi...
[ "0.6148821", "0.6110762", "0.60817826", "0.5971606", "0.58256143", "0.5784255", "0.5767097", "0.5704599", "0.5670642", "0.5660774", "0.5656408", "0.5620723", "0.55791247", "0.5566024", "0.5546062", "0.5546062", "0.5530581", "0.55274945", "0.55274945", "0.55274945", "0.5527494...
0.77773595
0
check duplicate user email
проверить дублирующуюся электронную почту пользователя
function checkDuplicateEmail () { $query = $this->db->where( array('user_email' => $this->user_email, 'user_type' => $this->user_type)) ->get($this->my_conf->user_tbl); $count_rows = $query->num_rows(); if($count_rows > 0) { return true; } else { return false; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasDuplicateEmail ($username, $email) {\n\t\n\t\tprintErr(2, $username, $email);\n\t}", "public function chkEmailDuplicate() {\n $this->load->model('register_model');\n $user_email = $this->input->post('user_email');\n $table_to_pass = 'mst_users';\n $fields_to_pass = array('...
[ "0.8115932", "0.8040452", "0.7854029", "0.7849795", "0.77975357", "0.77433604", "0.7704204", "0.76936555", "0.7674845", "0.7658885", "0.7611133", "0.7529915", "0.7514857", "0.7508076", "0.74948347", "0.7479945", "0.73720694", "0.73621774", "0.73540306", "0.73418593", "0.73262...
0.84696525
0
Saves a person and returns the ID for the person
Сохраняет человека и возвращает ID этого человека
public function save(Person $person): int { return parent::saveToTable((array)$person, self::TABLE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_person($person_data) {\n $person_id = $this->model->insert($person_data);\n return $person_id;\n }", "function save(&$person,&$account,$person_id = FALSE) {\n \n $person['person_id'] =$this->db->insert('people', $person);\n $account['person_id'] = $person...
[ "0.7195084", "0.68870324", "0.6883841", "0.68543833", "0.6846154", "0.66374516", "0.65796524", "0.6491298", "0.6485137", "0.64753836", "0.6465987", "0.6427438", "0.6364642", "0.63615793", "0.6327146", "0.63259876", "0.63047475", "0.62999916", "0.6264807", "0.6222238", "0.6210...
0.7051718
1
Exception full qualified class name that is handled by this factory
Полное имя класса исключения, которое обрабатывается этим фабричным методом
function getExceptionClassName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHandledExceptionName();", "protected function getExceptionClass(\\Throwable $e): string\n {\n }", "public function get_exception();", "public function getException();", "public function getException();", "public function getException();", "public function getReferencedException...
[ "0.7137761", "0.6823537", "0.66243047", "0.6593979", "0.6593979", "0.6593979", "0.6576445", "0.6569225", "0.65578026", "0.64933914", "0.6342514", "0.6325972", "0.62814367", "0.6220095", "0.6147507", "0.6107529", "0.6102957", "0.6101196", "0.6033992", "0.60175085", "0.59877133...
0.798361
0
parses all the paragraphs, we call it when we want to check if a line is a paragraph
парсит все абзацы, мы вызываем его, когда хотим проверить, является ли строка абзацом
function parse_paragraph($line){ $openmatch=preg_match('/(<table|<blockquote|<h1|<h2|<h3|<h4|<h5|<h6|<pre|<tr|<p|<ul|<li|<td|<th|<input|<textarea|<hr|<div|<form|<select|noparse_[0-9]+_string|code_[0-9]+_string)/iS', $line); $closematch=preg_match('/(<\\/table|<\\/blockquote|<\\/h1|<\\/h2|<\\/h3|<\\/h4|<\\/h5|<\...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function paragraph($text) {\n $paragraphs = explode(\"\\n\\n\", $text);\n $out = null;\n foreach($paragraphs as $paragraph) {\n $out .= \"\\n<p>\".$paragraph.\"</p>\\n\";\n }\n\n // cleanup paragraphs\n // due to the simplicity of the above there are many incorrect nested tags\n // i.e. <...
[ "0.7049943", "0.70405334", "0.6921491", "0.68337333", "0.6800111", "0.67871326", "0.6754043", "0.6706834", "0.66193885", "0.64909977", "0.6465193", "0.64131117", "0.62646663", "0.6263565", "0.62533265", "0.62383723", "0.6219609", "0.6200165", "0.6191772", "0.61301243", "0.611...
0.70513994
0
Import and Save opening hours
Импорт и сохранение времени работы
protected function saveOpeningHours() { Logger::debug(__METHOD__ . "T talo Import time"); $source = $this->fetchURL("http://www.sodexo.fi/tietotekniikantalo"); phpQuery::newDocument($source); $rows = array(); $part_numbers = array("0", "1", "2"); foreach ($part_numb...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function saveOpeningHours()\n {\n //TODO\n }", "public function setOpeningHours(){\n $weekHours=[\n 'monday' => [],\n 'tuesday' => [],\n 'wednesday' => [],\n 'thursday' => [],\n 'friday' => [],\n 'saturd...
[ "0.8175861", "0.68277866", "0.66379535", "0.63673097", "0.62233317", "0.6070022", "0.6065009", "0.5994474", "0.5991559", "0.5980506", "0.57965016", "0.57906187", "0.5770685", "0.5755549", "0.5738301", "0.57216054", "0.5697284", "0.56699634", "0.56612915", "0.5659011", "0.5557...
0.78098804
1
The change language action Route: /changelanguage/:lang
Действие изменения языка Route: /changelanguage/:lang
public function changeLanguageAction() { $session = new Container("base"); $response = $this->getResponse(); $lang = $this->params()->fromRoute('lang'); if ($lang == 'en') { $session->locale = 'en_US'; } else if ($lang == 'el') { $session->locale = 'el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function changeLang(Request $request, $locale = null)\n {\n// Session::put('locale', $locale);\n// return Redirect::to(URL::previous());\n }", "public function changeLang(Language $language ,Request $request)\n {\n\t\tsession(['cltvo_lang' => $language->iso6391]);\n\n\t\tif ($reques...
[ "0.751168", "0.7489698", "0.74619967", "0.7431552", "0.738029", "0.72887385", "0.7275832", "0.72699606", "0.72385746", "0.71145165", "0.7023147", "0.7009261", "0.69698584", "0.69082105", "0.6907475", "0.68972886", "0.6896836", "0.68760836", "0.6863812", "0.68528235", "0.68515...
0.78146935
0
Obtain all the cities from a given country, ordered by name or population. It returns an array with names, districts and populations.
Получить все города из заданной страны, отсортированные по названию или населению. Возвращает массив с именами, районами и населением.
function get_country_cities($country, $ordered = 'Population') { //$result[0] = array( 'name' => 'Zaragoza', 'district' => 'Aragon', 'population' => 768000); $result = $this->query('select * from City order by '. $ordered . ' asc'); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCities($countryId, $stateId = NULL) {\n $result = array();\n $sql = \"SELECT city_id, city_name\n FROM %s\n WHERE city_country = '%s'\";\n if ($stateId !== NULL) {\n $sql .= \" AND city_state = '%s'\";\n }\n $sqlParams = array($this->tableCities, $countryId)...
[ "0.6786043", "0.67744005", "0.6659184", "0.66516215", "0.6601251", "0.655723", "0.6502233", "0.6413134", "0.6402915", "0.6399913", "0.63961047", "0.63692707", "0.6357115", "0.6346907", "0.6336966", "0.6320486", "0.6300914", "0.62957203", "0.6290858", "0.6268003", "0.6251179",...
0.8074918
0
process user like or unlike media
обрабатывать лайк или дизлайк пользователя по медиа
public function likeunlikemedia(){ $data = $this->get_data(); $this->load->model('media_model'); if(!empty($data)){ $email = isset($data->email)?filter_var($data->email, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH):""; $media = isset($data->media)?filter_var($data->media, FILTER_SANITIZE_STRING,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionLikePost() {\n\n $userId = Users::checkLogged();\n \n if (isset($_POST['data'])) {\n $result = Pictures::addLike($_POST['data']);\n Pictures::addUniqueLike($_POST['data'], $userId);\n }\n if (isset($_POST['data1'])) {\n $resu...
[ "0.65245956", "0.62555534", "0.62365097", "0.62165564", "0.61873156", "0.6181029", "0.6102681", "0.6069605", "0.6012331", "0.6002609", "0.5980959", "0.59484446", "0.5945152", "0.59385747", "0.58819234", "0.58744645", "0.5872055", "0.58428854", "0.5826566", "0.58108306", "0.57...
0.7037769
0
get total likes and comments for a media
получить общее количество лайков и комментариев для медиа
public function getmediatotallikesandcommentsviews(){ $data = $this->get_data(); $this->load->model('media_model'); $total_likes = 0; $total_comments = 0; if(!empty($data)){ $media = isset($data->media)?filter_var($data->media, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH):""; if($media !=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function mediaCount()\n {\n $api = $this->getServiceLocator()->get('Omeka\\ApiManager');\n $response = $api->search('scripto_media', [\n 'scripto_item_id' => $this->id(),\n 'limit' => 0,\n ]);\n return $response->getTotalResults();\n }", "public func...
[ "0.7277292", "0.6754513", "0.6582848", "0.6557713", "0.6452583", "0.6427505", "0.6427218", "0.6354684", "0.6286708", "0.62734777", "0.62495214", "0.62192446", "0.6193842", "0.6152102", "0.6138929", "0.6095964", "0.6078658", "0.6066519", "0.6058601", "0.6058382", "0.6051946", ...
0.8020534
0
store user fcm token
сохранить токен FCM пользователя
function storeFcmToken(){ $data = $this->get_data(); $this->load->model('fcm_model'); if(isset($data->token) && $data->token!=""){ $token = $data->token; $version = isset($data->version)?$data->version:"v1"; $data = array("token"=>$token,"app_version"=>$version); $this->fcm_model->storeUserFcm...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function storeUserFcmToken($token)\n {\n $this->db->trans_start();\n $token['date'] = date('Y-m-d H:i:s');\n $this->db->insert('tbl_fcm_token', $token);\n $insert_id = $this->db->insert_id();\n $this->db->trans_complete();\n $this->status = 'ok';\n $this->message = 'token adde...
[ "0.82439774", "0.7943737", "0.7133782", "0.707396", "0.6906642", "0.65455145", "0.64073247", "0.63041824", "0.62977016", "0.6292474", "0.6272961", "0.6158127", "0.61567783", "0.6138516", "0.6119163", "0.61124665", "0.61124665", "0.6111447", "0.6109416", "0.6101148", "0.609781...
0.8283784
0
Options to control Custom Document Extraction (CDE) Processor. Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5;
Опции для управления процессором Custom Document Extraction (CDE). Генерируется из поля protobuf .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5;
public function getCustomDocumentExtractionOptions() { return $this->readOneof(5); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCustomDocumentExtractionOptions($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\DocumentAI\\V1\\TrainProcessorVersionRequest\\CustomDocumentExtractionOptions::class);\n $this->writeOneof(5, $var);\n\n return $this;\n }", "public function setCustomFeatures($v...
[ "0.84432286", "0.48158327", "0.44321752", "0.43950266", "0.43918872", "0.43918872", "0.43594605", "0.42346752", "0.42114606", "0.4204238", "0.41760272", "0.41683775", "0.41601184", "0.4148741", "0.4082001", "0.40717852", "0.40661076", "0.40601295", "0.4024472", "0.40176225", ...
0.7555471
1
Options to control Custom Document Extraction (CDE) Processor. Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5;
Опции для контроля процессора извлечения пользовательских документов (CDE). Сгенерировано из поля protobuf .google.cloud.documentai.v1.TrainProcessorVersionRequest.CustomDocumentExtractionOptions custom_document_extraction_options = 5;
public function setCustomDocumentExtractionOptions($var) { GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\CustomDocumentExtractionOptions::class); $this->writeOneof(5, $var); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCustomDocumentExtractionOptions()\n {\n return $this->readOneof(5);\n }", "public function setCustomFeatures($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Struct::class);\n $this->custom_features = $var;\n\n return $this;\n }", "abstract ...
[ "0.7554278", "0.4813818", "0.4430845", "0.43937483", "0.4389916", "0.4389916", "0.43573475", "0.42355356", "0.42104396", "0.42059985", "0.417756", "0.41703784", "0.41619685", "0.41485158", "0.40830314", "0.40703484", "0.40626276", "0.40579763", "0.40219116", "0.40177804", "0....
0.84421957
0
Required. The processor version to be created. Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED];
Обязательно. Версия обработчика, которая будет создана. Сгенерировано из поля protobuf .google.cloud.documentai.v1.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED];
public function getProcessorVersion() { return $this->processor_version; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setProcessorVersion($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\DocumentAI\\V1\\ProcessorVersion::class);\n $this->processor_version = $var;\n\n return $this;\n }", "public function setProcessor($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cl...
[ "0.8208091", "0.6735192", "0.5319598", "0.5319598", "0.52979094", "0.5297207", "0.5297207", "0.5297207", "0.5230253", "0.5224502", "0.51852584", "0.51053613", "0.5082387", "0.50594", "0.50241137", "0.49994066", "0.49796787", "0.49638087", "0.4944204", "0.49174586", "0.4914901...
0.7310263
1
Required. The processor version to be created. Generated from protobuf field .google.cloud.documentai.v1.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED];
Обязательно. Версия процессора, которая будет создана. Генерируется из поля protobuf .google.cloud.documentai.v1.ProcessorVersion processor_version = 2 [(.google.api.field_behavior) = REQUIRED];
public function setProcessorVersion($var) { GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\ProcessorVersion::class); $this->processor_version = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProcessorVersion()\n {\n return $this->processor_version;\n }", "public function setProcessor($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\DocumentAI\\V1\\Processor::class);\n $this->processor = $var;\n\n return $this;\n }", "public functio...
[ "0.73106086", "0.67343855", "0.5320105", "0.5320105", "0.52977884", "0.52977884", "0.52977884", "0.529697", "0.5230578", "0.52250767", "0.5184013", "0.5105142", "0.50813335", "0.5059437", "0.5025029", "0.49983817", "0.49793097", "0.4965261", "0.4944958", "0.49182335", "0.4914...
0.82058775
0
Optional. The input data used to train the [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Generated from protobuf field .google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL];
Опционально. Входные данные, используемые для обучения [ProcessorVersion][google.cloud.documentai.v1.ProcessorVersion]. Генерируется из поля protobuf .google.cloud.documentai.v1.TrainProcessorVersionRequest.InputData input_data = 4 [(.google.api.field_behavior) = OPTIONAL];
public function setInputData($var) { GPBUtil::checkMessage($var, \Google\Cloud\DocumentAI\V1\TrainProcessorVersionRequest\InputData::class); $this->input_data = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setInputDataConfig($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\AIPlatform\\V1\\InputDataConfig::class);\n $this->input_data_config = $var;\n\n return $this;\n }", "public function setInputData($inputData) {\n\t\t$this->inputData = $inputData;\n\n\t\treturn ...
[ "0.53845567", "0.5301123", "0.528028", "0.5030475", "0.5008839", "0.48714402", "0.47897202", "0.4787032", "0.47659877", "0.46964726", "0.46921644", "0.46856996", "0.46508893", "0.4650542", "0.46461648", "0.46259373", "0.4596107", "0.455793", "0.45528728", "0.45111668", "0.451...
0.905706
0
Handle a token request
Обработка запроса на токен
public function tokenAction() { // Can't do anything if not HTTP request... if (!$this->request instanceof HttpRequest) { return null; } return $this->authorizationServer->handleTokenRequest($this->request); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tokenAction()\n {\n $server = $this->get('yuido.oauth2.server');\n\n return $server->handleTokenRequest($this->get('oauth2.request'), $this->get('oauth2.response'));\n }", "public function tokenEndpoint(): void\n {\n $input = $this->wire('input');\n\n if ($inp...
[ "0.76689607", "0.7251654", "0.70776236", "0.70776236", "0.69038504", "0.68903476", "0.6889669", "0.68362284", "0.682319", "0.6775003", "0.6742118", "0.6730071", "0.6730071", "0.6730071", "0.6730071", "0.6730071", "0.6730071", "0.6730071", "0.66630685", "0.6626055", "0.6592663...
0.7807947
0
Retorna condensado bcrypt de cadena $c
Возвращает сжатый bcrypt строки $c
function condensado_bcrypt($c) { do { $gsal=gen_sal_bcrypt(10); flush(); $clavebf = crypt($c, $gsal); } while ($clavebf == '*0'); return $clavebf; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validCpassword($password, $Cpassword)\r\n {\r\n if($password != $Cpassword)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n }", "function do_password_crypt($apwrd_input) {\n\treturn crypt($apwrd_input);\n}", ...
[ "0.61205757", "0.6058981", "0.6047536", "0.6006056", "0.59577763", "0.59472764", "0.5916636", "0.59126174", "0.58962655", "0.58599067", "0.5816983", "0.57966626", "0.57711285", "0.5764799", "0.5764799", "0.5764799", "0.5747405", "0.5744101", "0.57383776", "0.57066137", "0.570...
0.77820843
0
Constructor (Calls in this order: preInit(), init(), postInit())
Конструктор (Вызовы в следующем порядке: preInit(), init(), postInit())
public function __construct() { $this->preInit(); $this->init(); $this->postInit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final private function __construct() {\n\t\t$this->init();\n\t}", "protected function _init() {}", "private function __construct() {\r\n $this->init();\r\n }", "protected function init()\n\t\t{}", "protected function init() {}", "protected function init() {}", "protected function init() {}", ...
[ "0.8475167", "0.8196049", "0.81560206", "0.8130391", "0.81020224", "0.81020224", "0.8101961", "0.8101961", "0.8101961", "0.8101961", "0.8101961", "0.8101961", "0.8101961", "0.8101961", "0.8101961", "0.8101961", "0.8101961", "0.81015223", "0.809417", "0.80821836", "0.80815554"...
0.8804527
0
Override this method to execute anything before the initialization
Переопределите этот метод, чтобы выполнить что-либо перед инициализацией
protected function preInit() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __onInit()\n\t{\n\t}", "protected function init_pre() {\n\t\t$this->task_loader( 'init_pre' );\n\t}", "public function before()\n\t{\n\t\t\n\t\tparent::before();\n\n\t\t$this->_init_auth();\n\t\t$this->_init_user();\n\n\t\tisset($this->template) and $this->_init_template();\n\t}", "protect...
[ "0.7918676", "0.78036904", "0.77950567", "0.7785022", "0.7746106", "0.7691658", "0.7635414", "0.7623308", "0.7563688", "0.756302", "0.756302", "0.756302", "0.756302", "0.756302", "0.75626445", "0.754337", "0.75432944", "0.75362563", "0.75356776", "0.7528782", "0.752209", "0...
0.849527
0
/==================================\ SubmitJob() processes form input and creates Client instance to send the uploaded file to the Switch server \==================================
/==================================\ SubmitJob() обрабатывает ввод формы и создает экземпляр Client для отправки загруженного файла на сервер Switch \==================================/
function SubmitJob(){ global $session; $pair= $_POST['point']; $ssp = \explode('::', $pair); $pointId = $ssp[0]; $flowId = $ssp[1]; $uname = $_SESSION['SwUser']; $pass = $_SESSION['SwPass']; $ip = SWITCHSERVER; $port =SWITCHPORT; $IpandPort = 'https://'.$ip.':'.$port; $fileData=""; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function submit_job($form,$job_id,$job_folder,$remote_job_folder,$user_workspace,$remote_user_workspace,&$inputs){\n\n if(empty($form['box2'])){\n Session::flash('toastr',array('error','You forgot to select an input file!'));\n return false;\n }\n if(empty($form['...
[ "0.7022851", "0.6237709", "0.6003068", "0.5996363", "0.59085405", "0.58109087", "0.57876056", "0.57788694", "0.5776012", "0.57490903", "0.5728923", "0.56710577", "0.56502366", "0.5642927", "0.56320846", "0.5616882", "0.56105316", "0.5606066", "0.5542467", "0.5537903", "0.5526...
0.72246087
0
/==================================\ extractPushMetadatas() Help function for pushjob() function. \==================================
/==================================\ Помощь функции extractPushMetadatas() для функции pushjob(). \==================================
function extractPushMetadatas() { $metadataNames = $_POST['metadatas_names']; $metadatas = array(); if ($metadataNames == null) { $metadataNames = array(); } else { $metadataNames = explode(',,,,', trim($metadataNames, ',')); } if(count($metadataNames)!=1)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractMetadatas() {\n $metadataNames = $_POST['metadatas_names'];\n $metadatas = array();\n if ($metadataNames == null) {\n $metadataNames = array();\n } else {\n $metadataNames = explode(',,,,', trim($metadataNames, ','));\n }\n\t\tif(count($metad...
[ "0.5728528", "0.5577857", "0.55294096", "0.54292196", "0.527958", "0.51941514", "0.5159633", "0.51387066", "0.51342356", "0.50773585", "0.50634575", "0.50524664", "0.49363685", "0.48938367", "0.48635533", "0.48556316", "0.4848988", "0.48008147", "0.4793315", "0.4756556", "0.4...
0.7479286
0
Add the gateway to WC Available Gateways
Добавить шлюз в WC Доступные шлюзы
function wc_ethereum_add_to_gateways($gateways) { $gateways[] = 'WC_Gateway_Ethereum'; return $gateways; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woobac_add_to_gateways( $gateways ) {\n $gateways[] = 'WC_Bac';\n return $gateways;\n}", "function wc_offline_add_to_gateways( $wc_gateways ) {\n\t$wc_gateways[] = 'WC_Gateway_WordPay';\n\treturn $wc_gateways;\n}", "function wc_cim_finance_add_to_gateways( $gateways ) {\n\t$gateways[] = 'WC_CIM_...
[ "0.7566518", "0.7292892", "0.7148531", "0.689519", "0.684035", "0.6744856", "0.6718", "0.6708443", "0.66611135", "0.66301966", "0.66289353", "0.66063833", "0.6470047", "0.6465352", "0.643741", "0.6410252", "0.64081365", "0.6381895", "0.63561684", "0.6306752", "0.6293608", "...
0.7546779
1
get Bukti Pengadaan berdasarkan id paket
получить Букти Пенгадаан по идентификатору пакета
function getBuktiById($id){ $res = $this->db->query("SELECT * FROM bukti_pengadaan WHERE ID_PAKET = '$id'")->result_array(); return $res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pembayaran($id_pembayaran){\n\t\t\n\t}", "function getBuktiByIdPaket($id){\n\t\t$query = $this->db->query(\"SELECT * from bukti_pengadaan where ID_PAKET = '$id'\")->result_array();\n\t\treturn $query;\n\t}", "public function getPetugasId(){\n \t\t$id = $_POST['id'];\n \t\techo json_encode($this->M_mas...
[ "0.7232882", "0.7109565", "0.70000976", "0.6968981", "0.6827522", "0.6799152", "0.6794446", "0.67760986", "0.6702349", "0.6690079", "0.66644126", "0.66404223", "0.6640063", "0.66158324", "0.65375346", "0.65221864", "0.65174675", "0.6511874", "0.64924794", "0.64869994", "0.648...
0.7299504
0
/ Method Name:__construct Param:$host as Databse Host Name ,$user as Database User Name, $password as Databse Password $databseName as default databse Return:Exception if any Description:MySQLDB class constructor to assign parameter to class properties and Establish Databse Connection.
Метод имени: __construct Параметр: $host как имя хоста базы данных, $user как имя пользователя базы данных, $password как пароль базы данных, $databaseName как имя базы данных по умолчанию Возвращение: исключение, если есть описание: конструктор класса MySQLDB для назначения параметров свойствам класса и установки соед...
public function __construct($databseName='baagglpayment',$host = "localhost",$user = "root", $password = "") { /*---------------------------------- Assign Parameter to class properties -----------------------------------*/ $this->mysqlHost= $host; $this->mysqlUser= $user; $this->mysqlPassword= $password; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($dbuser, $dbpassword, $dbname, $dbhost)\n {\n }", "public function __construct($dbHost=\"localhost\",$dbName=DBNAME,$dbUser=DBUSER,$dbMdp=DBPWD)\n\t{\n\t\t$this->dbHost=$dbHost;\n\t\t$this->dbName=$dbName;\n\t\t$this->dbUser = $dbUser;\n\t\t$this->dbMdp=$dbMdp;\n\t\t$this->bdd =...
[ "0.81226605", "0.7884022", "0.7876434", "0.78660184", "0.7841568", "0.78103364", "0.7805114", "0.77809453", "0.77697974", "0.7756859", "0.77446175", "0.77237964", "0.7715869", "0.7713176", "0.770022", "0.76951474", "0.7692674", "0.7679247", "0.7676938", "0.76522887", "0.76253...
0.81384
0
/ Method Name:selectDb Param:$databseName as Databse Name Return:Result under resultSet or Exception if any Description:Function to change current db wih Given Db From Database List of Server.
/ Название метода:selectDb Параметр:$databseName как Databse Name Возвращение:Результат в resultSet или исключение, если оно есть Описание:Функция для изменения текущей базы данных с заданной базой данных из списка баз данных сервера.
public function selectDb($databseName) { /*---------------------------------- Assigning Databse name to class property -----------------------------------*/ $this->mysqlDatabase=$databseName; /*---------------------------------- Selecting Databse -----------------------------------*/ if(!@mysql_sele...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function selectDatabase($db_name);", "public function selectDatabase($database);", "abstract public function selectDatabase($database);", "function db_select_db($sDatabase) {\n\t}", "public function select_db($dbname) {\n\t\t\t// Tur: Sorguların hangi veritabanı üzerinde yürütüleceğini belirtir.\n\t...
[ "0.73343563", "0.6972171", "0.6966951", "0.69642997", "0.67264754", "0.66281575", "0.6604091", "0.65516204", "0.6487385", "0.64794904", "0.6455654", "0.6455389", "0.64215994", "0.6418138", "0.6374892", "0.6357771", "0.62701076", "0.6263935", "0.6263093", "0.62373745", "0.6224...
0.7267822
1
/ Method Name:insertRowSql Param:$query: sql statement Return:id or Exception if any Description:Function to execute the insert query.
/ Название метода:insertRowSql Параметр:$query: sql-запрос Возвращаемое значение:id или исключение, если оно возникло Описание:Функция для выполнения вставки запроса.
public function insertRowSql($query) { if(!$this->resultSet=@mysql_query($query,$this->connectionHandle)) { print "<br> <pre>$query</pre><br>"; throw new Exception("<b>Error:</b>\n" . mysql_error()); } else return mysql_insert_id(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insert( $query )\n\t{\n\t\t$table = null;\n\t\t$rows = null;\n\t\t$fields = null;\n\t\t$rtype = self::Q_INSERT_ID;\n\n\t\tforeach ($query as $k => $v) {\n\t\t\tswitch ($k) {\n\t\t\tcase \"row\":\n\t\t\t\tif (is_assoc( $v ) || is_object( $v )) {\n\t\t\t\t\tif ($rows || $fields) {\n\t\t\t\t\t\t$err = \"quer...
[ "0.6621191", "0.65415573", "0.65181714", "0.65034634", "0.63440233", "0.6310181", "0.62834936", "0.62697417", "0.62676036", "0.62611425", "0.62598646", "0.6258071", "0.6254917", "0.6252531", "0.62199235", "0.62199235", "0.62199235", "0.62199235", "0.62199235", "0.62199235", "...
0.821579
0
/ Method Name:insertRow Param:$dataArray as associative array with key as field name and value as field value,$tableName as databse table name Return:Exception if any Description:Function to execute the insert query with secure method of non SQl Injection attacks.
Имя метода:insertRow Параметр:$dataArray как ассоциативный массив с ключом как названием поля и значением как значением поля,$tableName как имя таблицы базы данных Возвращение:Иключение, если есть Description:Функция для выполнения запроса вставки с использованием безопасного метода, защищенного от атак с использование...
public function insertRow($dataArray,$tableName) { /*------------------------------------------------- storing key of dataArray in local array varibale. --------------------------------------------------*/ $CheckKey=array_keys($dataArray); /*---------------------------------------------------------------- ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insertRecord(string $tableName, array $rowData);", "public function insertRow(Array $data);", "public function insertRowData($rowDataArray) {\r\n\t\t\r\n\t\ttx_pttools_assert::isNotEmptyString(\r\n\t\t\t$this->conf['table'],\r\n\t\t\tarray('message' => '$this->conf[table] should be non-empty bu...
[ "0.7892604", "0.7579143", "0.7371629", "0.728439", "0.7273787", "0.71135175", "0.7112733", "0.7052311", "0.7013538", "0.699321", "0.6992432", "0.6973033", "0.6967555", "0.6964303", "0.6964115", "0.69430846", "0.6925446", "0.6891877", "0.6874473", "0.68698525", "0.68541086", ...
0.84772915
0
/ Method Name:updateRow Param:$dataArray as associative array with key as field name and value as field value, $tableName as databse table name, $condition as where condition Return:Exception if any Description:Function to execute the update query with secure method of non SQl Injection attacks. NOTE:Please use SQL sta...
Метод: updateRow Параметр: $dataArray как ассоциативный массив с ключом как названием поля и значением как значением поля, $tableName как имя таблицы базы данных, $condition как условие WHERE Возвращаемое значение: Исключение, если есть Описание: Функция для выполнения запроса обновления с использованием безопасного ме...
public function updateRow($dataArray,$tableName,$condition=null) { /*------------------------------------------------- storing key of dataArray in local array varibale. --------------------------------------------------*/ $CheckKey=array_keys($dataArray); /*-------------------------------------------------...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update($data,$conditions, $tableName)\t{ // $data should be array and table name should be passed\r\n $query = \"UPDATE `$tableName` SET \";\t\r\n\tforeach($data as $key=>$val){\r\n\t\t$updateArray[]=\"`$key`='$val'\"; \r\n\t}\r\n\t\r\n\t\r\n\tif(count($updateArray)>0) {\r\n\t $query .= implode(\" , \...
[ "0.7655626", "0.7635684", "0.75602907", "0.7535023", "0.7532535", "0.748579", "0.7465451", "0.7427142", "0.74191153", "0.74098104", "0.7403183", "0.7272207", "0.72551835", "0.7250761", "0.7200702", "0.7179892", "0.70890355", "0.7078714", "0.70500165", "0.7007691", "0.70049506...
0.8682299
0
/ Method Name:fetchRow Param:$type as fetch type eg. 1=> BOTH , 2=>MYSQL_ASSOC , 3=>MYSQL_NUM Return:Result Row or Exception if any Description:Function Fetch a result row as an associative array, a numeric array, or both.
/ Название метода:fetchRow Параметр:$type как тип выборки, например. 1=>BOTH , 2=>MYSQL_ASSOC , 3=>MYSQL_NUM Возвращаемое значение:Строка результата или исключение, если оно есть Описание:Функция извлекает строку результата в виде ассоциативного массива, числового массива или обоих.
public function fetchRow($type=2) { /*---------------------------------- local variable to set Mysql Fetch Type. -----------------------------------*/ $fetchType=null; /*---------------------------------- Setting Mysql Fetch Type. -----------------------------------*/ switch($type) { case 1...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FetchRow($rs,$type=2) \n\t\t{\n\t\t\tif (is_resource($rs)) return @fbsql_fetch_array($rs,$type);\n\t\t}", "public function fetch_row($rownum,$type=Result::BOTH);", "function FetchRow($rs,$type=MYSQL_BOTH) \n\t\t{\n\t\t\tif (is_resource($rs)) {return @mysql_fetch_array($rs);\n\t\t\t\n\t\t\t\n\t\t\t}\n\...
[ "0.8266774", "0.82184666", "0.81842023", "0.8181333", "0.81142426", "0.8056881", "0.8024095", "0.8016054", "0.79418963", "0.79159635", "0.7810717", "0.77974147", "0.77225786", "0.7603765", "0.7556316", "0.7520489", "0.7490089", "0.7408795", "0.7398141", "0.7318416", "0.730918...
0.8788192
0
/ Method Name:rowCount Return:Row count or Exception if any Description:Function returns number of rows.
/ Название метода:rowCount Возвращаемое значение:Количество строк или исключение, если оно есть Описание:Функция возвращает количество строк.
public function rowCount() { if(mysql_errno() >0 ) throw new Exception("Error: Unable to Count Row".mysql_error()); /*---------------------------------- Fetching a result row. -----------------------------------*/ return @mysql_num_rows($this->resultSet); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rowCount()\n {\n return $this->m_oResult->num_rows;\n }", "public function countRow(){\n\n return $this->statement->rowCount();\n }", "final protected function rowCount() {\n if ($this->database === NULL)\n return $this->errorMessage(\"No database connec...
[ "0.82165", "0.8165074", "0.8085325", "0.806272", "0.8031144", "0.79953057", "0.7988527", "0.7988527", "0.797936", "0.79755974", "0.7962157", "0.7960603", "0.7954334", "0.78976035", "0.7894125", "0.78902125", "0.78902125", "0.78902125", "0.7888743", "0.788227", "0.78756434", ...
0.83189553
0
generate a file content to write in an entity file ./models/~entity.php
создать содержимое файла для записи в файл сущности ./models/~entity.php
private function writeEntitiesFiles(){ // foreach ($this->aTables as $table){ $table[] = "villes"; // var_dump($table); // load entity template $templates = file_get_contents($this->lycos("entitiesTemplate.php.txt", ROOT . "core/")); // Replace {CREATED_D...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function writeDaoEntitiesFiles(){\n// var_dump(\"toto\");\n// foreach ($this->aTables as $table){\n $table[] = \"villes\";\n// var_dump($table);\n // load entity template\n $templates = file_get_contents($this->lycos(\"daoEntitiesTemplate.php.t...
[ "0.75641495", "0.70175344", "0.69080174", "0.6606099", "0.6577991", "0.64041305", "0.6389215", "0.6380653", "0.620701", "0.6187989", "0.6176364", "0.61735725", "0.6168252", "0.61627877", "0.6153153", "0.6068136", "0.6048273", "0.60247695", "0.59999907", "0.596907", "0.5952943...
0.80706424
0
generate a file content to write in an DaoEntity file ./dao/Dao~Entity.php
создать содержимое файла для записи в файл DaoEntity ./dao/Dao~Entity.php
private function writeDaoEntitiesFiles(){ // var_dump("toto"); // foreach ($this->aTables as $table){ $table[] = "villes"; // var_dump($table); // load entity template $templates = file_get_contents($this->lycos("daoEntitiesTemplate.php.txt", ROOT . "cor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function writeEntitiesFiles(){\n// foreach ($this->aTables as $table){\n $table[] = \"villes\";\n// var_dump($table);\n // load entity template\n $templates = file_get_contents($this->lycos(\"entitiesTemplate.php.txt\", ROOT . \"core/\"));\n\n // ...
[ "0.77471536", "0.68903536", "0.6659227", "0.6389431", "0.6218761", "0.61731726", "0.61678404", "0.61551565", "0.61281985", "0.6104401", "0.60488987", "0.6033631", "0.6027734", "0.5966334", "0.5964199", "0.5945964", "0.58975637", "0.58737844", "0.58342516", "0.58216095", "0.57...
0.8260918
0
end func getParserWarnings Returns the total number of documentation warnings.
end func getParserWarnings Возвращает общее количество предупреждений о документации.
function getNumDocWarnings() { return $this->num_doc_warnings; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getWarnings() {\n return $this->doc_warnings;\n }", "function getWarningsCount(): int {\n return $this->warningsCount;\n }", "public function getWarnings() {}", "public function getWarnings() {\n return $this->warnings;\n }", "public function getWarnings() \n {\n ...
[ "0.751985", "0.7223588", "0.6745992", "0.6684693", "0.66578764", "0.6646632", "0.6627353", "0.6627353", "0.6504383", "0.6504383", "0.64338344", "0.63288915", "0.62358385", "0.62178844", "0.6137155", "0.61341447", "0.6081826", "0.596939", "0.59648436", "0.5937816", "0.5782757"...
0.8217321
0
/ authBlock.php Calls autentification block.
/ authBlock.php Вызывает блок аутентификации.
function authBlock( $args ) { return render( "authModal.html.php" ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function requestAuth() {\n\t\t\t$this->_view->encodeAuth();\n\t\t}", "function auth() {\n }", "function blocks_admin_main()\n{\n // Security check - important to do this as early as possible to avoid\n // potential security holes or just too much wasted processing\n if (!pnSecAuthAction(0, '...
[ "0.6425191", "0.6410762", "0.6270036", "0.61528146", "0.6144718", "0.61343074", "0.6128011", "0.6091411", "0.60793936", "0.6066168", "0.60515314", "0.60492635", "0.60085726", "0.59873646", "0.5969215", "0.59237313", "0.5922937", "0.59218717", "0.5920733", "0.59094405", "0.589...
0.71785784
0
Register autoloader for ScopedRole classes/interfaces
Регистрация автозагрузчика для классов/интерфейсов ScopedRole
public static function register() { spl_autoload_register(array('ScopedRole\\Loader', 'load')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register_autoloader() {\n\t\tspl_autoload_register(__NAMESPACE__ . \"\\\\App::reactive_autoload\");\n\t}", "private function register_autoload()\n {\n spl_autoload_register('Autoloader::autoloaderControllers');\n spl_autoload_register('Autoloader::autoloaderModels');\n spl...
[ "0.6848344", "0.6637088", "0.6567344", "0.65303415", "0.6506781", "0.64984673", "0.64584965", "0.64096296", "0.6408513", "0.6406789", "0.63610107", "0.62852913", "0.6279666", "0.62572783", "0.6245674", "0.62411076", "0.62408304", "0.62318975", "0.62084264", "0.6194724", "0.61...
0.8111463
0
Description: Function for select Clients
Описание: Функция для выбора клиентов
public function selectClients($dataClient) { try { echo $this->objDao->selectClients($dataClient); } catch (Exception $e) { echo 'Exception captured: ', $e->getMessage(), "\n"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSelectedclients( ){\n\t\t\n\t\tif( empty($this->_selectedclients) ){\n\t\t\n\t\t\t$query = \"SELECT cid \"\n\t\t\t.\"FROM #__zbrochure_assets_clients_rel \"\n\t\t\t.\"WHERE aid = \".$this->_id\n\t\t\t;\n\t\t\t\t\t\n\t\t\t$this->_db->setQuery( $query );\n\t\t\t$this->_selectedclients = $this->_db...
[ "0.71029884", "0.6680209", "0.6628077", "0.6609269", "0.6590727", "0.65838075", "0.6570989", "0.6502376", "0.6495773", "0.6437253", "0.6398207", "0.637923", "0.637459", "0.63688236", "0.636701", "0.6340451", "0.6340169", "0.63383067", "0.63197017", "0.63083017", "0.6303486", ...
0.70301193
1
Test get forbidden response
Тестирование получения запрещенного ответа
public function testForbiddenResponse() { $response = Response::forbidden(); $this->assertInstanceOf(JsonResponse::class, $response); $this->assertEquals(FoundationResponse::HTTP_FORBIDDEN, $response->getStatusCode()); $expect = [ 'code' => $this->app['config']->get('app...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function forbiddenAction()\n {\n $this->getResponse()\n ->setHttpResponseCode(403);\n }", "public function isForbidden(): bool {}", "public function forbidden()\n {\n return response()->json([\n 'message' => 'Forbidden!',\n ], 403);\n }", "public...
[ "0.74157166", "0.72841454", "0.7255258", "0.72510064", "0.7230141", "0.7202917", "0.7051096", "0.7027416", "0.7024682", "0.70211947", "0.6992163", "0.69862854", "0.6973339", "0.697252", "0.69568235", "0.6944904", "0.6943159", "0.6934703", "0.69274664", "0.69057655", "0.686647...
0.79471123
0
Test get exception response
Тест получения ответа с исключением
public function testExceptionResponse() { $response = Response::exception(); $this->assertInstanceOf(JsonResponse::class, $response); $this->assertEquals(FoundationResponse::HTTP_INTERNAL_SERVER_ERROR, $response->getStatusCode()); $expect = [ 'code' => $this->app['config...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSettingResponse(): void\n {\n $exception = new ReadException('ABC');\n static::assertSame('ABC', $exception->getResponse());\n static::assertSame('', $exception->getMessage());\n static::assertSame(0, $exception->getCode());\n static::assertNull($exception-...
[ "0.73039097", "0.7270639", "0.71745044", "0.71627676", "0.71539694", "0.7120998", "0.70989734", "0.70183074", "0.6973407", "0.69691795", "0.69605505", "0.69596297", "0.6942368", "0.69287616", "0.69114166", "0.6910673", "0.6889752", "0.6882126", "0.68390507", "0.6825879", "0.6...
0.7550545
0
Gets as employeeId Identifier assigned to the employee.
Получает идентификатор, назначенный сотруднику.
public function getEmployeeId() { return $this->employeeId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmployeeId()\n\t{\n\t\treturn $this->employeeId;\n\t}", "public function getEmployeeId() {\n return $this->employeeId;\n }", "public function getEntityId()\n {\n return $this->employeeId;\n }", "public function getEmployeeId(){\n \n if($this->hasAttribute('empl...
[ "0.8834989", "0.8782135", "0.8351744", "0.8243832", "0.814769", "0.79024994", "0.7896913", "0.78048545", "0.7663532", "0.73381996", "0.72797334", "0.71102315", "0.7009338", "0.69612765", "0.6854222", "0.68536913", "0.6848831", "0.67725194", "0.6699482", "0.66668046", "0.66574...
0.8815538
1