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
/ Function: getApplicationItemCount Method to get application related item count. Parameters: $application_id Application id Returns: Int
Функция: getApplicationItemCount Метод для получения количества элементов, связанных с приложением. Параметры: $application_id Идентификатор приложения Возвращает: Int
public function getApplicationItemCount($application_id) { $query = "SELECT count(a.id) AS item_count" ." FROM ".$this->name." AS a" ." WHERE a.application_id = ".(int) $application_id; return (int) $this->_queryResult($query); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function itemCount()\n {\n $response = $this->getServiceLocator()->get('Omeka\\ApiManager')\n ->search('items', [\n 'resource_template_id' => $this->id(),\n 'limit' => 0,\n ]);\n return $response->getTotalResults();\n }", "public stat...
[ "0.70258504", "0.696611", "0.69556856", "0.6871986", "0.6810475", "0.6754097", "0.673872", "0.673872", "0.6724486", "0.67081773", "0.6702852", "0.66577935", "0.6612419", "0.6612419", "0.6612419", "0.6612419", "0.6595301", "0.65590096", "0.65141755", "0.65072846", "0.6505162",...
0.8915673
0
/ Function: getTypeItemCount Method to get types related item count. Parameters: $type Type Returns: Int
Функция: getTypeItemCount Метод для получения количества элементов, связанных с типом. Параметры: $type Тип Возвращает: Целое число
public function getTypeItemCount($type){ // get database $db = $this->database; $group = $type->getApplication()->getGroup(); $query = "SELECT count(a.id) AS item_count" ." FROM ".$this->name." AS a" ." JOIN ".ZOO_TABLE_APPLICATION." AS b ON a.application_id = b.id" ." WHERE a.t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function item_type_count($type) {\n\t\t$types = array_column(self::$items_data, 'type');\n\t\t$type_count = array_count_values($types);\n\t\tif(isset($type_count[$type])) {\n\t\t\treturn $type_count[$type];\n\t\t}\n\t\treturn 0;\n\t}", "function getItemCount( $type ) {\n\t\t$menus = &JMenu::getInst...
[ "0.8188003", "0.7915502", "0.7596462", "0.73455644", "0.730854", "0.720115", "0.7162904", "0.7123333", "0.70154303", "0.69867975", "0.6939046", "0.6902133", "0.6814475", "0.67971224", "0.6669388", "0.6659761", "0.6651455", "0.662983", "0.6612319", "0.65149903", "0.64871144", ...
0.82128185
0
/ Function: getByCharacter Method to retrieve all items starting with a certain character. Parameters: $application_id Application id $char Character(s) $not_in Use not in for matching multiple characters $published $user $orderby $offset $limit Returns: Array Array of items
Функция: getByCharacter Метод для получения всех элементов, начинающихся с определенного символа. Параметры: $application_id Идентификатор приложения $char Символы $not_in Использовать "не в" для совпадения нескольких символов $published $user $orderby $offset $limit Возвращает: Массив Массив элементов
public function getByCharacter($application_id, $char, $not_in = false, $published = false, $user = null, $orderby = "", $offset = 0, $limit = 0){ // get database $db = $this->database; // get dates $date = $this->app->date->create(); $now = $db->Quote($date->toSQL()); $null = $db->Quote($db->getNullDate...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function characterList($data){\r\n $characters = self::multiRequest($data);\r\n return $characters;\r\n }", "function getCharacters($alpha) {\n\n\t\t$characters = [];\n\t\t$i = 0;\n\t\t$totalCharacters = 0;\n\n\t\t$dbData = $this->getRecords('characters', $alpha);\n\n\t\tif (count($dbData) ...
[ "0.49864742", "0.49727806", "0.49336633", "0.4915518", "0.4874917", "0.48053274", "0.47381136", "0.47331643", "0.47240603", "0.46925798", "0.469092", "0.46767616", "0.46064526", "0.45899558", "0.45671135", "0.4511629", "0.44762778", "0.44755524", "0.44710493", "0.4467069", "0...
0.76546913
0
/ Function: search Method to retrieve all items matching search data. Parameters: $search_string the search string $app_id specify an application id to limit the search scope Returns: Array Array of items
Функция: search Метод для получения всех элементов, соответствующих данным поиска. Параметры: $search_string строка поиска $app_id указание идентификатора приложения для ограничения области поиска Возвращает: Массив Массив элементов
public function search($search_string, $app_id = 0) { // get database $db = $this->database; $db_search = $db->Quote('%'.$db->escape( $search_string, true ).'%', false); $query = "SELECT a.*" ." FROM ".$this->name." AS a" ." LEFT JOIN ".ZOO_TABLE_SEARCH." AS b ON a.id = b.item_id" ." WHERE (LOWER(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search(string $searchString, int $pageNumber = 1, int $itemsPerPage = 5000): array {\n $items = [];\n \n if (strlen ( $searchString ) > 0) {\n \n $query = 'SELECT *, MATCH (title, description) AGAINST (:searchString) AS relevance FROM Items\n ...
[ "0.7024576", "0.658773", "0.6479686", "0.62438667", "0.62288547", "0.6138767", "0.6083469", "0.60740083", "0.6054199", "0.6029674", "0.6016743", "0.598413", "0.59130025", "0.59066504", "0.5888145", "0.58253884", "0.57646227", "0.57559067", "0.57239074", "0.5720296", "0.570409...
0.8253672
0
/ Function: searchElements Method to retrieve all items matching search data. Parameters: $elements_array key = element_name, value = search string $app_id specify an application id to limit the search scope Returns: Array Array of items
/ Функция: searchElements Метод для получения всех элементов, соответствующих поисковым данным. Параметры: $elements_array ключ = element_name, значение = строка поиска $app_id указывает идентификатор приложения для ограничения области поиска Возвращает: Массив Массив элементов
public function searchElements($elements_array, $app_id = 0) { // get database $db = $this->database; $i = 0; $join = array(); $where = array(); foreach ($elements_array as $name => $search_string) { $as = "table" . $i; $db_name = $db->Quote($db->escape( $name, true ), false); $db_search = $db->Q...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterElementIdsByQuery(array $elementIds, $query, bool $scoreResults = true, $siteId = null, bool $returnScores = false): array\n {\n if (is_string($query)) {\n $query = new SearchQuery($query, Craft::$app->getConfig()->getGeneral()->defaultSearchTermOptions);\n } else ...
[ "0.57158285", "0.56028694", "0.5461566", "0.54051477", "0.53209114", "0.52083725", "0.51494855", "0.5110642", "0.505334", "0.49980357", "0.49751925", "0.49708393", "0.49121517", "0.48406157", "0.4838066", "0.4838066", "0.4838066", "0.4821729", "0.4814864", "0.48007688", "0.47...
0.84783316
0
/ Function: getUsers Method to get users of items Parameters: $app_id Application id Returns: Array Array of items
/ Функция: getUsers Метод для получения пользователей предметов Параметры: $app_id Идентификатор приложения Возвращает: Массив Массив предметов
public function getUsers($app_id) { $query = 'SELECT DISTINCT u.id, u.name' .' FROM '.$this->name.' AS i' .' JOIN #__users AS u ON i.created_by = u.id' . ((empty($app_id)) ? "" : " WHERE i.application_id = ".$app_id); return $this->database->queryObjectList($query, 'id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getUsers($itemName)\r\n {\r\n // Create a new query object.\r\n $db = JFactory::getDbo();\r\n $query = $db->getQuery(true);\r\n $query->select('u.id AS value, u.name AS text');\r\n $query->from('#__users AS u');\r\n //Get only the names of users who have created items, thi...
[ "0.70654947", "0.7054014", "0.70358145", "0.70030606", "0.70030606", "0.70030606", "0.69742405", "0.6874213", "0.68557215", "0.6745129", "0.6713717", "0.6636563", "0.66269934", "0.6607108", "0.66056263", "0.6556786", "0.653728", "0.65353614", "0.6530868", "0.6530868", "0.6525...
0.8038508
0
\ \ Clear Room Data
Очистить данные комнаты
private function clear() { $this->id = 0; $this->name = ''; $this->rooms = array(); $this->loaded = false; $this->scan = 0; $this->refresh = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearRawDatas();", "public function DeleteRooms() {\n\t\t\t$this->objRooms->Delete();\n\t\t}", "public function remove() {\n\t\t$this->remove_room($this->data['rid']);\n\t\t$this->data = [];\n\t}", "public function clear()\n {\n $this->checkReadOnly();\n $this->data = [];\n ...
[ "0.6889517", "0.6819003", "0.6796688", "0.6794263", "0.6786165", "0.6699862", "0.6690026", "0.6684965", "0.66266245", "0.66266245", "0.66266245", "0.66266245", "0.66266245", "0.66266245", "0.66266245", "0.66266245", "0.66266245", "0.66266245", "0.66266245", "0.66266245", "0.6...
0.7850932
0
dado un id de insumo obtiene su stock
по заданному идентификатору сырья получает его запас
function obtener_stock($id_sede,$id_insumo) { $CI =& get_instance(); $sql = 'select stock_real from stock where id_insumo="'.$id_insumo.'" and id_sede="'.$id_sede.'"'; $rtdo=$CI->db->query($sql); if($rtdo->num_rows()==0) { echo "Hubo un error "; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEtat_stock($id){\n\t\t\t\t\t$sql = \"SELECT * FROM etat_stock WHERE etat_stock.id = \".$id.\" \";\n\t\t\t\t\t if($this->db != null)\n\t\t\t\t\t {\n\t\t\t\t\t return $this->db->query($sql)->fetch();\n\t\t\t\t\t }else{\n\...
[ "0.711536", "0.7018908", "0.70111644", "0.69041723", "0.6848833", "0.6834133", "0.677637", "0.6750572", "0.67170584", "0.6706065", "0.669261", "0.6682815", "0.6681099", "0.66603225", "0.66398257", "0.66357905", "0.6606329", "0.66018194", "0.6590502", "0.6541806", "0.65376663"...
0.79897106
0
dado un id de pedido obtiene el tipo
по заданному идентификатору заказа получает тип
function obtener_tipopedido($id_insumo) { $CI =& get_instance(); $sql = 'select tipo_pedido from pedidos where id="'.$id_insumo.'"'; $rtdo=$CI->db->query($sql); if($rtdo->num_rows()==0) { echo "Hubo un error "; } else { $resul= $rtdo->row(); } re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getId_tipo() {\n return $this->id_tipo;\n }", "public function getTipo()\r\n{\r\nreturn $this->id_usuario;\r\n}", "function getNombreTipo($id){\n\t$registros = new Registros();\n\n\t$nombre = $registros->getTipoObservacionDato(\"nombre\", $id);\n\n\tif( empty($nombre) ){\n\t\treturn 'Observa...
[ "0.72825825", "0.6738431", "0.66862655", "0.6678783", "0.66547227", "0.66428554", "0.66035306", "0.6550571", "0.65460885", "0.6478286", "0.6448351", "0.6412205", "0.6401477", "0.63810605", "0.6367275", "0.63553804", "0.6344487", "0.63439226", "0.6321788", "0.6314432", "0.6290...
0.71813273
1
Store a newly created Lession in storage. POST /lessions
Храните только что созданную Lession в хранилище. POST /lessions
public function store(CreateLessionAPIRequest $request) { $input = $request->all(); $lession = $this->lessionRepository->create($input); return $this->sendResponse($lession->toArray(), 'Lession saved successfully'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $mentoringSessionData = $request->only(['interest_id', 'topic', 'description', 'start_time', 'end_time', 'tags']);\n $mentoringSessionData['user_id'] = $currentUser['id'];\n $validat...
[ "0.6447375", "0.64261794", "0.6301286", "0.6280092", "0.62729436", "0.62377733", "0.6224218", "0.6220559", "0.6190792", "0.61642253", "0.61593056", "0.6148826", "0.61345255", "0.61254925", "0.6124018", "0.6121356", "0.61178756", "0.6116908", "0.61138916", "0.6105306", "0.6104...
0.7122836
0
Display the deleted resources
Показать удаленные ресурсы
public function showDeleted() { $servicesList = Services::onlyTrashed()->get(); return view('admin.services.deleted', compact('servicesList')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDeletedListAction()\n {\n $accId = Xend_Accounts_Prototype::getId();\n $where = new Zend_Db_Expr('deleted = 1 AND owner_id = ' . $accId);\n\n $response = $this->_model->getAll($where, $this->_getAllParams());\n if ($response->isSuccess()) {\n $this->view...
[ "0.7400676", "0.70312464", "0.70089686", "0.7008517", "0.7008517", "0.6978936", "0.6858418", "0.6839186", "0.6828482", "0.6820792", "0.6777622", "0.6771724", "0.6761942", "0.67349875", "0.6717857", "0.6714525", "0.6689453", "0.6672899", "0.6644819", "0.66444254", "0.6629222",...
0.70749694
1
if we're posting to a page within /f/ then we're either creating a new folder or uploading a file.
если мы отправляем данные на страницу внутри /f/, то либо создаем новую папку, либо загружаем файл.
private function indexPost(){ //since we're creating new stuff (post), better check that the address doesn't point to old stuff if(!$this->fs->isFile($this->filePath) && !$this->fs->isFolder($this->filePath)){ //That's fine, it's a new item. Gotta decide on whether it's a new file or a new folder. //We can te...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ft_do_action() {\n\tif (!empty($_REQUEST['act'])) {\n\n // Only one callback action is allowed. So only the first hook that acts on an action is run.\n ft_invoke_hook('action', $_REQUEST['act']);\n\n\t\t# mkdir\n\t\tif ($_REQUEST['act'] == \"createdir\" && CREATE === TRUE) {\n\t\t $_POST['newdir'] ...
[ "0.61983776", "0.6073772", "0.59637153", "0.59296346", "0.58117265", "0.5773746", "0.57436776", "0.57367045", "0.5692659", "0.564464", "0.557151", "0.5564243", "0.555162", "0.5541389", "0.55304736", "0.55248314", "0.5508534", "0.54884243", "0.548657", "0.54764295", "0.5442457...
0.71230143
0
Method to set the value of field xianshi_id
Метод установки значения поля xianshi_id
public function setXianshiId($xianshi_id) { $this->xianshi_id = $xianshi_id; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getXianshiId()\n {\n return $this->xianshi_id;\n }", "public function setXianshiName($xianshi_name)\n {\n $this->xianshi_name = $xianshi_name;\n\n return $this;\n }", "public function setXianshiPrice($xianshi_price)\n {\n $this->xianshi_price = $xiansh...
[ "0.7388896", "0.68640214", "0.66655296", "0.6329653", "0.61712044", "0.5996111", "0.5984924", "0.56931394", "0.56051147", "0.5584865", "0.5576188", "0.5575916", "0.55695736", "0.55405843", "0.55249405", "0.55087054", "0.55029976", "0.5437485", "0.5437485", "0.54135466", "0.54...
0.7398123
0
Method to set the value of field xianshi_name
Метод для установки значения поля xianshi_name
public function setXianshiName($xianshi_name) { $this->xianshi_name = $xianshi_name; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getXianshiName()\n {\n return $this->xianshi_name;\n }", "public function setXianshiTitle($xianshi_title)\n {\n $this->xianshi_title = $xianshi_title;\n\n return $this;\n }", "public function setXianshiPrice($xianshi_price)\n {\n $this->xianshi_price =...
[ "0.7268561", "0.703361", "0.6714571", "0.6678533", "0.6449094", "0.61552733", "0.61429065", "0.5668776", "0.558124", "0.55653095", "0.5545685", "0.5521844", "0.5468939", "0.5422925", "0.5415115", "0.54143775", "0.54143775", "0.54031855", "0.5348053", "0.5348053", "0.5344682",...
0.79185987
0
Method to set the value of field xianshi_title
Метод для установки значения поля xianshi_title
public function setXianshiTitle($xianshi_title) { $this->xianshi_title = $xianshi_title; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getXianshiTitle()\n {\n return $this->xianshi_title;\n }", "public function setTitle($value) {\n $this->title = $value;\n \n }", "public function setTitle($value) {\n $this->title = $value;\n }", "public function setTitle($value = ''){\n ...
[ "0.73349065", "0.70588523", "0.7049288", "0.70381534", "0.70381534", "0.7029753", "0.7022344", "0.70020753", "0.68404585", "0.68392664", "0.6811191", "0.6790988", "0.67374724", "0.6735323", "0.67281115", "0.6714296", "0.66930634", "0.6672434", "0.6631746", "0.66184866", "0.66...
0.76729715
0
Method to set the value of field xianshi_explain
Метод для установки значения поля xianshi_explain
public function setXianshiExplain($xianshi_explain) { $this->xianshi_explain = $xianshi_explain; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getXianshiExplain()\n {\n return $this->xianshi_explain;\n }", "public function setXianshiTitle($xianshi_title)\n {\n $this->xianshi_title = $xianshi_title;\n\n return $this;\n }", "public function setXianshiName($xianshi_name)\n {\n $this->xianshi_nam...
[ "0.7051049", "0.5544731", "0.55052507", "0.5472287", "0.5466504", "0.5312582", "0.5287099", "0.5287099", "0.52545375", "0.51817614", "0.51235574", "0.5109524", "0.5061868", "0.50151896", "0.49077952", "0.4893217", "0.48343074", "0.48301557", "0.4826437", "0.48119742", "0.4799...
0.770313
0
Method to set the value of field xianshi_price
Метод для установки значения поля xianshi_price
public function setXianshiPrice($xianshi_price) { $this->xianshi_price = $xianshi_price; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getXianshiPrice()\n {\n return $this->xianshi_price;\n }", "public function setPrice($value) {\n //può essere decimale o meno ma con solo 2 cifre dopo il punto\n $this->price = $value;\n \n }", "public function set_price($price)\n {\n }", "fu...
[ "0.70624936", "0.6525503", "0.64460564", "0.6432229", "0.6389497", "0.6352944", "0.63115543", "0.6284539", "0.6284539", "0.6279959", "0.6250149", "0.6220778", "0.62151426", "0.6182825", "0.6135558", "0.61112005", "0.6086341", "0.6064692", "0.60621256", "0.60541326", "0.602819...
0.707341
0
Method to set the value of field xianshi_recommend
Метод установки значения поля xianshi_recommend
public function setXianshiRecommend($xianshi_recommend) { $this->xianshi_recommend = $xianshi_recommend; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getXianshiRecommend()\n {\n return $this->xianshi_recommend;\n }", "public function setIsRecommend($is_recommend)\n {\n $this->is_recommend = $is_recommend;\n\n return $this;\n }", "public function setIsRecommend($is_recommend)\n {\n $this->is_recommen...
[ "0.6553282", "0.59313214", "0.59313214", "0.5373808", "0.5193503", "0.5150675", "0.49608395", "0.4933634", "0.48815262", "0.48424986", "0.48424986", "0.48326442", "0.4826201", "0.47401297", "0.4738494", "0.4724834", "0.46874398", "0.46796554", "0.46313047", "0.46209082", "0.4...
0.7524255
0
Method to set the value of field gc_id_1
Метод для установки значения поля gc_id_1
public function setGcId1($gc_id_1) { $this->gc_id_1 = $gc_id_1; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGcId1()\n {\n return $this->gc_id_1;\n }", "function setid_exp($val)\n { $this->id_exp=$val;}", "public function setID($value){\r\n $this->id = $value;\r\n }", "function setId($value)\n {\n $this->goods_id=$value;\n }", "public functi...
[ "0.6873417", "0.6288502", "0.62817854", "0.6194117", "0.616729", "0.6164725", "0.61327094", "0.6132599", "0.6132599", "0.61275554", "0.6116664", "0.6116664", "0.6112311", "0.61081064", "0.6093848", "0.6093461", "0.6051231", "0.60176384", "0.6004535", "0.60002965", "0.5996367"...
0.7053632
0
Returns the value of field xianshi_goods_id
Возвращает значение поля xianshi_goods_id
public function getXianshiGoodsId() { return $this->xianshi_goods_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGoodsId()\n {\n return $this->goods_id;\n }", "public function getGoodsId()\n {\n return $this->goods_id;\n }", "public function getGoodsId()\n {\n return $this->goods_id;\n }", "public function getGoodsId()\n {\n return $this->goods_id;\n ...
[ "0.7373596", "0.7373596", "0.7373596", "0.7373596", "0.723929", "0.7152709", "0.70259035", "0.6866603", "0.6488872", "0.6234027", "0.6216389", "0.61705536", "0.61471283", "0.6049838", "0.5983355", "0.57205313", "0.5603136", "0.55819756", "0.55583686", "0.5524463", "0.5485902"...
0.86101675
0
Returns the value of field xianshi_id
Возвращает значение поля xianshi_id
public function getXianshiId() { return $this->xianshi_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getXianshiGoodsId()\n {\n return $this->xianshi_goods_id;\n }", "public function setXianshiId($xianshi_id)\n {\n $this->xianshi_id = $xianshi_id;\n\n return $this;\n }", "public function getXianshiName()\n {\n return $this->xianshi_name;\n }", "pu...
[ "0.72085345", "0.68100625", "0.67055255", "0.6390549", "0.63519794", "0.61368644", "0.60753995", "0.604206", "0.59466124", "0.59317464", "0.5808281", "0.5649744", "0.56288785", "0.5606301", "0.5605578", "0.5575925", "0.55451125", "0.5222946", "0.51916933", "0.517728", "0.5100...
0.83937615
0
Returns the value of field xianshi_name
Возвращает значение поля xianshi_name
public function getXianshiName() { return $this->xianshi_name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setXianshiName($xianshi_name)\n {\n $this->xianshi_name = $xianshi_name;\n\n return $this;\n }", "public function getXianshiTitle()\n {\n return $this->xianshi_title;\n }", "public function getXianshiId()\n {\n return $this->xianshi_id;\n }", "pub...
[ "0.72375625", "0.7226912", "0.69097584", "0.6347758", "0.6342719", "0.6322634", "0.6123477", "0.6070959", "0.59352106", "0.58978325", "0.55967194", "0.5578309", "0.55344176", "0.5529264", "0.5433238", "0.52755886", "0.5253613", "0.52325875", "0.5205077", "0.516859", "0.516840...
0.8094838
0
Returns the value of field xianshi_title
Возвращает значение поля xianshi_title
public function getXianshiTitle() { return $this->xianshi_title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setXianshiTitle($xianshi_title)\n {\n $this->xianshi_title = $xianshi_title;\n\n return $this;\n }", "public function getXianshiName()\n {\n return $this->xianshi_name;\n }", "function getScientificTitle() {\n\t\treturn $this->getData('scientificTitle');\n\t}", ...
[ "0.7097816", "0.6979449", "0.6845013", "0.6782824", "0.6761019", "0.6638131", "0.66121966", "0.6558455", "0.65390813", "0.6532527", "0.6502209", "0.6475617", "0.64379877", "0.6437468", "0.6437468", "0.64239275", "0.6393306", "0.6384891", "0.6384891", "0.63807535", "0.63628864...
0.8437096
0
Returns the value of field xianshi_explain
Возвращает значение поля xianshi_explain
public function getXianshiExplain() { return $this->xianshi_explain; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setXianshiExplain($xianshi_explain)\n {\n $this->xianshi_explain = $xianshi_explain;\n\n return $this;\n }", "public function getXianshiRecommend()\n {\n return $this->xianshi_recommend;\n }", "public function getXianshiTitle()\n {\n return $this->xian...
[ "0.7041051", "0.6310597", "0.5881042", "0.5874607", "0.565974", "0.5621845", "0.547041", "0.5265674", "0.5216803", "0.5187442", "0.5172187", "0.5129118", "0.5123396", "0.50913554", "0.50675493", "0.49410117", "0.4893299", "0.4893299", "0.48925444", "0.48714557", "0.48676425",...
0.84585494
0
Returns the value of field goods_id
Возвращает значение поля goods_id
public function getGoodsId() { return $this->goods_id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getId()\n {\n return $this->goods_id;\n }", "public function getGoods_id()\r\n {\r\n \t return $this->_goods_id;\r\n }", "function getIdName()\n {\n return \"goods_id\";\n }", "public function getXianshiGoodsId()\n {\n return $this->xianshi...
[ "0.7852105", "0.76328504", "0.71031594", "0.6538027", "0.6534092", "0.65305775", "0.64494175", "0.6424306", "0.6334309", "0.63284844", "0.6263857", "0.6215313", "0.60915774", "0.60630673", "0.6054426", "0.599317", "0.5992746", "0.59846467", "0.5960372", "0.59139866", "0.58471...
0.7742708
1
Returns the value of field goods_name
Возвращает значение поля goods_name
public function getGoodsName() { return $this->goods_name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGoods_name()\r\n {\r\n \t return $this->_goods_name;\r\n }", "public function getMansongGoodsName()\n {\n return $this->mansong_goods_name;\n }", "public function setGoods_name($value)\r\n {\r\n \t$this->_goods_name = $value;\r\n }...
[ "0.7965119", "0.67473185", "0.6516067", "0.6455233", "0.63550806", "0.6326803", "0.62758297", "0.6187772", "0.61783594", "0.6164945", "0.61269826", "0.61192435", "0.6062651", "0.60601866", "0.60513633", "0.60503894", "0.6047668", "0.60149884", "0.6013395", "0.6009931", "0.600...
0.803566
0
Returns the value of field goods_price
Возвращает значение поля goods_price
public function getGoodsPrice() { return $this->goods_price; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrice() \n {\n return $this->_fields['Price']['FieldValue'];\n }", "public function getPrice()\n {\n return $this->source['real_price'];\n }", "public function getPrice()\n {\n return $this->_fields['Price']['FieldValue'];\n }", "public function getPrice()\n ...
[ "0.74170625", "0.7385456", "0.73690814", "0.72304326", "0.71203923", "0.71153957", "0.70978147", "0.70933443", "0.7066839", "0.70556486", "0.7042964", "0.7042964", "0.70424217", "0.7034055", "0.701802", "0.69929", "0.69752324", "0.69752324", "0.69752324", "0.69752324", "0.697...
0.8012701
1
Returns the value of field xianshi_price
Возвращает значение поля xianshi_price
public function getXianshiPrice() { return $this->xianshi_price; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setXianshiPrice($xianshi_price)\n {\n $this->xianshi_price = $xianshi_price;\n\n return $this;\n }", "public function getPriceValue()\n {\n return $this->price_value;\n }", "public function getPrice(): float;", "public function getShowPriceWithTax();", "func...
[ "0.6801414", "0.61561936", "0.6047966", "0.601993", "0.5928103", "0.5878698", "0.5846551", "0.58337927", "0.5820612", "0.57973576", "0.57568467", "0.57131904", "0.57131904", "0.57131904", "0.56982696", "0.5696845", "0.56735814", "0.5660135", "0.5656461", "0.56501395", "0.5637...
0.85229355
0
Returns the value of field goods_image
Возвращает значение поля goods_image
public function getGoodsImage() { return $this->goods_image; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGoodsPicture()\r\n {\r\n \t return $this->_goodsPicture;\r\n }", "public function get_image()\n\t{\n\t\treturn ( $this->_data['image'] ) ? (string) \\IPS\\File::get( 'nexus_Products', $this->_data['image'] )->url : NULL;\n\t}", "public function GetImage() {\n\t\tretur...
[ "0.76508015", "0.707012", "0.7018326", "0.6942699", "0.6818623", "0.6771124", "0.67210317", "0.67120034", "0.66593486", "0.6654517", "0.6644997", "0.6638276", "0.6593359", "0.6583897", "0.6573933", "0.65735024", "0.65550363", "0.65426826", "0.6539738", "0.6526677", "0.6526677...
0.81869954
0
Returns the value of field lower_limit
Возвращает значение поля lower_limit
public function getLowerLimit() { return $this->lower_limit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLowerLimit($minVal) {\n\t\t\tglobal $graphMin;\n\t\t\treturn floor($minVal) * $graphMin;\n\t\t}", "public function setLowerLimit($lower_limit)\n {\n $this->lower_limit = $lower_limit;\n }", "public function setLowerLimit($lower_limit)\n {\n $this->lower_limit = $lower_limit;\...
[ "0.7361631", "0.6908161", "0.68032724", "0.66714287", "0.6656872", "0.65428483", "0.64582294", "0.64143705", "0.6385011", "0.6383546", "0.6367695", "0.6349643", "0.6349643", "0.6330407", "0.6328993", "0.63155496", "0.63129705", "0.6304109", "0.62957054", "0.6290577", "0.62745...
0.85500944
0
Returns the value of field xianshi_recommend
Возвращает значение поля xianshi_recommend
public function getXianshiRecommend() { return $this->xianshi_recommend; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setXianshiRecommend($xianshi_recommend)\n {\n $this->xianshi_recommend = $xianshi_recommend;\n\n return $this;\n }", "public function getXianshiExplain()\n {\n return $this->xianshi_explain;\n }", "public function getXianshiPrice()\n {\n return $this->...
[ "0.69407463", "0.64690375", "0.5531655", "0.5336442", "0.5319956", "0.5319956", "0.51469713", "0.5090751", "0.50687337", "0.50086206", "0.49807036", "0.49574646", "0.49212515", "0.4916802", "0.48784184", "0.487445", "0.4869418", "0.48061475", "0.48060864", "0.4797622", "0.475...
0.8079259
0
Returns the value of field gc_id_1
Возвращает значение поля gc_id_1
public function getGcId1() { return $this->gc_id_1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGcId()\n {\n return $this->gc_id;\n }", "public function getGcId()\n {\n return $this->gc_id;\n }", "public function setGcId1($gc_id_1)\n {\n $this->gc_id_1 = $gc_id_1;\n\n return $this;\n }", "public function getGid()\n {\n $value = ...
[ "0.72611", "0.72611", "0.66993827", "0.6666088", "0.6453052", "0.6336125", "0.6326771", "0.6187882", "0.61788833", "0.6160862", "0.61289847", "0.612616", "0.6086047", "0.6077742", "0.60749304", "0.60618204", "0.60505193", "0.5973752", "0.5964659", "0.5946335", "0.5922485", ...
0.8387938
0
Encode the notification response data into the appropriate format for Sagepay
Закодируйте данные ответа уведомления в соответствующий формат для Sagepay
function _uc_sagepay_encode_response($data) { $output = ''; foreach ($data as $key => $value) { $output .= $key . "=" . $value . "\r\n"; } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function encodePayload($data);", "protected function generatePayload() {\r\n header('Content-type: text/json');\r\n header('Content-type: application/json');\r\n return json_encode($this->getView()->getPayload());\r\n }", "final public function getResponseData(): stri...
[ "0.62641025", "0.59780836", "0.5890621", "0.5786864", "0.5776197", "0.5772729", "0.5733889", "0.56927633", "0.56620413", "0.56478214", "0.56328464", "0.56167626", "0.55977744", "0.55946636", "0.5574555", "0.5566436", "0.55664146", "0.55598146", "0.5551647", "0.55487466", "0.5...
0.71529937
0
Scrape RHMZ to get radar map image URL. Two pages need to be scrapped with HTML DOM parser to find image URL. On the first page, with id 'napomena350_450' needs to be found. Next step is to loop through each in table in it. Then, we need to find only s with class 'bela75'. We actually need third . In it we loop through...
Извлеките RHMZ, чтобы получить URL изображения радарной карты. Нужно извлечь две страницы с помощью парсера HTML DOM, чтобы найти URL изображения. На первой странице, с идентификатором 'napomena350_450', необходимо найти таблицу. Далее нужно пройтись по каждому элементу в таблице и найти только те, у которых класс 'bel...
public static function rhmz() { // Set URL of the first page that we need to scrape $page_1_url = 'http://www.hidmet.gov.rs/ciril/osmotreni/radarska.php'; // Open page and get its content $page_1 = wp_remote_retrieve_body( wp_remote_get( $page_1_url ) ); // Load content in HTML DOM parser $dom = HtmlDomPa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function omsz() {\n\t\t// Set URL of the first page that we need to scrape\n\t\t$page_1_url = 'http://www.met.hu/en/idojaras/aktualis_idojaras/radar/main.php';\n\n\t\t// Open page and get its content\n\t\t$page_1 = wp_remote_retrieve_body( wp_remote_get( $page_1_url ) );\n\n\t\t// Find position of st...
[ "0.65323865", "0.5960374", "0.5808858", "0.57937527", "0.5785067", "0.5770636", "0.5676957", "0.5637901", "0.55937195", "0.5584713", "0.5558373", "0.5528477", "0.5525996", "0.5492922", "0.5437742", "0.5437742", "0.53623325", "0.53476423", "0.5338861", "0.53182435", "0.5318224...
0.7441938
0
Scrape OMSZ to get radar map image URL. Page need to be scrapped with simple string functions. Reasons for this is because that page has inline JavaScript with recent values. Just find starting position of that array, increase it with number of searched charachters and get fixed lenght.
Скачайте OMSZ, чтобы получить URL изображения радара. Страницу необходимо парсить с помощью простых строковых функций. Причиной этого является то, что на странице есть встроенный JavaScript с последними значениями. Просто найдите начальную позицию этого массива, увеличьте её на количество искомых символов и получите фи...
public static function omsz() { // Set URL of the first page that we need to scrape $page_1_url = 'http://www.met.hu/en/idojaras/aktualis_idojaras/radar/main.php'; // Open page and get its content $page_1 = wp_remote_retrieve_body( wp_remote_get( $page_1_url ) ); // Find position of start of array $pos = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function PorSearch($key)\n{\n $okKey = str_replace(' ', '%20', $key);\n $html = file_get_contents('https://www.porzo.com/search/'.$okKey);\n //Create a new DOM document\n $dom = new DOMDocument;\n \n //Parse the HTML. The @ is used to suppress any parsing errors\n //that will be thrown if the $html string i...
[ "0.55186164", "0.5426047", "0.54002047", "0.5342954", "0.5164101", "0.5135213", "0.50857204", "0.5052705", "0.50315076", "0.49667856", "0.49564484", "0.49524948", "0.48985308", "0.48849213", "0.4871604", "0.4871604", "0.48669457", "0.48433974", "0.48259008", "0.48235106", "0....
0.7227591
0
Scrape forecast from SerbianMeteo feed.
Собирать прогноз из потока SerbianMeteo.
public static function serbianmeteo() { // Feed cache last for one hour add_filter( 'wp_feed_cache_transient_lifetime', function( $time ) { return HOUR_IN_SECONDS; } ); // Prepare an empty forecast info $forecast = array(); // Set URL of feed $feed = 'http://serbianmeteo.com/category/vremenska-progno...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mhr_process_weather_forecast() {\n\t\t//Initialize the Zip code\n\t\t$zip = esc_attr(get_option('weather-location-zip'));\n\t\t// use Curl for forecast_URL\n\t\t$handle_f = curl_init();\n\t\t$forecast_url = 'https://api.openweathermap.org/data/2.5/forecast?zip=' . \"$zip\" . ',us&APPID=2cdcc7fc74739e655ab...
[ "0.66189104", "0.6321222", "0.62092054", "0.61953616", "0.5981055", "0.59281427", "0.58981305", "0.58689064", "0.57843506", "0.5745096", "0.5744368", "0.5732021", "0.572034", "0.5690994", "0.5650651", "0.5646384", "0.56450784", "0.5633573", "0.5627709", "0.5614105", "0.560308...
0.7890832
0
Get timestamp used for time related database fields in the cron tables Note: The timestamp used will change from Magento 2.1.7 to 2.2.0 and these changes are branched by Magento version in this method.
Получить временной штамп, используемый для полей базы данных, связанных со временем, в таблицах крона. Примечание: временной штамп, используемый в этом методе, изменится с Magento 2.1.7 на 2.2.0, и эти изменения ветвляются в зависимости от версии Magento.
protected function getCronTimestamp() { /* @var $version string e.g. "2.1.7" */ $version = $this->productMetadata->getVersion(); if (version_compare($version, '2.2.0') >= 0) { return $this->dateTime->gmtTimestamp(); } return $this->timezone->scopeTimeStamp(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSchedulerTimeMysql()\n {\n return $this->convertTimestampForMysql($this->_timezone->scopeTimeStamp());\n }", "protected function getTimestamp() {\n\t\treturn time();\n\t}", "public function getTimestamp();", "public function getTimestamp();", "public function getTimestamp();...
[ "0.7346987", "0.7115903", "0.701267", "0.701267", "0.701267", "0.701267", "0.701267", "0.701267", "0.701267", "0.701267", "0.701267", "0.701267", "0.6968909", "0.6911739", "0.68102616", "0.67877614", "0.6780011", "0.6774349", "0.6768052", "0.6767081", "0.6747791", "0.674644...
0.74453664
0
Lists all DomesticFreight models.
Список всех моделей DomesticFreight.
public function actionIndex() { $searchModel = new DomesticFreightSearch(); $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 if (! Gate::allows('rail_freight_access')) {\n return abort(401);\n }\n\n\n if (request('show_deleted') == 1) {\n if (! Gate::allows('rail_freight_delete')) {\n return abort(401);\n }\n $rail_freights =...
[ "0.6400359", "0.6191397", "0.61749357", "0.6152413", "0.6112312", "0.5925021", "0.5919406", "0.5894973", "0.58877665", "0.5785382", "0.57774436", "0.57746047", "0.5734866", "0.57026184", "0.568974", "0.5684054", "0.5680069", "0.5673763", "0.56669235", "0.5661263", "0.5648624"...
0.7744484
0
Returns the inner immutable datetime object
Возвращает внутренний неизменяемый объект datetime
public function getDateTime(): DateTimeImmutable { return $this->dateTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cloneDateTime() {\n\t\treturn clone $this;\n\t}", "function &dateTime()\n {\n $time = new eZDateTime();\n $time->setTimeStamp( $this->Date );\n \n return $time;\n }", "public function now(): DateTimeImmutable;", "public function getPhpDateTime() {\n return clone $...
[ "0.66518044", "0.65819186", "0.6575713", "0.6548096", "0.6511432", "0.64957356", "0.64932376", "0.64738524", "0.64658064", "0.6429237", "0.63875806", "0.6323163", "0.63049096", "0.62868893", "0.6228788", "0.6191774", "0.61887693", "0.6187829", "0.61861783", "0.618449", "0.617...
0.71788436
0
Checks whether the date is the current date
Проверяет, является ли дата текущей датой
public function isCurrentDate(): bool { $today = date('Y-m-d'); $thisDay = $this->getDateTime()->format('Y-m-d'); return $today === $thisDay; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isCurrentDate(): bool;", "protected function isToday()\n {\n $now = new \\DateTime();\n\n return $now->format('Y-m-d') === $this->date->format('Y-m-d');\n }", "public function isToday() : bool\n {\n return date('Ymd', $this->getTimestamp()) == date('Ymd');\n }",...
[ "0.8606143", "0.78547984", "0.76389146", "0.7481638", "0.7128302", "0.7116478", "0.69180775", "0.6859159", "0.68059844", "0.6715368", "0.6663806", "0.662949", "0.66139984", "0.65849787", "0.65435857", "0.64948726", "0.6474204", "0.6464457", "0.6432972", "0.6395459", "0.635712...
0.86261684
0
Checks whether the week is the current week
Проверяет, является ли неделя текущей недельной
public function isCurrentWeek(): bool { $today = date('Y-m-W'); $thisDay = $this->getDateTime()->format('Y-m-W'); return $today === $thisDay; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isCurrentWeek(): bool;", "public function checkIfWeekStarted()\n\t{\n\t\tif ( !(self::$currentWeek) && !($week) )\n\t\t{\n\t\t\t$this->deduceCurrentWeek();\n\t\t}\n\n\t\t// Prepare the SQL query that will be used to fetch all the current week's games that have already begun\n\t\t$this->prepareSta...
[ "0.8880278", "0.747177", "0.7181178", "0.7090255", "0.7067472", "0.6960011", "0.6766008", "0.67402595", "0.66842645", "0.6633874", "0.6623032", "0.66074115", "0.6548435", "0.6362175", "0.63549435", "0.63206846", "0.6315764", "0.6254193", "0.62075406", "0.6139354", "0.6134722"...
0.8783066
1
Salary Calendar PDF Output Helper Method
Метод помощи для вывода календаря зарплат в формате PDF
function pdfCalendar( $month, $year, $timesheetData){ if(request()->route()->parameters != null) { $month = request()->route()->parameters['month']; $year = request()->route()->parameters['year']; } if (empty($month)) { $month =date('m'); } if (empty($year)) { $yea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pdfHourlyCalendar( $month, $year, $timesheetData){\n\n\n if(request()->route()->parameters != null) {\n $month = request()->route()->parameters['month'];\n $year = request()->route()->parameters['year'];\n }\n\n if (empty($month)) {\n $month =date('m');\n\n }\n if (empt...
[ "0.67664045", "0.66864043", "0.66183573", "0.65442306", "0.6525484", "0.635145", "0.6325323", "0.62813944", "0.62483835", "0.6240681", "0.62304527", "0.62201387", "0.6179713", "0.6178767", "0.61755854", "0.6127319", "0.60441756", "0.60010874", "0.59923494", "0.599025", "0.597...
0.71136147
0
Hourly Calendar PDF Output Helper Method
Помощь метода PDF-выхода почасового календаря
function pdfHourlyCalendar( $month, $year, $timesheetData){ if(request()->route()->parameters != null) { $month = request()->route()->parameters['month']; $year = request()->route()->parameters['year']; } if (empty($month)) { $month =date('m'); } if (empty($year)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pdfCalendar( $month, $year, $timesheetData){\n\n if(request()->route()->parameters != null) {\n $month = request()->route()->parameters['month'];\n $year = request()->route()->parameters['year'];\n }\n\n if (empty($month)) {\n $month =date('m');\n\n }\n if (empty($year)...
[ "0.7655828", "0.6661401", "0.660715", "0.6524229", "0.6447716", "0.6393721", "0.6313585", "0.62106234", "0.61635214", "0.61608523", "0.61310285", "0.6124499", "0.61037225", "0.6068751", "0.60133487", "0.59955376", "0.59598756", "0.5957555", "0.59446025", "0.59421253", "0.5938...
0.78542393
0
Google Analytics tracking ID input
Ввод идентификатора Google Analytics
public function google_analytics_tracking_id_callback() { printf( '<input type="text" id="ga_tracking_id" name="viderum_settings[ga_tracking_id]" value="%s" />', isset( $this->options['ga_tracking_id'] ) ? esc_attr( $this->options['ga_tracking_id'] ) : '' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getGaTrackingId() {\n\t\t$this->trackingId = get_option( 'ic-ga-tracking-id' );\n\t}", "private function get_google_analytics_tracking_id() {\n\t\tif ( isset( $this->google_analytics_tracking_id ) ) {\n\t\t\treturn $this->google_analytics_tracking_id;\n\t\t}\n\t\t$this->google_analytics_tracking...
[ "0.76635593", "0.7438348", "0.7201589", "0.7000239", "0.68994415", "0.685136", "0.6631181", "0.65103555", "0.64472014", "0.64157647", "0.6342677", "0.63011104", "0.6273824", "0.6255517", "0.62299705", "0.6176385", "0.6135867", "0.6089136", "0.60820585", "0.60572296", "0.60564...
0.8036842
0
Google Search Console verification ID input
Ввод идентификатора проверки Google Search Console
public function google_search_console_verification_id_callback() { printf( '<input type="text" id="gsc_verification_id" name="viderum_settings[gsc_verification_id]" value="%s" />', isset( $this->options['gsc_verification_id'] ) ? esc_attr( $this->options['gsc_verification_id'] ) : '' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function verify_google_auth()\n {\n try {\n $id = $this->input->get_post('enc_id', TRUE);\n $id = $this->general->getAdminDecodeURL($id);\n $code = $this->input->get_post('code', TRUE);\n if (empty($id) || empty($code)) {\n throw new Excep...
[ "0.5557056", "0.5547415", "0.5385941", "0.53809", "0.53516895", "0.5345334", "0.5318191", "0.53098124", "0.5277254", "0.5258182", "0.5180777", "0.51720285", "0.51418984", "0.5116953", "0.5107608", "0.5103968", "0.50971174", "0.5092853", "0.5069505", "0.5060023", "0.5049444", ...
0.728184
0
sql_read : read data from database by SQL statement
sql_read : чтение данных из базы данных с помощью SQL-запроса
public function sql_read($sql, $params=array()){ if( empty($this->_database) ){ return false; } return $this->_database->sql_read($sql, $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Read($sql)\r\n\t\t{\r\n\t\t\t$stmt = $this->conn->prepare($sql);\r\n\t\t\t$stmt->execute();\r\n\t\t\t$result = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\treturn $result;\r\n\t\t}", "public function executeReadSql($sql, $params=array()) {\n return $this->sql_read($sql, $params);\n }", ...
[ "0.70779896", "0.70727783", "0.7010011", "0.6979764", "0.69790757", "0.6975912", "0.69109327", "0.6898178", "0.68946785", "0.6861665", "0.6789093", "0.6783661", "0.675165", "0.6694846", "0.66726387", "0.6657562", "0.66508794", "0.66127485", "0.6600393", "0.6564338", "0.654044...
0.72423434
0
sql_write : write data into database by SQL statement
sql_write : запись данных в базу данных с помощью SQL-запроса
public function sql_write($sql, $params=array()){ if( empty($this->_database) ){ return false; } return $this->_database->sql_write($sql, $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function executeWriteSql($sql, $params=array()) {\n return $this->sql_write($sql, $params);\n }", "public function write() {\n $this->prepare_dataset();\n $op = 'insupd';\n switch($this->insupd()) {\n case 'OK':\n return \"OK $op\";\n case 'CREATE':\n $op = 'create';\n if...
[ "0.6901396", "0.6738421", "0.6645121", "0.6642298", "0.637095", "0.6312042", "0.6272618", "0.6267939", "0.6218739", "0.6178669", "0.6156716", "0.6132839", "0.61039966", "0.6071687", "0.60318744", "0.6031338", "0.60284036", "0.596948", "0.5940225", "0.5896899", "0.5886241", ...
0.72943276
0
///////////////////////////////////////////////////////////////////////////// Code copied from existing projects ///////////////////////////////////////////////////////////////////////////// executeReadSql : query sql.
///////////////////////////////////////////////////////////////////////////// Код скопирован из существующих проектов ///////////////////////////////////////////////////////////////////////////// executeReadSql : выполнить запрос sql.
public function executeReadSql($sql, $params=array()) { return $this->sql_read($sql, $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function generateReadSQL() {\n if ( $this->sqlStatement == null ) {\n \t\n \tif ( empty($this->fields))\t{\n \t\t$this->loadColumns();\n \t}\n \t\n // Build SQL statement\n $sql = \"SELECT `\".implode(\"`, `\", array_keys($this->fields))...
[ "0.7390857", "0.6836114", "0.649655", "0.64221007", "0.6388005", "0.63600796", "0.6305849", "0.6292031", "0.62451094", "0.6244029", "0.6210757", "0.6209275", "0.61915195", "0.61855507", "0.6184452", "0.61678225", "0.6120743", "0.61150193", "0.61127234", "0.6104871", "0.610435...
0.7158527
1
executeWriteSql : query sql.
executeWriteSql : выполнить sql-запрос.
public function executeWriteSql($sql, $params=array()) { return $this->sql_write($sql, $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sql_write($sql, $params=array()){\n if( empty($this->_database) ){\n return false;\n }\n return $this->_database->sql_write($sql, $params);\n }", "public function executeSQL($sql);", "public function execute($sql);", "public function execute($sql);", "publ...
[ "0.7046182", "0.65787476", "0.6474488", "0.6474488", "0.6474488", "0.630462", "0.6284167", "0.6276338", "0.62665194", "0.62574905", "0.62121785", "0.61342114", "0.6079024", "0.5992166", "0.5957924", "0.5920613", "0.58173084", "0.58001465", "0.57878536", "0.57574034", "0.57365...
0.72230476
0
get_app : get app instance for current worker process
get_app : получение экземпляра приложения для текущего процесса работника
public static function get_app(){ return AppServer::get_instance()->get_app(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getApp()\n\t{\n\t\treturn self::getInstance()->app;\n\t}", "static public function getApp()\n\t{\n\t\treturn self::$application;\n\t}", "public static function getApp()\n {\n return self::$app;\n }", "public function get_app() {\n return $this->app;\n }", "publ...
[ "0.7758425", "0.7709224", "0.752033", "0.7513318", "0.7507114", "0.7480788", "0.746476", "0.746476", "0.746476", "0.746476", "0.7454735", "0.74470925", "0.7414922", "0.7387298", "0.7387298", "0.7387298", "0.72980046", "0.7242336", "0.71905124", "0.71633804", "0.71324325", "...
0.80367845
0
Evaluates a boolean I'll cast the boolean to an integer.
Оценивает булево значение. Я преобразую булево значение в целое число.
private function evaluateBool(bool $value): int { return (int) $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bool2int($input) {\n if ($input) {\n return 1;\n }\n return 0;\n}", "#[@test]\n public function bool_as_int() {\n $this->assertEquals(1, $this->fixture->convert(Primitive::$INT, TRUE));\n $this->assertEquals(0, $this->fixture->convert(Primitive::$INT, FALSE));\n }", "fu...
[ "0.7666507", "0.75342685", "0.74396515", "0.74223256", "0.6862949", "0.6785388", "0.6708763", "0.6609351", "0.6532832", "0.6501738", "0.6464531", "0.64163435", "0.64007145", "0.6371919", "0.6356312", "0.63515186", "0.62311584", "0.6127921", "0.6109575", "0.605913", "0.6038506...
0.77830327
0
Evaluates a currency string (e.g., "$100")
Оценивает строку валюты (например, "$100")
private function evaluateCurrency(string $value) { // if the string doesn't start with dollar-sign, short-circuit if (substr($value, 0, 1) !== '$') { return false; } // otherwise, re-evaluate the number less the dollar sign return $this(substr($value, 1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function currencyParser($stringPrice){\n $stringPrice = htmlentities($stringPrice);\n $stringPrice = str_replace(',','.',$stringPrice); // The database does not recognize , so they will be replaced with .\n if (!is_numeric(substr($stringPrice,0,1))){ // If the first value is not a number it will be a dollar/eur...
[ "0.6698229", "0.639456", "0.62885773", "0.62812203", "0.62136006", "0.60480094", "0.5904502", "0.58987516", "0.5828724", "0.58201855", "0.57923", "0.57831526", "0.57634395", "0.57587236", "0.5680825", "0.56706506", "0.56598914", "0.56312203", "0.56215465", "0.56115115", "0.55...
0.77830315
0
Evaluates an object Honestly, this method SHOULD NOT be used on objects. However, unlike PHP's native intval() or floatval() methods, I will not raise an error. I will always evaluate objects to 1.
Оценивает объект Честно говоря, этот метод НЕ ДОЛЖЕН использоваться для объектов. Однако, в отличие от встроенных в PHP методов intval() или floatval(), я не вызову ошибку. Я всегда оцениваю объекты как 1.
private function evaluateObject($value): int { return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function evaluate($value)\n {\n return is_object($value);\n }", "#[@test]\n public function objectIsNotEqualToPrimitive() {\n $o= new Object();\n $this->assertFalse($o->equals(0));\n }", "public function It_should_compare_correctly_at_an_object_level()\n\t{\n\t\t$numeric = P...
[ "0.6663631", "0.6321381", "0.6111599", "0.5818152", "0.56749976", "0.5445602", "0.539838", "0.5375442", "0.53305894", "0.5328414", "0.5315944", "0.5310738", "0.5300421", "0.52731913", "0.52720207", "0.52653724", "0.5213541", "0.52054", "0.51893616", "0.5162645", "0.5140948", ...
0.7399576
0
Evaluates a percent string
Оценивает строку процента
private function evaluatePercent(string $value) { // if the string doesn't end with percent sign, short-circuit if (substr($value, -1) !== '%') { return false; } // re-evaluate the value without the dollar sign return $this(substr($value, 0, -1)) / 100; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function percent($argue){\n \n}", "public function levenshteinPercent($string) {\n if($string instanceof AdvanceStringProcesser) {\n $string = $string->get();\n }\n return PortableStringProcesser::levenshteinPercent($this->_s, $string);\n }", "public function metaphonePerc...
[ "0.730487", "0.7039483", "0.6868756", "0.67148364", "0.66368747", "0.6632244", "0.6583704", "0.65317166", "0.64446807", "0.64369327", "0.62780607", "0.62195706", "0.62195706", "0.6210727", "0.6190388", "0.618438", "0.6106623", "0.6093649", "0.6031704", "0.6000208", "0.5993121...
0.80726737
0
Evaluates a string value I can handle a few scenarios: 1. The string is a thousandsseparated number (e.g., "1,000"). 2. The string is a fraction or mixed number (e.g., "1/2"). 3. The string is a named number (e.g., "one hundred"). 4. The string is a suffixed number (e.g., "1st") 5. The string is a percent (e.g., "1%") ...
Оценивает строковое значение, которое я могу обработать в нескольких сценариях: 1. Строка представляет собой число с разделителем тысяч (например, "1,000"). 2. Строка представляет собой дробь или смешанное число (например, "1/2"). 3. Строка представляет собой число, выраженное словами (например, "one hundred"). 4. Стро...
private function evaluateString(string $value) { // trim the value $value = trim($value); // if the value is an empty string, short-circuit if ( ! strlen($value)) { return false; } // otherwise, attempt to evaluate the string if (false !== ($number = $this->evalua...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function es_decimal($string) {\n if (!preg_match('/[0-9]+(\\.[0-9][0-9]?)?/', $string)) {\n return false;\n } else {\n return true;\n }\n }", "function checkNumeric($value)\n\t{\n\t\t//declare var\n\t\t$resStr\t= '';\n\t\t\n\t\tif(!preg_match('/^0*|[1-9][0-9]*$/',$va...
[ "0.6514264", "0.6389838", "0.63490784", "0.63390356", "0.6262241", "0.6209242", "0.62057686", "0.6190729", "0.61755764", "0.6145071", "0.6134647", "0.61334056", "0.609612", "0.60195154", "0.6017476", "0.59692705", "0.59624934", "0.59550834", "0.5950278", "0.592821", "0.590139...
0.74966663
0
Evaluates a thousandsseparated number (e.g., "1,000")
Оценивает число с разделением тысяч (например, "1,000")
private function evaluateThousandsSeparatedNumber(string $value) { // if the value is not a thousands-separated value, short-circuit if ( ! preg_match('#^([1-9](?:\d*|(?:\d{0,2})(?:,\d{3})*)(?:\.\d*[0-9])?|0?\.\d*[0-9]|0)$#', $value)) { return false; } // otherwise, stri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function thousands($val)\r\n{\r\n\tif (abs($val) >= 10000000)\r\n\t{\r\n\t\treturn intval($val/1000000).'M';\r\n\t}\r\n\t// over 10k show in k (thousands)\r\n\telse if (abs($val) >= 10000)\r\n\t{\r\n\t\treturn intval($val/1000).'k';\r\n\t}\r\n\telse\r\n\t{\r\n\t\treturn intval($val);\r\n\t}\r\n}", "function test...
[ "0.71765316", "0.7009973", "0.6853576", "0.67517936", "0.6664322", "0.663163", "0.66040504", "0.6548485", "0.6231816", "0.622041", "0.6179482", "0.6164809", "0.6162825", "0.61284274", "0.6096864", "0.6071935", "0.60647666", "0.6063747", "0.6062555", "0.6060992", "0.60597664",...
0.76721317
0
Set the table heading Can be passed as an array or discreet params
Установите заголовок таблицы. Может быть передан как массив или отдельные параметры
function set_heading() { $args = func_get_args(); $this->heading = $this->_prep_args($args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_table_heads($array) {\n if ( !is_array($array) )\n return false;\n\n // set vars\n $html = '';\n\n // foreach loop\n foreach ($array as $item) {\n $row_title = str_replace(array('_'), ' ', $item);\n $html .= '<th>'.__($row_title, 'default').'</th>';\n }\n\n re...
[ "0.7148354", "0.7139806", "0.71105146", "0.70984226", "0.7068402", "0.69791156", "0.6836027", "0.6830637", "0.67157805", "0.6706597", "0.66792643", "0.666753", "0.66381234", "0.6608259", "0.65839297", "0.6559581", "0.6541847", "0.652202", "0.6505052", "0.64950496", "0.6486155...
0.77137613
0
set_datatables option or enable it. Takes a onedimensional array as input and set defaults options in vanilla data table generation scripts. each option must be parset independient. if optionkey its "defaults" will generate defualt code js
установить параметр set_datatables или включить его. В качестве входных данных используется одномерный массив, и устанавливаются параметры по умолчанию в скриптах генерации базовых таблиц данных. каждый параметр должен быть обработан независимо. если ключ параметра "defaults", будет сгенерирован код js по умолчанию
function set_datatables($options = array()) { $jsoptions = ''; $this->enabledatatable = '1'; if ( ! is_array($options)) { if ( $options === FALSE ) $this->enabledatatable = '0'; $options = array($options); } if (count($options) === 0) { $options = array("sortable" => "true", "searchable" =...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addOptions()\n {\n if (! array_key_exists('order', $this->datatableOptions) && ! empty($this->defaultOrder)) {\n if (is_array($this->defaultOrder)) {\n foreach ($this->defaultOrder as $keyOrder => $order) {\n if (is_string($order[0])) {\n ...
[ "0.5946123", "0.57984567", "0.57313454", "0.56590664", "0.5432445", "0.5426402", "0.5404405", "0.5349437", "0.533606", "0.5328298", "0.5304524", "0.52984565", "0.5282926", "0.5231119", "0.52187985", "0.5216204", "0.5183316", "0.5174746", "0.51731277", "0.51705486", "0.5149597...
0.7535578
0
Set "empty" cells Can be passed as an array or discreet params
Ячейки "пустые" могут быть переданы как массив или отдельными параметрами
function set_empty($value) { $this->empty_cells = $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clear(){\n\t$this->cell(0,0,34,'a',0,0,'c');\n}", "public function set_data_empty() {\n\t\t$this->data = array();\n\t\tforeach ($this->fields as $field) {\n\t\t\t$this->data[$field] = null;\n\t\t}\n\t\t$this->data['set_from'] = 'empty';\n\t}", "private function setEmpty() {\n $this->lBoundIn = FALS...
[ "0.6380406", "0.6304907", "0.61662424", "0.61611426", "0.6080353", "0.6050342", "0.58620954", "0.5813235", "0.57578725", "0.5742933", "0.56985456", "0.566858", "0.566858", "0.566858", "0.566858", "0.56585544", "0.5633802", "0.5612755", "0.5523132", "0.5500128", "0.54778874", ...
0.7797567
0
Add a table row Can be passed as an array or discreet params
Добавить строку таблицы Может быть передан как массив или отдельные параметры
function add_row() { $args = func_get_args(); $this->rows[] = $this->_prep_args($args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addRow(array $row);", "abstract protected function addRow();", "public function add_row($args) {\n\t\t$args = func_get_args();\n\t\t$this->add_row_array($args);\n\t}", "public function addRow($dataRow, $style);", "function add_row($selector, $row = \\false, $post_id = \\false) {}", "funct...
[ "0.77036947", "0.7645141", "0.7229631", "0.7162203", "0.70318776", "0.7010382", "0.6962476", "0.68567145", "0.68435127", "0.6842705", "0.6831014", "0.68152165", "0.6715265", "0.6707013", "0.670252", "0.6686102", "0.6681781", "0.6668709", "0.6645756", "0.65977114", "0.65949446...
0.7724777
0
Prep Args Ensures a standard associative array format for all cell data
Аргументы подготовки обеспечивают стандартный ассоциативный массивный формат для всех данных ячеек
function _prep_args($args) { // If there is no $args[0], skip this and treat as an associative array // This can happen if there is only a single key, for example this is passed to table->generate // array(array('foo'=>'bar')) if (isset($args[0]) AND (count($args) == 1 && is_array($args[0]))) { // args se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _prep_args() {\n\t\t// this is the data prepared for binding.\n\t\t// these fields are ordered as they are in the table\n\t\t$args = array(\n\t\t\t'the_id' => $this->id,\n\t\t\t'question_id' => $this->question_id,\n\t\t\t'text' => $this->text,\n\t\t\t'date_created' => $this->date_created,\n\t\t\...
[ "0.6279122", "0.58093274", "0.57784003", "0.57736963", "0.57538307", "0.57165086", "0.5680179", "0.565451", "0.565451", "0.565451", "0.565451", "0.565451", "0.565451", "0.5653734", "0.5653734", "0.5653029", "0.563233", "0.56193584", "0.5567641", "0.5561034", "0.5558074", "0...
0.7576496
0
Clears the table arrays. Useful if multiple tables are being generated id and datatable must be reset, due deafult template wil use that values, instanciated
Очищает таблицы массивов. Полезно, если генерируются несколько таблиц, и идентификатор и datatable должны быть сброшены, так как шаблон по умолчанию будет использовать эти значения, инстанциированные
function clear() { $this->rows = array(); $this->heading = array(); $this->auto_heading = TRUE; $this->tableid = 'table'.rand(100,999); $this->enabledatatable = '0'; $this->template = $this->_default_template(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clear_tables() {\n\t\t$this->_tables = [];\n\t}", "private function destroyTableDefs() {\n\n\t\tunset($this->fields);\n\t\tunset($this->links);\n\n\t\t$this->fields = array();\n\t\t$this->links = array();\n\n\t\t$this->whereClause = NULL;\n\t\t$this->orderBy = NULL;\n\n\t}", "public functi...
[ "0.80208987", "0.7468971", "0.746317", "0.7234164", "0.71465296", "0.6947679", "0.68757504", "0.6822721", "0.6783949", "0.66554946", "0.6532212", "0.64564854", "0.6447099", "0.644464", "0.64443344", "0.64302826", "0.64200085", "0.6410204", "0.6409984", "0.64021933", "0.638384...
0.7726737
1
Ensure Magento have a Siteimprove Token
Убедитесь, что Magento имеет токен Siteimprove
public function ensureTokenIsFetched() { if (!$this->_token->getToken()) { $client = $this->_clientFactory->create(); $client->get('https://my2.siteimprove.com/auth/token?cms=Magento2'); if ($client->getStatus() === 200) { $token = $this->_json->unseriali...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function check()\n {\n $real_token = (string)$this->getToken();\n $token = (string)\\Tools::getValue('token');\n\n if ($real_token !== $token) {\n header('HTTP/1.0 403 Forbidden');\n die;\n }\n }", "public function saveTokenAction()\r\n {\r\n...
[ "0.6427363", "0.64191", "0.6135251", "0.612243", "0.60816556", "0.60445523", "0.60029", "0.5976418", "0.58522433", "0.58371884", "0.58336717", "0.57945985", "0.57901114", "0.5782989", "0.57794446", "0.57610357", "0.5760604", "0.57583416", "0.5739524", "0.5732912", "0.57324487...
0.71421415
0
Tests creating a FileStorage object with an invalid directory.
Тесты создания объекта FileStorage с недопустимой директорией.
public function testCreateWithInvalidDirectory(): void { $dir = '/nonsensedirdoesnotexist' . uniqid(); $this->expectException('RuntimeException'); $this->expectExceptionMessage("Cannot initialize filesystem local state: '$dir' is not a directory."); new FileStorage($dir); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInvalidDirectoryThrowsException()\n {\n $this->expectEnvironmentNotFoundException();\n\n $this->factory->create('doesNotMatter', '/fakeDirectoryFail');\n }", "public function testInvalidDirectory()\n {\n try {\n $this->faker->imageGenerator('/dev/null'...
[ "0.7520617", "0.7293615", "0.6711947", "0.6558036", "0.6539606", "0.6529317", "0.6483387", "0.6419207", "0.6386253", "0.63660294", "0.6359152", "0.63590366", "0.63393664", "0.6313654", "0.6309357", "0.62556624", "0.62220484", "0.62050456", "0.6196088", "0.6195426", "0.613403"...
0.8467734
0
Should be able to go into credit.
Должен быть возможен переход в кредит.
public function testCredit() { $account = new CreditAccount(Money::fromAmount(1000), 5); $withdrawal = $account->withdraw(Money::fromAmount(300)); $this->assertEquals(-300, $withdrawal->amount()->amount()); $this->assertEquals(-300, $account->balance()->amount()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function creditSourceAccount()\n {\n $this->sourceAccount->credit($this->amount);\n }", "public function use_credit()\n {\n if ($this->check_credits()) \n {\n $user_id = $this->session->userdata('userid');\n\n $this->db->set('credits', 'credits-1', FALSE...
[ "0.7184889", "0.68910825", "0.6737112", "0.67175466", "0.66935", "0.6661897", "0.6652466", "0.66498774", "0.6575373", "0.65624446", "0.6475188", "0.64581186", "0.6440863", "0.64391214", "0.6407347", "0.6404555", "0.63584316", "0.6352891", "0.63369817", "0.63191533", "0.629521...
0.7336611
0
Interest should be charged on a credit transaction.
Проценты должны начисляться за кредитную операцию.
public function testInterest() { $account = new CreditAccount(Money::fromAmount(1000), 25); $withdrawal = $account->withdraw(Money::fromAmount(300)); $this->assertEquals(-300, $withdrawal->amount()->amount()); $this->assertEquals(75, $account->interest()->amount()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCredit()\n {\n $account = new CreditAccount(Money::fromAmount(1000), 5);\n\n $withdrawal = $account->withdraw(Money::fromAmount(300));\n $this->assertEquals(-300, $withdrawal->amount()->amount());\n\n $this->assertEquals(-300, $account->balance()->amount());\n ...
[ "0.66508734", "0.6476594", "0.64601207", "0.63268477", "0.61054885", "0.5841495", "0.5783644", "0.5733804", "0.557429", "0.55128926", "0.55101866", "0.54911137", "0.5481702", "0.5479315", "0.5463799", "0.54620403", "0.5453221", "0.5447902", "0.54456127", "0.5407957", "0.54021...
0.7116601
0
Returns a specified claim
Возвращает указанное утверждение
public function getClaim($claim) { return $this->claims[$claim]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClaim($claim)\n {\n return $this->payload()->get($claim);\n }", "public function get_claim($name) {\n\t\tif(isset($this->payload[$name]))\n\t\t\treturn $this->payload[$name];\n\t\treturn \"\"; // claim no available in payload\n\t}", "public function getClaim()\n {\n re...
[ "0.80829716", "0.7607544", "0.72707784", "0.72177106", "0.6898714", "0.6801", "0.6649188", "0.66475093", "0.6558753", "0.63750136", "0.63479614", "0.63237864", "0.6092345", "0.60779", "0.60239816", "0.6017916", "0.60049015", "0.59966636", "0.59281087", "0.5822571", "0.5813282...
0.8192811
0
Add the files' content to the buffer Add filenames on top
Добавить содержимое файлов в буфер, добавить имена файлов вверху
function read_files_to_buffer() { foreach ($this->data['filelist'] as $f) { if (file_exists($f)) { // Create header filelist // Check if needs SASS $this->data['bh'] .= '/* ' . $f; if (strpos($f, '.scss') > -1) { $this->data['bh'] .= ' -> COMPILED'; $this->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function makeFiles()\n {\n $list = $this->getBuffer()->getScriptFiles();\n\n $html = \"\";\n\n foreach ($list as $path) {\n if($path[LibsFinder::L_MAIN] === true ){\n $html .= sprintf($this->templateScriptFile, $path[BufferCache::PATH_ABS]);\n ...
[ "0.6280596", "0.6071861", "0.6008951", "0.5967057", "0.59049726", "0.57922906", "0.5775337", "0.56768763", "0.5663015", "0.564304", "0.56191766", "0.56069255", "0.56040823", "0.5578198", "0.5510559", "0.5505357", "0.54968464", "0.54660916", "0.54628533", "0.5449712", "0.54307...
0.70036024
0
/ Write a program that reads an positive integer and count the number of digits the number has.
Напишите программу, которая читает положительное целое число и подсчитывает количество цифр в этом числе.
function countOfDigits(int $number): string { return 'The number of digits the number has is ' . strlen($number); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function countNumberOfDigits($number)\n{\n preg_match_all(\"/\\d/\", $number, $match);\n return count($match[0]);\n}", "function solution(int $n): int\n{\n $count = 0;\n\n for ($i = 1; $i <= $n; $i *= 10) {\n $div = $i * 10;\n $count += (int) ($n / $div) * $i + min(max($n % $div - $i + ...
[ "0.70615935", "0.65453315", "0.64569837", "0.6252239", "0.61132765", "0.6097271", "0.60149604", "0.59711003", "0.5833804", "0.56815886", "0.5661566", "0.5642279", "0.5530028", "0.55203575", "0.5512671", "0.5487192", "0.5487192", "0.54366827", "0.54025143", "0.5391417", "0.538...
0.7018764
1
Tests if mapping is gatherd correctly. Mapping is loaded from fixture bundle in Tests/app/fixture
Проверяет, правильно ли выполнено собирание отображения. Отображение загружается из пакета фикстур в Tests/app/fixture
public function testMapping() { $container = static::createClient()->getContainer(); $this->assertArrayHasKey( 'AcmeTestBundle', $container->getParameter('kernel.bundles'), 'Test bundle is not loaded.' ); /** @var Connection $connection */ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testMapping()\n {\n $item = new Item();\n\n $response = $item->getMapping();\n\n $this->assertTrue(is_array($response[\"inventory\"][\"mappings\"]));\n }", "public function testBasicMapping() {\n $mapping = new IcecatMapping([\n 'id' => 2,\n 'label' => 'Dem...
[ "0.7292271", "0.708101", "0.70009196", "0.6650952", "0.6581355", "0.648239", "0.64151895", "0.63502765", "0.6338486", "0.6250904", "0.6163011", "0.6152613", "0.6146719", "0.6144403", "0.6140765", "0.61348", "0.60836655", "0.60452753", "0.6034384", "0.6034195", "0.5977534", ...
0.74347204
0
Open session This function opens a session from a save path. The save path can be changed the method of opening also can but we do not change that we just do the basics and return
Открыть сессию. Эта функция открывает сессию из пути сохранения. Путь сохранения можно изменить, но метод открытия также может быть изменен, однако мы не изменяем его, мы просто делаем базовые действия и возвращаемся.
function open( $save_path, $session_name ) { global $sess_save_path; $sess_save_path = $save_path; // Don't need to do anything. Just return TRUE. return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function open($_sessionSavePath, $_sessionName) \r\n\t{\r\n $this->_sessionSavePath = $_sessionSavePath;\r\n $this->_sessionName \t= $_sessionName;\r\n\t\t\r\n return true;\r\n }", "public function open($savePath,$sessionName){\n\t\t$this->savePath = $savePath;\n\t\treturn true;\n\...
[ "0.7580565", "0.7534828", "0.7440542", "0.737835", "0.73528826", "0.73326045", "0.73279506", "0.729256", "0.72013223", "0.71941423", "0.7194017", "0.7128685", "0.70892113", "0.7009516", "0.70075876", "0.6995218", "0.6945863", "0.69377476", "0.68933386", "0.6873377", "0.675746...
0.75855124
0
This function GCs (Garbage Collection) all old and out of date sessions which still exist in the Db. It will remove by comparing the current to the time of expiring on the session record.
Эта функция производит сбор мусора (Garbage Collection) всех старых и устаревших сессий, которые всё ещё существуют в базе данных. Она удаляет их, сравнивая текущее время с временем истечения срока действия записи сессии.
function gc() { glue::db()->{$this->sessionCollectionName}->remove(array('expires' => array('$lt' => strtotime($this->lifeTime)))); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function gc()\r\n\t\t\t{\r\n\r\n\t\t\t\t\t$now = time();\r\n\t\t\t\t\treturn $this->db->query(\"DELETE FROM sessions WHERE expires <= '{$now}'\");\r\n\t\t\t}", "function gc(){\n\n // deletes expired sessions from database\n if($this->link->where('session_expire','<',time())->delete()){\n ...
[ "0.8169567", "0.79906744", "0.79537004", "0.763021", "0.7587515", "0.73708326", "0.73705864", "0.73513556", "0.7340334", "0.73126894", "0.7271173", "0.7245249", "0.7224648", "0.72034705", "0.71671313", "0.712533", "0.7111729", "0.70813227", "0.70389766", "0.7003527", "0.70030...
0.81137323
1
set a different goal for NaNoWriMo
установить другую цель для NaNoWriMo
public function setNaNoWriMoGoal($nanowrimoGoal = 50000, $year = "2019") { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setGoal($goal)\n {\n $this->goal = $goal;\n }", "private function changeTour()\r\n\t{\r\n\t\tif ($this->ninja_current == 0)\r\n\t\t\t$this->ninja_current = 1;\r\n\t\telse\r\n\t\t\t$this->ninja_current = 0;\r\n\t}", "function setCardioGoal($numDays, $type, $milestone)\n {\n ...
[ "0.57238615", "0.5622497", "0.53529435", "0.52768767", "0.51172405", "0.5113393", "0.508832", "0.50755084", "0.4926382", "0.4892554", "0.4882149", "0.48666936", "0.4855491", "0.483917", "0.48103014", "0.4796548", "0.47902536", "0.47708684", "0.4764859", "0.47536448", "0.47445...
0.7685481
0
sets the number of days a user wants to work in a given week
устанавливает количество дней, которое пользователь хочет работать в данной неделе
public function setWorkDaysPerWeek($workDays = 7) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function daysInWeek() {\n\t\treturn 7;\n\t}", "public function get_num_weekdays() {\n return 7;\n }", "public function setCompleteWeekDays()\r\n {\r\n $this->weekDays = array('Domingo', 'Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado');\r\n }", "public function getWeek(...
[ "0.7434435", "0.65481013", "0.64765817", "0.64609325", "0.63642246", "0.63637525", "0.6307211", "0.6294336", "0.62894976", "0.6214437", "0.62084514", "0.61349356", "0.61254966", "0.60997903", "0.605897", "0.6058244", "0.6032555", "0.6024246", "0.60100675", "0.5971552", "0.596...
0.722433
1
Creates a form to create a Usuario entity.
Создает форму для создания сущности Usuario.
private function createCreateForm(Usuario $entity) { $form = $this->createForm(new UsuarioType(), $entity, array( 'action' => $this->generateUrl('administradores_create'), 'method' => 'POST', )); $form->add('submit', 'submit', array('label' => 'Create')); return...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createCreateForm(Usuario $entity)\n {\n $form = $this->createForm(new UsuarioType(), $entity, array(\n 'action' => $this->generateUrl('usuario_create'),\n 'method' => 'POST',\n ));\n\n// $form->add('submit', 'submit', array('label' => 'Create'));\n ...
[ "0.79070896", "0.78231543", "0.7728235", "0.7648869", "0.76372904", "0.75534177", "0.74415797", "0.74314016", "0.73583466", "0.7354439", "0.73294073", "0.7320867", "0.7268725", "0.7200688", "0.7199752", "0.7190541", "0.7179971", "0.71690303", "0.7157075", "0.71403354", "0.714...
0.78509265
1
Finds and displays a Usuario entity.
Находит и отображает сущность Usuario.
public function showAction($id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('ServidorBundle:Usuario')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Usuario entity.'); } $deleteForm = $this->createDelet...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SigFichasocialBundle:Usuario')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No se pudo encontrar la entidad Usuario.');\n }\n\n ...
[ "0.73881394", "0.727101", "0.71106166", "0.70667136", "0.70507556", "0.7043363", "0.7043363", "0.7043363", "0.7043363", "0.7043363", "0.7043363", "0.7022118", "0.69965756", "0.6940039", "0.6900832", "0.6871683", "0.68675673", "0.6847314", "0.678383", "0.6742157", "0.6737764",...
0.7335441
1
Displays a form to edit an existing Usuario entity.
Показывает форму для редактирования существующего сущности Usuario.
public function editAction($id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('ServidorBundle:Usuario')->find($id); $endereco = $em->getRepository('ServidorBundle:Endereco')->find($entity->getEndereco()->getId()); if (!$entity) { throw $this->crea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CursoBundle:Usuario')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Usuario entity.');\n }\n\n $editForm = $thi...
[ "0.78192616", "0.768423", "0.7652213", "0.75878847", "0.75878125", "0.75279224", "0.75279224", "0.75279224", "0.75279224", "0.749499", "0.7471679", "0.74381953", "0.73930866", "0.7376554", "0.7347299", "0.73378193", "0.731428", "0.7284957", "0.72760546", "0.7274695", "0.72670...
0.7696621
1
URL encode the value.
Закодируйте значение по URL.
public static function encode($value) { return urlencode($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function encodeValue($value);", "public function encodeValue($value);", "public function encodeValue($value);", "function encodeUrlParam($value) {\n\treturn strtr(base64_encode(json_encode($value, true)), '+/', '-_');\n}", "public function encode($value);", "public function encode($value);", "fu...
[ "0.77384293", "0.77384293", "0.77384293", "0.77301097", "0.7690359", "0.7690359", "0.744763", "0.7402118", "0.73913795", "0.7263785", "0.7181853", "0.71752554", "0.7159514", "0.71399397", "0.71399397", "0.71399397", "0.7138764", "0.7081912", "0.7077985", "0.70743006", "0.7042...
0.8106833
0
URL decode the value.
Декодировать значение по URL.
public static function decode($value) { return urldecode($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function decodeValue($value='') {\r\n return(html_entity_decode(urldecode($value), ENT_QUOTES));\r\n }", "function decodeUrlParam($value) {\n\treturn json_decode(base64_decode(strtr($value, '-_', '+/')), true);\n}", "private function decode($value) {\n return bin2hex(urldecode($...
[ "0.7794986", "0.7541359", "0.7427938", "0.73554146", "0.7249285", "0.72314423", "0.72314423", "0.72314423", "0.72016466", "0.72016466", "0.72016466", "0.70246476", "0.6821369", "0.68095523", "0.67982465", "0.6601615", "0.65648836", "0.6496751", "0.6483474", "0.64813405", "0.6...
0.837231
0
This method will fill the given $object by the given $array. If the $fillable parameter is not available it will use the fillable array of the class.
Этот метод заполнит заданный $object заданным $array. Если параметр $fillable недоступен, он будет использовать массив fillable класса.
public function fill(array $data, $object, array $fillable = []) { if (empty($fillable)) { $fillable = $this->fillable; } if (!empty($fillable)) { // just fill when fillable array is not empty $object->fillable($fillable)->fill($data); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFields($object, array $fieldArray=null)\n{\n $classname = get_class($object);\n // a static map that maps class parameters to their types. needed for knowing which objects to create\n //$typesmap = $classname::$paramtypesmap;\n\n if (!isset ($typesmap)) {\n // if the class does not h...
[ "0.7046296", "0.65050894", "0.64881015", "0.63800484", "0.6288916", "0.6276476", "0.6247759", "0.6232284", "0.6185696", "0.6179083", "0.6167901", "0.61356735", "0.61075264", "0.5969653", "0.59654915", "0.5941552", "0.5941552", "0.5941189", "0.59262526", "0.59148", "0.5891067"...
0.8032961
0
Get ArticleName Article Name
Получить ArticleName Article Name
public function getArticleName () { $preValue = $this->preGetValue("ArticleName"); if($preValue !== null && !\Pimcore::inAdmin()) { return $preValue; } $data = $this->ArticleName; return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getArticleTitle(): string {\n\t\treturn $this->articleTitle;\n\t}", "public function getArticleTitle()\n {\n return $this->article_title;\n }", "public function getArticleTitle() {\n\t\treturn($this->articleTitle);\n\t}", "public function getName()\r\n {\r\n return \"ar...
[ "0.754459", "0.7473043", "0.7469242", "0.72522473", "0.72427213", "0.7219083", "0.7153741", "0.7151515", "0.7077003", "0.7077003", "0.7077003", "0.7077003", "0.7035022", "0.7025763", "0.69755924", "0.6960521", "0.6936915", "0.69367224", "0.68843293", "0.6881116", "0.68701994"...
0.83005565
0
Get publication_name Publication Name
Получить publication_name Название публикации
public function getPublication_name () { $preValue = $this->preGetValue("publication_name"); if($preValue !== null && !\Pimcore::inAdmin()) { return $preValue; } $data = $this->publication_name; return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getArticlePublisherName()\n {\n return $this->article_publisher_name;\n }", "public function publisher(): string\n {\n return ($this->pluck('publisherName') ?? $this->pluck('leadPublisherName'));\n }", "function get_publication()\r\n {\r\n return $this->get_d...
[ "0.73764426", "0.71831423", "0.6991097", "0.6984712", "0.68349737", "0.66977787", "0.6645778", "0.65017515", "0.64925593", "0.6473402", "0.6448986", "0.6442491", "0.64276767", "0.63985133", "0.6395825", "0.6367195", "0.635109", "0.6349964", "0.6346857", "0.6317198", "0.630369...
0.86702365
0
Set publication_name Publication Name
Установить publication_name Название публикации
public function setPublication_name ($publication_name) { $this->publication_name = $publication_name; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_publication($phrases_publication)\r\n {\r\n $this->set_default_property(self :: PROPERTY_PUBLICATION, $phrases_publication);\r\n }", "public function setPublication($publication)\n\t\t{\n\t\t\t$this->_publication = $publication;\n\t\t}", "public function getPublication_name () {\n\t$p...
[ "0.71407026", "0.67457527", "0.66610706", "0.6612163", "0.64865667", "0.64865667", "0.63726974", "0.62048537", "0.61638635", "0.61109596", "0.60502106", "0.59865975", "0.5963363", "0.5958747", "0.59213716", "0.588806", "0.5880547", "0.5870161", "0.58618224", "0.5859929", "0.5...
0.740631
0
Get editor_name Editor Name
Получить editor_name Название редактора
public function getEditor_name () { $preValue = $this->preGetValue("editor_name"); if($preValue !== null && !\Pimcore::inAdmin()) { return $preValue; } $data = $this->editor_name; return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_form_editor_field_title() {\n\t\treturn esc_attr__( 'Name', 'gravityforms' );\n\t}", "public function getNameForEdit()\n {\n return Kwc_Abstract::getSetting($this->getData()->componentClass, 'componentName');\n }", "function __tstb_role_editor() {\n\n\t\treturn 'editor';\n\t}",...
[ "0.7069595", "0.68766373", "0.6628929", "0.6576476", "0.65492964", "0.6484951", "0.64553684", "0.64553684", "0.64287746", "0.6396358", "0.63927144", "0.63697374", "0.6313691", "0.62769765", "0.6271011", "0.6267779", "0.62580895", "0.62416804", "0.62334937", "0.6224116", "0.62...
0.8914114
0
Set editor_name Editor Name
Установить editor_name Editor Name
public function setEditor_name ($editor_name) { $this->editor_name = $editor_name; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEditor_name () {\n\t$preValue = $this->preGetValue(\"editor_name\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->editor_name;\n\treturn $data;\n}", "public function setName($name)\n\t{\n\t\tunset(self::$_dateEditorIds[$this->getName()]);...
[ "0.7072801", "0.64551246", "0.63193643", "0.63144976", "0.62382495", "0.6235915", "0.6221198", "0.6170789", "0.6165222", "0.6136835", "0.6132425", "0.61305535", "0.6123857", "0.61204857", "0.61192715", "0.610781", "0.6092949", "0.608956", "0.60876554", "0.6081521", "0.6077741...
0.77274215
0
Returns whether the reCAPTCHA is enabled or not
Возвращает значение, указывающее, включено ли использование reCAPTCHA
public function isReCaptchaEnabled() { return $this->_getHelper()->isReCaptchaEnabled(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isCaptchaEnabled()\n {\n return $this->captcha_enabled;\n }", "protected function captchaEnabled()\n {\n return config('captcha.enabled');\n }", "function is_captcha_enabled() {\n return true;\n }", "function enableCaptcha() {\n if(!extension_loaded('gd') ||...
[ "0.8373823", "0.83127844", "0.7923526", "0.7858532", "0.7827748", "0.7672205", "0.76535344", "0.7621385", "0.7521479", "0.72362405", "0.71860147", "0.71597946", "0.7140021", "0.7014449", "0.6933426", "0.6873419", "0.6870491", "0.6678033", "0.66649175", "0.6620933", "0.6579132...
0.878692
0
Get the reCAPTCHA helper
Получить помощника reCAPTCHA
protected function _getHelper() { return Mage::helper('recaptcha'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function getCaptcha()\n {\n if (static::$_captcha === NULL) {\n\n require dirname(dirname(__FILE__)) . '/vendor/ReCaptcha/recaptchalib.php';\n\n static::$_captcha = new ReCaptcha(Config::RECAPTCHA_SECRETKEY);\n }\n\n return static::$_captcha;\n }", "public function getHelp...
[ "0.77581435", "0.74101734", "0.7358918", "0.73552775", "0.7225173", "0.71505976", "0.7024162", "0.69393", "0.69079983", "0.68540645", "0.6815529", "0.66853696", "0.6567291", "0.6413603", "0.64069647", "0.63979167", "0.63932884", "0.6377617", "0.63604397", "0.63538295", "0.632...
0.7561641
1
Generates an id for a task or note based on board and largest id value present
Генерирует идентификатор для задачи или заметки на основе доски и самого большого значения идентификатора, присутствующего в системе
public function generateId(string $board): int { $sql = "SELECT MAX(id) FROM tasks_notes WHERE board = :board;"; $stmt = $this->db->prepare($sql); $stmt->bindParam(':board', $board); $stmt->execute(); $row = $stmt->fetch(); if ($row === NULL) { return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nextId($tasks){\n\t$highest = -1;\n\tforeach ($tasks as $key => $task) {\n\t\tif ($task[0] > $highest) {\n\t\t\t$highest = $task[0];\n\t\t}\n\t}\n\treturn $highest+1;\n}", "function genId()\n\t{\n\t\t$this->flyId++;\n\t\t$this->recId = $this->flyId;\n\t\treturn $this->flyId;\n\t}", "function genId()\n...
[ "0.6693593", "0.65922797", "0.65922797", "0.64472884", "0.63759094", "0.63536966", "0.635304", "0.6342005", "0.6311907", "0.6258712", "0.620433", "0.6197861", "0.61796916", "0.6156322", "0.6081236", "0.60591894", "0.60222673", "0.60098475", "0.6000375", "0.5993709", "0.598115...
0.7159737
0
Checks if user specified board exists or not
Проверяет, существует ли указанный пользователем доска или нет
public function boardExists(string $board): bool { $sql = "SELECT name FROM boards WHERE name = :board;"; $stmt = $this->db->prepare($sql); $stmt->bindParam(':board', $board); $stmt->execute(); return is_array($stmt->fetch()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkExists(){\r\n \t\r\n \tif(isset($this->id) && !$this->exist){\r\n \t\t$result=mysql_query(\"SELECT * FROM forum_board WHERE id='{$this->id}'\") or die(mysql_error());\r\n \t\tif (mysql_num_rows($result)==1)\r\n \t\t\t$this->parse(mysql_fetch_array($result));\r\n \t\t$this->exist=true;\r\...
[ "0.6852783", "0.665362", "0.6519627", "0.62543947", "0.6237868", "0.6153345", "0.6102216", "0.60976833", "0.60929537", "0.6023193", "0.6009362", "0.5989363", "0.5979323", "0.59634703", "0.5959795", "0.5891615", "0.5879706", "0.5844887", "0.58446586", "0.58119696", "0.5797445"...
0.72935855
0
Checks if the specified board name is valid or not
Проверяет, является ли указанное имя доски допустимым или нет
public function isValidBoardName(string $board): bool { // Alphanumeric names with hyphens and underscores are allowed $aValid = ['-', '_']; return ctype_alnum(str_replace($aValid, '', $board)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function boardExists(string $board): bool\n {\n $sql = \"SELECT name FROM boards WHERE name = :board;\";\n\n $stmt = $this->db->prepare($sql);\n\n $stmt->bindParam(':board', $board);\n\n $stmt->execute();\n\n return is_array($stmt->fetch());\n }", "public function ...
[ "0.6628411", "0.6527036", "0.64704716", "0.6333799", "0.6255052", "0.62428033", "0.6224676", "0.62157786", "0.6203089", "0.618", "0.6172753", "0.61467344", "0.6138668", "0.6138108", "0.6084191", "0.6083544", "0.60829884", "0.6077158", "0.6074233", "0.60706496", "0.6053681", ...
0.808722
0
Lands the MiaChat configuration file
Загружает файл конфигурации MiaChat
function writeMiaConfig() { //Output the new Mia-Chat config.inc.php configuration file $config_file = "../config.ini.php"; if (($handle = @fopen($config_file, 'w'))===false) { return false; } else { $configText = ";This is the mia configuration file\n"; $configText .= ";Comments start...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateConf($file) {\n\t\tglobal $amp_conf;\n\t\tglobal $version;\n\n\t\t$output = \"\";\n\n\t\tswitch ($file) {\n\t\tcase 'meetme_additional.conf':\n\t\t\tif ($amp_conf['ASTCONFAPP'] == 'app_meetme' && !empty($this->_meetmes)) {\n\t\t\t\tforeach (array_keys($this->_meetmes) as $meetme) {\n\t\t\t\t\t$out...
[ "0.60948205", "0.6063853", "0.59824157", "0.58683807", "0.583303", "0.57845294", "0.57709837", "0.5741571", "0.5738972", "0.57191926", "0.57160014", "0.5696913", "0.5680253", "0.56735075", "0.56713986", "0.5635056", "0.5611805", "0.5600553", "0.55898297", "0.5574803", "0.5566...
0.71979964
0
Creates the ADOdb database connection to the selected db platform Note: While similar to the setupConnection class in Mia itself this is slightly different
Создает соединение с базой данных ADOdb с выбранной платформой базы данных. Примечание: Хотя это похоже на класс setupConnection в самом Mia, оно немного отличается.
private function setupConnection() { /* Valid ADOdb platform options include: mysql, postgres, sqlite, oracle, firebird, db2, mssql Note: The setup process has been built with all of the platforms listed above in mind. Some dev/testing has occurred for each, but Mia-Chat is only heavily tested with Mysq...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setupDatabase()\n {\n $config = $this->getDatabaseConfig();\n switch ($config['driver']) {\n case 'mysql':\n $mysql_config = $config['drivers']['mysql'];\n Database::createMysqlConnection(\n $mysql_config['host'],\n ...
[ "0.7063226", "0.67691827", "0.6758828", "0.67045575", "0.67045575", "0.66212326", "0.6613618", "0.660289", "0.6545401", "0.65039665", "0.6499698", "0.6494964", "0.64945817", "0.6470391", "0.6456744", "0.64370877", "0.6410019", "0.63989514", "0.63790786", "0.6378421", "0.63783...
0.7308191
0
Test return 'Fizz' string when receive multiple of 3
Тест возврата строки 'Fizz' при получении кратного 3 числа
public function testWithMultipleOfThreeReturnFizz(): void { $fizzBuzz = new FizzBuzzKata(); $numbers = [3, 6, 9, 12, 18, 21, 24]; $number = $numbers[rand(0, count($numbers) - 1)]; $response = $fizzBuzz->convert($number); $this->assertEquals('Fizz', $response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function it_translate_3_for_fizzBuzz()\n {\n $this->execute(3)->shouldReturn('fizz');\n }", "function fizzbuzz($N) {\n \n for($i=0; $i < $N; $i++) {\n\n if ($i % 5 == 0 && $i % 3 == 0) {\n echo \"fizz buzz<br>\";\n } else if($i % 3 == 0) {\n echo \"fizz<br>\...
[ "0.7201669", "0.71247274", "0.7052525", "0.6920065", "0.6879399", "0.6876264", "0.680481", "0.6803534", "0.6739816", "0.6589936", "0.6588131", "0.6474474", "0.6452368", "0.64037335", "0.6276237", "0.62154335", "0.61930597", "0.61836237", "0.58920336", "0.5866871", "0.57449883...
0.8000659
0
Test return 'Buzz' string when receive multiple of 5
Тестирование возврата строки 'Buzz', когда получено кратное 5
public function testWithMultipleOfFiveReturnBuzz(): void { $fizzBuzz = new FizzBuzzKata(); $numbers = [5, 10, 20, 25, 35, 40]; $number = $numbers[rand(0, count($numbers) - 1)]; $response = $fizzBuzz->convert($number); $this->assertEquals('Buzz', $response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test_make5toPing()\n {\n //Arrange\n $test_PingPongGenerator = new PingPongGenerator;\n $input = 30;\n\n //Act\n $result = $test_PingPongGenerator->generatePingPongArray($input);\n\n //Assert\n $this->assertEquals(\"pong\"...
[ "0.624371", "0.62180156", "0.6082428", "0.6014006", "0.59862685", "0.5920814", "0.58864313", "0.57884824", "0.57299876", "0.5633271", "0.56160724", "0.55344003", "0.5499271", "0.5498367", "0.5496296", "0.548587", "0.54851454", "0.54527277", "0.54205287", "0.54132825", "0.5380...
0.7043251
0
Read the info about parliament \param $params An array of pairs column => value specifying the countries to select. \return An array of countries that satisfy all prescribed column values. \ex \code read(array('code' => 'cz')) \endcode returns \code Array ( [0] => Array ( [code] => cz [name] => Czech republic [short_na...
Прочитайте информацию о парламенте \param $params Массив пар column => value, указывающий страны для выбора. \return Массив стран, удовлетворяющих всем указанным значениям столбцов. \ex \code read(array('code' => 'cz')) \endcode возвращает \code Array ( [0] => Array ( [code] => cz [name] => Czech republic [short_name] ...
public function read($params) { $query = new Query(); $query->setQuery(" SELECT p.code as parliament_code, p.name as parliament_name,p.short_name as parliament_short_name, p.description as parliament_description, pk.code as parliament_kind_code,pk.name as parliament_kind_name,pk.short_name as parliament_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getData($params) {\n\t\t$query = $this->court->where('name', 'LIKE', '%' . $params . '%')\n\t\t\t->orWhere('name', 'LIKE', '%' . $params . '%')->orWhere('description', 'LIKE', '%' . $params . '%')->get();\n\t\treturn $query;\n\t}", "public function getData(array $params);", "function readCities...
[ "0.5753988", "0.56643337", "0.5586332", "0.5579517", "0.5495069", "0.54903746", "0.5444115", "0.53952616", "0.5351005", "0.5342299", "0.5328413", "0.5323309", "0.5289242", "0.5280964", "0.5249946", "0.52298075", "0.5210202", "0.52099764", "0.5193125", "0.5193125", "0.5178181"...
0.71616757
0
Lists all tagName entities.
Список всех сущностей tagName.
public function indexAction() { $em = $this->getDoctrine()->getManager(); /** @var TagName[] $tagNames */ $tagNames = $em->getRepository('AppBundle:TagName')->findAll(); return $this->render('tagname/index.html.twig', array( 'tagNames' => $tagNames, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CoreBundle:Tag')->findAll();\n\n return $this->render('CoreBundle:Tag:index.html.twig', array('entities' => $entities));\n }", "public function listAction()\n {\n ...
[ "0.7083319", "0.67598474", "0.66466975", "0.6454969", "0.64531285", "0.64320755", "0.6392773", "0.6291935", "0.6247364", "0.61552864", "0.61496174", "0.6146244", "0.6146244", "0.6145316", "0.6140263", "0.6071613", "0.60558766", "0.6048078", "0.60404986", "0.60352975", "0.6033...
0.7090766
0
Creates a form to delete a tagName entity.
Создает форму для удаления сущности tagName.
private function createDeleteForm(TagName $tagName) { return $this->createFormBuilder() ->setAction($this->generateUrl('tags_delete', array('id' => $tagName->getId()))) ->setMethod('DELETE') ->getForm() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function templateForDeleteAction()\n {\n return 'UnitedOneBundle:Form:form.html.twig';\n }", "private function createDeleteForm(Vente $vente)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('vente_delete', array('id' => $vente->getId())))\n ...
[ "0.6712159", "0.66950375", "0.66195047", "0.64933217", "0.64933085", "0.64899105", "0.6484317", "0.6460048", "0.64513314", "0.643056", "0.64160305", "0.6403041", "0.6377855", "0.63674533", "0.6350697", "0.63459444", "0.6338025", "0.6334499", "0.6332471", "0.63312453", "0.6331...
0.7835187
0
Returns if the current runtime is HHVM.
Возвращает true, если текущая среда выполнения — HHVM.
protected function isHHVM() { return defined('HHVM_VERSION'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isRunningHHVM()\n {\n return defined('HHVM_VERSION');\n }", "protected function isHhvm()\n {\n return defined('HHVM_VERSION');\n }", "private function isVM()\n\t{\n\t\treturn(CAutoTest::ENVIRONMENT_VM == $this->environment);\n\t}", "public function isRunningHRM():...
[ "0.8067041", "0.7702968", "0.67271733", "0.59733945", "0.5889725", "0.5774296", "0.5678479", "0.5575499", "0.5531556", "0.54583675", "0.5430152", "0.5419901", "0.5398347", "0.5395019", "0.53679067", "0.5363217", "0.53565973", "0.53402364", "0.53377086", "0.5329709", "0.532922...
0.81512487
0
Returns a named array with the default connection parameters and their values.
Возвращает именованный массив с параметрами подключения по умолчанию и их значениями.
protected function getDefaultParametersArray() { return array( 'scheme' => 'tcp', 'host' => REDIS_SERVER_HOST, 'port' => REDIS_SERVER_PORT, 'database' => REDIS_SERVER_DBNUM, ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultParameters()\n\t{\n\t\t$data = array();\n\t\t$data['alias'] = $this->getAlias();\n\t\t\n\t\treturn $data;\n\t}", "private function _setDefaultParams(){\n return array(\n 'port' => 389,\n 'host' => null,\...
[ "0.7356997", "0.7250552", "0.72001904", "0.7127034", "0.7119604", "0.71091", "0.70866716", "0.70790416", "0.70054054", "0.6999508", "0.69547623", "0.6947712", "0.69156706", "0.6914989", "0.6891017", "0.68634444", "0.68634444", "0.68485785", "0.68216383", "0.68201834", "0.6816...
0.81161875
0
Returns the server version of the Redis instance used by the test suite.
Возвращает версию сервера Redis, используемого тестовым набором.
protected function getRedisServerVersion() { if (isset($this->redisServerVersion)) { return $this->redisServerVersion; } $client = $this->createClient(null, null, true); $info = array_change_key_case($client->info()); if (isset($info['server']['redis_version']))...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRedisVersion()\n {\n return $this->redis_version;\n }", "public function getVersion()\n {\n $row = $this\n ->executeSql(\"show server_version\")\n ->current()\n ;\n\n return $row['server_version'];\n }", "public function getSe...
[ "0.7567481", "0.7288566", "0.72448236", "0.7240027", "0.7155918", "0.70637554", "0.70053875", "0.6930246", "0.6894543", "0.6791971", "0.6790508", "0.67586726", "0.6735084", "0.6657858", "0.66022885", "0.655732", "0.6520423", "0.6505767", "0.64983153", "0.6492444", "0.6451055"...
0.8275103
0