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
$list = DB::select('SELECT create_time,version_number,version_desc,is_force,os_type,url FROM sh_duobaohui.sh_app_version where os_type=? order by create_time desc', array($osType));
$list = DB::select('SELECT create_time,version_number,version_desc,is_force,os_type,url FROM sh_duobaohui.sh_app_version where os_type=? order by create_time desc', array($osType));
public function getVersionList($osType,$pageinfo) { $list = DB::table('app_version')->where('os_type', $osType)->orderBy('create_time', 'desc')->paginate($pageinfo->length); return $list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function app_version_get(){\n $data = $this->model->getAllwhere('app_version_history','','versioncode,versionname','id','DESC','1');\n\n $resp = array('rccode' => 1, 'version' => !empty($data) ? $data[0]:[]); \n $this->response($resp);\n \n }", "public function vendor_app_version_...
[ "0.6117427", "0.6053766", "0.5754973", "0.5733699", "0.5711172", "0.56228757", "0.56085646", "0.5535838", "0.54997426", "0.5484245", "0.5465838", "0.5448214", "0.54434735", "0.5428628", "0.54057646", "0.53953165", "0.53889376", "0.53848886", "0.5383046", "0.53818554", "0.5371...
0.72479665
0
Imports Doctors. Import Doctors from the OpenPaymentsData data pool.
Импортируйте Докторов. Импортируйте Докторов из набора данных OpenPaymentsData.
public static function importDoctors() { $type = Recipient::PROVIDER; $columns = "physician_profile_id, physician_first_name,physician_last_name, count(*) as transactions"; $group_by = "physician_profile_id, physician_first_name,physician_last_name"; $doctors = OpenPaymentsData::connec...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function doctorsData()\n {\n if (auth()->user()->hasRole('super-admin|admin'))\n return Datatables::of(DoctorResource::collection(Doctor::all()))->make(true);\n else if (auth()->user()->hasRole('pharmacy'))\n return Datatables::of(DoctorResource::collection(\n ...
[ "0.615425", "0.56039864", "0.53206336", "0.529323", "0.52305573", "0.5221195", "0.51955825", "0.51653445", "0.4952354", "0.48728716", "0.4847356", "0.4837415", "0.48112884", "0.47737104", "0.46978825", "0.4683777", "0.46807182", "0.46651268", "0.46613723", "0.46595177", "0.46...
0.71906114
0
Return a simple list of the pets
Вернуть простой список питомцев
public function getPets() { if (! $this->pets()->count()) return ''; return implode( ', ', $this->pets->pluck('name')->toArray() ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_markets()\n {\n return $this->_request('getmarkets');\n }", "public function pots()\n {\n $results = $this->call('GET', 'pots', [], [], 'pots');\n\n return collect($results)->map(function ($item) {\n return new Pot($item, $this);\n });\n }", ...
[ "0.6407684", "0.6278297", "0.6177432", "0.61429435", "0.59893084", "0.5973324", "0.5948888", "0.5912209", "0.58868617", "0.58787394", "0.5845842", "0.58246475", "0.57596654", "0.569411", "0.56919134", "0.5639303", "0.5603501", "0.559864", "0.5588652", "0.55776", "0.55284303",...
0.71418494
0
get user sort $type must in array('money','rvrc','credit','currency','todaypost','monthpost','postnum','monoltime','onlinetime','digests') or is_numeric and must in $GLOBALS['_CREDITDB']
get user sort $type должен быть в массиве('money','rvrc','credit','currency','todaypost','monthpost','postnum','monoltime','onlinetime','digests') или быть числом и должен находиться в $GLOBALS['_CREDITDB']
function userSort($type, $num) { global $db_uidblacklist; $ifOverflow = 0; $marktype = $this->_getUserMark(); if (!in_array($type, $marktype) && !is_numeric($type)) return false; $num = (int) $num; !$num && $num = $this->cachenum; $this->reality == true && require_once (R_P . 'require/showimg.php')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function _getSortType();", "protected function _getSortType() {}", "protected function _getSortType() {}", "public function getSortedItems($type)\n\t{\n\t\t$sorted = array();\n\t\tforeach ($this->items as $item)\n\t\t{\n\t\t\t$sorted[($item->price * 100)] = $item;\n\t\t}\n\t\treturn ksort(...
[ "0.64074", "0.63709533", "0.63709533", "0.58954", "0.5895215", "0.5832367", "0.57521045", "0.57245433", "0.55872774", "0.5581931", "0.55795586", "0.5577934", "0.55654424", "0.55647606", "0.5562687", "0.5514897", "0.5506425", "0.54736227", "0.54615015", "0.5425287", "0.5393926...
0.733427
0
Method Name : getCountryIdFromState parameters : state_id,return_field Task : Loading for getting the country id according to state id
Название метода : getCountryIdFromState параметры : state_id, return_field Задача : Загрузка для получения идентификатора страны по идентификатору штата
function getCountryIdFromState($state_id=null,$return_field="hajj_mst_countries_id"){ $this->db->select('*'); $this->db->where(array('status'=>true)); if($state_id!=null){ $this->db->where(array('id'=>$state_id)); } $recordSet = $this->db->get(TBL_HAJJ_MST_STATE); $data=$recordSet->result() ; i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getStateIsoById($id_state, $id_country = null)\n {\n return Db::getInstance()->getValue('\n\t\tSELECT iso_code\n\t\tFROM ' . _DB_PREFIX_ . 'state\n\t\tWHERE id_state = \\'' . pSQL($id_state) . '\\'\n\t\t' . ($id_country ? 'AND id_country = ' . (int)$id_country : ''));\n }", "protect...
[ "0.69539577", "0.69124234", "0.6835191", "0.6697622", "0.6669433", "0.66289675", "0.6570577", "0.6538582", "0.65114343", "0.64817876", "0.64817876", "0.64798456", "0.6470172", "0.6421704", "0.63890266", "0.63838893", "0.6362851", "0.63300747", "0.6289553", "0.62834656", "0.62...
0.85052645
0
Method Name : getCountry parameters : is_name,counry_id Task : Loading for getting the country data according to id
Название метода : getCountry параметры : is_name,counry_id Задача : Загрузка для получения данных страны по идентификатору
function getCountry($is_name=false,$counry_id=null){ $this->db->select('*'); //$this->db->where(array('status'=>1)); if($is_name==true and $counry_id!=null){ $this->db->where(array('id'=>$counry_id,'status'=>1)); } $recordSet = $this->db->get(TBL_HAJJ_MST_COUNTRY); $data=$recordSet->result() ; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountry(){\n\t\n\t\tif(!isset($_SESSION['country_list'])){\n\t\t\t$country = $this->getData(\"select id,country,currency,flag,is_active,contact_email,address from country order by id\");\n\t\t\tforeach ($country as $k => $countrys) {\n\t\t\t\t$_SESSION['country_list'][$countrys['id']]=['id' => $...
[ "0.7568097", "0.756059", "0.75589764", "0.74667084", "0.73399264", "0.73399264", "0.7302045", "0.7297779", "0.7297779", "0.72608787", "0.7207283", "0.7181908", "0.7163159", "0.7072798", "0.7050456", "0.7016721", "0.69991606", "0.6954829", "0.69340503", "0.6933636", "0.6868994...
0.77336496
0
Method Name : getStatesOfCntryAgent parameters : country_id Task : Loading for getting the states of country accoeding to country id
Название метода : getStatesOfCntryAgent параметры : country_id Задача : Загрузка для получения штатов страны в соответствии с идентификатором страны
function getStatesOfCntryAgent($country_id,$agent_id=null){ $this->db->select('id,title'); $this->db->where(array('mst_countries_id'=>$country_id)); $this->db->order_by('title','asc'); $recordSet = $this->db->get(TBL_MST_STATES); $states=$recordSet->result(); if($agent_id!=''){ $this->db->se...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_states_by_country($country_id)\n {\n\t\t$this->db2->select('s.id as state_id,s.name as state_name');\n\t\t$this->db2->from('state s');\n\t\t$this->db2->where('country_id',$country_id);\n\t\t$this->db2->order_by('state_name', 'Asc');\n\t\t$query = $this->db2->get();\n\t\t$results = $query->re...
[ "0.7194386", "0.7034659", "0.6787329", "0.67762375", "0.6759607", "0.6723007", "0.6606475", "0.65357625", "0.653533", "0.64686936", "0.64476615", "0.6393874", "0.6360612", "0.63044894", "0.6259003", "0.6245372", "0.6244745", "0.6231433", "0.62284154", "0.61525834", "0.6005962...
0.7355368
0
Method Name : getSessionCodeByCode parameters : session_code,status Task : Loading for getting the session detail according to sessioncode and status
Название метода : getSessionCodeByCode параметры : session_code,status Задача : Загрузка для получения деталей сеанса в соответствии с sessioncode и статусом
function getSessionCodeByCode($session_code,$status=null){ $this->db->select('mst_countries_id,mst_states_id,event_mst_cities_id,mst_venues_id,date,id'); if($status==true){ $this->db->where(array('session_code'=>$session_code)); }else{ //$this->db->where(array('session_type'=>SESSION_TYPE_GENERAL)); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function doGetSession() {\r\n\t\t$code = $this->getCode ();\r\n\t\t// check whether it is a CSRF attack request\r\n\t\tif ($code && $code != $this->store->get ( 'code' )) {\r\n\t\t\t$session = $this->getAccessTokenByAuthorizationCode ( $code );\r\n\t\t\tif ($session) {\r\n\t\t\t\t\r\n\t\t\t\t$this->store...
[ "0.68703043", "0.6419014", "0.63162494", "0.6257284", "0.6185009", "0.61469024", "0.6117998", "0.6116611", "0.6109317", "0.6022719", "0.58995", "0.579685", "0.5780781", "0.57722944", "0.5763118", "0.5757924", "0.57483816", "0.572517", "0.57227325", "0.56879616", "0.56835824",...
0.8389561
0
Method Name : getPageCategories Parameter :NULL Task : Loading for Getting Page categories
Название метода : getPageCategories Параметр :NULL Задача : Загрузка для получения категорий страниц
function getPageCategories(){ $this->db->select('*'); $this->db->where(array('is_active'=>true)); $this->db->order_by("order", "asc"); $recordSet = $this->db->get(TBL_PAGE_CATEGORIES); $data=$recordSet->result() ; return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCategories();", "public function getCategories();", "public function GetCategories()\n {\n \n \n global $PAGE;\n $output = '';\n \n \n if ($this->Is_Instructor) {\n $type = \" AND `type_instructor`=1\";\n } else {\n ...
[ "0.70498556", "0.70498556", "0.6902265", "0.68322", "0.682066", "0.67652977", "0.675221", "0.6722472", "0.6651599", "0.66067994", "0.65968996", "0.6556225", "0.65429884", "0.6522225", "0.6517271", "0.6484134", "0.64672804", "0.64352554", "0.6374618", "0.63533807", "0.6348519"...
0.7278745
0
Method Name : getPages Parameter :page_category_id Task : Loading for Getting Pages according to page category id
Название метода : getPages Параметр :page_category_id Задача : Загрузка для получения страниц по идентификатору категории страниц
function getPages($page_category_id=null){ if($page_category_id==null) return array(); $this->db->select('*'); $this->db->where(array('page_categories_id'=>$page_category_id)); $recordSet = $this->db->get(TBL_PAGE_CATEGORY_HAS_PAGES); $data=$recordSet->result() ; return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPages();", "public function getPages() {}", "public function paginateAllWithCategory($postsPerPage);", "function get_page_category ($category_id) {\r\n\t$cat = get_category($category_id);\r\n\tif ($cat) { return $cat; }\r\n\treturn get_category(1);\r\n}", "public function getPage($id);",...
[ "0.6838344", "0.6696129", "0.6631751", "0.6333479", "0.63030857", "0.62842077", "0.62840974", "0.6277004", "0.62291163", "0.6225541", "0.6208954", "0.6169689", "0.61506116", "0.61181027", "0.6114833", "0.6101148", "0.6101008", "0.6090618", "0.60829484", "0.6074073", "0.602059...
0.8213042
0
Method Name : getFieldValueById Parameter : $table and $condition and $return_field Task : Loading for getting the field value from the database table according to user_id
Название метода : getFieldValueById Параметр : $table и $condition и $return_field Задача : Загрузка для получения значения поля из таблицы базы данных в соответствии с user_id
function getFieldValueById($table_name=NULL,$condition=NULL,$return_field="id"){ if(!isset($condition)){ return false; } $this->db->select('*'); $this->db->where($condition); $recordSet = $this->db->get($table_name); $data=$recordSet->result() ; if(count($data)>0){ return $data[0]->$ret...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFieldValue($value_id)\r\n\t{\r\n\t\t$q = \"SELECT \".$this->fieldToSelect.\" FROM `\".$this->tableName.\"` WHERE \".$this->tableId.\"='\".$value_id.\"'\";\r\n\t\t$this->db->Execute($q);\r\n\r\n\t\tif($this->db->Affected_rows() > 0)\r\n\t\t{\r\n\t\t\t$field_value = $this->db->GetOne($q);\r\n\t\t\treturn...
[ "0.7148024", "0.6839502", "0.67880815", "0.6668875", "0.66426075", "0.658527", "0.65626353", "0.65535045", "0.6540076", "0.65178275", "0.6491089", "0.6487005", "0.6433502", "0.6392421", "0.638186", "0.637834", "0.63586426", "0.6344935", "0.6338042", "0.63346463", "0.63216174"...
0.7774074
0
Method Name : getUserDetail Parameter : user_id Task : Loading for Getting User Detail according to user_id
Название метода : getUserDetail Параметр : user_id Задача : Загрузка для получения деталей пользователя в соответствии с user_id
function getUserDetail($user_id=null){ if($user_id==null) return array(); $this->db->select(TBL_USERS.'.id,'.TBL_USERS.'.email,'.TBL_USERS.'.parent_report_id as parent_id,'.TBL_USER_INFORMATION.'.sales_rip as parent_report_id,'.TBL_USERS.'.password,'.TBL_USERS.'.job_title,'.TBL_USERS.'.role,'.TBL_USER_INFORMATION...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadUserDetail($id) {\n \t$_user = new class_User();\n \n \t$user = $_user->getUserDetail($id);\n \n \treturn $user;\n }", "public function getUserDetail($uId){ \n\t\n\t $data = $this->User_model->getUser($uId);\n\t\tif(!empty($data)) {\n\t\t $this->load->view('admin/user_mgt...
[ "0.7531052", "0.75221795", "0.72931886", "0.720888", "0.71758693", "0.71452105", "0.7121002", "0.711226", "0.69658756", "0.6920663", "0.690581", "0.6879998", "0.68697417", "0.68444616", "0.68247837", "0.6817744", "0.6781725", "0.67372197", "0.6720524", "0.6720082", "0.6713714...
0.7613952
0
Method Name : getUserDetailForSessionAttend Parameter : user_id Task : Loading for Getting User Detail according to user_id
Название метода : getUserDetailForSessionAttend Параметр : user_id Задача : Загрузка для получения деталей пользователя в соответствии с user_id
function getUserDetailForSessionAttend($user_id=null,$is_cancel=false){ if($user_id==null) return array(); $this->db->select(TBL_USERS.'.id,'.TBL_USERS.'.email,'.TBL_USER_INFORMATION.'.sales_rip as parent_report_id,'.TBL_USERS.'.password,'.TBL_USERS.'.job_title,'.TBL_USERS.'.role,'.TBL_USER_INFORMATION.'.*,'.TBL_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserDetails($user_id) {\n// $admin_name = $this->session->userdata('admin_name');\n //$user_id = $this->session->userdata('user_id');\n $path = base_url();\n $url = $path.'api/Userprofile_api/getUserDetails?user_id='.$user_id;\n $ch = curl_init($url);\n ...
[ "0.69416976", "0.69226885", "0.6920221", "0.689438", "0.68303", "0.6815038", "0.6625288", "0.6623152", "0.6590603", "0.65815556", "0.6553365", "0.65406245", "0.6531504", "0.6470375", "0.64432853", "0.643451", "0.6336902", "0.632817", "0.6307316", "0.6305116", "0.62946564", ...
0.7441685
0
Method Name : getUserPhotoAlbumDetail Parameter : user_id Task : Loading for Getting User Photo Albums according to user_id
Название метода : getUserPhotoAlbumDetail Параметр : user_id Задача : Загрузка для получения альбомов фотографий пользователя в соответствии с user_id
function getUserPhotoAlbums($user_id=null,$profile_picture_album=false){ if($user_id==null) return array(); $this->db->select('*'); $this->db->where(array('user_id'=>$user_id)); if($profile_picture_album==true) { $this->db->where(array('title'=>PROFILE_PICTURES)); } $recordSet = $this->db->ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserAlbumPhotos($album_id=null,$profile_picture=false){\r\n\t\tif($album_id==null) return array();\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('photo_albums_id'=>$album_id));\r\n\t\tif($profile_picture==true)\r\n\t\t{\r\n\t\t\t$this->db->where(array('is_profile_picture'=>true));\t\t\r\...
[ "0.67464286", "0.67214876", "0.6518263", "0.6483815", "0.6447495", "0.63256717", "0.6325078", "0.6316738", "0.6302122", "0.62721485", "0.62223554", "0.6193844", "0.6186008", "0.6174258", "0.6090746", "0.60575265", "0.60371995", "0.60217446", "0.60082847", "0.5975698", "0.5962...
0.7327077
0
Method Name : getUserAlbumPhotos Parameter : album_id Task : Loading for Getting User Albums Photo according to album_id
Имя метода : getUserAlbumPhotos Параметр : album_id Задача : Загрузка для получения фотографий альбома пользователя в соответствии с album_id
function getUserAlbumPhotos($album_id=null,$profile_picture=false){ if($album_id==null) return array(); $this->db->select('*'); $this->db->where(array('photo_albums_id'=>$album_id)); if($profile_picture==true) { $this->db->where(array('is_profile_picture'=>true)); } $recordSet = $this->db->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPhotos($album_id)\n {\n $client = new Client();\n\n // get JSON from the webservice and convert it into an assoc. array\n return json_decode($client->get(\"http://jsonplaceholder.typicode.com/album/${album_id}/photos\")->getBody(), true);\n\n }", "public function get...
[ "0.7227899", "0.72237635", "0.72032", "0.70951104", "0.6791564", "0.65806705", "0.6556234", "0.6462394", "0.63634205", "0.63573796", "0.6346602", "0.6280598", "0.62366587", "0.6191744", "0.61832255", "0.6167404", "0.61412346", "0.6134351", "0.6123222", "0.6120605", "0.6111544...
0.7544386
0
Method Name : getPhotoDetail Parameter : photo_id Task : Loading for Getting User Albums Photo according to photo_id
Название метода : getPhotoDetail Параметр : photo_id Задача : Загрузка для получения альбомов пользователя по photo_id
function getPhotoDetail($photo_id=null){ if($photo_id==null) return array(); $this->db->select('*'); $this->db->where(array('id'=>$photo_id)); $recordSet = $this->db->get(TBL_ALBUM_HAS_PHOTOS); $data=$recordSet->result() ; return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPhotoInfo($photoId);", "public function getPhoto($id);", "function findPhoto($photo_id){\n\t\n}", "public function getPhoto($photo_uid) {\r\n\t\t$photo = tx_cwtcommunity_lib_common::dbQuery('SELECT * FROM tx_cwtcommunity_photos p WHERE uid = \"'.intval($photo_uid).'\" AND NOT deleted = \"1\" AND ...
[ "0.76846325", "0.748433", "0.73620164", "0.679797", "0.6626833", "0.65865064", "0.65719724", "0.6569778", "0.6545772", "0.6545391", "0.6543608", "0.65302473", "0.6483407", "0.64743686", "0.6435034", "0.64254093", "0.6409434", "0.63953304", "0.6383532", "0.6380999", "0.6371148...
0.77682614
0
Method Name : isIdVerified Parameter : $table and $id Task : Loading for verify the id from the table
Название метода : isIdVerified Параметр : $table и $id Задача : Загрузка для проверки идентификатора из таблицы
function isIdVerified($table_name=NULL,$id=NULL){ if($id==null && $table_name==null) return array(); $this->db->select('*'); $this->db->where(array('id'=>$id)); $recordSet = $this->db->get($table_name); $data=$recordSet->result() ; if(count($data)>0){ return true; }else{ return false; }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function check($id);", "public function verifyIncidence ($id) {\n return DB::table('incidence')->where([['type', '=', '1'],['status','=', null],['contract', '=', $id]])->count();\n }", "function _check_table_id($value, $type, &$err = null)\n {\n $where = array();\n $where['id'] = $v...
[ "0.6591816", "0.6339834", "0.62729746", "0.6216513", "0.6128833", "0.612185", "0.60767657", "0.60428274", "0.5969233", "0.59687775", "0.59503514", "0.5936787", "0.58923197", "0.58923197", "0.5878634", "0.5878449", "0.58691216", "0.5865593", "0.5856395", "0.58359975", "0.58294...
0.7873583
0
Get Current Step of User First Time User id not available so table will return first step id
Получить текущий шаг пользователя в первый раз. Идентификатор пользователя недоступен, поэтому таблица вернет идентификатор первого шага
function getCurrentStep($user_id,$role_id){ $this->db->select('step_id'); $this->db->where(array('user_id'=>$user_id)); $rs_object=$this->db->get(TBL_USER_STEPS); $data=$rs_object->result(); if(count($data)>0){ return $data[0]->step_id; }else{// no step defined yet its first time //So ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStepId();", "public function getPostPublicationFirstStep(){\n return $this->getData(\"SELECT s.id FROM steps s \n JOIN process pr ON s.processId = pr.id \n WHERE pr.processForId = 3 AND s.stepTypeId = 1 LIMIT 1;\");\n ...
[ "0.67190045", "0.66899467", "0.66634214", "0.6444725", "0.63660645", "0.62673885", "0.6224784", "0.6139795", "0.6136658", "0.6116292", "0.60331017", "0.5985193", "0.5967856", "0.58749753", "0.5869514", "0.5832055", "0.5764518", "0.571363", "0.5677168", "0.56648433", "0.566181...
0.7906677
0
Method Name : getFacebookIds Parameter: NULL Task : Load All the facebook ids from the user login table which is confirmed and active user
Название метода : getFacebookIds Параметр: NULL Задача : Загрузить все facebook идентификаторы из таблицы входа пользователя, которые подтверждены и активны
function getFacebookIds(){ $this->db->select('facebook_id'); $this->db->from(TBL_USER_LOGIN); $this->db->where(array('is_active'=>true,'is_confirmed'=>true)); $recordSet = $this->db->get(); $data=$recordSet->result() ; return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFriendIdsOnlineAppUser($facebook_uid = null){\r\n\t\t$fql = 'SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=\"'.$this->getFacebookUid($facebook_uid).'\" ORDER BY rand() LIMIT 500) AND is_app_user=1 AND (online_presence=\"idle\" OR online_presence=\"active\") ORDER BY last_...
[ "0.73264545", "0.61602646", "0.61197233", "0.61176926", "0.611034", "0.6104863", "0.6078575", "0.6069693", "0.60002744", "0.596348", "0.5944813", "0.5931546", "0.5919887", "0.5918748", "0.5915884", "0.5883681", "0.5869222", "0.5861118", "0.5850145", "0.5849597", "0.5848396", ...
0.8020436
0
Method Name : searchFollowerList Parameter: user_id Task : Load for get the follower id which is common in showamerica and facebook and which is may be user friends
Название метода: searchFollowerList Параметр: user_id Задача: Загрузить идентификаторы подписчиков, общие для showamerica и facebook, которые могут быть друзьями пользователя
function searchFollowerList($user_id=null){ if($user_id==null) return array(); $facebookIds=$this->general->getFacebookIds(); $commonIds=array(); $lines_read = 0; $user_upload_home_path=sprintf(USER_UPLOAD_HOME_PATH,$user_id); $lines=file($user_upload_home_path.FACEBOOK_TXT); foreach...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserFollowers($userId);", "function followerIds($settings, $user_id)\r\n{\r\n$url = \"https://api.twitter.com/1.1/followers/ids.json\";\r\n$requestMethod = \"GET\";\r\n$getfield = \"?user_id=\" . $user_id;\r\n$twitter = new TwitterAPIExchange($settings);\r\n$string = json_decode($twitter->setG...
[ "0.71863115", "0.6789805", "0.66736823", "0.66079646", "0.6539807", "0.6535899", "0.6510349", "0.64875805", "0.64545286", "0.6447097", "0.6430723", "0.6424212", "0.63937205", "0.6381895", "0.628093", "0.62793404", "0.6268794", "0.6253948", "0.6213806", "0.6205612", "0.6189108...
0.8034555
0
Method : getAdminRoles Parameter : Null Return : For get admin roles ids
Метод: getAdminRoles Параметр: Null Возвращение: Для получения идентификаторов ролей администраторов
function getAdminRoles(){ $this->db->select(TBL_MST_ROLES.'.id'); $this->db->from(TBL_MST_ROLES); $this->db->where(array(TBL_MST_ROLES.'.is_active'=>TRUE,TBL_MST_ROLES.'.is_admin'=>TRUE)); $recordSet = $this->db->get(); $data=$recordSet->result(); if(count($data)>0){ return $data; }el...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRoles(): array\n {\n return ['admin'];\n }", "public function & GetRoles ();", "abstract protected function getRoles();", "public function getRoles(): array;", "public function getRoles()\n {\n }", "public function getRoles()\n {\n }", "public function getRol...
[ "0.757398", "0.7478163", "0.7433444", "0.7362058", "0.73466027", "0.73466027", "0.73466027", "0.73446053", "0.7290137", "0.71846914", "0.71569383", "0.71344006", "0.7121803", "0.71168315", "0.7032997", "0.7023412", "0.70230645", "0.702025", "0.7011666", "0.70060134", "0.69971...
0.7617251
0
Method Name : getUserEventDetail Parameter : user_id Task : Loading for Getting User Detail according to user_id
Название метода : getUserEventDetail Параметр : user_id Задача : Загрузка для получения деталей пользователя в соответствии с user_id
function getUserEventDetail($user_id=null){ if($user_id==null) return array(); $this->db->select(TBL_EVENT_REGISTRATION.'.*,'.TBL_MST_SESSION.'.date,'.TBL_MST_SESSION.'.event_time_from,'.TBL_MST_SESSION.'.event_time_to,'.TBL_MST_COUNTRIES.'.title as country,'.TBL_MST_STATES.'.title as state,'.TBL_MST_VENUES.'.ven...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_event_details($userId, $eventId)\n {\n\t\tlog_message('debug', '_event/get_event_list');\n\t\tlog_message('debug', '_event/get_event_list:: [1] userId='.$userId.' eventId='.$eventId);\n\n $result = $this->_query_reader->get_list('get_event_details',array(\n\t\t\t'user_id'=>$userId,\n\t\t\t'even...
[ "0.701328", "0.6653489", "0.65655893", "0.6507603", "0.6450773", "0.64489263", "0.6437758", "0.6347674", "0.6315162", "0.63052297", "0.62786436", "0.62467396", "0.61913174", "0.61554664", "0.6139141", "0.6128157", "0.61097085", "0.61072594", "0.60948753", "0.60818136", "0.607...
0.7578699
0
/ Method Name : checkRoleMenu Parameter : null Task : Loading for check the role menu
/ Название метода : checkRoleMenu Параметр : null Задача : Загрузка для проверки меню ролей
function checkRoleMenu($menu_id=null,$role=null,$allow_type=false){ if($role==null || $role==''){ $role=$this->session->userdata('role_id'); } if($role==ADMIN_NAME){ return true; } $this->db->select(TBL_MENU_HAS_ROLES.'.*'); if($menu_id!=null && $menu_id!='' && $allow_type==false){ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function menuHasRole()\n {\n // We need cache this menu ?\n if (!$found = cache(user()->id.'_group_menu')) {\n $found = $this->db->table('menu')\n ->select('menu.id, menu.parent_id, menu.active, menu.title, menu.icon, menu.route')\n ->join('groups_me...
[ "0.7058731", "0.6949255", "0.6203771", "0.6187541", "0.60809684", "0.6080509", "0.5917137", "0.59116036", "0.59015024", "0.5875115", "0.5869492", "0.585042", "0.5843463", "0.58087903", "0.57895595", "0.5756153", "0.57403344", "0.57333654", "0.5710711", "0.568431", "0.56785095...
0.7217591
0
Method Name : getStoreByUserId Parameter : user_id Task : getting store Name by user id
Название метода : getStoreByUserId Параметр : user_id Задача : получение имени магазина по идентификатору пользователя
function getStoreByUserId($user_id=null){ if($user_id==null){return false;} $this->db->select(TBL_MST_STORES.'.title'); $this->db->from(TBL_USER_INFORMATION); $this->db->join(TBL_MST_STORES,TBL_MST_STORES.'.id='.TBL_USER_INFORMATION.'.store_id'); $this->db->where(array(TBL_USER_INFORMATION.'.tbl_users_i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStoreName($store_id) {\n\t\n\t\taddToDebugLog(\"getStoreName(), Function Entry - supplied parameters: Store ID: \" . $store_id . \", INFO\");\n\t\n\t\t$sql = \"SELECT store_name FROM hackcess.store where store_id = \" . $store_id . \";\";\n\t\t$result = search($sql);\n\t\n\t\treturn $result[0][0];\n\t\...
[ "0.67705476", "0.65056753", "0.63690245", "0.63690245", "0.63690245", "0.63447034", "0.6240901", "0.62169725", "0.61325634", "0.606875", "0.6026741", "0.6008275", "0.5981096", "0.5970365", "0.5931989", "0.5929004", "0.59046996", "0.5872006", "0.58324975", "0.5827783", "0.5726...
0.80425376
0
Method Name : getDateTimeByTimeZone Parameter : Zone name Task : getting date time according to zone example "canada/central"
Название метода : getDateTimeByTimeZone Параметр : Название часового пояса Задача : получение даты и времени в соответствии с часовым поясом, например "canada/central"
function getDateTimeByTimeZone($zone=null){ if($zone==null) return false; date_default_timezone_set($zone); return date('Y/m/d G:i:s'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTimeZone();", "public function getDateTimeZone();", "public function nowInTimeZone(\\DateTimeZone $timezone);", "function getTimeZoneOffset($timezone = 'GMT') {\r\r\n \r\r\n /** TimeZone Information */\r\r\n $_WorldTimeZoneInformation = array (\r\r\n ...
[ "0.69685864", "0.6780871", "0.65014553", "0.650026", "0.64329165", "0.6328757", "0.62008816", "0.6186132", "0.61385804", "0.60660166", "0.6064531", "0.6064451", "0.600816", "0.59646946", "0.5904186", "0.58832467", "0.58380884", "0.58024204", "0.5799887", "0.5787703", "0.57808...
0.72745365
0
Method Name : getAllUserRecords Parameter : Task : getting all users sales_rip
Название метода : getAllUserRecords Параметр : Задача : получение всех продаж пользователей sales_rip
function getAllUserRecords() { $this->db->select('sales_rip,tbl_users_id'); $this->db->from(TBL_MST_USERS_Information); $recordSet=$this->db->get(); $data=$recordSet->result(); return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUsers(){\n }", "function getUsers(){\n }", "public function getUsers() {\n\n $users = $this->users_model->getallusers();\n exit;\n }", "public function getUsers();", "public function getUsers();", "public function getUsers();", "function getUsers(){\n\t\t$this->users = ...
[ "0.6273085", "0.6273085", "0.62414086", "0.6218505", "0.6218505", "0.6218505", "0.6160237", "0.6120169", "0.6090767", "0.6044076", "0.60398966", "0.6023771", "0.5998082", "0.5986398", "0.5983978", "0.5968603", "0.59571135", "0.59524095", "0.5943475", "0.59418726", "0.59418726...
0.7089169
0
Method Name : UpdateEventRecord Parameter : user_id Task : getting all event table record according to userid
Название метода : UpdateEventRecord Параметр : user_id Задача : получение всех записей таблицы событий в соответствии с идентификатором пользователя
function UpdateEventRecord($user_id=null) { $this->db->select('id'); $this->db->from(TBL_EVENT_REGISTRATION); $this->db->where(array('is_cancel'=>false,'tbl_users_id'=>$user_id)); $recordSet=$this->db->get(); $data=$recordSet->result(); if(count($data)>0){ return $data[0]->id; }else{ re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_user_events ($user_id, $event_id, &$set_arr) {\n\t// Initialize variables\n\t$errArr=init_errArr(__FUNCTION__);\n\t// Construct passing parameters\n\t$table_name = \"user_events\";\n\t$key_arr = array();\n\t\n\t$key_arr [\"user_id\"] = $user_id; // set u...
[ "0.71040475", "0.67420864", "0.6512511", "0.63525385", "0.63162374", "0.6084477", "0.60709655", "0.60556614", "0.59981745", "0.5939792", "0.59314936", "0.5878297", "0.58625996", "0.58497673", "0.58142066", "0.58038265", "0.5785805", "0.57371736", "0.57351327", "0.57182837", "...
0.746336
0
Register the Admin service provider in the application configuration file.
Зарегистрируйте провайдера службы Admin в файле конфигурации приложения.
protected function registerAdminServiceProvider() { $namespace = Str::replaceLast('\\', '', $this->laravel->getNamespace()); file_put_contents(config_path('app.php'), str_replace( "{$namespace}\\Providers\EventServiceProvider::class," . PHP_EOL, "{$namespace}\\Providers\Even...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registerConfiguredProviders()\n {\n __l('[App] registerConfiguredProviders');\n\n $manifestPath = $this->storagePath() . '/framework/services.json';\n\n (new ProviderRepository($this, new Filesystem, $manifestPath))\n ->load($this->get('config')['app.providers']);...
[ "0.63827324", "0.627572", "0.61272466", "0.61259836", "0.6070831", "0.60380906", "0.5964519", "0.5874959", "0.58605576", "0.58314747", "0.5813935", "0.5776489", "0.575795", "0.57516384", "0.5734124", "0.5724769", "0.57155687", "0.5698977", "0.5692433", "0.5687605", "0.5682254...
0.7739573
0
Set the namespace on the given file.
Установите пространство имен для указанного файла.
protected function setAppNamespaceOn($file, $namespace) { file_put_contents($file, str_replace( 'App\\', $namespace, file_get_contents($file) )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setNamespace($namespace);", "function setNamespace ($name);", "public function setPsr4Namespace($filePath)\n {\n // TODO little hard to know having namespace or not. do with cheap way once.\n $src = $this->filesystem->get($filePath);\n\n $namespace = ''; // TODO ここでnamespaceを拾っ...
[ "0.6888453", "0.68090624", "0.6771221", "0.66301966", "0.65173596", "0.6453144", "0.6195026", "0.61386013", "0.6130358", "0.612037", "0.6118131", "0.6106009", "0.60560507", "0.6052142", "0.60037017", "0.599722", "0.5982998", "0.59749883", "0.5973628", "0.59491056", "0.5928258...
0.76757365
0
Try HTTP POST authentication method Login/password are provided in HTTP request, through POST params. we should save them in COOKIE in order to avoid further login requests.
Попробуйте метод аутентификации HTTP POST. Логин и пароль предоставляются в HTTP-запросе через параметры POST. Нужно сохранить их в COOKIE, чтобы избежать дальнейших запросов на вход.
private function _tryHttpPost() { if (!array_key_exists(self::POST_LOGIN, $_POST) || !array_key_exists(self::POST_PWD, $_POST) ) { return array(); } $login = $_POST[self::POST_LOGIN]; $hash = md5($_POST[self::POST_PWD]); setcookie( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function login_post()\n {\n if(!$this->post('user') || !$this->post('pass')){\n $this->response(NULL, 400);\n }\n\n $this->load->library('authentication');\n $array = array(\n 'user' => $this->post('user'),\n 'pass' => $this->post('pass')\n );\...
[ "0.6797112", "0.6644776", "0.6572025", "0.6564106", "0.6491536", "0.64377815", "0.6356475", "0.6355917", "0.6334514", "0.63128936", "0.6280777", "0.6266564", "0.6222431", "0.62140465", "0.619979", "0.6193015", "0.6182909", "0.6169007", "0.6163231", "0.61625767", "0.6152818", ...
0.7076787
0
Get current auth result, if it exists
Получить текущий результат аутентификации, если он существует
public function getAuthResult() { if (!isset($this->_authResult)) { throw new phpRack_Exception("AuthResult is not set yet, use authenticate() before"); } return $this->_authResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function current()\n\t{\n\t\t$user = Sentry::getUser();\n\t\treturn result(true, compact('user'));\n\t}", "public function getAuth();", "public function getAuth();", "function getAuth() {\n parent::getAuth(); // load company!\n $au = $this->getAuthUser();\n if (!$au) {\n ...
[ "0.6960148", "0.6729813", "0.6729813", "0.6695599", "0.6670412", "0.66181093", "0.64881486", "0.6458037", "0.64486694", "0.64461255", "0.64338917", "0.6365786", "0.6279882", "0.6258791", "0.6256977", "0.6236568", "0.622727", "0.62110674", "0.6208797", "0.61910284", "0.6172072...
0.7164887
0
Prefetch Size for subscriptions
Размер предварительной загрузки для подписок
public function getPrefetchSize() { return $this->prefetchSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDefinesPrefetchCount()\n {\n $rabbit = $this->getModelMock('messenger/transport_rabbitmq', array('_getChannel', '_close'));\n $channel = $this->_getChannelMock();\n $channel->expects($this->once())->method('basic_qos')\n ->with($this->equalTo(null), $this->equ...
[ "0.6659804", "0.657606", "0.5904277", "0.5829784", "0.5660263", "0.5568453", "0.5485357", "0.5461425", "0.5429927", "0.53192145", "0.5293544", "0.521983", "0.5212467", "0.51799667", "0.5179092", "0.510568", "0.50775856", "0.5076521", "0.50212497", "0.49982038", "0.49758556", ...
0.70979285
1
Returns the metabox id. It adds the prefix to the id given
Возвращает идентификатор metabox. Добавляет префикс к указанному идентификатору
public function getMetaboxId($id) { return sprintf('%s_%s', $this->getPrefix(), $id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function metabox_id_fix($args){\r\n\t\treturn ( $args['plain'] ? $args['id'] : \"$this->options_name[\" . $args['id'] . \"]\" );\r\n\t}", "public function getIdPrefix()\n {\n return $this->idPrefix;\n }", "function wp_unique_id($prefix = '')\n {\n }", "function pulcherrimum_unique_id($pref...
[ "0.7709753", "0.67167693", "0.6381776", "0.63594836", "0.63346", "0.6319503", "0.6300167", "0.62492806", "0.6236085", "0.6225005", "0.61998814", "0.61906296", "0.61779207", "0.6174073", "0.6066117", "0.606162", "0.60600674", "0.59932137", "0.5963128", "0.5962842", "0.5962842"...
0.7439439
1
Execute une procedure stockee avec des parametres
Выполнить хранимую процедуру с параметрами
function execProc($nomProc, $param) { // calcul du nombre de parametres $nbParam = count($param) ; // construit la requete pour executer la procedure stockee $req = "call ".$nomProc."(" ; for($k=0 ; $k<$nbParam-1 ; $k++) { $req .= ":param".$k.", " ; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DBExecSP($connection, &$cursor, $sql, $params, $return = true, $mode = 1) {\n\n\t//\n}", "public function Ejecutar($procedimiento,$params=null){\n\t\t//Hacemos la llamada al precedimiengto concatenado \n\t\t$query = \"call \".$procedimiento;\n\n\t\t//Conecta\n\t\tself::getConexion();\n\n\t\t//Sie es dif...
[ "0.65349495", "0.6344756", "0.63166", "0.62012136", "0.6154833", "0.5952575", "0.5950574", "0.59432435", "0.59432435", "0.59325314", "0.5929459", "0.5917551", "0.59017086", "0.59017086", "0.59017086", "0.59017086", "0.5893855", "0.5863447", "0.58600163", "0.58600163", "0.5860...
0.7718076
0
get all the Users this user is following
получить всех пользователей, которых этот пользователь следует за
public function FollowingList() { return $this->belongsToMany('App\User', 'user_following', 'user_id', 'following_id' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOwnerFollows()\n {\n return $this->http->get('/users/%s/follows', 'self');\n }", "public function follows() {\n return $this->belongsToMany(User::class, 'follows', 'user_id', 'following_user_id');\n }", "public function following() {\n // Need to explicitly stat...
[ "0.73162913", "0.7278707", "0.71989423", "0.71799904", "0.7178686", "0.7174414", "0.7159583", "0.7057066", "0.70040315", "0.6978999", "0.69612104", "0.6894589", "0.687465", "0.6857026", "0.685026", "0.6828948", "0.682531", "0.6788383", "0.67326194", "0.67289996", "0.67283964"...
0.74768555
0
/ Chart weekly payments statistics on home page / ajax
/ Статистика еженедельных выплат на главной странице / ajax
public function weekly_payments_statistics($currency) { if ($this->input->is_ajax_request()) { echo json_encode($this->dashboard_model->get_weekly_payments_statistics($currency)); die(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stats($chart='orders', $limit = 7)\n {\n \t$this->load->model('nitrocart/statistics_m');\n if ($this->input->is_ajax_request())\n {\n $this->data = $this->statistics_m->get_period($limit, $chart );\n echo json_encode($this->data);die;\n }\n //...
[ "0.6708193", "0.64775765", "0.6438501", "0.6421483", "0.640208", "0.6269323", "0.6221026", "0.62132835", "0.62124896", "0.6211106", "0.61673546", "0.61657894", "0.6147628", "0.61449945", "0.60618126", "0.6057157", "0.60552096", "0.6034641", "0.60168844", "0.6008314", "0.59986...
0.77314717
0
To set the select statement
Чтобы задать выборку запроса
protected abstract function getSelectStatement();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function prepareSelectStatement() {}", "abstract public function prepareSelect();", "protected function getSelectStatement()\n {\n return \"SELECT BookID, ISBN10, ISBN13, Title, CopyrightYear, TrimSize, PageCountsEditorialEst\n as PageCount, Description, CoverImage, Status, Subcategories.Subca...
[ "0.78326184", "0.72638875", "0.72045064", "0.7093273", "0.70116633", "0.6887705", "0.6834037", "0.6834037", "0.6834037", "0.6818958", "0.67775327", "0.67583174", "0.675663", "0.6746766", "0.6691058", "0.66488737", "0.66484666", "0.6602869", "0.6593154", "0.6572585", "0.657258...
0.79142326
1
Visitor can't create a project with a wrong status
Посетитель не может создать проект с неправильным статусом
public function cant_create_with_wrong_status() { $project = factory(Project::class)->raw(['status' => $this->faker->word]); $this->post('/api/projects', $project)->assertStatus(422)->assertJsonStructure([ 'errors' => [ 'status', ], ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function can_create_a_project()\n {\n $this->withoutExceptionHandling();\n\n $data = [\n 'name' => $this->faker->sentence,\n 'description' => $this->faker->paragraph,\n 'status' => $this->faker->randomElement(Project::$statuses),\n ];\n\n $requ...
[ "0.6621923", "0.6591892", "0.64376134", "0.6423716", "0.64136386", "0.64124966", "0.6288926", "0.62850004", "0.62741977", "0.62524176", "0.6223393", "0.62114614", "0.6162634", "0.616109", "0.60811937", "0.60649294", "0.6062518", "0.60298234", "0.6012442", "0.60069567", "0.597...
0.7332146
0
User can't create a project without providing a `name` field
Пользователь не может создать проект без указания поля `name`
public function a_project_require_a_name() { $project = factory(Project::class)->raw(['name' => '']); $this->post('/api/projects', $project)->assertStatus(422)->assertJsonStructure([ 'errors' => [ 'name', ], ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newProject()\n {\n\n GeneralUtility::checkReqFields(array(\"name\"), $_POST);\n\n $project = new Project();\n $project->create($_POST[\"name\"], $_SESSION[\"uuid\"]);\n\n }", "public function a_user_can_create_a_project()\n {\n\n $this->withoutExceptionHandlin...
[ "0.7208562", "0.7131543", "0.7089933", "0.6756836", "0.67006326", "0.66283715", "0.66081995", "0.6591279", "0.6581725", "0.6556458", "0.6478731", "0.64327514", "0.6432224", "0.64253914", "0.64078134", "0.6397638", "0.63701904", "0.63260335", "0.6322277", "0.6321393", "0.63002...
0.7792814
0
User can't create a project without providing `description`
Пользователь не может создать проект без указания `description`
public function a_project_require_a_description() { $project = factory(Project::class)->raw(['description' => '']); $this->post('/api/projects', $project)->assertStatus(422)->assertJsonStructure([ 'errors' => [ 'description', ], ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function a_user_can_create_a_project()\n {\n $attributes = [\n \n 'title' => $this->fake->sentence,\n\n ];\n\n }", "public function a_user_can_create_a_project()\n {\n\n $this->withoutExceptionHandling();\n \n //Given\n $this->actingAs(factory('Ap...
[ "0.744813", "0.7030566", "0.7022541", "0.68627423", "0.6701497", "0.6681751", "0.65149903", "0.6481103", "0.646917", "0.6435771", "0.64134866", "0.6377921", "0.63414925", "0.6316634", "0.6314083", "0.631055", "0.62614304", "0.6255815", "0.6229063", "0.6200228", "0.6182883", ...
0.78097016
0
User can see single project
Пользователь может видеть один проект
public function a_user_can_see_single_project() { $project = factory(Project::class)->create(); $this->get('/api/projects/' . $project->id)->assertStatus(200)->assertJson([ 'data' => [ 'id' => $project->id, 'name' => $project->name, 'descr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function projectPannel()\n {\n if (Auth::check()) {\n $user = User::find(Auth::user()->id);\n $project = $user->project;\n return view('projectAdmin', compact('user', 'project'));\n } else {\n return redirect('/');\n }\n }", "public fu...
[ "0.7265823", "0.7158675", "0.7151732", "0.70709", "0.7055924", "0.6973177", "0.6951867", "0.6906467", "0.6872686", "0.6832559", "0.6819465", "0.67928416", "0.67713773", "0.6734495", "0.67220247", "0.6713572", "0.6703379", "0.6681112", "0.666061", "0.66581285", "0.6653678", ...
0.7828417
0
User can delete a project
Пользователь может удалить проект
public function a_user_can_delete_project() { $project = factory(Project::class)->create(); $this->delete('/api/projects/' . $project->id)->assertStatus(200); $this->assertDatabaseMissing('projects', [ 'id' => $project->id, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_project( $user, $project )\n {\n //Unimplemented\n }", "public function deleteProject()\n\t{\n\t\t$this->verifyTeam();\n\t\tAuthBackend::ensureWrite($this->team);\n\n\t\t// Project deletion isn't really supported yet, but is used in a limited way\n\t\t// in some of the tests. Rather than hav...
[ "0.81663793", "0.75706863", "0.7237973", "0.7232978", "0.7193011", "0.7142395", "0.7117037", "0.7110571", "0.7047179", "0.70430416", "0.70321244", "0.7027356", "0.6879716", "0.6865592", "0.6863683", "0.6786891", "0.67839944", "0.6776095", "0.6749816", "0.6737722", "0.67329884...
0.8217796
0
Use can change status of the project
Пользователь может изменить статус проекта
public function can_change_status_properly() { $project = factory(Project::class)->create(); $statuses = [ Project::STATUS_ON_HOLD => 'onHoldProject', Project::STATUS_FINISHED => 'finishProject', Project::STATUS_RUNNING => 'runProject', Project::STATUS...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function changeStatus()\n {\n }", "public function update_status();", "public function updateStatus(int $projectId);", "public function executeStatusProject()\n {\n $this->statusProjectList = StatusProjectPeer::getStatusProjectListCounted(); \n if($this->getRequest()->getParameter('status...
[ "0.7610061", "0.72652036", "0.7040986", "0.67405623", "0.67180586", "0.67130923", "0.6575768", "0.6575768", "0.65219575", "0.64796096", "0.64496225", "0.6444661", "0.6425921", "0.6413432", "0.64041007", "0.63977927", "0.63672566", "0.6345775", "0.6343843", "0.6332501", "0.632...
0.7437181
1
Returns storage primary key name.
Возвращает имя первичного ключа хранилища.
public function getStoragePrimaryKey();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrimaryKeyName()\n {\n return self::$primary_key_name;\n }", "public function getKeyName()\n {\n return $this->keyName ?: 'id';\n }", "public function getKeyName()\n {\n return $this->keyName ?: 'id';\n }", "public function getStorageId(): string\n ...
[ "0.7569957", "0.7425716", "0.7425716", "0.7320939", "0.7313381", "0.7258909", "0.7244193", "0.7241233", "0.7233055", "0.72195935", "0.7130674", "0.7122298", "0.7080268", "0.7075594", "0.70707786", "0.7044285", "0.7041558", "0.7030665", "0.7020435", "0.7020111", "0.7017895", ...
0.775668
0
Converts entity key name to storage key format.
Конвертирует имя ключа сущности в формат ключа хранилища.
public function convertEntityToStorageKey($key);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function convertStorageToEntityKey($key);", "public function normaliseKey(string $key): string;", "public function formatKey(string $key): string;", "private function getCacheKey($storage_name){\n return $storage_name.'_'.$this->media_type.'_'.$this->media_id;\n }", "public function getKey...
[ "0.8025515", "0.630974", "0.62133706", "0.5954914", "0.58955944", "0.58955944", "0.58955944", "0.5792846", "0.5742352", "0.57201856", "0.57201856", "0.5710756", "0.57061726", "0.5705096", "0.5694894", "0.5679888", "0.56696355", "0.56542146", "0.56348556", "0.5620584", "0.5614...
0.79353666
1
Converts storage key name to entity key format.
Преобразует имя ключа хранилища в формат ключа сущности.
public function convertStorageToEntityKey($key);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function convertEntityToStorageKey($key);", "public function normaliseKey(string $key): string;", "public function formatKey(string $key): string;", "private function getCacheKey($storage_name){\n return $storage_name.'_'.$this->media_type.'_'.$this->media_id;\n }", "public function getKey...
[ "0.79547817", "0.6288227", "0.60988766", "0.5991613", "0.590256", "0.58335364", "0.58335364", "0.58335364", "0.5775592", "0.5775592", "0.5706061", "0.56767523", "0.56703806", "0.5637969", "0.56375635", "0.56350857", "0.5624758", "0.55947953", "0.55935293", "0.55701345", "0.55...
0.81646305
0
generate general menu with avialable languages and themes. /////////
Создать общий меню с доступными языками и темами. /////////
function genMenu() { $menuData = array( array('text' => SHIN_Core::$_language->line('lng_label_choice_language'), 'data' => array( array('type' => 'link', 'text' => SHIN_Core::$_language->line('lng_label_name_italian'), 'link' => base_url().'/change_language/it'), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function theme_menu() {\n global $theme;\n $content = new UN_Content();\n $cAll = $content->getMenuContent($theme->langid);\n if (is_array($cAll)) {\n $out = '<ul>';\n if ($theme->indexlink == 1) {\n $out .= '<li><a href=\"index.php'.theme_global_url(true).'\"><span>'._('Main Page').'</span></a></li...
[ "0.7626751", "0.7435462", "0.7435462", "0.7435462", "0.7435462", "0.7435462", "0.7435462", "0.68641794", "0.6806988", "0.6804178", "0.6780272", "0.67493176", "0.6747918", "0.6743779", "0.6741719", "0.6705592", "0.6679283", "0.6636573", "0.66358984", "0.66345775", "0.66323453"...
0.76221913
1
Generate a type attribute on the model.
Создайте атрибут типа на модели.
public abstract function getTypeAttribute();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTypeAttribute();", "protected function getTypeAttribute()\n {\n return $this->is_organizational ? $this->organization_goal->type : $this->custom_type;\n }", "public function getTypeAttribute()\n\t{\n\t\t\n\t\treturn self::getTypes()[$this->type_id] ?? \"-\";\n\t\t\n\t}", "publ...
[ "0.816787", "0.7226515", "0.72118944", "0.69261986", "0.6918405", "0.68128896", "0.6800201", "0.67185014", "0.6556045", "0.65093666", "0.6504882", "0.6500074", "0.645338", "0.64288306", "0.63955146", "0.6347369", "0.6337884", "0.6337512", "0.62986106", "0.6291124", "0.6243672...
0.8146856
1
end function right Remove the strip accents from a string
конец функции right Удаление ударений из строки
static function stripAccents( $str ) { $str = str_replace("�", "a", $str); $str = str_replace("�", "e", $str); $str = str_replace("�", "i", $str); $str = str_replace("�", "o", $str); $str = str_replace("�", "u", $str); $str = str_replace("�", "A", $str); $str ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeAccents($str)\n{\n $a = array('\\/','À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', '...
[ "0.78721106", "0.78569365", "0.7718009", "0.7617452", "0.7581597", "0.75495017", "0.746934", "0.74218273", "0.7375727", "0.73739415", "0.7368234", "0.73406976", "0.7319291", "0.7273648", "0.7257515", "0.72199905", "0.71628684", "0.7119219", "0.70823956", "0.70815533", "0.7079...
0.7915195
0
end function replace Replaces the key with the value of $dictionary in $str
конец функции replace Заменяет ключ на значение $dictionary в $str
private static function dictReplace( $dictionary, $str ) { foreach ($dictionary as $key => $value) { $str = str_replace($key, $value, $str); } // end foreach $dictionary return $str; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function replace($template,$_DICTIONARY){\n\t\tforeach ($_DICTIONARY as $clave=>$valor) {\n\t\t\t$template = str_replace('#'.$clave.'#', $valor, $template);\n\t\t}\t\t\n\t\treturn $template;\n\t}", "public function replace($key,$value,$string){\n\t\treturn str_replace(\"::$key::\",$value,$string);\n\t}", "publ...
[ "0.69425195", "0.663701", "0.66287476", "0.64189124", "0.633201", "0.61444443", "0.60605747", "0.5969615", "0.5889446", "0.5844273", "0.5692488", "0.5679208", "0.56781363", "0.5677757", "0.5666182", "0.5665424", "0.5596515", "0.55693793", "0.5539937", "0.5514411", "0.5510335"...
0.8339589
0
end function stringReplace Converts special chars to HTML equivalents
end function stringReplace Преобразует специальные символы в HTML-эквиваленты
static function specialCharsToHTML( $str ) { $search = array( 'á', 'é', 'í', 'ó', 'ú', 'Á', 'É', 'Í', 'Ó', 'Ú', 'ñ', 'Ñ', '¿', '¡' ); $replace = array( '&aacute;', '&eacute;', '&iacute;', '&oacute;', '&uacute;', '&Aacute;', '&Eacute;', '&Iacu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function replace_specials_characters($s) {\r\n\t\t\t//$s = mb_convert_encoding($s, 'UTF-8','');\r\n\t\t\t$s = preg_replace(\"/á|à|â|ã|ª/\",\"a\",$s);\r\n\t\t\t$s = preg_replace(\"/Á|À|Â|Ã/\",\"A\",$s);\r\n\t\t\t$s = preg_replace(\"/é|è|ê/\",\"e\",$s);\r\n\t\t\t$s = preg_replace(\"/É|È|Ê/\",\"E\",$s);\r\n\t\t\t$s =...
[ "0.70848966", "0.70442736", "0.7024572", "0.6987348", "0.6905611", "0.6899356", "0.689103", "0.6844672", "0.681843", "0.6804559", "0.6787769", "0.6739799", "0.6726597", "0.6709764", "0.66663903", "0.6663315", "0.6649508", "0.66160375", "0.66075844", "0.6586649", "0.6579731", ...
0.7424213
0
end function random Determines if is a string is base 64
конец функции random Определяет, является ли строка кодированной base 64
static function isBase64( $str ) { if (preg_match('%^[a-zA-Z0-9/+]*={0,2}$%', $str)) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function nrua_is_base64( $str )\n{\n\tif( $str === base64_encode( base64_decode( $str ) ) )\n\t{\n\t\treturn true;\n\t}\n\t\n\treturn false;\n}", "function random_string($type = 'basic', $len = 8, $string = '0123456789') {\n if($type=='basic') {\n return mt_rand();\n } elseif($type=='md5') {\n ...
[ "0.7319538", "0.6853497", "0.67600435", "0.66002274", "0.6590549", "0.65602213", "0.65480137", "0.65360993", "0.65175146", "0.6514723", "0.647429", "0.6474006", "0.6462859", "0.64398813", "0.64316803", "0.6408863", "0.6375078", "0.6370132", "0.6366873", "0.63514686", "0.63492...
0.71061057
1
returns an array of Profile objects for all profiles in the database
возвращает массив объектов Profile для всех профилей в базе данных
public static function getAllProfiles() { $allProfiles = array(); try { $db = Database::getDB(); $stmt = $db->prepare("select * from Profiles"); $stmt->execute(); foreach ($stmt as $row) { $profile = new Profile($...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getProfiles() {\n $db = Db::instance();\n $q = \"SELECT * FROM `\".self::DB_TABLE.\"`\";\n $result = $db->query($q);\n\n $profiles = array();\n if($result->num_rows != 0) {\n while($row = $result->fetch_assoc()) {\n $profiles[] = self::getProfile($row['profile_id']...
[ "0.83601695", "0.8256225", "0.7794927", "0.7136787", "0.70801497", "0.6946545", "0.6818495", "0.67483735", "0.6737839", "0.66997534", "0.6648556", "0.66415477", "0.6615353", "0.65720403", "0.6545268", "0.64653844", "0.64494056", "0.64081764", "0.6393495", "0.63692355", "0.636...
0.8325404
1
returns a Profile object whose $type field has value $value
возвращает объект Profile, у которого поле $type имеет значение $value
public static function getProfileBy($type, $value) { $allowed = ['profileID', 'email']; $profile = null; try { if (!in_array($type, $allowed)) throw new PDOException("$type not allowed search criterion for Profile"); $db = Dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProfileType()\n {\n return $this->profile_type;\n }", "protected function filProfileAttribute__($value)\n\t{\n\t\treturn $this->model->whereHas('profiles', function ($query) use ($value) {\n\t\t $query->where('id', '=', $value);\n\t\t});\n\t}", "private static function valueF...
[ "0.6058053", "0.60274214", "0.5981694", "0.5828676", "0.58256584", "0.58113176", "0.57851094", "0.56669754", "0.5661412", "0.56293154", "0.5598335", "0.54756624", "0.54612654", "0.5453882", "0.5447361", "0.5434527", "0.5373349", "0.5365818", "0.53652054", "0.5322941", "0.5319...
0.8036337
0
get_category_identification_by_position / get_category_weight_all Get Category Weight by position ID from database
get_category_identification_by_position / get_category_weight_all Получение веса категории по идентификатору позиции из базы данных
function get_category_weight_all(){ $sql = "SELECT * FROM evs_database.evs_set_form_attitude LEFT JOIN evs_database.evs_category ON sft_ctg_id = ctg_id LEFT JOIN evs_database.evs_identification ON ctw_ctg_id = idf_ctg_id where sft_pos_id = ? group by ctg_category_detail_en order by sf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_category()\n\t{\n\t\tglobal $module_name, $nv_Cache;\n\n\t\t$category = array();\n\n\t\t$sql = \"SELECT * FROM \" . $this->table_prefix . \"_category ORDER BY weight ASC\";\n\t\t$result = $this->db_cache( $sql, 'id', $module_name );\n\n\t\t$category[0] = array(\n\t\t\t'id' => 0,\n\t\t\t'title' ...
[ "0.5855445", "0.5851751", "0.570663", "0.5680099", "0.56394714", "0.5614891", "0.5608748", "0.55509657", "0.5522584", "0.549665", "0.54876274", "0.5473617", "0.5455369", "0.5451105", "0.5423163", "0.53974277", "0.53587246", "0.53534895", "0.53534895", "0.53534895", "0.5353489...
0.7333408
0
get_by_key_data / get_all_by_key_by_year Get all by id by year
get_by_key_data / get_all_by_key_by_year Получить все по идентификатору по году
function get_all_by_key_by_year(){ $sql = "SELECT * FROM evs_database.evs_set_form_attitude WHERE sft_pos_id = ? AND sft_pay_id = ?"; $query = $this->db->query($sql, array($this->sft_pos_id, $this->sft_pay_id)); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_all_by_key_by_year() {\t\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM evs_database.evs_set_form_g_and_o\n\t\t\t\tWHERE sfg_pos_id = ? AND sfg_pay_id = ?\";\n\t\t$query = $this->db->query($sql, array($this->sfg_pos_id, $this->sfg_pay_id));\n\t\treturn $query;\n\t}", "public function get_datas($table, $year,...
[ "0.7893096", "0.60640895", "0.6010914", "0.59726465", "0.5890573", "0.5869494", "0.5809484", "0.5717572", "0.56686443", "0.56380445", "0.56372225", "0.5626549", "0.55782396", "0.5533609", "0.54485714", "0.54398304", "0.54217666", "0.54151154", "0.5402771", "0.539645", "0.5383...
0.80528957
0
Remove comments from given strings The comments are defined as line begin by
Удалить комментарии из заданных строк. Комментарии определяются как строки, начинающиеся с
protected function removeComments($str){ $res = array(); foreach(preg_split("/\n/", $str) as $line){ if(isset($line[0]) && $line[0]!=="#") $res[] = $line; } return implode("\n",$res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function strip_comments($arr) {\r\n //Filter blank lines and lines that start with #\r\n $arr = array_filter($arr, function($val) {\r\n return !((strpos($val, '#') === 0) || (strlen($val) == 0));\r\n });\r\n //Filter inline #comments\r\n foreach ($arr as $key=>$val) {\r\n if (strpo...
[ "0.718347", "0.71670717", "0.7018369", "0.6979003", "0.68260974", "0.67972463", "0.6795102", "0.6795102", "0.67369604", "0.6718834", "0.66790134", "0.66522646", "0.6611211", "0.65235674", "0.6510724", "0.6470492", "0.636796", "0.6358746", "0.634857", "0.63311577", "0.63259244...
0.78223246
0
Get the pass code for the record 0 this record is not need when using the dual pass approach 1 this record always always required
Получите код для записи 0. Эта запись не требуется при использовании подхода с двумя проходами. 1 эта запись всегда всегда требуется
public function getPassCode() { $row = $this->getInnerRow(); return (int)$row['pass_code']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPass();", "public function getPasscode()\n {\n return $this->passcode;\n }", "public function getPass() {\n\n if (isset($this->pass)) {\n return $this->pass;\n }\n }", "public function getPass()\n {\n return $this->pass;\n }", "public function getPas...
[ "0.6852785", "0.6465843", "0.6184818", "0.60943395", "0.60943395", "0.5958258", "0.5850704", "0.5835162", "0.583392", "0.5831301", "0.58254945", "0.5804192", "0.57832336", "0.57208574", "0.56445616", "0.56371015", "0.561259", "0.55788964", "0.5555242", "0.55483866", "0.554058...
0.7270501
0
Get the inactive date
Получить дату деактивации
public function getInactiveDate() { $row = $this->getInnerRow(); return (string)$row['inactive_date']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInactive()\n\t{\n\n\t\tself::addArgument('courses', Course::inactives());\n\n\t\treturn self::make('inactive');\n\n\t}", "public function getExpirationDate();", "public function getStatusDate()\n {\n return $this->statusDate;\n }", "public function getDateTimeExpired()\n {\...
[ "0.6552093", "0.6437012", "0.6410254", "0.63294643", "0.6313131", "0.6282963", "0.6273702", "0.6267166", "0.6224786", "0.6213131", "0.6211827", "0.61630356", "0.61565447", "0.6144408", "0.6143457", "0.61296976", "0.6111276", "0.6109682", "0.60791165", "0.6077246", "0.6077246"...
0.8178637
0
Don't show the email verification view if they are already verified
Не показывать представление проверки электронной почты, если они уже проверены
public function displayEmailVerificationView() { if($this->user->hasVerifiedEmail()) { return redirect($this->redirectTo)->withFlash('success', 'Your email has already been verified'); } return response(view('auth.verification:view', [ 'message' => 'Your emai...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function verifyEmailView()\n {\n return view('auth.verify-email');\n }", "function verify_email()\n\t{\n\t\tlog_message('debug', 'Account/verify_email');\n\t\t$data = filter_forwarded_data($this);\n\t\t$data['msg'] = get_session_msg($this);\n\t\tlog_message('debug', 'Account/verify_email:: [...
[ "0.7165959", "0.7106676", "0.7045858", "0.68711305", "0.6826192", "0.68036604", "0.6709899", "0.6633931", "0.6609009", "0.66070193", "0.6596096", "0.6573707", "0.6561102", "0.6551017", "0.6470924", "0.64523214", "0.6433998", "0.6429542", "0.6403021", "0.6400388", "0.63892305"...
0.7901546
0
Check to see if something could be an ID
Проверьте, может ли что-то быть идентификатором
public function is_id($id) { return is_numeric($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function validateId()\n {\n return is_numeric($this->id) && (int)$this->id >= 1;\n }", "public function hasId() : bool;", "public function hasId()\n {\n $id = $this->getId();\n\n if (is_array($id)) {\n foreach ($id as $k => $v) {\n if (\"\" == \"$...
[ "0.74819016", "0.7325636", "0.7233098", "0.7217123", "0.71945775", "0.71818656", "0.7056573", "0.6896259", "0.6896013", "0.68703353", "0.68314385", "0.6787926", "0.6780644", "0.6774682", "0.6767973", "0.6755711", "0.67412287", "0.67412287", "0.67412287", "0.6725549", "0.66962...
0.74425155
1
Check to see if something is an ent_id
Проверьте, является ли что-то ent_id
public function is_ent_id($ent_id) { return is_string($ent_id) && (strlen($ent_id) <= 25) && array_key_exists(substr($ent_id, 0, 4), $this->prefix_to_model_type); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_id($id) {\n return is_numeric($id);\n }", "public function hasId()\n {\n $id = $this->getId();\n\n if (is_array($id)) {\n foreach ($id as $k => $v) {\n if (\"\" == \"$v\") {\n return false;\n }\n ...
[ "0.65887856", "0.6397396", "0.63865954", "0.6374524", "0.6283091", "0.62592816", "0.6253197", "0.6224878", "0.62195694", "0.6164479", "0.6158572", "0.61413294", "0.61413294", "0.61413294", "0.61413294", "0.61413294", "0.61413294", "0.61413294", "0.61413294", "0.61413294", "0....
0.72568107
0
Resets the name of the database to null.
Сбрасывает имя базы данных в null.
public function resetDbName() { $this->setDbName(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function reset()\n {\n self::$dbm = null;\n }", "protected function resetDb()\n {\n if (is_readable(PHPUNIT_WEBROOT . '/app/database/bolt.db')) {\n unlink(PHPUNIT_WEBROOT . '/app/database/bolt.db');\n copy(PHPUNIT_ROOT . '/resources/db/bolt.db', PHPUN...
[ "0.6862971", "0.6811798", "0.6707475", "0.670674", "0.669958", "0.6655786", "0.65970206", "0.654254", "0.64923316", "0.6322812", "0.6267902", "0.62623084", "0.6250621", "0.6245026", "0.6226229", "0.6212337", "0.61732167", "0.61715263", "0.61502224", "0.61436594", "0.6104929",...
0.83230746
0
Sets the last command to the empty string.
Устанавливает последнюю команду в пустую строку.
private function resetLastCommand() { $this->setLastCommand(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearCommand(string $command = NULL);", "function ResetCmd() {\r\n\r\n\t\t// Check if reset command\r\n\t\tif (substr($this->Command,0,5) == \"reset\") {\r\n\r\n\t\t\t// Reset sorting order\r\n\t\t\tif ($this->Command == \"resetsort\") {\r\n\t\t\t\t$sOrderBy = \"\";\r\n\t\t\t\t$this->setSessionOr...
[ "0.7165825", "0.6219884", "0.6191575", "0.61496925", "0.6050443", "0.5982724", "0.59735423", "0.59624296", "0.5957846", "0.59478676", "0.58864033", "0.58459765", "0.58417046", "0.5837719", "0.58327824", "0.57998514", "0.57966787", "0.563468", "0.56313497", "0.5630633", "0.561...
0.8433197
0
Adds a result to the results array.
Добавляет результат в массив результатов.
private function addResult($result) { //Adds a result to the results array $this->results[] = $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_result(array $request, $result) {\n $this->__results[] = array('action' => $request['action'],\n 'method' => $request['method'],\n 'tid' => $request['tid'],\n 'type' => $request['type'],\n ...
[ "0.78613085", "0.7509566", "0.74252987", "0.72205865", "0.6864693", "0.6853211", "0.6850232", "0.6460867", "0.6442098", "0.64199555", "0.63708645", "0.626817", "0.6225254", "0.61990917", "0.6081949", "0.60415304", "0.60397583", "0.59749156", "0.5943011", "0.59380347", "0.5915...
0.8592895
0
Resets the results array.
Сбрасывает массив результатов.
private function resetResults() { $this->results = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reset()\n {\n $this->values[self::_RESULT] = array();\n }", "public function reset()\n {\n $this->values[self::_RESULT] = array();\n }", "public function reset()\n {\n $this->values[self::RES] = array();\n }", "public function reset()\n {\n $th...
[ "0.8122658", "0.8120702", "0.77787143", "0.77257276", "0.7685171", "0.76713103", "0.7638756", "0.7625153", "0.75973433", "0.75932276", "0.75846976", "0.7507713", "0.7507713", "0.7507713", "0.75065094", "0.75065094", "0.75065094", "0.75065094", "0.75065094", "0.75065094", "0.7...
0.90853524
0
Resets the error array.
Сбрасывает массив ошибок.
private function resetErrors() { $this->errors = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function resetErrors() {\n $this->errors = array();\n }", "public function clearError() {\n $this->errors = array();\n }", "public function reset()\n {\n $this->errors = array();\n }", "function resetErrorData()\n {\n $this->errorData = array();\n }", "public...
[ "0.8427555", "0.82306814", "0.8149524", "0.8059842", "0.7992417", "0.7894228", "0.7891296", "0.7824653", "0.7709724", "0.75470024", "0.74112946", "0.7382818", "0.7283085", "0.72683316", "0.7249592", "0.7226511", "0.7210287", "0.7201253", "0.7191823", "0.71474934", "0.7111608"...
0.84940463
0
Sets the value of insertID.
Устанавливает значение insertID.
private function setInsertID($id) { if (is_integer($id)) { $this->insertID = $id; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert()\n {\n $this->id = insert($this);\n }", "private function resetInsertID() {\n $this->setInsertID(0);\n }", "abstract public function insertID();", "public function insertId() {\n return $this->insertId;\n }", "public function insertId()\r\n\t...
[ "0.6555401", "0.645368", "0.63980794", "0.63552415", "0.62293077", "0.62000144", "0.6160682", "0.6129452", "0.61118495", "0.6079406", "0.6079406", "0.6079406", "0.6069704", "0.60627335", "0.60216886", "0.60062236", "0.59815145", "0.5969502", "0.5949836", "0.59205776", "0.5909...
0.73620343
0
Resets insertID to 0.
Сбрасывает insertID в 0.
private function resetInsertID() { $this->setInsertID(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reset()\n\t{\n\t\tparent::reset();\n\n\t\t// Reset the primary key\n\t\t$this->id = null;\n\t}", "public function reset()\n\t{\n\t\tparent::reset();\n\n\t\t// Reset the primary key\n\t\t$this->id = null;\n\t}", "public static function reset()\n {\n self::$id = 0;\n }", "public fu...
[ "0.6877203", "0.6877203", "0.67222106", "0.64896184", "0.63517976", "0.63376766", "0.61956245", "0.6155696", "0.59135836", "0.59091336", "0.58971566", "0.58607024", "0.58556926", "0.58479667", "0.5832689", "0.5811424", "0.5806717", "0.57747406", "0.57493496", "0.57419753", "0...
0.88912445
0
Resets rowsAffected to 0.
Сбрасывает rowsAffected в 0.
private function resetRowsAffected() { $this->setRowsAffected(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAffectedRows()\n\t{\n\t\treturn 0;\n\t}", "public function getAffectedRows();", "public function getAffectedRows();", "public function getAffectedRowsCount(): int\n {\n }", "public function rows_affected() {\n\t\tif ($this->q) {\n\t\t\treturn $this->q->numrows();\n\t\t}\n\n\t\tretu...
[ "0.744754", "0.66926724", "0.66926724", "0.6651504", "0.6649227", "0.6613057", "0.6563016", "0.6563016", "0.6563016", "0.6563016", "0.6548256", "0.6528956", "0.6528956", "0.6526939", "0.652451", "0.64819056", "0.64748275", "0.6451366", "0.6451366", "0.6447206", "0.63912725", ...
0.91110134
0
Adds the current lastCommand, results, errors, insertID and rowsAffected to commandsReport.
Добавляет текущий lastCommand, результаты, ошибки, insertID и rowsAffected в commandsReport.
private function addCommandsReportEntry() { $this->commandsReport[] = array( "Command" => $this->getLastCommand(), "Results" => $this->getResults(), "Errors" => $this->getErrors(), "InsertID" => $this->getInsertID(), "RowsAffected" => $this->getRowsAff...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function resetCommandsReport() {\n $this->commandsReport = array();\n }", "public function insert () {\n\t\t$GLOBALS[\"logger\"]->debug(\"report:insert\");\n\t\t\n\t\t$newRec = ORM::for_table (self::REPORT_TABLE)->create();\n\t\t$newRec->clip_id = $this->clip->id;\n\t\t$newRec->master_id = $thi...
[ "0.60757124", "0.5450846", "0.5254971", "0.50819445", "0.501936", "0.5003992", "0.49302393", "0.49251992", "0.48581854", "0.48277172", "0.48215297", "0.4792988", "0.47742167", "0.4769433", "0.47590238", "0.4744005", "0.46810022", "0.46518975", "0.4641237", "0.46305758", "0.46...
0.8144736
0
Resets commandsReport to an empty array.
Сбрасывает командыReport в пустой массив.
private function resetCommandsReport() { $this->commandsReport = array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reset()\n {\n $this->cbuff = [];\n }", "public function reset()\n {\n $this->messages = [];\n }", "public function reset()\n {\n $this->returnedFiles = [];\n }", "public function reset()\n {\n $this->values[self::promotions] = array();\n }",...
[ "0.67358416", "0.6596979", "0.6535706", "0.6442818", "0.64240885", "0.63849586", "0.63777995", "0.63766205", "0.6371948", "0.6360989", "0.6360458", "0.6336398", "0.63285375", "0.632699", "0.6322756", "0.63097954", "0.6298293", "0.6240458", "0.623591", "0.6230286", "0.62240946...
0.8935338
0
Ask for phone number
Запросить номер телефона
public function askPhoneNumber() { $this->ask('Ваш номер телефона', function (Answer $answer) { try { $contact = $answer->getMessage()->getContact()->getPhoneNumber(); $this->getBot()->userStorage()->save([ 'phone_number' => $contact ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function askForNumber()\n {\n return \"Give me a number, and we can play BuzzPhone together!\";\n }", "public function phone($phone = null);", "public function getPhone();", "function do_phone() {\n global $phone;\n global $clean_phone;\n $phone = get_field('phone', 'options');\n $cle...
[ "0.7566859", "0.65268606", "0.6332133", "0.62854", "0.62600106", "0.6191182", "0.6128754", "0.6047805", "0.59039617", "0.5894948", "0.58780116", "0.58323556", "0.58162296", "0.5788087", "0.5777468", "0.57719254", "0.5762456", "0.5758123", "0.5755451", "0.5749242", "0.5719374"...
0.7832734
0
dump an object for HTML comment: "dumpobject ( $object_name, __LINE__ )" for text in page: "dumpobject ( $object_name, __LINE__, False )"
загрузить объект для HTML-комментария: "dumpobject ( $object_name, __LINE__ )" для текста на странице: "dumpobject ( $object_name, __LINE__, False )"
function dumpobject( $thing, $line, $comment=True ) { if ( isset ( $thing ) ) { if ( $comment ) { echo "<!--\n"; } else { echo "<pre>\n"; } echo "dumpobject() called at\n" . $_SERVER['PHP_SELF'] . ": $line \n"; print_r ($thin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function robm_dump() {\r\n echo '<pre style=\"border:1px solid #000; padding:5px; margin:5px; max-height:150px; overflow:auto;\" id=\"' . md5(serialize($object)) . '\">';\r\n $i = 0; $args = func_get_args();\r\n foreach ( (array) $args as $object ) {\r\n if ( $i == 0 && count($args)...
[ "0.6740159", "0.6275945", "0.62096936", "0.61659443", "0.6111998", "0.6091745", "0.6061175", "0.5996974", "0.5834193", "0.58078593", "0.57849705", "0.5775588", "0.57702535", "0.5757447", "0.5736594", "0.57166094", "0.5681853", "0.5680767", "0.5653895", "0.5653887", "0.5630358...
0.7590947
0
Show contract create page
Показать страницу создания контракта
public function create() { $data['page'] = $this->getPage(); return view('contracts::create')->with($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return view('contracts.create');\n }", "public function create()\n {\n $contracts = null;\n\n\n return view('contracts.create', compact('contracts'));\n }", "public function getCreate()\n\t{\n\t\t/*\n\t\t * Layout / View\n\t\t */\n\n\t\t$this->layout->c...
[ "0.78456783", "0.7764073", "0.76151097", "0.74110967", "0.7408983", "0.7318854", "0.7252426", "0.71839327", "0.70640707", "0.694114", "0.69265366", "0.6900144", "0.68965745", "0.6788508", "0.67749906", "0.67603356", "0.6696963", "0.6667627", "0.6659651", "0.6629134", "0.66111...
0.7852973
0
Show contract delete modal
Показать модальное окно удаления контракта
public function delete(Contract $contract) { $data['contract'] = $contract; return view('contracts::modal.delete')->with($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionDelete()\n {\n if ( ($id = Yii::$app->request->post(\"id\")) && $model = Contract::findOne($id) ) {\n $model->delete();\n return json_encode([\n \"message\" => Yii::t(\"app\", \"You deleted contract \" . $model->contract_id),\n ...
[ "0.7278735", "0.7214206", "0.7185426", "0.6968181", "0.6836887", "0.6827946", "0.6733061", "0.66803217", "0.6573354", "0.65108895", "0.6463014", "0.64407194", "0.6404634", "0.6399308", "0.63910353", "0.6384527", "0.63494617", "0.6305066", "0.63029456", "0.6228103", "0.6217928...
0.76742357
0
Creates a query that ignores the current storage page.
Создает запрос, игнорирующий текущую страницу хранения.
public function createQuery() { $query = parent::createQuery(); $query->getQuerySettings()->setRespectStoragePage(false); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function discardQuery() {}", "public function newQueryWithoutScopes();", "public function emptyQuery()\n {\n return Content::query();\n }", "public function emptyQuery()\n {\n return Image::query();\n }", "public function newQueryWithoutScope($scope);", "function ithi_exclude_pa...
[ "0.6744565", "0.6506182", "0.6437365", "0.619175", "0.5883499", "0.58785367", "0.58241504", "0.5799002", "0.57035244", "0.57017875", "0.56179434", "0.54675883", "0.5450632", "0.5392892", "0.5381592", "0.53752446", "0.5336252", "0.53272444", "0.5317464", "0.5278695", "0.524755...
0.71333736
0
Removes all auth codes from the database where validUntil is older than the current timestamp.
Удаляет все коды авторизации из базы данных, где validUntil старше текущего временного метки.
public function deleteExpiredAuthCodesFromDatabase() { $query = $this->createQuery(); $query->getQuerySettings()->setIgnoreEnableFields(true); $query->matching( $query->lessThan('validUntil', $GLOBALS['EXEC_TIME']) ); $authCodes = $query->execute(); forea...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function cleanUpExpiredAuthorizationCodes(Carbon $now): void\n {\n $tenMinutesAgo = $now->subMinutes(10);\n $query = [\n 'or',\n ['revoked' => 1],\n ['<', 'created_at', $tenMinutesAgo],\n ];\n $totalPendingAuthCode = AuthCode::find()->where(...
[ "0.69574827", "0.62838006", "0.6265413", "0.5984791", "0.5956601", "0.5955215", "0.59522814", "0.5937637", "0.57788384", "0.57687783", "0.5720598", "0.57068104", "0.55874646", "0.55220735", "0.55086046", "0.5499123", "0.5470552", "0.54108113", "0.5409544", "0.5403243", "0.539...
0.80984634
0
Searches for an independent auth code with the given auth code in the given context.
Ищет независимый код авторизации с заданным кодом авторизации в заданном контексте.
public function findOneIndependentByAuthCodeAndContext($authCode, $context) { if ($this->autoDeleteExpiredAuthCodes) { $this->deleteExpiredAuthCodesFromDatabase(); } $query = $this->createQuery(); /** @noinspection PhpMethodParametersCountMismatchInspection */ $q...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_auth_code( $code ) {\n\t\t$tokens = new Token_User( '_indieauth_code_' );\n\t\treturn $tokens->get( $code );\n\t}", "private function checkingApiCanAuthenticateCode($auth_code)\n {\n return $this->api_request->get(\"user\",\"validate_user_code\",$params=array('code'=>$auth_code))...
[ "0.5479539", "0.5457401", "0.5360745", "0.5295156", "0.5263344", "0.5260674", "0.5251334", "0.5235757", "0.52100116", "0.51914227", "0.5183412", "0.5133535", "0.5050008", "0.49735868", "0.49710724", "0.49649084", "0.4951318", "0.49129653", "0.4911629", "0.4889032", "0.4855704...
0.7143321
0
Returns the DateTime until the generated auth codes should be valid.
Возвращает DateTime до которого сгенерированные коды авторизации должны быть действительны.
public function getValidUntil() { $this->validateAuthCodeExpiryTime(); return new DateTime($this->authCodeExpiryTime); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTokenValidationDate(): \\DateTime\n {\n try {\n $tokenValidationDate = new \\DateTime(\n sprintf('now - %s', trim($this->tokenLifetime))\n );\n } catch (\\Exception $e) {\n $tokenValidationDate = new \\DateTime('now - 24 hours');\n...
[ "0.6298964", "0.60689634", "0.5936849", "0.58881116", "0.5851942", "0.5707294", "0.56442595", "0.5555442", "0.5554548", "0.553133", "0.5511522", "0.54880714", "0.54775065", "0.5471358", "0.54619753", "0.54133785", "0.5410559", "0.5322282", "0.5293478", "0.5293478", "0.5293478...
0.79990345
0
Sets a new auth code expiry time, if you want to use it you have to call it before running getAuthCodeDataFromDBI() or deleteExpiredAuthCodesFromDatabase()
Устанавливает новый срок действия кода авторизации, если вы хотите использовать его, вам нужно вызвать его перед запуском getAuthCodeDataFromDBI() или deleteExpiredAuthCodesFromDatabase()
public function setAuthCodeExpiryTime($authCodeExpiryTime) { $this->authCodeExpiryTime = $authCodeExpiryTime; $this->validateAuthCodeExpiryTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_auth_code() {\n\t\t$tokens = new Token_User( '_indieauth_code_' );\n\t\t$tokens->set_user( self::$author_id );\n\t\treturn $tokens->set( static::$test_auth_code, 600 );\n\t}", "public function setExpiry( $expiry );", "public function expire() {\n logit_r($this, 'expire'); \n $status =...
[ "0.6288463", "0.6121231", "0.6109383", "0.6056165", "0.59379643", "0.58996934", "0.5892611", "0.58860207", "0.5872174", "0.58434016", "0.5802908", "0.572371", "0.5671891", "0.56662893", "0.56662893", "0.5656964", "0.56434643", "0.56434643", "0.56434643", "0.56434643", "0.5637...
0.7388306
0
Clears all auth codes that match the given identifier for the given context
Очищает все коды аутентификации, соответствующие заданному идентификатору для заданного контекста
protected function clearIndependentAuthCodes($identifier, $context) { $authCodes = $this->findIndependendByIdentifierAndContext($identifier, $context); foreach ($authCodes as $authCode) { $this->remove($authCode); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Public Function clearResetCode()\n\t{\n\t\t$this->_db->delete('bevomedia_user_reset_password', 'id = ' . $this->id);\n\t}", "public function revokeAuthCode($codeId)\n {\n }", "protected function clearRecordAuthCodes($table, $uid, $uidField)\n {\n $authCodes = $this->findByReferencedRecord($tabl...
[ "0.59661853", "0.58326465", "0.58025604", "0.5777449", "0.5681941", "0.56258655", "0.5489642", "0.54748607", "0.5374097", "0.53722155", "0.5362918", "0.5306991", "0.52761406", "0.52711254", "0.5254204", "0.5250942", "0.5250942", "0.5250942", "0.52301055", "0.52182704", "0.520...
0.7986202
0
Removes all auth codes that reference the given record
Удаляет все коды авторизации, ссылающиеся на данный запись
protected function clearRecordAuthCodes($table, $uid, $uidField) { $authCodes = $this->findByReferencedRecord($table, $uid, $uidField); foreach ($authCodes as $authCode) { $this->remove($authCode); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function db_removeAuthEntry($auth_id)\n{\n $auth_id = db_esc($auth_id);\n db_run(\"DELETE FROM \".TBL_AUTH.\" WHERE auth_id='$auth_id'\");\n}", "public function clearAssociatedAuthCodes($authCode)\n {\n if ($authCode->getType() === AuthCodeType::RECORD) {\n $this->clearRecordAuthCodes(\n ...
[ "0.62140507", "0.60981506", "0.5998672", "0.58361477", "0.57716376", "0.57421136", "0.5740313", "0.5594922", "0.5577059", "0.55460113", "0.55177873", "0.5515065", "0.550837", "0.5350765", "0.53441834", "0.53418815", "0.53244376", "0.52936536", "0.52784246", "0.5252746", "0.52...
0.709266
0
Validates the current valid in $this>authCodeExpiryTime.
Проверяет текущее время истечения срока действия кода авторизации в $this>authCodeExpiryTime.
protected function validateAuthCodeExpiryTime() { $authCodeExpiryTimestamp = strtotime($this->authCodeExpiryTime); if ($authCodeExpiryTimestamp === false) { throw new Exception('An invalid auth code expiry time was provided: ' . $this->authCodeExpiryTime); } if ($authCod...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValidUntil()\n {\n $this->validateAuthCodeExpiryTime();\n return new DateTime($this->authCodeExpiryTime);\n }", "public function accessTokenValid()\n {\n return $this->expireTime > time();\n }", "function isValid() {\n //we get if it is still good or e...
[ "0.6947617", "0.65688336", "0.6420419", "0.6229013", "0.6215438", "0.60935175", "0.60605025", "0.6044394", "0.59815794", "0.59417695", "0.593266", "0.59198284", "0.59152055", "0.5819773", "0.5782803", "0.5770667", "0.57702935", "0.57702935", "0.5733911", "0.5714672", "0.56971...
0.73716515
0
Manage a template override in the fork directory
Управление шаблоном переопределения в каталоге форка
protected function addForkTemplatePath() { $this->addTemplatePath(JPATH_COMPONENT .DS. 'fork' .DS. 'views' .DS. $this->getName() .DS. 'tmpl'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setTemplatePaths() {}", "public static function use_parent_template() {\n add_action('save_post', array('core_admin', 'switch_page_template'));\n }", "private function setTemplate(){\n if (isset($this->data['template']) && !empty($this->data['template'])){\n $temp...
[ "0.68392277", "0.6678282", "0.65403575", "0.6263296", "0.62305963", "0.6169956", "0.6157243", "0.609381", "0.6067841", "0.60643256", "0.6050167", "0.6030065", "0.602298", "0.602298", "0.602298", "0.602298", "0.602298", "0.6016847", "0.6012627", "0.6008404", "0.5991798", "0....
0.730396
0
Test custom _findTagged method
Тестирование пользовательской метода _findTagged
public function testFindTagged() { $this->Tagged->recursive = -1; $result = $this->Tagged->find('tagged', array( 'by' => 'cakephp', 'model' => 'Article')); $this->assertEqual(count($result), 1); $this->assertEqual($result[0]['Article']['id'], 'article-1'); $result = $this->Tagged->find('tagged', array(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFindTaggedWithConditions() {\n\t\t$this->Tagged->recursive = -1;\n\t\t$result = $this->Tagged->find('tagged', array(\n\t\t\t'by' => 'cakephp',\n\t\t\t'model' => 'Article',\n\t\t\t'conditions' => array('Article.title LIKE' => 'Second %')));\n\t\t$this->assertEqual(count($result), 0);\n\n\t\t$res...
[ "0.695842", "0.6678963", "0.6330321", "0.61517316", "0.6151354", "0.61386216", "0.60857505", "0.6041897", "0.5970571", "0.59112227", "0.590392", "0.5856781", "0.5854285", "0.58525276", "0.58445907", "0.58445907", "0.58280426", "0.5800048", "0.57965845", "0.5771962", "0.575896...
0.733898
0
Test custom _findTagged method with additional conditions on the model
Тестирование пользовательской метода _findTagged с дополнительными условиями на модели
public function testFindTaggedWithConditions() { $this->Tagged->recursive = -1; $result = $this->Tagged->find('tagged', array( 'by' => 'cakephp', 'model' => 'Article', 'conditions' => array('Article.title LIKE' => 'Second %'))); $this->assertEqual(count($result), 0); $result = $this->Tagged->find('tag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFindTagged() {\n\t\t$this->Tagged->recursive = -1;\n\t\t$result = $this->Tagged->find('tagged', array(\n\t\t\t'by' => 'cakephp',\n\t\t\t'model' => 'Article'));\n\t\t$this->assertEqual(count($result), 1);\n\t\t$this->assertEqual($result[0]['Article']['id'], 'article-1');\n\n\t\t$result = $this->...
[ "0.66774994", "0.57210124", "0.5690388", "0.5586405", "0.5579669", "0.52778065", "0.5219891", "0.51958644", "0.511997", "0.5110995", "0.50881284", "0.50876045", "0.5081435", "0.5073863", "0.50642097", "0.50628227", "0.5062248", "0.50465614", "0.5032594", "0.5032078", "0.50239...
0.74970376
0
Set id of Post
Установить идентификатор Post
public function setId(int $postId): void { $this->_id = (int) $postId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPostId($value)\n {\n $this->postId=$value;\n }", "public function changeset_post_id()\n {\n }", "private function setPostId() {\n\t\tif (isset($_SESSION[\\posts\\model\\PostsModel::postId])) {\n\t\t\t$this->postId = $_SESSION[\\posts\\model\\PostsModel::postId]...
[ "0.81376976", "0.7513295", "0.75022566", "0.74789804", "0.7401061", "0.7251433", "0.7104148", "0.7022098", "0.69805336", "0.68211126", "0.6817931", "0.6730266", "0.6726208", "0.6719655", "0.671503", "0.6714825", "0.6713663", "0.67126083", "0.6699171", "0.6695823", "0.6691837"...
0.7689624
1
Returns the content for the demo story.
Возвращает содержимое для демонстрационной истории.
public function get_content(): string { $content = $this->load_demo_content_from_file(); $content = $this->localize_texts( $content ); $content = $this->update_assets_urls( $content ); // Quick sanity check to see if the JSON is still valid. if ( null === json_decode( $content, true ) ) { return ''; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function load_demo_content_from_file(): string {\n\t\t$file = WEBSTORIES_PLUGIN_DIR_PATH . 'includes/data/stories/demo.json';\n\n\t\tif ( ! is_readable( $file ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$content = file_get_contents( $file ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_fil...
[ "0.7175141", "0.6603018", "0.6529565", "0.65292126", "0.65292126", "0.6508917", "0.6465178", "0.6458256", "0.6451543", "0.6438847", "0.6438847", "0.64333105", "0.6422936", "0.641805", "0.63835335", "0.63835335", "0.63835335", "0.62749", "0.62700236", "0.62700236", "0.62700236...
0.70065206
1
Loads demo content from JSON file.
Загружает демонстрационный контент из файла JSON.
private function load_demo_content_from_file(): string { $file = WEBSTORIES_PLUGIN_DIR_PATH . 'includes/data/stories/demo.json'; if ( ! is_readable( $file ) ) { return ''; } $content = file_get_contents( $file ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents, WordPre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadJson(){\n if(file_exists($this->fullPath.$this->jsonFile)) {\n $arCfg = get_object_vars(json_decode(file_get_contents($this->fullPath.$this->jsonFile)));\n $this->loadConfigs($arCfg);\n }\n }", "public function testReadJsonShowcase()\n {\n // ...
[ "0.653173", "0.64834106", "0.62887204", "0.62592393", "0.6257641", "0.6257581", "0.6257581", "0.6145123", "0.61426944", "0.6084053", "0.5981788", "0.59455734", "0.5912565", "0.58967304", "0.58103114", "0.58075714", "0.57529414", "0.5749452", "0.57417715", "0.5717534", "0.5716...
0.7292858
0
Checks if the value can be properly converted to a plain string.
Проверяет, можно ли значение корректно преобразовать в обычную строку.
private function canBeString($value): bool { // https://stackoverflow.com/a/5496674 return !is_array($value) && ( (!is_object($value) && settype($value, 'string') !== false) || (is_object($value) && method_exists($value, '__toString')) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function canBeCastToString($value) {\n if (is_object($value) && method_exists($value, \"__toString\")) {\n return true;\n }\n return is_scalar($value) || is_null($value);\n }", "public static function aString($value)\n {\n return (is_string($value))?:...
[ "0.70425284", "0.70185417", "0.6889408", "0.68096757", "0.6766731", "0.6756565", "0.6732506", "0.67060935", "0.6497445", "0.6470792", "0.64497507", "0.6430755", "0.6330794", "0.6288613", "0.6282758", "0.62712586", "0.6235245", "0.62064844", "0.6179192", "0.6178125", "0.616909...
0.70580155
0
Check register globals and remove them
Проверьте регистрацию глобальных переменных и удалите их
function unregisterGlobals() { /* if (ini_get('register_globals')) { $array = array('_SESSION', '_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES'); foreach ($array as $value) { foreach ($GLOBALS[$value] as $key => $var) { if ($var === $GLOBALS[$key]) { unset($G...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function unregisterGlobals() {\n if (ini_get('register_globals')) {\n $array = array('_SESSION', '_POST', '_GET', '_COOKIE', '_REQUEST', '_SERVER', '_ENV', '_FILES');\n foreach ($array as $value) {\n foreach ($GLOBALS&#91;$value&#93; as $key => $var) {\n if ($var === $GLO...
[ "0.7925965", "0.7877758", "0.7855095", "0.783103", "0.78293526", "0.77349675", "0.77349675", "0.77173024", "0.7609189", "0.7570749", "0.7535158", "0.7367719", "0.71579355", "0.6740479", "0.6491229", "0.64702916", "0.6421601", "0.63359356", "0.63359356", "0.63152003", "0.62769...
0.79668564
0
Get context id from sharing level. It follows how $sharinglevel is formed: $parts[0] | $parts[1] CONTEXT_SYSTEM | 0 CONTEXT_COURSECAT | $category>id CONTEXT_COURSE | $COURSE>id CONTEXT_MODULE | $cm>id CONTEXT_USER | $USER>id
Получите идентификатор контекста из уровня делегирования. Следующее описание показывает, как формируется $sharinglevel: $parts[0] | $parts[1] CONTEXT_SYSTEM | 0 CONTEXT_COURSECAT | $category>id CONTEXT_COURSE | $COURSE>id CONTEXT_MODULE | $cm>id CONTEXT_USER | $USER>id
public function get_contextid_from_sharinglevel($sharinglevel='') { if (empty($sharinglevel)) { $sharinglevel = $this->formdata->sharinglevel; } $parts = explode('_', $sharinglevel); $contextlevel = $parts[0]; $contextid = $parts[1]; if (!isset($parts[0]) ||...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_contextstring_from_sharinglevel($contextlevel) {\n // Depending on the context level the component can be:\n // -> system, -> category, -> course, -> module, -> user.\n switch ($contextlevel) {\n case CONTEXT_SYSTEM:\n $contextstring = 'system';\n ...
[ "0.68914044", "0.512862", "0.50891465", "0.49753767", "0.49725735", "0.48986244", "0.4871696", "0.48058227", "0.4703243", "0.4680104", "0.46600303", "0.4648824", "0.45194682", "0.4499009", "0.4444544", "0.439675", "0.43883005", "0.43698034", "0.43305847", "0.4292893", "0.4268...
0.8259235
0
Get context string from sharing level.
Получить строку контекста из уровня общей доступности.
public function get_contextstring_from_sharinglevel($contextlevel) { // Depending on the context level the component can be: // -> system, -> category, -> course, -> module, -> user. switch ($contextlevel) { case CONTEXT_SYSTEM: $contextstring = 'system'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContextString() {}", "public function as_string() { return $this->contexts[0][0]; }", "function print_context_name($context) {\n\n $name = '';\n switch ($context->contextlevel) {\n\n case CONTEXT_SYSTEM: // by now it's a definite an inherit\n $name = get_string('cores...
[ "0.7137533", "0.66095054", "0.63518804", "0.6336535", "0.6191034", "0.6180549", "0.6105712", "0.60559744", "0.59396285", "0.59109807", "0.58949393", "0.5889281", "0.58013237", "0.5793861", "0.57303977", "0.57297546", "0.5704507", "0.5704081", "0.5698332", "0.5688257", "0.5658...
0.778264
0
Get sharing level options.
Получить параметры уровня общей доступности.
public function get_sharinglevel_options() { global $USER; $labelsep = get_string('labelsep', 'langconfig'); // Separator usually is ': '.. $options = array(); $options[CONTEXT_USER.'_'.$USER->id] = get_string('user').$labelsep.fullname($USER); $parentcontexts = $this->context...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOptions() ;", "function attendance_get_sharedipoptions() {\n $options = array();\n $options[ATTENDANCE_SHAREDIP_DISABLED] = get_string('no');\n $options[ATTENDANCE_SHAREDIP_FORCE] = get_string('yes');\n $options[ATTENDANCE_SHAREDIP_MINUTES] = get_string('setperiod', 'attendance');\n\n ...
[ "0.5850662", "0.58217466", "0.58156776", "0.58041215", "0.5754577", "0.5700688", "0.5694497", "0.56819946", "0.56811047", "0.56770444", "0.56770444", "0.56767416", "0.5676558", "0.5664458", "0.56425667", "0.5633201", "0.5633201", "0.5632452", "0.56292176", "0.56292176", "0.56...
0.73345596
0
Display the welcome message of the save page.
Показать приветственное сообщение страницы сохранения.
public function welcome_save_message() { global $OUTPUT; $a = get_string('sharinglevel', 'mod_surveypro'); $message = get_string('welcome_utemplatesave', 'mod_surveypro', $a); echo $OUTPUT->notification($message, 'notifymessage'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function print_saved_message(){\n\t\techo '<div class=\"note_box\" id=\"saved_box\">'.$this->themename.' settings saved.</div>';\t\n\t}", "public function show_success_message() {\n\t\tif ( $this->have_settings_been_saved() ) {\n\t\t\techo '<p class=\"wpseo-message\"><span class=\"dashicons dashicons-yes\"></spa...
[ "0.71815765", "0.6867414", "0.6391332", "0.63368416", "0.6328995", "0.63036126", "0.6137587", "0.61175865", "0.60975385", "0.60872954", "0.60674614", "0.60303766", "0.6026331", "0.6004005", "0.5996234", "0.597738", "0.59634894", "0.59510297", "0.5950932", "0.5949654", "0.5949...
0.7231607
0
Display the welcome message of the import page.
Показать приветственное сообщение страницы импорта.
public function welcome_import_message() { global $OUTPUT; $a = get_string('tabutemplatepage2', 'mod_surveypro'); $message = get_string('welcome_utemplateimport', 'mod_surveypro', $a); echo $OUTPUT->notification($message, 'notifymessage'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function displayImport()\n {\n if(true === $error = $this->handleImport()){\n $result = $this->ImportForm();\n\n if($result['error'] == true)\n $error = $result['message'];\n else\n $success = $result['message'];\n }\n\n ...
[ "0.8023278", "0.6629119", "0.6485385", "0.64090276", "0.64077586", "0.6385336", "0.63826585", "0.6361984", "0.6340215", "0.63335955", "0.6285129", "0.62753975", "0.6237058", "0.6231096", "0.6148335", "0.61090153", "0.6103207", "0.6046125", "0.6034782", "0.60293347", "0.602536...
0.73273015
1
Display the welcome message of the apply page.
Показать приветственное сообщение страницы apply.
public function welcome_apply_message() { global $OUTPUT; $a = new \stdClass(); $a->uploadpage = get_string('tabutemplatepage3', 'mod_surveypro'); $a->savepage = get_string('tabutemplatepage2', 'mod_surveypro'); $message = get_string('welcome_utemplateapply', 'mod_surveypro', $a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function welcome() {\r\n\r\n return $this->render('welcome', array());\r\n }", "public function welcomeMessage()\n {\n $this->info('');\n $this->info('Welcome to Nigels Coffee Shop Robot Controller Simulator!');\n }", "static function welcome()\n\t{\n\t\techo 'wellcome to ...
[ "0.7156983", "0.6824484", "0.6708718", "0.67009014", "0.66923577", "0.66640747", "0.6565645", "0.6533739", "0.649942", "0.64794093", "0.6462009", "0.6440394", "0.64250344", "0.64250344", "0.64250344", "0.64250344", "0.64250344", "0.64250344", "0.64250344", "0.64250344", "0.64...
0.71818465
0
Display the usertemplates table.
Показать таблицу usertemplates.
public function display_usertemplates_table() { global $CFG, $USER, $OUTPUT; require_once($CFG->libdir.'/tablelib.php'); $candownloadutemplates = has_capability('mod/surveypro:downloadusertemplates', $this->context); $candeleteutemplates = has_capability('mod/surveypro:deleteusertempla...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ListTemplates()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tglobal $Config;\r\n\t\t\t\r\n\t\t\t$sql = \"select * from templates order by TemplateDisplayName asc\" ; \r\n\t\t\treturn $this->get_results($sql);\t\t\r\n\t }", "public function print_templates()\n {\n }", "function index()\n {\n ...
[ "0.66734797", "0.6565263", "0.65516055", "0.6485439", "0.6456997", "0.6439163", "0.6409092", "0.6350991", "0.6300258", "0.62570965", "0.6244033", "0.6222354", "0.6220532", "0.62126344", "0.6168257", "0.6156226", "0.6131265", "0.6118694", "0.6118185", "0.611494", "0.60947204",...
0.8275629
0
Prevent direct user input.
Запретить прямой ввод пользователя.
public function prevent_direct_user_input() { if ($this->action != SURVEYPRO_NOACTION) { require_sesskey(); } if ($this->action == SURVEYPRO_DELETEUTEMPLATE) { require_capability('mod/surveypro:deleteusertemplates', $this->context); } if ($this->action == ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function preventDefault() {\n\t\t$this->runDefault = false;\n\t}", "public function no_op() {\n\t\t\texit( 'Not permitted' );\n\t\t}", "function handleNoPrivRequest(){\n $class = apply_filters( 'mvc_theme_ajax_handle_class', $this->getControllerObject( $_POST['controller'] ), $_POST );\n \...
[ "0.65775144", "0.6124377", "0.58483416", "0.5693304", "0.56732726", "0.5643109", "0.561337", "0.5576258", "0.5507626", "0.54963505", "0.547298", "0.5459712", "0.54583657", "0.5435354", "0.54282236", "0.54250675", "0.5420112", "0.5418824", "0.5402777", "0.5381305", "0.5377653"...
0.766201
0