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
Test case for teamMembersIdWorkflowsGet Queries workflows of TeamMember..
Тест-кейс для команды TeamMembersIdWorkflowsGet Запросы workflows команды TeamMember.
public function testTeamMembersIdWorkflowsGet() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTeamMembersIdWorkflowsFkGet()\n {\n\n }", "public function testTeamMembersIdTeamWorkflowsGet()\n {\n\n }", "public function testTeamMembersIdTeamWorkflowsFkGet()\n {\n\n }", "public function testTeamMembersIdWorkflowsCountGet()\n {\n\n }", "public function testTe...
[ "0.8043732", "0.80416393", "0.7918973", "0.7532917", "0.7399775", "0.73245555", "0.71736705", "0.69920766", "0.6900045", "0.6872558", "0.6741195", "0.67258936", "0.66917324", "0.66703326", "0.6668657", "0.665885", "0.6625711", "0.66094613", "0.6601235", "0.6600462", "0.656827...
0.8213018
0
Test case for teamMembersIdWorkflowsPost Creates a new instance in workflows of this model..
Тестовый случай для teamMembersIdWorkflowsPost Создает новый экземпляр в workflows этого модели.
public function testTeamMembersIdWorkflowsPost() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTeamMembersIdTeamWorkflowsPost()\n {\n\n }", "public function testTeamMembersIdWorkflowsFkPut()\n {\n\n }", "public function testTeamMembersIdTeamWorkflowsFkPut()\n {\n\n }", "public function testTeamMembersIdTeamPortalsPost()\n {\n\n }", "public function testTea...
[ "0.8043462", "0.7176099", "0.7077431", "0.66511357", "0.65919393", "0.6558492", "0.6551242", "0.65197396", "0.6498241", "0.64973485", "0.64631516", "0.6444252", "0.64408123", "0.6438993", "0.6436598", "0.6426706", "0.6409775", "0.6401474", "0.6393347", "0.6379229", "0.6375304...
0.8122868
0
Store a newly created homes in storage. POST /homes
Храните только что созданные дома в хранилище. POST /homes
public function store(CreatehomesAPIRequest $request) { $input = $request->all(); $homes = $this->homesRepository->create($input); return $this->sendResponse($homes->toArray(), 'Homes saved successfully'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(CreatehomedataRequest $request)\n {\n $input = $request->all();\n\n $homedata = $this->homedataRepository->create($input);\n\n Flash::success('Homedata saved successfully.');\n\n return redirect(route('homedatas.index'));\n }", "public function store(Reques...
[ "0.69204885", "0.68638945", "0.6853906", "0.682137", "0.6664908", "0.65927655", "0.6548791", "0.63206124", "0.60742766", "0.6030723", "0.5999799", "0.5962312", "0.59032947", "0.5899721", "0.58864343", "0.5879892", "0.58697516", "0.5867859", "0.5851728", "0.58492947", "0.58415...
0.75106746
0
It loads the original content of each of the book's items. If the item doesn't define its own content (such as the table of contents or the cover) it loads the default content (if defined).
Он загружает исходное содержимое каждого из элементов книги. Если элемент не определяет своё собственное содержимое (например, оглавление или обложка), он загружает стандартное содержимое (если оно определено).
protected function loadContents() { foreach ($this->app->book('contents') as $itemConfig) { $item = $this->initializeItem($itemConfig); // for now, easybook only supports Markdown format $item['config']['format'] = 'md'; if (isset($itemConfig['content'])) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadItems()\n {\n // load all items\n }", "function load_item() {\n\t\t$this->items = read_data($this->events_file);\n\t\t$this->items_map = read_data($this->events_map_file);\n\t}", "public function reloadItems(): void\n {\n $this->editKey = null;\n $this->reload(...
[ "0.6245238", "0.6165247", "0.6154516", "0.6126201", "0.60491407", "0.60491407", "0.60491407", "0.60487795", "0.59225535", "0.5887608", "0.58773816", "0.5845388", "0.5824507", "0.58236724", "0.58017176", "0.5787222", "0.5746224", "0.56392056", "0.5607144", "0.5604954", "0.5592...
0.74148655
0
It creates the directory where the final book contents will be copied.
Оно создаёт директорию, в которую будут скопированы окончательные содержимое книги.
protected function prepareOutputDir() { $bookOutputDir = $this->app['publishing.dir.output'] ?: $this->app['publishing.dir.book'].'/Output/'.$this->app['publishing.edition']; if (!file_exists($bookOutputDir)) { $this->app['filesystem']->mkdir($bookOutputDir); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createDirectory() {}", "function createDirectory();", "public function make_dir() {\n if(! file_exists($this->base_dir))\n mkdir( $this->base_dir);\n }", "public function createScaffolding() {\n $this->logHeader('Creating directory structure');\n\n $worki...
[ "0.6858355", "0.6684332", "0.66356903", "0.66173834", "0.66118485", "0.64033985", "0.6394289", "0.63568777", "0.6324042", "0.6317384", "0.6279575", "0.6243026", "0.62284726", "0.6191014", "0.6186292", "0.6171015", "0.6165182", "0.6165016", "0.61494464", "0.6134093", "0.612458...
0.72111815
0
Convert ShopWare customer data to MercadoPago customer expected structure Expected structure example: [ 'firstname'=>'Federico', 'lastname'=>'Stange',
Преобразуйте данные клиента ShopWare в ожидаемую структуру клиента MercadoPago. Пример ожидаемой структуры: [ 'firstname'=>'Federico', 'lastname'=>'Stange',
public function customerToMp(Array $customerData){ $this->validateCustomer($customerData); /** * The phone field needs to be more specific for MercadoPago * Maybe: Use google's libphonenumber to parse the phone */ //'phone' => $customer['shippingaddress']['phone'], return [ 'n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function toCustomerDataArray();", "public function getCustomerData(Mage_Customer_Model_Customer $customer)\n {\n try {\n if ($primaryBillingAddress = $customer->getPrimaryBillingAddress()) {\n $address = implode(', ',$primaryBillingAddress->getStreet());\n ...
[ "0.688789", "0.66774315", "0.6624803", "0.65008605", "0.6404329", "0.63596046", "0.6311483", "0.6307695", "0.62993574", "0.6280493", "0.6276525", "0.6274448", "0.62627137", "0.6259418", "0.6141826", "0.6086115", "0.6074475", "0.60694623", "0.6063821", "0.6057098", "0.604818",...
0.70409787
0
Sets the terms of use.
Устанавливает условия использования.
public function setTermsOfUse($tou) { $this->_changed = true; $this->_terms = $tou; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTermsAttribute($value)\n {\n $this->attributes['terms'] = $value;\n }", "public function setTerms($val)\n {\n $this->_propDict[\"terms\"] = $val;\n return $this;\n }", "public function setSearchTerms($search_terms)\n\t{\n\t\t# Set the variable.\n\t\t$this->se...
[ "0.66577435", "0.6534025", "0.63355476", "0.6205296", "0.61931336", "0.6135597", "0.59809697", "0.59504044", "0.5913572", "0.5910013", "0.5910013", "0.59002876", "0.58893764", "0.58617884", "0.5827246", "0.5812152", "0.5808614", "0.58064574", "0.5779607", "0.57303417", "0.568...
0.7055839
0
Returns the terms of use.
Возвращает условия использования.
public function getTermsOfUse() { return $this->_terms; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_terms()\n {\n }", "public function get_terms()\n {\n }", "public function terms() {\n\n\t\treturn $this->terms;\n\t}", "function getTerms() {\n return $this->terms;\n }", "public function getTerms()\n {\n return $this->terms;\n }", "public fu...
[ "0.7552642", "0.74162745", "0.74041426", "0.7366759", "0.73644364", "0.73644364", "0.73134226", "0.721412", "0.7181888", "0.68841445", "0.68732697", "0.6860117", "0.6842825", "0.67583734", "0.6743933", "0.6741317", "0.66935426", "0.66935426", "0.6628202", "0.6607694", "0.6600...
0.82941735
0
The id of the store
Идентификатор хранилища
public function getStoreId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStore_Id()\n {\n return $this->getData(self::STORE_ID);\n }", "public function getStoreId()\n {\n return $this->storeId;\n }", "public function getStoreId()\n {\n return $this->storeId;\n }", "public function getStoreId()\n {\n return $this-...
[ "0.8733742", "0.8515208", "0.8515208", "0.8514331", "0.8514331", "0.8514331", "0.8514331", "0.8514331", "0.85011524", "0.84768945", "0.8460025", "0.8415497", "0.8411776", "0.84096026", "0.8396179", "0.8396179", "0.8357454", "0.8345429", "0.82738906", "0.82700944", "0.82273674...
0.87546545
1
The id of the language
Идентификатор языка
public function getLanguageId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLangID()\r\n {\r\n return $this->language;\r\n }", "public function getLanguageId()\n {\n return $this->_languageId;\n }", "public function getLangId()\n {\n return $this->langId;\n }", "public function getLangId()\n {\n return $...
[ "0.8364664", "0.8126105", "0.81121624", "0.81121624", "0.80586976", "0.8030794", "0.80167276", "0.80167276", "0.80167276", "0.80143946", "0.80143946", "0.8003097", "0.7931206", "0.78007364", "0.77212286", "0.76905334", "0.74726063", "0.73800653", "0.72966635", "0.7293315", "0...
0.8808446
0
The name of the language.
Название языка.
public function getLanguageName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLanguageName() : string\n {\n return $this->languageName;\n }", "function getLangName()\n {\n return 'lang';\n }", "public function getLanguageName(): string;", "public function getName ()\n\t{\n\t\treturn _(Language_Str::get($this->code));\n\t}", "static public...
[ "0.8612165", "0.8510521", "0.8391825", "0.83659816", "0.79845333", "0.7944248", "0.79098034", "0.78366584", "0.77872366", "0.7785875", "0.77852273", "0.77266103", "0.7691396", "0.76602846", "0.7646384", "0.7622016", "0.7608541", "0.75863427", "0.75224173", "0.7514143", "0.750...
0.8782348
0
The notification type For return values
Тип уведомления Для возвращаемых значений
public function getNotificationType();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNotificationType()\n {\n return $this->notification_type;\n }", "public function type()\n {\n return Yii::$app->session->getFlash('notify.type');\n }", "public function getNotificationType()\n {\n return $this->_fields['NotificationType']['FieldValue'];\n ...
[ "0.7106466", "0.7098663", "0.7079206", "0.6998331", "0.6631263", "0.6231529", "0.6171905", "0.61686116", "0.61462617", "0.61462617", "0.61462617", "0.6091238", "0.6058174", "0.6046273", "0.60401195", "0.60363704", "0.6008051", "0.59758705", "0.59461194", "0.5930055", "0.58998...
0.7482399
1
The notification severity For return values
Уровень серьёзности уведомления Для возвращаемых значений
public function getNotificationSeverity();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_severity();", "public function getSeverity() {}", "public function getSeverity() : int {}", "public function getLogSeverity();", "public function getSeverity()\n {\n return $this->severity;\n }", "public function getSeverity()\n {\n return $this->severity;\n ...
[ "0.81239545", "0.79386604", "0.7889358", "0.74454266", "0.7060101", "0.7060101", "0.7060101", "0.7060101", "0.7060101", "0.7060101", "0.7060101", "0.7060101", "0.7056623", "0.68341506", "0.6745374", "0.66337395", "0.65834457", "0.6396086", "0.6385183", "0.63123524", "0.629929...
0.8229277
0
Prepare selectColumns[], allColumns[] and joins[].
Подготовьте selectColumns[], allColumns[] и joins[].
private function prepareColumns() { // start with the tableName and the primary key e.g. 'fos_user' and 'id' $this->addSelectColumn($this->metadata, $this->rootEntityIdentifier); for ($i = 0; $i <= $this->requestParams['dql_counter']; $i++) { if ($this->requestParams['dql_' . $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function prepSelect() {\n $stmt = 'select ';\n if ($this->distinct)\n $stmt .= 'distinct ';\n $i = 0;\n $t = 0;\n $tables = '';\n foreach ($this->fields as $table => $fields) {\n if ($t++ > 0)\n $tables .= ',';\n $tables .= $table;\n foreach ($fields as $f) {\...
[ "0.6598115", "0.6571067", "0.64663976", "0.64657235", "0.6424587", "0.6385602", "0.6362507", "0.6326106", "0.63161105", "0.6299054", "0.62970877", "0.62585795", "0.62486184", "0.6229578", "0.6219787", "0.60941505", "0.60722005", "0.6071087", "0.60618454", "0.6048083", "0.6013...
0.713038
0
declare a variables for spotify and youtube class default constructor
объявите переменные для Spotify и YouTube класса по умолчанию конструктор
public function __construct() { $this-> apiResponse = ""; $this -> spotifyData = ""; $this -> youtubeData = ""; $this -> song = ""; //instantiate spotify and youtube class }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n // $this->metaTitle = new Title();\n // $this->metaRobots = new Robots();\n // $this->metaKeywords = new Keywords();\n // $this->metaDescription = new Description();\n // $this->metaAuthor = new Author();\n }", "public function __constr...
[ "0.7002133", "0.68786156", "0.6787757", "0.6698245", "0.6693022", "0.6662774", "0.66613966", "0.65757793", "0.65266424", "0.6524022", "0.651997", "0.6500157", "0.6497381", "0.64894", "0.6485359", "0.64604855", "0.6436615", "0.6434291", "0.6432798", "0.6431673", "0.6422107", ...
0.8323742
0
select `stock` from `productos` where id_producto = 1
select `stock` from `productos` where id_producto = 1
function sumarStock($codigo){ $this->db->select('stock'); $this->db->from('productos'); $this->db->where('id_producto', $codigo); return $this->db->get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStock($cod_prod,$cod_tienda){\n\t\t$sql = \"SELECT stock FROM tiendas_has_productos \".\n\t\t\t\"WHERE productos_idproductos=\".$cod_prod.\" AND tiendas_idtiendas=\".$cod_tienda;\n\t\t$q = $this->c->prepare($sql);\n\t\t$q->execute();\n\t\treturn $q->fetch()['stock'];\n\t}", "function en_stock_...
[ "0.7350889", "0.7305883", "0.7293056", "0.71861446", "0.71275574", "0.7112466", "0.7073944", "0.70375735", "0.6974752", "0.69446063", "0.69420576", "0.6940486", "0.69171304", "0.69155675", "0.6893578", "0.68387556", "0.683056", "0.68280184", "0.6785349", "0.6784012", "0.67781...
0.76155734
0
Lists all BuildingShopPark models.
Перечисляет все модели BuildingShopPark.
public function actionIndex() { $searchModel = new BuildingShopParkSearch(); $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 view('parking/all', ['parkings' => Parking::all()]);\n }", "public static function all()\n\t{\n\t\tself::dbConnect();\n\t\t$query = 'SELECT * FROM national_parks;';\n\t\t$parkTable = self::$dbc->query($query)->fetchAll(PDO::FETCH_ASSOC);\n\t\t$parks = [];\n\t\tfo...
[ "0.62206507", "0.59378594", "0.59028566", "0.57495534", "0.57440984", "0.573454", "0.5729597", "0.56795937", "0.5630271", "0.56297797", "0.5624654", "0.5571719", "0.5555854", "0.5542572", "0.5525492", "0.55208373", "0.54686934", "0.54535574", "0.54186696", "0.54181594", "0.54...
0.7702372
0
Creates a new BuildingShopPark model. If creation is successful, the browser will be redirected to the 'view' page.
Создает новый объект модели BuildingShopPark. Если создание успешно, браузер будет перенаправлен на страницу просмотра.
public function actionCreate() { $model = new BuildingShopPark(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } return $this->render('create', [ 'model' => $model, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new Shop();\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,\n ...
[ "0.71602196", "0.7083562", "0.70271355", "0.6983227", "0.6967581", "0.69069874", "0.6863094", "0.684191", "0.68141997", "0.6801263", "0.67824215", "0.678045", "0.6760341", "0.67137426", "0.67020595", "0.67003846", "0.66938186", "0.6683673", "0.6672946", "0.6656973", "0.664383...
0.87803
0
Get new date, modified by date expression
Получить новую дату, измененную выражением даты
function get($expression) { $newdate = clone $this; $newdate->modify($expression); return $newdate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDateChange();", "public function getChangeDate();", "public function updateDate($date){\n\n $timestamp = mktime(0,0,0,$month,$day,$year);\n\n return $date = getdate($timestamp);\n }", "function modify_date($date_string, $modification_string)\n{\n $date = new \\DateTime($date_st...
[ "0.62661064", "0.61954206", "0.6105855", "0.6062215", "0.59851396", "0.5936058", "0.5933027", "0.58654", "0.57764566", "0.5704707", "0.5697003", "0.56678814", "0.5658339", "0.56582195", "0.5642167", "0.5629746", "0.56258035", "0.5604099", "0.5604099", "0.5604099", "0.5604099"...
0.7761389
0
Get query string for the date, year=%d&month=%d&day=%d&hour=%d
Получить строку запроса для даты, year=%d&month=%d&day=%d&hour=%d
function get_date_str() { return sprintf("&year=%d&month=%d&day=%d&hour=%d", $this->year, $this->month, $this->day, $this->hour); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reqGetDate($tParam,$tLength){\r\n global $_GET;\r\n return getValidDate($_GET[$tParam],$tLength);\r\n}", "public static function buildUrl($date)\n {\n $date = new Zend_Date($date);\n $day = $date->toString(ZendExt_Service_DataFactory::DATE_FORMAT);\n $time = $date->toString...
[ "0.6112521", "0.5932663", "0.5742737", "0.55003476", "0.54863983", "0.5412232", "0.53952587", "0.5344429", "0.52850574", "0.52732456", "0.522422", "0.52234644", "0.519231", "0.5159453", "0.51404935", "0.50706404", "0.50676847", "0.5065536", "0.5064416", "0.5054699", "0.505007...
0.74973446
0
Set Current Date to First Day of Current Month
Установить текущую дату на первый день текущего месяца
public function setDateForFirstDayOfMonth() { $this->setDate($this->getYear(), $this->getMonth(), 1); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setCurrentDate()\n {\n $this->first_date = self::getFirstDate();\n $this->current_date = new Carbon();\n // set current day to 1 if unset (so it won't be 0 because 0 is the last day of previous month)\n $this->current_date->setDate($this->current_year, $this->current_month, ($this->...
[ "0.7362326", "0.71856517", "0.7159902", "0.70172983", "0.69877505", "0.67368096", "0.65293646", "0.6517168", "0.64559436", "0.63806367", "0.6377731", "0.63650423", "0.62661505", "0.6217351", "0.62139827", "0.6204891", "0.6190801", "0.61743003", "0.6151375", "0.61338276", "0.6...
0.7600673
0
Return an array of SugarDateTime objects for all of the current month's dates that land on a WeekEnd.
Вернуть массив объектов SugarDateTime для всех дат текущего месяца, которые попадают на выходной день.
public function getMonthDatesForWeekEndDays() { return $this->getMonthDatesForDaysOfWeek(array(self::DOW_SAT, self::DOW_SUN)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function weekendDates() {\n\t\t\t\t\n\t\t// prevent multiple calls by retrieving time once //\n\t\t$now = time();\n\t\t$aYearLater = strtotime('+1 Year', $now);\n\n\t\t// fill this with dates //\n\t\t$allDates = Array();\n\n\t\t// init with next friday and saturday //\n\t\t$sunday = strtotime('Next Sunday',...
[ "0.7019276", "0.69923145", "0.65335375", "0.64333427", "0.63853973", "0.6193059", "0.5992821", "0.59839594", "0.596388", "0.5963737", "0.586256", "0.57962203", "0.5791606", "0.5776157", "0.57414746", "0.57237065", "0.56709844", "0.56200045", "0.55786616", "0.5577335", "0.5562...
0.75268245
0
Get Number of Days in Current Month
Получить количество дней в текущем месяце
public function getDaysInMonth() { return (int) $this->format('t'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function daysInMonth(): int;", "public function daysInMonth() {\r\n\t\t\t$temp = $this->tempWorkingYear($this->year);\r\n\t\t\treturn (date('t', strtotime($temp . '-' . $this->month . '-' . $this->day)));\r\n\t\t}", "function calendar_days_this_month()\r\n\t{\r\n\t\t$days = date(\"t\");\r\n\t\treturn $d...
[ "0.8423068", "0.8112963", "0.80253226", "0.7898496", "0.7831022", "0.76656413", "0.7543443", "0.74916434", "0.743475", "0.7359764", "0.72555315", "0.70447993", "0.7035292", "0.7030641", "0.70202494", "0.6918827", "0.68926835", "0.6855823", "0.6849332", "0.68378913", "0.680938...
0.82100403
1
Test writing to a table.
Тестирование записи в таблицу.
public function testWriteToTable() { $count = 0; // Run with listener $this->resolver->config()->set('db-lojack.query_log.handler', 'listener'); DB::table('test')->insert($this->data); $test = DB::table('test')->get(); $count += count($this->data); $this->as...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test1()\n {\n $template_table = '\n+---------+---------+---------+---------+---------------------+------+------+\n| tst_c00 | tst_c01 | tst_c02 | tst_c03 | tst_c04 | t | s |\n+---------+---------+---------+---------+---------------------+------+------+\n| Hello | 1 | ...
[ "0.64168715", "0.640972", "0.6381812", "0.62823486", "0.62341696", "0.61732155", "0.6046799", "0.6046799", "0.60357004", "0.6007697", "0.59066117", "0.5896256", "0.58914053", "0.5884736", "0.58262753", "0.58080554", "0.57956696", "0.5794709", "0.5783285", "0.57484376", "0.573...
0.7212279
0
Handles incoming ajax requests for which the user must be authenticated. Forwards the request to plugin actions for the "context" portion of the URL.
Обрабатывает входящие ajax-запросы, для которых пользователь должен быть аутентифицирован. Передает запрос плагинным действиям для "контекста" части URL.
public function act_auth_ajax() { $user = User::identify(); if ( $user->loggedin ) { Plugins::act( 'auth_ajax_verify', $this ); /** * Triggers the ajax plugin action for the context if user is authenticated. * * @see act_auth_ajax() * @action ajax_auth_{$context} */ Plugins::act( 'aut...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ajax_handler() {\n\t\t// Permission check.\n\t\tif ( ! current_user_can( self::$cap_required ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Try to disable debug output for ajax handlers of this plugin.\n\t\tif ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {\n\t\t\tdefined( 'WP_DEBUG_DISPLAY' ) || define( 'WP_DEBUG_...
[ "0.6941001", "0.66202796", "0.63802946", "0.6188548", "0.59644777", "0.5952405", "0.5902438", "0.5773404", "0.5765125", "0.57291186", "0.5723773", "0.5715204", "0.5652861", "0.5647639", "0.5580232", "0.5559279", "0.5552504", "0.55477947", "0.55237424", "0.5513881", "0.5491326...
0.75686663
0
Serves the locale Javascript to translate javascript strings.
Предоставляет локализованный JavaScript для перевода строк JavaScript.
public function locale_js() { header('Expires: ' . gmdate('D, d M Y H:i:s ', time() + 432000) . 'GMT'); header('content-type: text/javascript'); $domain = Locale::get_messages(); $domain_json = json_encode($domain); $js = <<<TEEHEE function _t() { var domain = {$domain_json}; var s = arguments[0]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadJavaScriptLanguageStrings() {}", "public function __translateJavaScript($context) {\n\t\t\t// get current language\n\t\t\t$lang = $this->__getCurrentLanguage(true);\n\t\t\tif($lang == 'system') {\n\t\t\t\t$lang = Administration::instance()->Configuration->get('lang', 'symphony');\n\t\t\t}\...
[ "0.71124345", "0.6717178", "0.66517454", "0.6502204", "0.64574176", "0.6450918", "0.64322484", "0.6374488", "0.62918407", "0.6096259", "0.5982929", "0.59700465", "0.5966192", "0.59616184", "0.5936621", "0.5885781", "0.5856069", "0.58363235", "0.5794001", "0.5778044", "0.57752...
0.8039877
0
A simple slash command that returns a random joke to the Slack channel.
Простая команда в виде слэша, возвращающая случайную шутку в канал Slack.
function slack_command_joke() { $jokes = array( "The box said 'Requires Windows Vista or better.' So I installed LINUX.", "Bugs come in through open Windows.", "Unix is user friendly. It’s just selective about who its friends are.", "Computers are like air conditioners: they stop working when you open Windows....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRandomJoke() {\n $client = $this->http_client;\n $request = $client->get( 'https://api.chucknorris.io/jokes/random');\n $response = json_decode($request->getBody()->getContents());\n\n return $response->value;\n }", "public function getRandomJoke()\n {\n $response = $thi...
[ "0.7263694", "0.7025895", "0.6401659", "0.5727951", "0.5721679", "0.5584998", "0.5562539", "0.54376745", "0.543702", "0.52769023", "0.5162576", "0.5118561", "0.5093468", "0.5057582", "0.50221485", "0.50144553", "0.49831182", "0.49660003", "0.4954229", "0.49367943", "0.4920620...
0.75793153
0
Base Function to run Fetch Users and Save Them
Основная функция для запуска получения пользователей и их сохранения
public function fetchUsers() { $this->factory->fetchData(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fetch_existing_users ()\n\t{\n\t\t$users = $this->export_lib->fetch_users ();\n\t\tforeach ($users as $user)\n\t\t{\n\t\t\t$user_meta = $this->export_lib->fetch_user_meta ($user['ID']);\n\t\t\t$user = $this->export_lib->prep_user_data ($user, $user_meta);\n\t\t\t$this->existing_data['users'][] = $user;\n\...
[ "0.6566594", "0.6487891", "0.6465139", "0.64539856", "0.64395154", "0.631104", "0.63103974", "0.62995386", "0.6289095", "0.627003", "0.6204362", "0.6189264", "0.6185419", "0.61793983", "0.6173927", "0.6164335", "0.6154811", "0.6149144", "0.6145018", "0.6140435", "0.61322564",...
0.73027295
0
This function reads in a CSV, Comma Separated file, and returns a 2D array indexed like, $table[ROW_ID][COLUMN_ID] = CELL_VALUE Inputs: $filename = 'test.csv' // specific file $withHeaders = True // Is their a header row $withLeftID = True // Can a row be determined by the leftmost column $withDelimiter = ',' // What i...
Эта функция читает CSV-файл, разделенный запятыми, и возвращает двумерный массив, индексируемый как $table[ROW_ID][COLUMN_ID] = CELL_VALUE Входные данные: $filename = 'test.csv' // конкретный файл $withHeaders = True // есть ли строка заголовков $withLeftID = True // можно ли определить строку по самой левой колонке $w...
function read_csv($filename, $withHeaders=True, $withLeftID=True, $withDelimiter=',') { $table = array(); if ($fp = fopen($filename, 'r')) { $counter = 0; while($row = fgetcsv($fp, 0, $withDelimiter)) { if (!isset($headers) && !$withHeaders) { $headers = array_keys($row); }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function read_csv($filename, $withHeaders=True, $withLeftID=True, $withDelimiter=',') {\n if ($fp = fopen($filename, 'r')) {\n $counter = 0;\n while($row = fgetcsv($fp, 0, $withDelimiter)) {\n if (!isset($headers) && !$withHeaders) {\n $headers = array_keys($row);\n }\n i...
[ "0.8414505", "0.74485016", "0.73706263", "0.73483443", "0.72598404", "0.72586393", "0.72460055", "0.72434", "0.71610177", "0.70284665", "0.6945718", "0.6888279", "0.6781579", "0.6770343", "0.67550915", "0.6750316", "0.6750194", "0.67313355", "0.672706", "0.6726516", "0.668542...
0.8523587
0
method to return role gid
метод для возврата идентификатора роли
public function getRoleGid($roleName =''){ if(!empty($roleName)){ $roleName = str_replace(' ', DELEM4,$roleName); $roleName = strtoupper($roleName); } return $roleName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function gid() { return $this->_m_gid; }", "public function getGid()\n {\n return $this->_gid;\n }", "public function getegid()\n {\n return posix_getegid();\n }", "public function getGroupRole() {\n return $this->groupRole;\n }", "public function getGroup()\n ...
[ "0.7532388", "0.6702128", "0.6642293", "0.66061145", "0.6582385", "0.6543076", "0.6528137", "0.65154946", "0.65115464", "0.65001357", "0.648121", "0.64738333", "0.64359635", "0.64110076", "0.6405989", "0.64028585", "0.63992524", "0.636227", "0.6346403", "0.6325456", "0.631038...
0.70817524
1
method to add new role in all the languages
метод для добавления новой роли на всех языках
public function addRole() { $postedData = $this->request->data; //posted information // Convert fields name $postedData = AppServiceUtil::backendFrontendFieldsMap('Roles', $postedData, false, array()); //map posted data $checkGlobalAdmin = $this->Auth->User('ISGLOBALADMIN'); if($checkGlobal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_role($role)\n {\n }", "public function addRole($role);", "public function addRole($role);", "public function addNewRole(): void\n {\n if (!empty($_POST)) {\n $token = $_POST['token'];\n $role = htmlspecialchars($_POST['role']);\n if ($token...
[ "0.6916735", "0.67130953", "0.67130953", "0.6709577", "0.6661264", "0.66237086", "0.66145647", "0.65877897", "0.6556222", "0.65331054", "0.6383283", "0.6359823", "0.6352983", "0.6341845", "0.631728", "0.6295306", "0.6261986", "0.6215905", "0.621314", "0.62011766", "0.61878115...
0.7146704
0
persists the project and its releases into the database
сохраняет проект и его релизы в базу данных
public function save() { parent::save(); // and now save all releases foreach ($this->releases as $release) { $release->save(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n \n\n \\DB::table('git_projects')->delete();\n \n \\DB::table('git_projects')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'sort' => 1,\n 'type' => 1,\n 'name' => 'wangjia...
[ "0.6186665", "0.6117", "0.6098727", "0.6066293", "0.6047379", "0.6007774", "0.59595346", "0.5889675", "0.58876234", "0.58756804", "0.58109075", "0.5801487", "0.5768764", "0.5734364", "0.57114464", "0.5692863", "0.5683956", "0.5667675", "0.56676567", "0.5656049", "0.565552", ...
0.7335929
0
Loads the related record values into this field. This can be uploaded in one of three ways: By passing in a list of file IDs in the $value parameter (an array with a single key 'Files', with the value being the actual array of IDs). By passing in an explicit list of File objects in the $record parameter, and leaving $v...
Загружает связанные значения записей в это поле. Это можно выполнить одним из трех способов: передачей в параметре $value списка идентификаторов файлов (массив с одним ключом 'Files', значение которого является фактическим массивом идентификаторов). Передачей явного списка объектов File в параметре $record и оставление...
public function setValue($value, $record = null) { // If we're not passed a value directly, we can attempt to infer the field // value from the second parameter by inspecting its relations $items = new ArrayList(); // Determine format of presented data if ($value instanceof...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testAddingFilesToNewRecord()\n {\n $obj = TestManyManyThroughDataObject::create();\n\n // The file IDs to add, Should result in D,B,A,C\n $data = ['Files' => ['4','2','1','3']];\n\n $field = SortableUploadField::create('Files', 'Files', $obj->Files())->setRecord($obj)...
[ "0.57957137", "0.5606384", "0.5419952", "0.5194736", "0.517908", "0.5177462", "0.5156841", "0.5059168", "0.50350446", "0.49860752", "0.4959137", "0.49397242", "0.4933291", "0.4930097", "0.4926026", "0.4923911", "0.48952508", "0.48908082", "0.48796895", "0.48684627", "0.486666...
0.7129426
0
Gets the foreign class that needs to be created, or 'File' as default if there is no relationship, or it cannot be determined.
Получает иностранный класс, который нужно создать, или 'File' по умолчанию, если нет связи или она не может быть определена.
public function getRelationAutosetClass($default = File::class) { // Don't autodetermine relation if no relationship between parent record if (!$this->getRelationAutoSetting()) { return $default; } // Check record and name $name = $this->getName(); $recor...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClassName(): ?string\n {\n return $this->namingStrategy->getBeanClassName($this->foreignKey->getForeignTableName());\n }", "public function getAssociatedClass()\n {\n return null;\n }", "public function class()\n {\n return self::RELATION_CLASSES[$this->ty...
[ "0.66992664", "0.63369334", "0.6212756", "0.61328703", "0.60723215", "0.60602534", "0.6008764", "0.5972695", "0.5972695", "0.5972695", "0.5958435", "0.5924672", "0.58997834", "0.58997834", "0.58997834", "0.58997834", "0.588293", "0.5849293", "0.58281356", "0.58281356", "0.579...
0.7436568
0
random_element() is included in Array Helper, so it overrides the native function
random_element() включено в Array Helper, поэтому оно переопределяет встроенную функцию
function random_element($array) { shuffle($array); return array_pop($array); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function randomElement($array){\n $count = count(self::$array);\n return self::$array[\n mt_rand(0, count($count) - 1)\n ];\n }", "public static function random_element($array)\n {\n return is_array($array) ? $array[array_rand($array)] : $array;\n }"...
[ "0.74459183", "0.7334427", "0.70629096", "0.7043217", "0.695138", "0.68400794", "0.6734271", "0.66719323", "0.66692185", "0.6541309", "0.6538817", "0.65288466", "0.6520239", "0.64749086", "0.63725096", "0.6318261", "0.62994003", "0.6292788", "0.62480193", "0.6237115", "0.6162...
0.7712617
0
Get a summary of the transaction status in the system
Получите обзор статуса транзакции в системе
function status_summary($adminId) { return $this->_query_reader->get_list('get_transaction_status_summary', array('admin_id'=>$adminId)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTransactionStatus() \n {\n return $this->_fields['TransactionStatus']['FieldValue'];\n }", "public function getTransactionStatus()\n {\n }", "public function summary()\n {\n switch ($this->wrappedObject->status) {\n case 1:\n return 'PAS...
[ "0.73296714", "0.7311081", "0.7309586", "0.7285166", "0.71255815", "0.71197027", "0.7105946", "0.71058697", "0.7067875", "0.7031828", "0.6982088", "0.69371045", "0.693154", "0.6861484", "0.68346393", "0.68103004", "0.6703657", "0.6702037", "0.6702037", "0.66572523", "0.662537...
0.7359916
0
check_items_versions rationale: usertemplates are validated at upload time using validate_xml. Mastertemplates are not validated "at the beginning" because they are never uploaded. At application time, I only need check_items_versions for user templates while I need the bigger validate_xml to validate mastertemplates f...
check_items_versions: причина: пользовательские шаблоны проверяются в момент загрузки с помощью validate_xml. Главные шаблоны не проверяются "вначале", потому что они никогда не загружаются. В момент применения мне нужно использовать check_items_versions только для пользовательских шаблонов, а для первоначальной провер...
public function check_items_versions() { global $CFG; if (empty($this->formdata->usertemplateinfo)) { // nothing was selected return; } $versiondisk = $this->get_plugin_versiondisk(); $parts = explode('_', $this->formdata->usertemplateinfo); $this->utemplate...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_version_check($extra_stats = array(), $force_check = \\false)\n{\n}", "function plugin_fusinvinventory_needUpdate() {\n $version = \"2.3.0\";\n include (GLPI_ROOT . \"/plugins/fusinvinventory/install/update.php\");\n $version_detected = pluginFusinvinventoryGetCurrentVersion($version);\n if (...
[ "0.5966763", "0.58707196", "0.58529323", "0.5769303", "0.57628715", "0.5693744", "0.5677389", "0.56650966", "0.5646626", "0.5632913", "0.56236714", "0.55907625", "0.55557376", "0.5546474", "0.5528836", "0.55210584", "0.55096257", "0.5492112", "0.5484978", "0.54693705", "0.546...
0.796037
0
/ In case you need a webhook
В случае если вам нужен вебхук
public function webhook() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function webhooks()\n {\n\n }", "function requests()\n {\n if (isset($this->settings['webhook'])) {\n $uri = parse_url($this->settings['webhook']);\n if (isset($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI'] == $uri['path'] . \"?\" . $uri['query']) {\n ...
[ "0.75167793", "0.6866057", "0.6754806", "0.6671838", "0.66319925", "0.66057515", "0.65487957", "0.65326416", "0.651906", "0.65109783", "0.6476213", "0.6445718", "0.64239657", "0.6411842", "0.640954", "0.64020157", "0.640195", "0.6391531", "0.6377371", "0.6371185", "0.63659006...
0.8258917
0
Get list of all allowed activities.
Получить список всех разрешенных действий.
public static function getAllowedActivities();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActivities()\n {\n return $this->custodialActivity;\n }", "public function getActivities()\n {\n return $this->activities;\n }", "private function get_activities()\n {\n $activities = $this->dataHandler->get_activity_data();\n return $activities;\n ...
[ "0.69888777", "0.69679654", "0.6868741", "0.6771127", "0.67695844", "0.67695844", "0.6545627", "0.6429853", "0.63721937", "0.62880284", "0.6242127", "0.62309927", "0.61731815", "0.61707014", "0.6133917", "0.6124827", "0.6120841", "0.6100413", "0.6078138", "0.60598224", "0.603...
0.8489876
0
Get list of all allowed callbacks.
Получить список всех разрешенных обратных вызовов.
public static function getAllowedCallbacks();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_allowed_call_backs()\n\t{\n\t\treturn self::$DEFAULT_CALLBACKS;\n\t}", "abstract public function getCallbacks(): array;", "protected static function allowedEvents()\n\t{\n\t\treturn array();\n\t}", "protected static function allowedEvents()\n\t{\n\t\treturn array();\n\t}", "publi...
[ "0.7432301", "0.67754513", "0.67334014", "0.67334014", "0.6435971", "0.6423362", "0.6346528", "0.6226438", "0.6184549", "0.6177294", "0.61563826", "0.6155173", "0.61549866", "0.6138069", "0.6137089", "0.61323994", "0.6116837", "0.60952324", "0.6091965", "0.60765934", "0.60765...
0.8538142
0
Get work template value.
Получить значение шаблона работы.
public function getWorkTemplate();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTemplate() {\r\n\t\treturn ($this->template);\r\n\t}", "public function getTemplate(): string\n {\n return optional($this->pivot_data)->get('template') ?? 'default';\n }", "public function get_template() {\n return $this->template;\n }", "public function get_template...
[ "0.6894442", "0.67650056", "0.676235", "0.6745259", "0.6715054", "0.66957176", "0.66948956", "0.66896147", "0.66820747", "0.6667321", "0.6667321", "0.6667321", "0.6650485", "0.66389817", "0.66389817", "0.6629785", "0.66260993", "0.66260993", "0.6623644", "0.6612482", "0.66124...
0.7340617
0
Set work template value.
Установить значение шаблона работы.
public function setWorkTemplate($template);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTemplate($template);", "public function setTemplate( $value ) \n {\n $this->setConfig('template', $value);\n }", "public function setTemplate($template){ }", "public function setTemplate($temp){\n\t\t$this->tempOverride = $temp;\n\t}", "function set($name,$value) {\n\t\t$thi...
[ "0.6637959", "0.6628927", "0.66199756", "0.65931284", "0.65496373", "0.65357375", "0.6517164", "0.65017873", "0.6423135", "0.6316928", "0.63060457", "0.624912", "0.6241017", "0.62132514", "0.62122285", "0.61813456", "0.6175623", "0.6170109", "0.61476964", "0.6139674", "0.6097...
0.757496
0
Get project documents statuses summary.
Получить общий статус документов проекта.
public function getDocumentsStatuses();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n $projectStatuses = ProjectStatus::all();\n\n return ProjectStatusResource::collection($projectStatuses);\n }", "private function status() {\n $this->load->model('Status');\n\n $rows = array();\n foreach ($this->Status->get_status() as $record...
[ "0.7148755", "0.65078455", "0.64268595", "0.64165574", "0.62570333", "0.6255911", "0.6208433", "0.6159703", "0.61209273", "0.6119476", "0.60668814", "0.60497415", "0.60268736", "0.60268736", "0.6009468", "0.60091656", "0.5992075", "0.5982626", "0.59383345", "0.5928684", "0.59...
0.7509448
0
Process classification fields via ajax request.
Классификация полей процесса через ajax-запрос.
public function processClassifications() { $classData = $this->RisksManager->getDataToSet($this->request->query['classModel']); $this->set($classData); $this->set($this->request->query); $this->initOptions(); $this->set([ 'model' => 'ThirdPartyRisk' ]); $this->render('../Elements/risks/risk_classific...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function processClassifications()\n\t{\n\t\t// $this->controller->allowOnlyAjax();\n\t\t$this->controller->autoRender = false;\n\n\t\t$setData = $this->getDataToSet();\n\t\t$this->controller->set($setData);\n\t\t$this->controller->initOptions();\n\n\t\t$this->validateClassification($setData);\n\n\t\treturn ...
[ "0.7006847", "0.6438054", "0.5594302", "0.55767983", "0.5568651", "0.55037457", "0.5499454", "0.5486734", "0.54173064", "0.53977954", "0.5349616", "0.53419083", "0.5296959", "0.5292588", "0.52797115", "0.52190554", "0.5215809", "0.51949143", "0.5187123", "0.51856333", "0.5173...
0.7260212
0
genereate html to show hands
создать html для отображения рук
function render_hand($hand) { echo "<div class='hand'>"; foreach ($hand as $card) { echo "<img src='$card'>"; } echo "</div>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generate_screen() {\n\t\t\t$bootstrap = new HTMLWriter();\n\t\t\t$content = $this->generate_salesusagetable();\n\t\t\t\n\t\t\tforeach (array_keys($this->json['data']['24month']) as $warehouse) {\n\t\t\t\tif ($warehouse != 'zz') {\n\t\t\t\t\t$content .= $this->generate_warehousediv($warehouse);\n\t\...
[ "0.6636705", "0.65799105", "0.65138626", "0.6479642", "0.64766586", "0.63301414", "0.620391", "0.62020785", "0.6130333", "0.60190904", "0.6018808", "0.60016185", "0.599713", "0.5970383", "0.5968044", "0.59676284", "0.5957146", "0.59555686", "0.5954216", "0.59381473", "0.59359...
0.7013263
0
Sends a RAW line to the server.
Отправляет RAW строку на сервер.
public function raw($raw) { $raw = substr($raw, 0, 510); debug("[<magenta>{$this->name}</magenta>] << {$raw}"); try { $this->socket->write("{$raw}\r\n"); } catch (BrokenPipeException $e) { $this->reconnect(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendRaw(...$lines)\n {\n //Not running? Bail out.\n if(!$this->running)\n return;\n\n $this->sentLines++;\n\n foreach($lines as $line)\n {\n Console::text(\"SENDING: {$line}\")->info()->debug()->push();\n\n foreach(explode(\"\\n...
[ "0.70874614", "0.68359643", "0.65078163", "0.63525486", "0.60539615", "0.60098195", "0.59042746", "0.5803802", "0.57444715", "0.5632348", "0.5609794", "0.55484074", "0.5525671", "0.548076", "0.548076", "0.5449566", "0.5404831", "0.5346024", "0.5346024", "0.53422487", "0.53386...
0.70261276
1
Delete all records by ids
Удалить все записи по идентификаторам
public static function delete_all($ids, $options = array()) { $connection = self::establish_connection(self::class_name($options)); $sql = "DELETE FROM " . self::table_name($options) . " WHERE `" . self::options('id_field') . "` IN (" . join(',', $ids) . ")"; return $connection->query($sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteRecords(array $ids);", "function deleteInBatch(array $ids);", "function delete_all() {\n $ids = $this->input->post('ids');\n foreach ($ids as $id) {\n $this->_del($id, false);\n }\n }", "abstract protected function _delete($ids);", "public function d...
[ "0.80696845", "0.76785517", "0.7677346", "0.76771194", "0.76656157", "0.7648199", "0.7614128", "0.7587268", "0.74001235", "0.74001235", "0.74001235", "0.74001235", "0.74001235", "0.74001235", "0.74001235", "0.74001235", "0.73675823", "0.73229086", "0.73178196", "0.72794676", ...
0.7699841
1
Check if connection established, if connection name is not assigned used current connection name
Проверьте, установлен ли соединение, если имя соединения не назначено, используйте текущее имя соединения
public static function is_connection_established($connection_name = null){ $connection = self::connection(empty($connection_name) ? self::class_name() : $connection_name); return !empty($connection); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function connection($name = null)\n {\n if (null === $name) {\n return DB::connection()->getName();\n }\n\n return strtolower($name) === strtolower(DB::connection()->getName());\n }", "public function hasConnection();", "public function setActiveCon...
[ "0.69348675", "0.6836141", "0.6582975", "0.65019745", "0.6469149", "0.64573956", "0.64385337", "0.64228654", "0.6408167", "0.6403352", "0.6365087", "0.6358174", "0.6344841", "0.6339285", "0.633673", "0.6311527", "0.62630856", "0.6193942", "0.61937994", "0.61703384", "0.614907...
0.7034628
0
Tests Phalcon\Http\Message\Stream :: getMetadata()
Тесты Phalcon\Http\Message\Stream :: getMetadata()
public function httpMessageStreamGetMetadata(UnitTester $I) { $I->wantToTest('Http\Message\Stream - getMetadata()'); $fileName = dataDir('assets/stream/mit.txt'); $handle = fopen($fileName, 'rb'); $stream = new Stream($handle); $expected = [ 'timed_out' =>...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMetadata()\n {\n return stream_get_meta_data($this->mPipes[1]);\n }", "public function getMetadata()\n {\n return $this->getResponse()['data']['metadata'];\n }", "public function getStreamMetadata(): array\n {\n return $this->streamMetadata;\n }", "public func...
[ "0.75778955", "0.7382161", "0.72018784", "0.7079997", "0.67898977", "0.6765629", "0.6765051", "0.6726569", "0.6726569", "0.6726569", "0.6726569", "0.6726569", "0.6726569", "0.6726569", "0.6726569", "0.6726569", "0.6726569", "0.6726569", "0.6726569", "0.6726569", "0.6726569", ...
0.7829626
0
Tests Phalcon\Http\Message\Stream :: getMetadata() by key
Тестирование Phalcon\Http\Message\Stream :: getMetadata() по ключу
public function httpMessageStreamGetMetadataByKey(UnitTester $I, Example $example) { $I->wantToTest('Http\Message\Stream - getMetadata() - by key - ' . $example[0]); $fileName = dataDir('assets/stream/mit.txt'); $handle = fopen($fileName, 'rb'); $stream = new Stream($handle); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMetadata($key = null);", "public function getMetadata($key = null);", "public function getMediaMetadata($key);", "public function getMetadata(string $key = null);", "public function getMetadata($key = null)\n {\n if(\n $this->stream instanceof MetadataStreamInterface...
[ "0.7226158", "0.7226158", "0.714579", "0.7094472", "0.69892436", "0.696848", "0.6920886", "0.6901017", "0.68319726", "0.6700547", "0.6640883", "0.64786583", "0.62657744", "0.62055963", "0.6193302", "0.61559683", "0.61559683", "0.61434543", "0.6132815", "0.61106694", "0.594772...
0.7592142
0
Tests Phalcon\Http\Message\Stream :: getMetadata() invalid handle
Тесты Phalcon\Http\Message\Stream :: getMetadata() неверной ручки
public function httpMessageStreamGetMetadataInvalidHandle(UnitTester $I) { $I->wantToTest('Http\Message\Stream - getMetadata() - invalid handle'); $stream = new StreamFixture('php://memory', 'rb'); $stream->setHandle(null); $actual = $stream->getMetadata(); $I->assertNull($a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function httpMessageStreamGetMetadata(UnitTester $I)\n {\n $I->wantToTest('Http\\Message\\Stream - getMetadata()');\n $fileName = dataDir('assets/stream/mit.txt');\n $handle = fopen($fileName, 'rb');\n $stream = new Stream($handle);\n\n $expected = [\n 't...
[ "0.7117053", "0.634235", "0.60835445", "0.60794085", "0.6046698", "0.5935476", "0.59256834", "0.58012515", "0.57793945", "0.56972057", "0.5673404", "0.5670594", "0.56687033", "0.5666457", "0.56358135", "0.56316626", "0.55785626", "0.55742663", "0.55738235", "0.55572194", "0.5...
0.7836258
0
Preload routes by their names using the provided list of names. This method exists in order to allow performance optimizations. It allows preloading serialized routes that may latter be retrieved using ::getRoutesByName()
Предварительно загрузите маршруты по их именам с использованием предоставленного списка имен. Этот метод существует для возможности оптимизации производительности. Он позволяет предварительно загружать сериализованные маршруты, которые позже могут быть получены с помощью ::getRoutesByName()
public function preLoadRoutes($names);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadMultiple(array $names);", "private function _loadRoutes() {\n if ($this->_existsSerializedRoutesFile()) { \n $this->_loadRoutesFromSerializedFile();\n }\n else { \n $this->_files = $this->_discoverRoutesFiles();\n ...
[ "0.607681", "0.57587767", "0.57022774", "0.56833744", "0.5620253", "0.55234456", "0.5514221", "0.54923135", "0.5465452", "0.54596573", "0.53734744", "0.5350134", "0.5350134", "0.534575", "0.5336136", "0.5312109", "0.5246372", "0.52284074", "0.5144907", "0.51166844", "0.508568...
0.7925252
0
Gets the name used for the poka yoke variable in the templates
Получает имя, используемое для переменной poka yoke в шаблонах
public function getPokaYokeName() { return $this->_pokaVarName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_name() {\n\t\treturn 'meta-variable-by-get-id';\n\t}", "public function getTemplateName()\n {\n return trim(preg_replace('/(id|at|\\[\\])$/i', '', ucfirst(str_replace('_', ' ', $this->template))));\n }", "public function getVarNamePage()\n {\n return $this->_varNamePa...
[ "0.7303261", "0.7029878", "0.6912112", "0.68262136", "0.680648", "0.67975426", "0.679049", "0.67473674", "0.6733338", "0.67192864", "0.67047644", "0.67047644", "0.6695684", "0.6692488", "0.6670576", "0.6661254", "0.6661254", "0.6661254", "0.66526634", "0.6647373", "0.66404164...
0.7508389
0
Lista todos los sectores de una determinada institucion para una determinada oferta.
Перечислить все сектора определенной организации для определенного предложения.
function listSectoresConOferta($instit_id, $oferta_id = 0){ $conditions = array('Plan.instit_id'=>$instit_id); if (!empty($oferta_id)) { $conditions['Titulo.oferta_id'] = $oferta_id; } $sectores = $this->Plan->find("all",ar...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_sectores() {\n//Sentencia SQL\n $sqlconsulta = (\"SELECT S.id_sector, S.nombre FROM sector S WHERE 1\");\n//Php realiza la consulta a Maria DB\n $resultado = $this->db->query($sqlconsulta);\n while ($filas = $resultado->fetch_row()) {\n $this->sector[] = $filas;\...
[ "0.63478184", "0.62649053", "0.6252296", "0.59080946", "0.59059757", "0.5878101", "0.58725315", "0.5871421", "0.58169967", "0.5780025", "0.5776178", "0.5767776", "0.569924", "0.5689927", "0.5676779", "0.5656912", "0.5648703", "0.56167483", "0.556551", "0.55468297", "0.5529605...
0.74936664
0
Si el tipo de dependencia es nacional entonces el nombre de la dependencia no debe estar vacio
Если тип зависимости — национальный, то имя зависимости не должно быть пустым
function tipo_dependencia_nacional_y_nombre_dep_no_vacio(){ if ( $this->data['Instit']['dependencia_id'] == DEPENDENCIA_NACIONAL ){ if (!$this->data['Instit']['nombre_dep']){ return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tipo_dependencia_provincial_y_nombre_dep_vacio(){\r\n if ( $this->data['Instit']['dependencia_id'] == DEPENDENCIA_PROVINCIAL ){\r\n if ( $this->data['Instit']['nombre_dep']) {\r\n return false;\r\n }\r\n }\r\n return true;\r...
[ "0.6795375", "0.6795375", "0.58573484", "0.5712259", "0.5698486", "0.56611884", "0.55531704", "0.55531174", "0.55531174", "0.5523821", "0.5511038", "0.5464222", "0.53236765", "0.5289196", "0.52873856", "0.52835727", "0.5256518", "0.5248636", "0.52302045", "0.5196257", "0.5194...
0.7736299
0
Returns the available lightbox themes.
Возвращает доступные темы лайтбокса.
function lightbox_themes() { $themes = array( array( 'value' => 'base', 'name' => esc_attr__( 'Base', 'soliloquy-lightbox' ) ), array( 'value' => 'classic', 'name' => esc_attr__( 'Classic', 'soliloquy-lightbox' ), 'file...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getListTheme()\n {\n return $this->_gallerieManager->getListThemes();\n }", "public static function get_allowed_themes()\n {\n }", "public static function get_themes()\n {\n }", "function get_allowed_themes()\n{\n}", "function get_themes()\n{\n}", ...
[ "0.74599046", "0.7372713", "0.72874045", "0.7264862", "0.722399", "0.72156596", "0.72077215", "0.71882415", "0.70702344", "0.70174813", "0.7003466", "0.69630283", "0.69405925", "0.69359535", "0.680303", "0.67948216", "0.6756568", "0.67464787", "0.67447406", "0.6739651", "0.67...
0.78534776
0
Returns the available lightbox transition effects.
Возвращает доступные эффекты переходов в поп-апе.
function lightbox_transition_effects() { $transitions = array( array( 'value' => 'fade', 'name' => esc_attr__( 'Fade', 'soliloquy-lightbox' ) ), array( 'value' => 'elastic', 'name' => esc_attr__( 'Elastic', 'soliloquy-lightbox' ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_transitions () {\n return array('default', 'cube', 'page', 'concave', 'zoom', 'linear', 'fade', 'none');\n}", "public function effects() {\n // Pull the effects array via the external function.\n return item_effects($this->id());\n }", "public function getTransitions();", "publ...
[ "0.71978766", "0.63536143", "0.61310345", "0.61310345", "0.6074367", "0.5887813", "0.57991284", "0.5777577", "0.55889267", "0.54535806", "0.5410123", "0.53658104", "0.53513294", "0.53330255", "0.53234583", "0.52975994", "0.5181031", "0.5134935", "0.51293194", "0.51067436", "0...
0.8091084
0
Returns the available lightbox thumbnail positions.
Возвращает доступные позиции миниатюр светового ящика.
function lightbox_thumbnail_positions() { $positions = array( array( 'value' => 'bottom', 'name' => esc_attr__( 'Bottom', 'soliloquy-lightbox' ) ), array( 'value' => 'top', 'name' => esc_attr__( 'Top', 'soliloquy-lightbox' ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function determineGalleryPosition() {}", "function lightbox_list($picId) {\r\n \r\n\t################################################\r\n\t//Set max number of images\r\n\t$max = 100; \t\t\t//(-1 for all pics in album)\r\n\t################################################\r\n\r\n global $lang_displa...
[ "0.70323294", "0.6023953", "0.5968271", "0.58200336", "0.5750559", "0.56251526", "0.5622366", "0.5615924", "0.55701745", "0.5543841", "0.55400646", "0.55324477", "0.54951084", "0.5444406", "0.5428851", "0.54146534", "0.54134357", "0.5382177", "0.53808427", "0.53778213", "0.53...
0.786597
0
/ Generate all possible combinations of $n elements where $k elements are equal to "true" and $n $k are equal to "false". $k:number of expected "true" elements $n:total number of elements return:array of combinations
// Генерировать все возможные комбинации $n элементов, где $k элементов равны "true", а $n $k элементов равны "false". $k: количество ожидаемых элементов "true". $n: общее количество элементов. return: массив комбинаций.
function combinations($k, $n, $candidates = array()) { if ($n === 0) { return array($candidates); } elseif ($k > $n) { return array(); } elseif ($k === $n) { return array(array_merge($candidates, array_fill(0, $n, true))); } elseif ($k === 0) { return array(array_merge($c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCombos($arr, $n, $r) \n{ \n // A temporary array to \n // store all combination \n // one by one \n $data = array(); \n \n // Print all combination \n // using temprary array 'data[]' \n combinationUtil($arr, $data, 0, \n $n - 1, 0, $r); \n}", "public funct...
[ "0.65452915", "0.6439206", "0.6396801", "0.6387522", "0.61700404", "0.61622876", "0.59613824", "0.58805406", "0.5486203", "0.5428309", "0.53181845", "0.5299055", "0.5228299", "0.5225519", "0.5207155", "0.5182211", "0.51746047", "0.515372", "0.510259", "0.50538445", "0.5035293...
0.76543945
0
/ Generate all possible (constants, variables) partition pairs from given pairs array. $pairs:key => value pairs array return:(constants, variables) pairs array
/ Генерация всех возможных пар (константы, переменные) из заданного массива пар. $pairs: массив пар ключ => значение return: массив пар (константы, переменные)
function make_combinations($pairs) { $results = array(); for ($i = count($pairs); $i >= 0; --$i) { foreach (combinations($i, count($pairs)) as $combination) { $constants = array(); $variables = array(); foreach (array_keys($pairs) as $j => $key) { if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function make_slices($pairs)\n{\n return array(array($pairs, array()), array(array(), $pairs));\n}", "function getPairs()\n\t{\n\t\t$pairs = /*. (array[int][int]mixed) .*/ array();\n\t\tfor($j = count($this->slots)-1; $j >= 0; $j--){\n\t\t\t$slot = $this->slots[$j];\n\t\t\tfor($i = count($slot)-2; $i >= 0; $i...
[ "0.60372365", "0.58513296", "0.5368103", "0.53493804", "0.5317948", "0.5263821", "0.51400036", "0.50938106", "0.5029423", "0.49889195", "0.49520364", "0.49347857", "0.49161214", "0.48942143", "0.48628336", "0.48558372", "0.48434514", "0.48260713", "0.48077542", "0.48029596", ...
0.7602016
0
/ Return a single element array of (empty, empty) pair. return:array with empty pair
Возвращает одномерный массив из пары (пустой, пустой). return: массив с пустой парой
function make_empty() { return array(array(array(), array())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmptyValue() {\n return array();\n }", "public function get_array()\n {\n $ar = array();\n\n $iter = $this->get_iter_first();\n if ($iter !== null) {\n do {\n $ar[$this->get_value($iter, 0)] = $this->get_value($iter, 1);\n ...
[ "0.67641586", "0.6553745", "0.6499923", "0.64914566", "0.64846563", "0.64767724", "0.6429073", "0.6318011", "0.6171091", "0.6163601", "0.61230487", "0.61220795", "0.61220795", "0.6085891", "0.6083411", "0.6062335", "0.6010597", "0.593947", "0.59384066", "0.59261733", "0.59114...
0.71409726
0
/ Compare exception message and search for expected content. $exception:raised exception $expect:expected message
Сравните сообщение об исключении и выполните поиск ожидаемого содержимого. $exception:выброшенное исключение $expect:ожидаемое сообщение
function raise($exception, $expect) { $message = $exception->getMessage(); assert(strpos($message, $expect) !== false, 'should have raised exception with message "' . $expect . '" but was "' . $message . '"'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testExceptionMessageContent(): void\n {\n // Migrator creation\n $migrator = (new MigratorEntity())\n ->setServiceId('migrator.id')\n ->setStatus(ComponentStatus::RUNNING);\n\n $migration = (new MigrationEntity())\n ->setServiceId('migration....
[ "0.6869342", "0.65458316", "0.6379305", "0.6374546", "0.6305366", "0.6278302", "0.61620104", "0.60972166", "0.6056643", "0.6044756", "0.6018426", "0.60095614", "0.6008933", "0.59826714", "0.5975947", "0.5960254", "0.59363353", "0.5930476", "0.5902022", "0.5891102", "0.5890522...
0.7072029
0
/ Ensure source code throw compile exception when generated with given constants. $source:template source code $constants:injected constants $message:expected exception message
Убедитесь, что исходный код вызывает исключение компиляции при генерации с заданными константами. $source:шаблон исходного кода $constants:вjected константы $message:ожидаемое сообщение исключения
function raise_compile($source, $constants, $message) { $renderer = new Deval\StringRenderer($source); try { $renderer->inject($constants); $renderer->render(); assert(false, 'should have raised exception when compiling'); } catch (Deval\CompileException $exception) { raise...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function raise_render($source, $constants, $variables, $message)\n{\n $renderer = new Deval\\StringRenderer($source);\n $renderer->inject($constants);\n\n try {\n $renderer->render($variables);\n\n assert(false, 'should have raised exception when rendering');\n } catch (Deval\\RenderExcep...
[ "0.5867825", "0.5807578", "0.56772065", "0.56258184", "0.5433391", "0.5380609", "0.5343514", "0.52584577", "0.525373", "0.5226861", "0.52052194", "0.5191059", "0.5162376", "0.5133578", "0.5091188", "0.50695515", "0.5059627", "0.5009177", "0.50059974", "0.500558", "0.500558", ...
0.7628517
0
/ Ensure source code throw render exception when injected given constants and variables. $source:template source code $constants:injected constants $variables:injected variables $message:expected exception message
Убедитесь, что исходный код вызывает исключение рендеринга при введении заданных констант и переменных. $source: код шаблона $constants: введенные константы $variables: введенные переменные $message: ожидаемое сообщение исключения
function raise_render($source, $constants, $variables, $message) { $renderer = new Deval\StringRenderer($source); $renderer->inject($constants); try { $renderer->render($variables); assert(false, 'should have raised exception when rendering'); } catch (Deval\RenderException $exception)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function raise_compile($source, $constants, $message)\n{\n $renderer = new Deval\\StringRenderer($source);\n\n try {\n $renderer->inject($constants);\n $renderer->render();\n\n assert(false, 'should have raised exception when compiling');\n } catch (Deval\\CompileException $exception)...
[ "0.72182167", "0.5844671", "0.5775528", "0.56381285", "0.5481003", "0.5407942", "0.5386707", "0.5364354", "0.5355761", "0.53277034", "0.53168285", "0.53000534", "0.52982956", "0.5298185", "0.52814436", "0.5235637", "0.5231058", "0.52253896", "0.5224049", "0.5221011", "0.52123...
0.7133199
1
/ Run tests using given renderers constructor and set of (constants, variables) pairs array. $constructor:renderers constructor $pairs:(constants, variables) pairs array $expect:expected rendered string
/ Запуск тестов с использованием заданного конструктора рендереров и массива пар (константы, переменные). $constructor: конструктор рендереров $pairs: массив пар (константы, переменные) $expect: ожидаемая отрендеренная строка
function render($constructor, $pairs, $expect) { foreach ($pairs as $pair) { list($constants, $variables) = $pair; foreach ($constructor() as $renderer) { $renderer->inject($constants); $names_expect = array_keys($variables); $names_result = array(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render_code($source, $pairs, $expect, $setup = null)\n{\n render(function () use ($setup, $source) {\n return array(\n new Deval\\StringRenderer($source, $setup)\n );\n }, $pairs, $expect, $setup);\n}", "public function testRenderMethod()\n {\n $result = 'This is...
[ "0.60247725", "0.57088125", "0.5562071", "0.55489916", "0.55227333", "0.5510416", "0.54861516", "0.5360095", "0.5357543", "0.527277", "0.5255021", "0.52393484", "0.5192574", "0.5167477", "0.5140795", "0.51219493", "0.51193935", "0.5099232", "0.5069847", "0.50259995", "0.50156...
0.77795684
0
/ Run tests on codebased renderers using given source code and set of (constants, variables) pairs array. $source:template source code $pairs:(constants, variables) pairs array $expect:expected rendered string $setup:compiler setup
Запуск тестов на основе кода рендереров с использованием заданного исходного кода и массива пар (константы, переменные). $source: исходный код шаблона $pairs: массив пар (константы, переменные) $expect: ожидаемая отрендеренная строка $setup: настройки компилятора
function render_code($source, $pairs, $expect, $setup = null) { render(function () use ($setup, $source) { return array( new Deval\StringRenderer($source, $setup) ); }, $pairs, $expect, $setup); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render($constructor, $pairs, $expect)\n{\n foreach ($pairs as $pair) {\n list($constants, $variables) = $pair;\n\n foreach ($constructor() as $renderer) {\n $renderer->inject($constants);\n\n $names_expect = array_keys($variables);\n $names_result = array(...
[ "0.63252276", "0.5576304", "0.5425571", "0.52448046", "0.52031213", "0.50998205", "0.50062555", "0.50048655", "0.4986333", "0.49538535", "0.4943442", "0.49383545", "0.49374205", "0.49146", "0.48886323", "0.48555094", "0.48526597", "0.48436946", "0.48310044", "0.48057452", "0....
0.7702869
0
/ Run tests on filebased renderers using given template path and set of (constants, variables) pairs array. $path:template file path $directory:cache directory $pairs:(constants, variables) pairs array $expect:expected rendered string $setup:compiler setup
Запуск тестов на файловых рендерерах с использованием заданного пути шаблона и набора пар (константы, переменные). $path: путь к файлу шаблона $directory: каталог кэша $pairs: массив пар (константы, переменные) $expect: ожидаемая отрендеренная строка $setup: настройки компилятора
function render_file($path, $directory, $pairs, $expect, $setup = null) { render(function () use ($directory, $path, $setup) { return array( new Deval\CacheRenderer($path, $directory, $setup, true), new Deval\FileRenderer($path, $setup) ); }, $pairs, $expect, $setup); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFormatFileBuildInTemplate()\n {\n $file = \"ui/appfuel/include_template.phtml\";\n $data = array('template_path' => $this->getTemplatePath());\n $compositor = new FileCompositor();\n\t\t$compositor->setRelativeRootPath('test/files');\n\t\t$compositor->setFile($file);\n ...
[ "0.60432464", "0.57066005", "0.5681257", "0.5661947", "0.5636701", "0.5515846", "0.55071765", "0.546796", "0.5402024", "0.54015344", "0.53925985", "0.5387917", "0.53601515", "0.5322271", "0.5298633", "0.52883875", "0.52653074", "0.5250743", "0.52201885", "0.5209631", "0.52029...
0.75009614
0
Complete the extraLongFactorials function below.
Завершите функцию extraLongFactorials ниже.
function extraLongFactorials($n) { $result = $n; for ( $i=$n-1; $i>=1; $i--) { // $result *= $i; $result = bcmul($result, $i); // echo $result . "; $i, \n"; } echo $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function calculateFactorial($n)\n{\n $fact = 1;\n while ($n) {\n $fact *= ($n--);\n }\n return $fact;\n}", "static function factorial($n){\n if ($n <= 1) {return 1;}\n return $n * factorial($n - 1);\n }", "function factorial($num)\r\n{\r\n if ($num < 2){\r\n return...
[ "0.54146516", "0.52655584", "0.52224445", "0.5176202", "0.51334685", "0.503704", "0.4965705", "0.4935995", "0.493372", "0.4891321", "0.48789757", "0.48618397", "0.48109236", "0.47640756", "0.4725536", "0.47113368", "0.468969", "0.4619159", "0.4609881", "0.458612", "0.45814452...
0.70691746
0
Returns UserDetails records associated with the country
Возвращает записи UserDetails, связанные с страной
public function userDetails() { return $this->hasMany(UserDetails::class, 'citizenship_country_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_userDetails($user_id){\n//---------------getting the country id by user id-----------------------------------//\n\n\t\t$SQL = \"SELECT * FROM jm_userprofile_tab WHERE jm_user_id='$user_id'\";\n\t\t$country_id = '';\n\t\t$res = $this->db->query($SQL);\n\t\tif ($res->num_rows() > 0) {\n\t\t\tfore...
[ "0.6377107", "0.63055325", "0.6134273", "0.6126831", "0.6054401", "0.6048913", "0.60260075", "0.60201675", "0.5995049", "0.5979079", "0.5976564", "0.5954901", "0.5954901", "0.5954901", "0.5943485", "0.5939381", "0.5937129", "0.5937129", "0.59003687", "0.5899472", "0.58769906"...
0.7144123
0
Update number of times product has been sold
Обновить количество раз, когда товар был продан
public function updateProductsSold($quantity) { $this->productsSold += $quantity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function recalculate_numbersold(){\n\t\t$ps = singleton('Product');\n\t\t$q = $ps->buildSQL(\"\\\"Product\\\".\\\"AllowPurchase\\\" = 1\");\n\t\t$select = $q->select;\n\n\t\t$select['NewNumberSold'] = self::$number_sold_calculation_type.\"(\\\"OrderItem\\\".\\\"Quantity\\\") AS \\\"NewNumberSold\\\"\";\n\n\...
[ "0.7359247", "0.70296854", "0.7017274", "0.6977134", "0.6947479", "0.69370806", "0.6786485", "0.67716277", "0.6605617", "0.6531845", "0.6514671", "0.64927304", "0.646128", "0.64390206", "0.6403001", "0.6364953", "0.63348436", "0.63320464", "0.63267595", "0.6311417", "0.630631...
0.7377941
0
Check if product is a ticket
Проверьте, является ли продукт билетом
public function isTicket() { return $this->getIsTicket(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isTicket($lineItem)\n {\n if ($lineItem->purchasable) {\n return (bool)($lineItem->purchasable->elementType == 'Events_Ticket');\n }\n }", "public function hasUseTicket(){\n return $this->_has(8);\n }", "function has_ticket($ticket_id){\n\t\tforeach( $this...
[ "0.7030466", "0.61930317", "0.615263", "0.6111763", "0.60938716", "0.6042489", "0.59459317", "0.5945156", "0.59278506", "0.5923234", "0.5864039", "0.57580346", "0.5739659", "0.573835", "0.5695984", "0.56778383", "0.56656903", "0.5662572", "0.56575394", "0.5640819", "0.5612076...
0.7348976
0
Retrieves all error messages which match the currently defined filter rules.
Возвращает все сообщения об ошибках, соответствующие текущим определенным правилам фильтрации.
public function getErrorMessages();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getErrorMessages() {}", "public function getErrorMessages(): array;", "public function getErrorMessages(): array;", "private function getErrorMessages()\n {\n return $this->errorBag->all();\n }", "public function errorMessages()\n\t{\n\t\treturn $this->validator->errors()->all(...
[ "0.73308665", "0.6819636", "0.6819636", "0.6817879", "0.6770159", "0.6767981", "0.67159265", "0.669856", "0.669856", "0.669856", "0.669856", "0.669856", "0.66474766", "0.6633865", "0.6628257", "0.6515674", "0.65030366", "0.6490771", "0.6457866", "0.64423794", "0.6437826", "...
0.7377184
0
Create password from encrypted String
Создать пароль из зашифрованной строки
public static function fromEncryptedString($encryptedPassword) { $ret = new Password(); $ret->password = $encryptedPassword; return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function password_enc($str){\n return $str;\n }", "public function passwordEncrypt($string) \n\t{\n\t\t// Convert md5\n\t\t$string = md5($string);\n\t\t\n\t\treturn $string;\n\t}", "function password($key, $string, $request = 'encrypt')\n {\n if ($request === 'encrypt') {\n $pass...
[ "0.75987935", "0.7125093", "0.70469874", "0.6929992", "0.68453795", "0.6781266", "0.67741334", "0.6738594", "0.66993517", "0.66521513", "0.66173434", "0.65606505", "0.65591", "0.6547997", "0.6482811", "0.647366", "0.6385962", "0.6376432", "0.6374155", "0.6365973", "0.63655204...
0.7454688
1
Returns the field types instances.
Возвращает экземпляры типов полей.
public static function get_field_types() { return static::$instances; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getFieldTypes()\n {\n return (new Collection($this->getFields()))\n ->map(function ($options) {\n return $options['type'];\n })\n ->values()\n ->unique()\n ->map(function ($type) {\n return self::$type...
[ "0.79021573", "0.7836589", "0.77257115", "0.76693285", "0.7651275", "0.7639931", "0.7532964", "0.7518108", "0.7518108", "0.7518108", "0.73076814", "0.71181583", "0.7062843", "0.7031868", "0.70000404", "0.6982434", "0.6943089", "0.69039154", "0.6875754", "0.6872289", "0.687228...
0.8880769
0
Print the field JS templates.
Выведите поле шаблонов JS.
public static function print_js_templates() { foreach ( static::$instances as $type => $control ) { if ( ! method_exists( $control, 'template' ) ) { continue; } ?> <script type="text/html" id="tmpl-wplibs-field-<?php echo esc_attr( $type ); ?>-content"> <?php $control->template(); ?> </script>...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render_fields(){\n\t\tforeach($this->fields as &$value)\n\t\t\techo $value->render(), PHP_EOL;\n\t}", "public function to_js_objects() {\n\n\t\tif ( ! $this->is_admin() ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n <script type='text/javascript'>\n var xpfields = <?php echo json_encode( $this->f...
[ "0.6876309", "0.6840126", "0.6680765", "0.6559137", "0.65305305", "0.6386125", "0.6345078", "0.63179725", "0.6316916", "0.6306351", "0.62784374", "0.62767595", "0.6242116", "0.61949205", "0.61948997", "0.61723864", "0.6165853", "0.6165853", "0.61572284", "0.6156435", "0.61458...
0.81798804
0
Get the render field callback.
Получить обратный вызов поля рендеринга.
protected static function get_render_callback( $callback ) { /** * Rendering the field. * * @param Field $field The passed in `CMB2_Field` object. * @param mixed $escaped_value The value of this field escaped. * @param int $object_id The ID of the current object. * @p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetDisplayFieldCallbackFunction()\n {\n $callbackFunction = null;\n if (is_array($this->sqlData) && array_key_exists('display_column_callback', $this->sqlData) && !empty($this->sqlData['display_column_callback'])) {\n $callbackFunction = $this->sqlData['display_column_ca...
[ "0.68410885", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", "0.6670806", ...
0.7556198
0
WHAT: Function to display initial donation page WHY: To display the view associated with donations providing users the ability to donate HOW: Call Information controller with element donations e.g. base_url/Information/donations
WHAT: Функция для отображения начальной страницы пожертвований WHY: Для отображения представления, связанного с пожертвованиями, предоставляющего пользователям возможность пожертвовать HOW: Вызов контроллера Information с элементом donations, например, base_url/Information/donations
public function donations(){ if ($this->input->is_ajax_request()) { $this->load->view('information/donation_view'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function donationsAction(){\n $this->load_model('Donations');\n $donation = $this->DonationsModel->findAll(['order'=>'id DESC']);\n $this->view->donation = $donation;\n $this->view->setLayout('dashboard2');\n $this->view->render('admin/donation/index');\n }", "public ...
[ "0.7909535", "0.76283664", "0.7261073", "0.71705914", "0.71705914", "0.71493256", "0.71155804", "0.7087375", "0.6959318", "0.6885942", "0.6860729", "0.6763106", "0.6611218", "0.6563676", "0.65341944", "0.65341944", "0.6398012", "0.6397044", "0.6372489", "0.63447845", "0.63332...
0.78486556
1
Cookie Login Log a user in with a remeber me cookie that has been set validating it matches the one stored in the database, then creating a new one for next time
Вход с использованием куки-файла "Запомнить меня", проверяя, соответствует ли она той, которая сохранена в базе данных, а затем создавая новый для следующего использования
function CookieLogin() { global $db, $errorCodes, $cookieSecret; if (isset($_COOKIE['rememberMe'])) { list ($userID, $token, $hash) = explode(':', $_COOKIE['rememberMe']); if ($hash == hash('sha256', $userID . ':' . $token . $cookieSecret) && !empty($token)) { $queryResult = $db->rawQuery("SELECT userID FR...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cookie_login()\n {\n try {\n if (array_key_exists(self::cookie_name, $_COOKIE)) {\n /* Vérification de la longueur de cookie */\n if (mb_strlen($_COOKIE[self::cookie_name]) < 1) {\n return true;\n }\n\n $auth_sql = 'SELECT *, UNIX_TIMESTAMP(session_start)...
[ "0.7353703", "0.7298264", "0.7278152", "0.72780246", "0.7231407", "0.7166752", "0.71632564", "0.709635", "0.70307916", "0.7021721", "0.69951725", "0.6994789", "0.6983764", "0.6973513", "0.6950754", "0.6950625", "0.6932526", "0.6918361", "0.6917366", "0.68785965", "0.6869298",...
0.73978424
0
Deletes all remember me cookies Removes all of a users Remember me cookies from the database
Удаляет все куки "запомнить меня" Удаляет все куки "запомнить меня" пользователя из базы данных
function deleteAllRememberMeCookies($userID) { global $db; $db->where("userID = ?", Array($userID)); $db->delete("UserSessions"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function deleteRememberMeCookie()\n {\n //$dataModel = new \\System\\BaseModel(\"users\");\n\n if (!isset($_SESSION['user_id']))\n {\n return;\n }\n \n // Reset rememberme token\n $remembermeuser = $this->dataModel->find(\"users\",\"id=?\",[$_S...
[ "0.8097429", "0.7646585", "0.76023775", "0.75599915", "0.7544023", "0.75330323", "0.7532718", "0.7289442", "0.7255747", "0.72150755", "0.7195825", "0.71574455", "0.71136665", "0.70961875", "0.7093785", "0.7068926", "0.7025451", "0.70106226", "0.70087415", "0.6987527", "0.6987...
0.7968706
1
Throws an Exception because you cannot boot a powered down machine from ssh
Выбрасывает исключение, так как невозможно запустить выключенную машину через ssh
public function boot() { throw new MethodNotAllowedException("You cannot use SSH to boot a powered down server."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRebootInstance()\n {\n if (self::$infrastructure->WaitStatusInstance(self::$instanceId, Instance::STATUS_RUNNING)) {\n $this->assertTrue(self::$infrastructure->rebootInstance(self::$instanceId));\n } else {\n $this->markTestSkipped('I cannot reboot the in...
[ "0.60614693", "0.5901934", "0.57153267", "0.56228644", "0.5572671", "0.5520728", "0.5520728", "0.54302126", "0.5373276", "0.5335634", "0.5335634", "0.5335634", "0.5335634", "0.5335634", "0.5324891", "0.5233188", "0.5233133", "0.52131325", "0.5192217", "0.5172928", "0.5133675"...
0.77255815
0
Executes a Reboot command
Выполняет команду Перезагрузки
public function reboot() { $exec = $this->getExec(); $exec->run('reboot'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reboot()\n\t{\n\t\t$command = 'reboot=1';\n\t\treturn $this->send($command);\n\t}", "public function reboot() {\n $rpc = \"<rpc>\";\n $rpc.=\"<request-reboot/>\";\n $rpc.=\"</rpc>\";\n $rpc.=\"]]>]]>\\n\";\n $rpcReply = $this->get_rpc_reply($rpc);\n retur...
[ "0.70070314", "0.6432998", "0.62788063", "0.6181809", "0.6173108", "0.609495", "0.6060047", "0.591843", "0.58853024", "0.58296126", "0.5749874", "0.56321186", "0.56209314", "0.55791837", "0.54741395", "0.5427095", "0.5414954", "0.5331127", "0.5327558", "0.52950174", "0.528367...
0.8006971
0
Executes a Shutdown command
Выполняет команду Выключения
public function shutdown() { $exec = $this->getExec(); $exec->run('shutdown -P now'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shutdown();", "public function shutdown();", "public function shutdown();", "function shutdown();", "function shutdown();", "function shutdown() ;", "public static function shutdown() {}", "protected function doShutdown() { }", "public function shutdown(): void;", "function shutdo...
[ "0.74771875", "0.74771875", "0.74771875", "0.73743236", "0.73743236", "0.7330962", "0.7322234", "0.72366077", "0.72352743", "0.718979", "0.701989", "0.7007064", "0.7006439", "0.7006439", "0.7006439", "0.7006439", "0.7006439", "0.7006439", "0.6897797", "0.688702", "0.68782115"...
0.7962509
0
Attempts to set the LastModified header with the proper date format.
Попытка установить заголовок LastModified с правильным форматом даты.
private function set_last_modified($value) { ee('Response')->setHeader('Last-Modified', $this->parseDateString($value)); return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function header_last_modified($headers, $format = true) {\n\t\tif (preg_match('/HTTP\\/1.1 404/', $headers)) {\n\t\t\treturn false;\n\t\t}\n\t\telse if (preg_match(\"/Last-Modified: ([^\\r]*)\\r/i\", $headers ,$temp)) {\n\t\t\t$date_modif = $temp[1];\n\t\t}\n\t\telse {\n\t\t\t$date_modif = '';\n\t\t}\n\t\t\n\t\tif...
[ "0.71930325", "0.7163548", "0.7126273", "0.70871574", "0.6991436", "0.6973808", "0.6946016", "0.6792266", "0.67167455", "0.6666588", "0.6639632", "0.6633528", "0.662878", "0.66244256", "0.66244256", "0.66244256", "0.66244256", "0.66161287", "0.66149694", "0.66068155", "0.6591...
0.7577968
0
If the $value is numeric then we'll use EE's set_status_header, which will supply the text to match the value. Otherwise we'll simply regurgitate the value.
Если значение $value числовое, то мы используем set_status_header EE, который предоставит текст, соответствующий значению. В противном случае мы просто вернём значение.
private function set_status($value) { if (is_numeric($value)) { ee('Response')->setStatus($value); return FALSE; } return TRUE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setStatus($value)\n {\n if (empty($value)) {\n $this->status = 'basic';\n return;\n }\n $this->status = trim(filter_var($value, FILTER_SANITIZE_STRING));\n }", "function __set($header, $value) {\n\t\tif ($header == 'status')\n\t\t\t$this->setStatus...
[ "0.6961697", "0.6906201", "0.66564393", "0.6633138", "0.66217726", "0.6612342", "0.6590212", "0.65096146", "0.64807016", "0.64756155", "0.6464661", "0.64483", "0.64285886", "0.64257705", "0.64244497", "0.64114314", "0.640965", "0.63665915", "0.6299089", "0.62930053", "0.62867...
0.7430774
0
If the value appears to have tags in it we'll run it through the parse_globals method.
Если значение содержит теги, мы выполним его через метод parse_globals.
private function parseTags($value) { if (strpos($value, '{') !== FALSE && strpos($value, '}') !== FALSE) { return ee()->TMPL->parse_globals($value); } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function varparse( ){\r\n\t\t\r\n\t\tif( preg_match( '/<?php/', $this->content ) ) $this->phpparse($this->content);\r\n\t\t\r\n\t\t//preg_match_all ('/\\{\\$[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\[\\]x7f-\\xff]*\\}/', $this->content, $tagmatches);\r\n\r\n\t\t// this was copied from the new version...\r\n\t\tpreg_match_...
[ "0.62745726", "0.59408444", "0.58930254", "0.5837741", "0.57132107", "0.55727226", "0.5494114", "0.5443543", "0.53892094", "0.5382131", "0.5371393", "0.5371393", "0.5330043", "0.524623", "0.52415025", "0.51997524", "0.5166335", "0.5150107", "0.5126809", "0.5096474", "0.509603...
0.7266559
0
Perform the validation. If fieldNames is nonempty, then only the fields specified will be validated.
Выполните проверку. Если fieldNames не пуст, то будут проверяться только указанные поля.
public function validate($fieldNames = array()) { $allFields = $this->getValidationConfig(); $fields = array(); if(!empty($fieldNames)) { foreach($allFields as $fieldConfig) { if(in_array($fieldConfig['name'], $fieldNames)) { $fields[] = $fieldConfig; } } } else { $fields = $allFields...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function validateFields()\n\t{\n\t\t$function = $this->class;\n\t\tif($function == 'CreditSale' && $this->swipe)\n\t\t\t$function .= 'Swipe';\n\n\t\t$fields = array_merge($this->requiredCommon,$this->required[$function]);\n\n\t\tforeach($fields as $var)\n\t\t\tif(!isset($this->$var) || empty($var))\n\t\t...
[ "0.6991147", "0.6840443", "0.6742899", "0.6742899", "0.6672388", "0.66669303", "0.66425264", "0.6641436", "0.64447445", "0.64193124", "0.6407995", "0.6326438", "0.63223255", "0.6284059", "0.62282085", "0.6171347", "0.6143785", "0.6111238", "0.6092178", "0.6064799", "0.6059283...
0.74784964
0
Return the validation configuration.
Вернуть конфигурацию валидации.
protected function getValidationConfig() { return array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getYamlValidation()\n {\n return $this->config['validation'];\n }", "public function getValidatorConfig()\n {\n $this->_initializeConfigList();\n $this->_initializeDefaultTranslator();\n return $this->_objectManager->create(\n Config::class,\n ...
[ "0.8000439", "0.78190094", "0.7237256", "0.7197178", "0.7085977", "0.70040387", "0.6971767", "0.6971767", "0.6971767", "0.6891472", "0.67402816", "0.6587385", "0.6550221", "0.65247065", "0.64654535", "0.64606297", "0.6449363", "0.6441981", "0.6420533", "0.6378984", "0.634526"...
0.8197003
0
Add a WHERE column != value clause to your query.
Добавьте в свой запрос условие WHERE column != value.
public function where_not_equal($column_name, $value) { return $this->_addSimpleWhere($column_name, '!=', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function whereNotEqualTo($field, $value) {\r\n\t$this->parseQuery->whereNotEqualTo($field, $value);\r\n }", "public function neq($column, $value)\n {\n return $this->addWhere($column, '!=', $value);\n }", "public function where_not_equal($column_name, $value) {\n $this->_builder->...
[ "0.71628165", "0.7120391", "0.70234925", "0.70234925", "0.70234925", "0.6968714", "0.68435663", "0.68138194", "0.67977405", "0.6639577", "0.65974563", "0.65491813", "0.65491813", "0.65491813", "0.65194356", "0.6513405", "0.6441533", "0.63925177", "0.6377806", "0.6360558", "0....
0.7594194
0
Add where WHERE ... NOT LIKE clause to your query.
Добавьте условие WHERE ... NOT LIKE в свой запрос.
public function whereNotlike($column_name, $value) { return $this->_addSimpleWhere($column_name, 'NOT LIKE', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function sql_not_like( $column, $value, $format = '%s', $and = true ) {\n $sql = $this->sql_and( $and );\n $sql .= $this->wpdb->prepare( \" `$column` NOT LIKE $format\", $value );\n return $sql;\n }", "public function testSelectWhereOperatorNotLike(): void\n {\n $query...
[ "0.70412976", "0.69929725", "0.6735192", "0.66969955", "0.6583199", "0.65638894", "0.6535444", "0.6535444", "0.6535444", "0.6519918", "0.64966965", "0.64388925", "0.6404441", "0.63426256", "0.6308566", "0.6204714", "0.61933243", "0.6193308", "0.6007197", "0.5995119", "0.59831...
0.7307956
0
Add a raw WHERE clause to the query. The clause should contain question mark placeholders, which will be bound to the parameters supplied in the second argument.
Добавьте сырые WHERE-условие в запрос. Условие должно содержать заполнители в виде вопросительных знаков, которые будут привязаны к параметрам, указанным во втором аргументе.
public function whereRaw($clause, $parameters=array()) { return $this->_addWhere($clause, $parameters); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function where($where_sql, $bind_fields = FALSE);", "public function appendWhere($where_sql, $bind_fields = FALSE);", "protected function prepareWhere(&$query) {\r\n\r\n\t\tif (count ( $this->where )) {\r\n\t\t\t$query .= \" WHERE \";\r\n\r\n\t\t\t$where = \"\";\r\n\t\t\t$was_or = false;\r\n\r\n\t\t\tfo...
[ "0.68297005", "0.68233323", "0.6653452", "0.6650831", "0.6604808", "0.6553134", "0.6517132", "0.6466367", "0.64416856", "0.64145035", "0.64059055", "0.63204986", "0.6284334", "0.62679094", "0.6244181", "0.62438303", "0.62383157", "0.6197879", "0.6189732", "0.61881286", "0.618...
0.72116923
0
Build a SELECT statement based on the clauses that have been passed to this instance by chaining method calls.
Постройте инструкцию SELECT на основе предложений, переданных в этот экземпляр с помощью цепочки вызовов методов.
private function _buildSelect() { // If the query is raw, just set the $this->_values to be // the raw query parameters and return the raw query if($this->_isRawQuery) { $this->_values = $this->_rawParameters; return $this->_rawQuery; } // Build and return the full SELECT statement by concatenating ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function select()\n {\n $this->validateNotNull(\n $this->table,\n \"Method 'select' requires method 'table' be called before it.\"\n );\n\n $this->validateNotNull(\n $this->fields,\n \"Method 'select' requires method 'fields' be called befo...
[ "0.75161153", "0.7236513", "0.72149545", "0.7166701", "0.71306217", "0.70608675", "0.7008919", "0.69658315", "0.69059783", "0.68461967", "0.6813324", "0.6797657", "0.6775164", "0.6759988", "0.6746822", "0.66855615", "0.6672957", "0.6663533", "0.66548604", "0.6650197", "0.6649...
0.7702425
0
Build the start of the SELECT statement
Постройте начало оператора SELECT
private function _buildSelectStart() { $resultColumns = join(', ', $this->_resultColumns); if($this->_distinct) { $resultColumns = 'DISTINCT ' . $resultColumns; } $fragment = "SELECT {$resultColumns} FROM " . $this->_quoteIdentifier($this->_tableName); if(!is_null($this->_tableAlias)) { $fragmen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function prepSelect() {\n $stmt = 'select ';\n if ($this->distinct)\n $stmt .= 'distinct ';\n $i = 0;\n $t = 0;\n $tables = '';\n foreach ($this->fields as $table => $fields) {\n if ($t++ > 0)\n $tables .= ',';\n $tables .= $table;\n foreach ($fields as $f) {\...
[ "0.75616086", "0.7346364", "0.73424745", "0.7280882", "0.72279865", "0.72093606", "0.7144748", "0.711883", "0.71170914", "0.7071279", "0.7015282", "0.6986365", "0.69857347", "0.69748837", "0.6969876", "0.6949311", "0.69131", "0.6912037", "0.6840684", "0.6835346", "0.6826245",...
0.84036124
0
Build the WHERE clause(s)
Постройте WHERE-предложение(я)
private function _buildWhere() { // If there are no WHERE clauses, return empty string if(count($this->_whereConditions) === 0) { return ''; } $whereConditions = array(); foreach ($this->_whereConditions as $condition) { $whereConditions[] = $condition[$this->WHERE_FRAGMENT]; $this->_values = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildQueryWhere() {\n\t\t$query = \"\";\n\t\t// WHERE...\n\t\tif (count($this->_where) > 0) {\n\t\t\t// BETA TODO\n\t\t\t$query .= implode(' ', $this->_where);\n\t\t} else {\n\t\t\t$query .= \"1\"; // some databases cannot accept this\n\t\t}\n\t\t// GROUP BY ...\n\t\tif (count($this->_groupby) > 0)...
[ "0.8236187", "0.7734395", "0.7721403", "0.7697988", "0.76768905", "0.7585273", "0.7584109", "0.75542057", "0.75297546", "0.75210243", "0.7492873", "0.74712706", "0.7446153", "0.7441961", "0.7429358", "0.7411185", "0.7363643", "0.7339347", "0.7338659", "0.7333501", "0.73329455...
0.81207365
1
Wrapper around PHP's join function which only adds the pieces if they are not empty.
Обертка вокруг функции join PHP, которая добавляет элементы только в том случае, если они не пустые.
private function _joinIfNotEmtpy($glue, $pieces) { $filtered_pieces = array(); foreach ($pieces as $piece) { if(is_string($piece)) { $piece = trim($piece); } if(!empty($piece)) { $filtered_pieces[] = $piece; } } return join($glue, $filtered_pieces); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function implode($glue, $pieces)\n{\n return '';\n}", "function implode($glue,$pieces)\n{\n\treturn '';\n}", "public function join(array $parts): string;", "public function join() {\n $colon = $this->options->colon === 'none' ? '' : ':';\n if (!($c = count($this->parsed)) || $c < 3 || $c > 4) {\n ...
[ "0.7383887", "0.7341122", "0.7107392", "0.70122856", "0.68502265", "0.6792431", "0.6791701", "0.6750529", "0.6726932", "0.67154187", "0.6711696", "0.66919893", "0.66530687", "0.664424", "0.66081095", "0.6538931", "0.6505853", "0.6463771", "0.64497614", "0.64223886", "0.640802...
0.75451833
0
Create a cache key for the given query and parameters.
Создайте ключ кэша для заданного запроса и параметров.
private function _createCacheKey($query, $parameters) { $parameter_string = join(',', $parameters); $key = $query . ':' . $parameter_string; return sha1($key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function generateCacheKey()\n {\n $routeIdentifier = $this->route->getName() ?: $this->route->getUri();\n $routeParameters = $this->implodeParameters($this->route->parameters());\n $queryParameters = $this->implodeParameters($this->request->query());\n\n $routeHash = md5(im...
[ "0.69155806", "0.6827298", "0.6672168", "0.6650808", "0.66502845", "0.66501856", "0.66501856", "0.6611276", "0.66095454", "0.657183", "0.65508604", "0.64187914", "0.64015096", "0.62268305", "0.61345404", "0.61302584", "0.61114633", "0.60932624", "0.60932624", "0.6083339", "0....
0.8163392
0
Check the query cache for the given cache key. If a value is cached for the key, return the value. Otherwise, return false.
Проверьте кэш запросов для заданного ключа кэша. Если значение кэшировано для этого ключа, верните его. В противном случае верните false.
private function _checkQueryCache($cache_key) { if(isset(self::$_queryCache[$cache_key])) { return self::$_queryCache[$cache_key]; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function isCached($key);", "public static function cache_exists($key){}", "function cacheGet($key)\n {\n if (Cache::has(md5($key))) return Cache::get(md5($key));\n return false;\n }", "public function exists($key)\n {\n $key = mysql_real_escape_string...
[ "0.749828", "0.74211127", "0.7379244", "0.73328334", "0.71187294", "0.71136254", "0.7082081", "0.7043435", "0.70009583", "0.6987526", "0.696327", "0.6948083", "0.693206", "0.6905299", "0.68867266", "0.6882815", "0.6845598", "0.6845166", "0.678869", "0.67740935", "0.6757238", ...
0.80520177
0
Clear the query cache
Очистить кэш запросов
public function clearCache() { self::$_queryCache = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearCache()\n {\n Cache::delete('settings', 'query_results_app');\n }", "public function clearQuery(){\n $this->_query = null;\n }", "public function clearCache() {}", "public function clearCache() {}", "function _elgg_invalidate_query_cache() {\n\tglobal $DB...
[ "0.8038208", "0.79291254", "0.7708013", "0.7708013", "0.7694725", "0.76280904", "0.7541324", "0.75382066", "0.7534431", "0.75072086", "0.74963325", "0.7495949", "0.74168956", "0.7408571", "0.7384494", "0.73463005", "0.7332752", "0.73314095", "0.73287314", "0.7328191", "0.7310...
0.9005497
0
Clear the query log
Очистить журнал запросов
public static function clearLog() { self::$_queryLog = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearQueryLog()\n {\n $this->queryLog = array();\n }", "public function flushQueryLog() {\n\t\t$this->queryLog = array();\n\t}", "public function clearQueryHistory(): void;", "public function clearQuery(){\n $this->_query = null;\n }", "public function stopLog...
[ "0.925436", "0.8466844", "0.78977406", "0.7603797", "0.75250274", "0.74630064", "0.7371886", "0.7370375", "0.73166955", "0.7283222", "0.7237803", "0.722583", "0.721004", "0.7157664", "0.71182853", "0.7007961", "0.7007572", "0.6994452", "0.69859874", "0.6974151", "0.6952831", ...
0.90215915
1
Add the given value to the query cache.
Добавьте заданные значение в кэш запросов.
private function _cacheQueryResult($cache_key, $value) { self::$_queryCache[$cache_key] = $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_to_cache($key, $value);", "public function addValue($value)\n {\n Cache::put('cachetest', $value, 10);\n return 'done';\n }", "public function add($key, $value) {\n\t\tif(!isset($this->_currCache[$key])) {\n\t\t\t$this->_currCache[$key] = $value;\n\t\t}\n\t\treturn true;...
[ "0.82322776", "0.71786886", "0.69090396", "0.6660239", "0.6543614", "0.6510203", "0.64423454", "0.6417206", "0.64014083", "0.637674", "0.6368115", "0.6364385", "0.6351748", "0.6323089", "0.631602", "0.6292431", "0.6243811", "0.6228436", "0.6219627", "0.62078846", "0.61656636"...
0.7483441
1
Setup quote character Detect and initialise the character used to quote identifiers (table names, column names etc). If this has been specified manually using setConfig('identifier_quote_character', 'somechar'), this will do nothing.
Настройка символа кавычек Обнаружить и инициализировать символ, используемый для ковычек идентификаторов (названия таблиц, названия колонок и т.д.). Если этот символ был указан вручную с помощью setConfig('identifier_quote_character', 'somechar'), то это действие не выполнится.
private function _setupQuoteCharacter() { if(is_null($this->_config['quote_character'])) { $this->_config['quote_character'] = $this->_detectQuoteCharacter(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function _setup_identifier_quote_character() {\n \n if (is_null(static::$_config['identifier_quote_character'])) {\n static::$_config['identifier_quote_character'] = static::_detect_identifier_quote_character();\n }\n }", "protected static func...
[ "0.9069133", "0.72715706", "0.6461738", "0.62782794", "0.623354", "0.61648226", "0.60747784", "0.60530144", "0.6030367", "0.5864202", "0.5864202", "0.5855165", "0.5696128", "0.56610036", "0.5586449", "0.5582991", "0.5568116", "0.55637634", "0.55152327", "0.55152327", "0.54579...
0.7490063
1