query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Independent Column Mapping. Keys are the real names in the table and the values their names in the application
public function columnMap() { return array( 'cd_upload' => 'cd_upload', 'nome_original' => 'nome_original', 'nome_servidor' => 'nome_servidor', 'criacao' => 'criacao', 'cd_unidade' => 'cd_unidade' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function columnMap()\n {\n //the values their names in the application\n return array(\n 'id' => 'code' ,\n 'the_name' => 'theName' ,\n 'the_type' => 'theType' ,\n 'the_year' => 'theYear'\n );\n }", "public function columnMap()\n...
[ "0.78786296", "0.7716914", "0.7581518", "0.7580315", "0.75181746", "0.7496103", "0.7490029", "0.74615186", "0.7422307", "0.73996055", "0.73713225", "0.73607874", "0.7356903", "0.7355668", "0.73356444", "0.7335067", "0.7334235", "0.7314454", "0.7294334", "0.7247176", "0.724464...
0.71719337
24
Hent en jobb fra databasen
public function __construct(Int $cron_id) { $query = new Query( "SELECT * FROM `" . Converter::TABLE . "` WHERE `id` = '#id' ", [ 'id' => $cron_id ], 'videoconverter' ); $data = $query->getArray(); if (!$data) { throw new Exception( 'Fant ikke CRON ID ' . $cron_id ); } $this->id = (int) $data['id']; $this->eier = new Eier( (int) $data['blog_id'], (int) $data['pl_id'], (int) $data['season'] ); $this->film = new Film( $data['type'], $data['b_id'], $data ); $this->fil = new Fil( $data['file_path'], $data['file_name'] ); $this->status = $data['status_progress']; $this->data = $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function markImportDatabaseDone() {}", "public function run()\n {\n DB::table('jobs')->insert([\n 'worker_id'=>1,\n 'client_id'=>2,\n 'status_id'=>3,\n 'name'=>'order1',\n 'description'=>\"description tutututututu\",\n 'price'=...
[ "0.6144874", "0.5986398", "0.5966359", "0.59496534", "0.59410703", "0.5828556", "0.58122295", "0.58017105", "0.5769671", "0.5727056", "0.5694499", "0.5665426", "0.5664027", "0.5662933", "0.56496733", "0.5648198", "0.5645631", "0.56454194", "0.56226707", "0.5612884", "0.560341...
0.0
-1
Oppdater jobbens overordnede status
public function saveStatus(String $status): void { if (!in_array($status, static::STATUS)) { throw new Exception( 'Kan ikke sette jobb-status til ' . $status . ' da den ikke er støttet' ); } $this->update('status_progress', $status); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateStatus(array $jobs);", "public function update_status();", "public function refreshTaskStatus(){\n\n $webCronResult = $this->webCronResults()->orderBy('code', 'desc')->first();\n\n if ($webCronResult) {\n\n if ($webCronResult->code >= 300) {\n // ba...
[ "0.7107267", "0.7099361", "0.6856061", "0.6627047", "0.66234565", "0.6594672", "0.6578937", "0.6506085", "0.64097893", "0.63432175", "0.6263854", "0.6255753", "0.6252873", "0.6227075", "0.6181117", "0.6165519", "0.60912836", "0.60596794", "0.60281", "0.60278136", "0.60137975"...
0.0
-1
Hent jobbens overordnede status
public function getStatus(): string { return $this->status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getJobStatus()\n {\n }", "protected function getSelfStatus() {}", "protected function getSelfStatus() {}", "public function update_status();", "abstract public function getStatus();", "public function statusBulu(){\r\n\t\t\treturn parent::lihatBulu();\r\n\t\t}", "public function r...
[ "0.68366736", "0.6549133", "0.6546785", "0.64989436", "0.64383966", "0.63693273", "0.63638496", "0.6354427", "0.6352624", "0.62968063", "0.6295633", "0.6295633", "0.6293467", "0.6250492", "0.6250492", "0.61886024", "0.61773145", "0.6167308", "0.6167308", "0.61234176", "0.6109...
0.0
-1
Hent info om eieren
public function getEier(): Eier { return $this->eier; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function information();", "public function afficherInformation()\n {\n //la version de la méthode implémenté dans la classe parent (Personne)\n return \"le héro est \".$this->pseudo.\" et est un \".$this->getCote();\n }", "public function getInformation();", "protected fun...
[ "0.6733211", "0.64752626", "0.6423097", "0.6372331", "0.63133025", "0.62065953", "0.61983454", "0.61983454", "0.5991071", "0.5907634", "0.5907634", "0.5900688", "0.5898299", "0.58945745", "0.58855236", "0.5878329", "0.5878329", "0.5875631", "0.58753085", "0.58556885", "0.5854...
0.0
-1
Hent info om filmen
public function getFilm(): Film { return $this->film; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function information();", "public function afficherInformation()\n {\n //la version de la méthode implémenté dans la classe parent (Personne)\n return \"le héro est \".$this->pseudo.\" et est un \".$this->getCote();\n }", "public function show(Filiere $filiere)\n {\n ...
[ "0.5958908", "0.58537966", "0.58209616", "0.5808039", "0.57933295", "0.5788794", "0.57839847", "0.57832426", "0.5762298", "0.5755125", "0.5736176", "0.5725711", "0.57168305", "0.56965715", "0.5638339", "0.56225854", "0.56210214", "0.5602461", "0.55993605", "0.5585581", "0.554...
0.0
-1
Hent detaljer om filen
public function getFil(): Fil { return $this->fil; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function filtes()\n {\n /*\n * The filters fetches are transported\n * to router Bus calls\n **/\n }", "public function show(Filme $filmes)\n {\n //\n }", "public function getIdFil()\n {\n return $this->idFil;\n }", "protected funct...
[ "0.60942745", "0.6044171", "0.5981389", "0.5974022", "0.59601825", "0.59399796", "0.5896837", "0.5877442", "0.5840485", "0.5824281", "0.5818902", "0.5784837", "0.5784837", "0.5784837", "0.57695365", "0.5677723", "0.5673326", "0.5663925", "0.56503814", "0.5644413", "0.5638005"...
0.6072827
1
Hent all info vi har om filmen Burde kanskje begrense noe hva som gis ut her? Hvis angitt keyparameter, vil den returnere verdi, eller false hvis verdien ikke finnes
public function getDatabaseData(String $key = null): array { if (!is_null($key)) { if (isset($this->data[$key])) { return $this->data[$key]; } return false; } return $this->data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasKeyValueParameter(): bool\n {\n return $this->has(Parameter\\JWKParameter::P_K);\n }", "function SetupKeyValues($key) {\r\n\t\tglobal $rekeningju;\r\n\t\t$arrKeyFlds = explode(EW_COMPOSITE_KEY_SEPARATOR, $key);\r\n\t\tif (count($arrKeyFlds) >= 1) {\r\n\t\t\t$rekeningju->kode_otoma...
[ "0.6247013", "0.62009287", "0.6191371", "0.6167822", "0.6003899", "0.5886515", "0.5886515", "0.5886515", "0.5886515", "0.5886515", "0.5886515", "0.5886515", "0.5886515", "0.5886515", "0.5881389", "0.585414", "0.58512414", "0.58498716", "0.58440274", "0.581488", "0.5785226", ...
0.0
-1
insert others leave type
public function save_leave_type($data = array()){ return $this->db->insert('leave_type', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allottedLeave(){\n if(empty($this->data)){\n //$alloted_leavesdata = $this->\n }\n else{\n \n }\n \n }", "function makeType($rType, $blocktype){\n sqlQuery(\"INSERT INTO types (type_...
[ "0.5142426", "0.5082389", "0.5064751", "0.49068695", "0.4893627", "0.48630047", "0.4795121", "0.47806665", "0.47775748", "0.47399652", "0.4737057", "0.47297826", "0.47103852", "0.47041103", "0.46873248", "0.46870318", "0.4686359", "0.468107", "0.46623477", "0.46175316", "0.46...
0.60432804
0
get all leave type for apply leave
public function get_leave_type(){ $this->db->select('*'); $this->db->from('leave_type'); $query=$this->db->get(); $data=$query->result(); $list = array('' => 'Select One...'); if(!empty($data)){ foreach ($data as $value) { $list[$value->leave_type_id]=$value->leave_type; } } return $list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_all_leave_type(){\n \t$this->db->select('*');\n \t$this->db->from('leave_type');\n \t$query=$this->db->get();\n \treturn $query->result();\n }", "function getLeaveTypes()\n {\n $leaveTypes = [];\n $leaves = DB::table('dbo.LEAVE_TYPE')->lists('leave_type')...
[ "0.7015487", "0.6967404", "0.61036795", "0.5900912", "0.56877154", "0.5634207", "0.5619556", "0.56008863", "0.5542771", "0.5446719", "0.54432833", "0.539795", "0.5340632", "0.5317936", "0.5301901", "0.5259336", "0.523336", "0.5229623", "0.5211691", "0.51794404", "0.5164349", ...
0.6223224
2
get all leave type
public function get_all_leave_type(){ $this->db->select('*'); $this->db->from('leave_type'); $query=$this->db->get(); return $query->result(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLeaveTypes()\n {\n $leaveTypes = [];\n $leaves = DB::table('dbo.LEAVE_TYPE')->lists('leave_type');\n $userGender = Employee::find(Auth::user()->Emp_id)->Emp_Gender;\n \n foreach ($leaves as $leaveType )\n {\n array_push($leaveType...
[ "0.75516534", "0.71069634", "0.66632444", "0.6558683", "0.62703604", "0.6269362", "0.6228708", "0.61700433", "0.5946417", "0.590239", "0.58780676", "0.57982624", "0.5764007", "0.57404125", "0.570456", "0.566397", "0.5626214", "0.55968493", "0.556556", "0.55309695", "0.5529872...
0.801312
0
get leave type by leave type id
public function get_leave_type_by_id($id){ $this->db->where('leave_type_id',$id); $query = $this->db->get('leave_type'); return $query->row(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function leaveType()\n {\n return $this->belongsTo(LeaveType::class, 'leave_type_id');\n }", "public function get_leave_type(){\n \t$this->db->select('*');\n \t$this->db->from('leave_type');\n \t$query=$this->db->get();\n \t$data=$query->result();\n $list = array('' => 'Sel...
[ "0.6812724", "0.62546927", "0.6137966", "0.6058944", "0.60555565", "0.60231405", "0.5924666", "0.5854124", "0.58376056", "0.5781426", "0.57241917", "0.56991005", "0.5622433", "0.55524373", "0.5545866", "0.5536764", "0.55139154", "0.549001", "0.54735565", "0.54720604", "0.5447...
0.8029744
0
delete leave type by id
public function delete_leave_type($id = null) { $this->db->where('leave_type_id',$id) ->delete('leave_type'); if ($this->db->affected_rows()) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete_type($id)\n\t\t{\n\t\t\n\t\t$this->db->where('revenue_id',$id);\n\t\t\n\t\t$this->db->delete($this->table_name);\n\t\t\n\t\t}", "public function deleteByIdType($id, $type);", "public function delete($id) {\n // Delete the type\n $this->getDb()->delete('eventtype', array('num_E...
[ "0.74041224", "0.72852546", "0.72507405", "0.70398813", "0.6975743", "0.66140383", "0.65837365", "0.6570395", "0.6519953", "0.64907527", "0.6439085", "0.64206415", "0.64180046", "0.63894266", "0.6370687", "0.6369166", "0.629657", "0.6261063", "0.6260483", "0.62580913", "0.625...
0.7647829
0
Return the ItemPart entity for the supplied id or null if not found.
public function find($id) { // Reading from cache first if ($this->_cache->has($id)) { return $this->_cache->get($id); } $prepSql = "SELECT {$this->_columnNames} FROM `{$this->_tableName}` " . "WHERE `id` = ?"; $pstmt = $this->_prepare($prepSql); $bindings = [$id]; $pstmt->execute($bindings); $dbRecord = $pstmt->fetch(\PDO::FETCH_ASSOC); $pstmt->closeCursor(); $entity = $this->_toEntity($dbRecord); // Now that we have retrieved the Entity, let's add it to the cache $this->_cache->set($id, $entity); return $entity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getById($id) {\n foreach ($this->items as $item) {\n if ($item->id() == $id) {\n return $item;\n }\n }\n \n return null;\n }", "public function getItem($id)\n {\n $this->loadItems();\n return isset($this->items[$...
[ "0.69224507", "0.6558311", "0.6539314", "0.6478853", "0.6414613", "0.6334524", "0.6263007", "0.6234165", "0.62075704", "0.6183862", "0.6147584", "0.6089886", "0.6064883", "0.60409445", "0.6023105", "0.6016889", "0.5977106", "0.596379", "0.5944548", "0.594121", "0.59346604", ...
0.5357453
87
Map an associative array DB record into a ItemPart Entity.
protected function _toEntity($dbRecord) { if (empty($dbRecord)) { return null; } return new ItemPart( $dbRecord['id'], $dbRecord['item_id'], $dbRecord['name'], $dbRecord['type_item_part_id'], $dbRecord['is_need_mod'] == 1, $dbRecord['image'] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function createEntity(array $row);", "public function toEntity($array);", "public function toEntity($array);", "protected function _rowToEntity($row) {\r\n \t$id = $row->{$this->_getPrimary()};\r\n \t\r\n \tif($this->_hasIdentity($id)) {\r\n \t\t$entity = $this->_getIdentity($i...
[ "0.5647026", "0.5434827", "0.5434827", "0.5239059", "0.5164255", "0.5164255", "0.5086436", "0.50439537", "0.5034887", "0.5000173", "0.4992006", "0.4948551", "0.49406523", "0.49344933", "0.4924414", "0.49004805", "0.4889416", "0.48704693", "0.48445737", "0.4818561", "0.4813407...
0.63341534
0
Retrieve option array with empty value
public function getAllOptions() { $result = []; foreach (self::getOptionArray() as $index => $value) { $result[] = ['value' => $index, 'label' => $value]; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmptyValues();", "public function toOptionArray($emptyLabel = '') {\n if($emptyLabel !== false && !$emptyLabel)\n $emptyLabel = Mage::helper('core')->__('-- Please Select --');\n \n return parent::toOptionArray($emptyLabel);\n }", "public function getOp...
[ "0.7248526", "0.6974299", "0.6927566", "0.6826012", "0.66438353", "0.6536376", "0.6497448", "0.6496091", "0.6437268", "0.6363146", "0.6352075", "0.63439274", "0.6250747", "0.62452984", "0.6222028", "0.62102556", "0.62085295", "0.6189132", "0.6181418", "0.6176706", "0.61664903...
0.5776547
84
Retrieve option text by option value
public function getOptionText($optionId) { $options = self::getOptionArray(); return isset($options[$optionId]) ? $options[$optionId] : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOptionText($value) {\n $options = $this->getAllOptions();\n foreach ($options as $option) {\n if ($option['value'] == $value) {\n return $option['label'];\n }\n }\n return false;\n }", "public function getOptionText($value)\n ...
[ "0.7324542", "0.71233946", "0.6881275", "0.6819372", "0.6802792", "0.6715897", "0.6519207", "0.6519207", "0.6519207", "0.64764524", "0.6433878", "0.6433878", "0.62758607", "0.6243528", "0.6229604", "0.6229604", "0.61794233", "0.6166231", "0.614617", "0.6144168", "0.6141262", ...
0.6071028
24
$mssql_ser= "192.168.1.59"; $mssql_db= "jest"; $mssql_user= "jestadmin"; $mssql_pass= "into99black"; mssql_connect($mssql_ser,$mssql_user,$mssql_pass) or die("Could not connect to MSSQL database"); mssql_select_db($mssql_db) or die("Table unavailable"); echo "START2";
function splitonspace($data) { $u_data=preg_split("/ +/",$data); $lname=array_pop($u_data); $fn=""; foreach ($u_data as $n => $v) { $fn=$v." "; } $dout=array(0=>$fn,1=>$lname); return $dout; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function conect_ssql(){\n\n $conn = mssql_connect($this->servidor, $this->usuario, $this->senha);\n if($conn == FALSE) die(\"Couldn't connect\");\n\n if(mssql_select_db($this->dbname, $conn))\n $result = \"Selected {$this->dbname} ok<br />\";\n else...
[ "0.75274545", "0.6930887", "0.68080163", "0.67765397", "0.66802174", "0.6568066", "0.6501982", "0.6423329", "0.6401815", "0.6387465", "0.63523215", "0.63277173", "0.62218636", "0.61079603", "0.60929745", "0.60575247", "0.6050017", "0.6035848", "0.6013343", "0.6011767", "0.600...
0.0
-1
Handles user login form. Uses PDO class to securely query database verifying if username and password exists.
public static function authenticate($user) { $db = DB::getInstance(); $resp = ""; try { $query = $db->prepare("SELECT * FROM `users` WHERE username=?"); $query->execute([$user['username']]); if ($row = $query->fetch(PDO::FETCH_ASSOC)) { $password = $row['password']; $ver = self::verifyPassword($user['password'], $password); $resp = ( $ver == TRUE ? json_encode($row) : json_encode($ver) ); } else { error_log("Problem with query"); } } catch (Exception $e) { $db->rollBack(); $resp = $e->getMessage(); } return $resp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function login(){\n\t\tif (empty($_POST['username'])) {\n\t\t\t$this->errors[] = \"Username field was empty.\";\n } elseif (empty($_POST['password'])) {\n $this->errors[] = \"Password field was empty.\";\n } elseif (!empty($_POST['username']) && !empty($_POST['password'])) { ...
[ "0.75218815", "0.7398707", "0.7253535", "0.716421", "0.71003133", "0.70955014", "0.7075609", "0.7041077", "0.7002006", "0.69728905", "0.6959259", "0.6936361", "0.6924928", "0.6921282", "0.6879245", "0.6859193", "0.68561876", "0.6855071", "0.6836097", "0.67767394", "0.67748934...
0.0
-1
Simple email script that's triggered if a decision aid user wants to send an email to the study administrator
public static function sendAnxietyEmail($email) { $to = ADMIN_EMAIL; $subject = "Decision aid user requested contact"; $mssg = "A breast cancer decision aid user has requested that someone "; $mssg .= "contact her about support options. Her email address is:\r\n\r\n"; $mssg .= $email; $header = "From: " . ADMIN_EMAIL . "\r\n"; $header .= "Bcc: dave_rothfarb@dfci.harvard.edu"; mail($to, $subject, $mssg, $header); return "Email has been sent"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function mail()\n {\n if(!(php_sapi_name() == 'cli-server'))\n return 403;\n\n import('SurveyMailer');\n\n $mailer = new SurveyMailer();\n $mailer->send();\n //$mailer->sendForParticipant(with(new SurveyMatcher())->getParticipantById(1));\n }", "function notify_request_client($email)...
[ "0.7360788", "0.6819686", "0.6604754", "0.6542428", "0.65334666", "0.6513322", "0.65036994", "0.64904356", "0.646865", "0.64024365", "0.6377022", "0.6365306", "0.6353499", "0.63419515", "0.6322707", "0.6319457", "0.6318369", "0.63136584", "0.6313477", "0.63003933", "0.6283735...
0.63886374
10
Obtains list of all decision aid users in database
public static function getUserList() { $db = DB::getInstance(); $resp = ""; try { $query = $db->query("SELECT id, first_name, last_name, username, lump, admin FROM `users` ORDER BY last_name ASC", PDO::FETCH_ASSOC); $rows = $query->fetchAll(); $resp = json_encode($rows); } catch (Exception $e) { $db->rollBack(); $resp = $e->getMessage(); } return $resp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLTIUsers();", "public function getAllActiveUsers()\n {\n $connection = Db::getConnection();\n\n $userDataRecords = $connection->fetchAll(\n \"SELECT id, name, email \n FROM {$this->tableName} \n WHERE active = ?\", \n ...
[ "0.6721477", "0.6676935", "0.66450995", "0.6623731", "0.6589885", "0.6536673", "0.65193135", "0.64881223", "0.64603025", "0.645175", "0.645175", "0.645175", "0.6444243", "0.6440348", "0.64389354", "0.64368135", "0.6429843", "0.64271814", "0.6407488", "0.6394742", "0.6394742",...
0.0
-1
Captures data from client user registration form, alphabetically sorts data to match table columns, securely inserts data into database using PDO.
public static function addUser($userData) { $db = DB::getInstance(); $columns = "admin, date_created, first_name, last_name, lump, password, username"; $placeholders = ":admin, :date_created, :first_name, :last_name, :lump, :password, :username"; $sorted = $userData; uksort($sorted, function ($val1, $val2) { return strncmp($val1, $val2, 2); }); $mssg = ""; // Insert form data into database try { $statement = $db->prepare("INSERT INTO `users` ($columns) VALUES ($placeholders)"); $statement->execute($sorted); // Grab the id of the newly inserted record and pass it back to client $mssg = $db->lastInsertId(); } catch (Exception $e) { $db->rollBack(); $mssg = $e->getMessage(); } return $mssg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register() {\n \n $controlquery = doquery(\"SELECT * FROM {{table}} WHERE id='1' LIMIT 1\", \"control\");\n $controlrow = mysql_fetch_array($controlquery);\n \n if (isset($_POST[\"submit\"])) {\n \n extract($_POST);\n \n $errors = 0; $errorlist = \"\";\n i...
[ "0.64977", "0.6479849", "0.63656586", "0.63578534", "0.6337286", "0.62500536", "0.6245404", "0.62007517", "0.6192037", "0.6191592", "0.61715764", "0.6137734", "0.6136647", "0.6136335", "0.61072147", "0.6105207", "0.61049545", "0.6098253", "0.60967386", "0.60888857", "0.607636...
0.0
-1
Update a user's record using data from client update form. Sort data entries as done in addUser method
public static function updateUser($userData) { $db = DB::getInstance(); $id = $userData['id']; $sorted = $userData; // Remove user id before sorting so it can be added to the end // of the soon to be sorted array unset($sorted['id']); uksort($sorted, function ($val1, $val2) { return strncmp($val1, $val2, 2); }); $updates = self::prepareUpdate($sorted); // Add user id back in array_push($sorted, $id); try { $statement = $db->prepare("UPDATE `users` SET $updates"); $statement->execute(array_values($sorted)); $mssg = "Transaction successful, user updated"; } catch (Exception $e) { $db->rollBack(); $mssg = $e->getMessage(); } return $mssg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateUser(){\n\t\t\tif($this->rest->getRequestMethod() != \"PUT\"){\n\t\t\t\t$this->rest->response('',406);\n\t\t\t\texit;\n\t\t\t}\n\t\t\t//Validate the user\n\t\t\t$validUser = $this->validateUser(\"admin\", \"basic\");\n\t\t\tif ($validUser) {\n\t\t\t\tif (isset($_POST['user_name']) && isset($_POST['p...
[ "0.72046643", "0.7049093", "0.7004831", "0.69486153", "0.6914516", "0.6852044", "0.6818012", "0.6806075", "0.6792286", "0.6713711", "0.6704334", "0.6698259", "0.6661887", "0.66524005", "0.66427976", "0.661599", "0.66091025", "0.6604343", "0.6593484", "0.6590227", "0.65733427"...
0.6535107
22
Delete user from database
public static function removeUser($id) { $db = DB::getInstance(); $mssg = ""; try { $db->beginTransaction(); $db->exec("DELETE FROM `users` WHERE ID=$id"); $db->commit(); $mssg = "Transaction successful, user deleted"; } catch (Exception $e) { $db->rollBack(); $mssg = $e->getMessage(); } return $mssg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteUser()\n {\n $this->delete();\n }", "public function delete() {\n\t\t$query = \"DELETE FROM Users WHERE userId = :id\";\n\t\t$query_params = array(':id' => $this->userData['userId']);\n\t\texecuteSQL($query, $query_params);\n\t}", "public function delete() {\n try {\n ...
[ "0.87488234", "0.8642228", "0.83821976", "0.83556765", "0.82819825", "0.80244935", "0.7997251", "0.7979946", "0.78483224", "0.7843256", "0.7814623", "0.7740485", "0.77305776", "0.77305776", "0.77305776", "0.77167374", "0.7667169", "0.7659463", "0.7650734", "0.7633149", "0.760...
0.0
-1
Simple password verification function
private static function verifyPassword($submittedPassword, $dbPassword) { return password_verify($submittedPassword, $dbPassword); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function passwordValid($password) {\n\treturn true;\n}", "public function checkPassword($value);", "function check_password($password)\n{\n return ($password == 'qwerty');\n}", "public function verify($password, $securePass);", "function passwd_verify(string $password, string $hash): bool\n{\n return...
[ "0.8108709", "0.80354327", "0.79714274", "0.7850707", "0.7739929", "0.7737853", "0.77277213", "0.7719317", "0.7676892", "0.76546663", "0.7639732", "0.755541", "0.7532916", "0.75009954", "0.7466339", "0.74472564", "0.74453133", "0.7430817", "0.7420084", "0.7362727", "0.7361647...
0.0
-1
Format array into SQL statement in prep for inserting into database
private static function prepareUpdate($toupdate) { $updates = ""; $keys = array_keys($toupdate); for($i = 0; $i < count($keys); $i++) { $updates .= $keys[$i] . "=?"; $updates .= ($i < count($keys) - 1 ? ", " : " "); } $updates .= "WHERE id=?"; return $updates; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function db_array_to_insert_sqladd( $arr ) {\n\t$s = '';\n\tif ( DB_TYPE == 'access' )$arr = toutf( $arr );\n\t$keys = array();\n\t$values = array();\n\tforeach ( $arr as $k => $v ) {\n\t\t$k = ( $k );\n\t\t$v = ( $v );\n\t\t$keys[] = '`' . $k . '`';\n is_array( $v ) || is_object( $v ) and $v=tojson($v);\n...
[ "0.76524454", "0.7577538", "0.7515403", "0.7390087", "0.7206968", "0.7112595", "0.70155007", "0.70139986", "0.6951629", "0.69034773", "0.6891097", "0.68838865", "0.68306696", "0.6820923", "0.67391145", "0.6728411", "0.670877", "0.6705099", "0.67012435", "0.6696875", "0.667712...
0.0
-1
/ \Peanut\Phalcon\Db::name('master')>sets( 'insert into test (a,b,c,d) values (:a,:b,:c,:d)', [ [ ':a' => 1, ':b' => 2, ':c' => 1, ':d' => 2, ], [ ':a' => 1, ':b' => 2, ':c' => 1, ':d' => 2, ], [ ':a' => 1, ':b' => 2, ':c' => 1, ':d' => 2, ], ] ); => insert into test(a,b,c,d) values(:a0, :b0, :c0, :d0),(:a1, :b1, :c1, :d1),(:a2, :b2, :c2, :d2) [ [:a0] => 1 [:b0] => 2 [:c0] => 1 [:d0] => 2 [:a1] => 1 [:b1] => 2 [:c1] => 1 [:d1] => 2 [:a2] => 1 [:b2] => 2 [:c2] => 1 [:d2] => 2 ]
public function sets($statement, $bindParameters) { if ( 0 < \count($bindParameters) && 1 === \preg_match('/(?P<control>.*)(?:[\s]+)values(?:[^\(]+)\((?P<holders>.*)\)/Us', $statement, $m) ) { $holders = \explode(',', \preg_replace('/\s/', '', $m['holders'])); $newStatements = []; $newBindParameters = []; foreach ($bindParameters as $key => $value) { $statements = []; foreach ($holders as $holder) { $statements[] = $holder . $key; $newBindParameters[$holder . $key] = $value[$holder]; } $newStatements[] = '(' . \implode(', ', $statements) . ')'; } $newStatement = $m['control'] . ' values ' . \implode(', ', $newStatements); try { if (self::execute($newStatement, $newBindParameters, true)) { return \count($bindParameters); } } catch (\PDOException $e) { throw $e; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testMultipleInserts()\n {\n $statement = $this->getQueryBuilderConnection()\n ->insert()\n ->into('querybuilder_tests')\n ->values(\n [\n [\n 'id' => 10,\n 'languageId'...
[ "0.663163", "0.64041233", "0.62730074", "0.6219013", "0.59546626", "0.58772254", "0.5745428", "0.5741173", "0.5672622", "0.5654515", "0.56194955", "0.56147915", "0.5599889", "0.5578452", "0.5576814", "0.556198", "0.55512154", "0.5547503", "0.5542283", "0.5532702", "0.5530291"...
0.0
-1
Display a listing of the resource.
public function index() { $result = Artical::where('is_delete','1') ->orderby('id','desc') ->with('user') ->paginate(); return view('artical.index', compact('result')); // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // return view('artical.new'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $todate = date("Y-m-d-H-i-s"); $this->validate($request, [ 'title' => 'required|min:10', 'body' => 'required|min:20', ]); // $request->artical_image->store('image_name'); $check_has = $request->hasFile('image_name'); $file_name = $request->file('image_name'); $name = $todate.'.'.$file_name->getClientOriginalExtension(); $path_url = public_path('/uploads/articals'); //file uploads $save_data = [ 'title'=>$request->title, 'body'=>$request->body, 'image_name'=>$name, 'image_path'=>$path_url, ]; $data = $request->user()->articals()->create($save_data); if($data->toarray()){ $path = $path_url.'/'.$data->id; File::makeDirectory($path, $mode = 0777, true, true); FileUploadComponent::upload($check_has,$file_name, $path, $name); $request->session()->flash('success', 'Record successfully added!'); }else{ $request->session()->flash('warning', 'Record not added!'); } return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show(Artical $artical) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047...
0.0
-1
Show the form for editing the specified resource.
public function edit(Artical $artical) { $artical = Artical::findorFail($artical->id); return view('artical.edit',compact('artical')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Artical $artical) { $todate = date("Y-m-d-H-i-s"); $this->validate($request, [ 'title' => 'required|min:10', 'body' => 'required|min:20', 'image_name' => 'required', ]); $me = $request->user(); if( $me->hasRole('Admin') ) { $artical = Artical::findOrFail($artical->id); } else { $artical = $me->articals()->findOrFail($artical->id); } $check_has = $request->hasFile('image_name'); $file_name = $request->file('image_name'); $name = $todate.'.'.$file_name->getClientOriginalExtension(); $path_url = public_path('/uploads/articals'); $path = $path_url.'/'.$artical->id; $imagename = FileUploadComponent::upload($check_has,$file_name, $path, $name); $save_data = [ 'title'=>$artical->title, 'body'=>$artical->body, 'image_name'=>$imagename, ]; $data = $artical->update($save_data); if($data){ $request->session()->flash('success', 'Record successfully added!'); }else{ $request->session()->flash('warning', 'Record not added!'); } return redirect()->route('articals.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy(Artical $artical) { $me = Auth::user(); if($me->hasRole('admin')){ $post = Artical::findorFail($artical->id); }else{ $post = $me->artical()->findorFail($artical->id); } Artical::where('id',$post->id) ->update([ 'is_delete'=>'0', 'delete_by'=>$post->user_id, ]); flash()->success('Post has been deleted.'); return redirect()->route('articals.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Save a new entity in repository
public function create(array $attributes);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save($entity);", "public function save($entity);", "public function save($entity);", "public function saveEntity($entity)\n\t{\n\t\t$entityManager = $this->getDoctrine()->getManager();\n\t $entityManager->persist($entity);\n\t $entityManager->flush();\n\t}", "public function saveModel...
[ "0.7721987", "0.7721987", "0.7721987", "0.72997355", "0.7240121", "0.70330256", "0.70183027", "0.6965358", "0.6887411", "0.685511", "0.6836253", "0.6811672", "0.6758604", "0.6739007", "0.670642", "0.66952485", "0.6689463", "0.6615146", "0.6613949", "0.6612068", "0.65979916", ...
0.0
-1
Delete a entity in repository by model
public function delete($id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteModel($entity){\n $this->entityManager->remove($entity);\n $this->entityManager->flush();\n }", "public function delete(Identifiable $model);", "public function delete($entity);", "public function delete($model);", "public function delete(Model $model);", "public fu...
[ "0.78725386", "0.7590369", "0.7589358", "0.746357", "0.74503756", "0.74503756", "0.73578537", "0.7321317", "0.7295291", "0.7205994", "0.71555907", "0.7140213", "0.7120578", "0.7114568", "0.7109538", "0.7034707", "0.70044404", "0.70030516", "0.6989801", "0.6891775", "0.6823149...
0.0
-1
Find data by id
public function find($id, $columns = ['*']);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function find($id);", "public static function findById($id);", "function findById($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public function find($id);", "public funct...
[ "0.79497033", "0.78082377", "0.7724701", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0.771992", "0....
0.0
-1
Find data by field and value
public function firstByField($field, $value, $columns = ['*']);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findBy($field, $value);", "public static function get_data_by($field, $value)\n {\n }", "public function findEquals($field, $value);", "public function find($value);", "public function findBy($field, $value, $operator = '=');", "function _get_by($field, $value = array())\r\n...
[ "0.76875156", "0.72457445", "0.7052904", "0.6899644", "0.6848747", "0.6725298", "0.6681301", "0.6663246", "0.658952", "0.658952", "0.65888345", "0.6581572", "0.6561277", "0.6549663", "0.6521565", "0.65203655", "0.650544", "0.64730877", "0.6463947", "0.64623547", "0.64389515",...
0.5923856
49
Find data by multiple fields
public function firstWhere(array $where, $columns = ['*']);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findByData($a,$b=null,$c=null, $d=null, $e=null, $f=null) {\n\t\tif (!is_array($a) && $b !== null) {\n\t\t\t$keyValues = array($a=>$b);\n\t\t\tif ($c) {\n\t\t\t\t$multipleResults = $c;\n\t\t\t}\n\t\t\tif ($d!==null) {\n\t\t\t\t$neededMatches = $d;\n\t\t\t} \n\t\t\tif ($e!==null) {\n\t\t\t\t$contain...
[ "0.64155215", "0.6295917", "0.6271706", "0.62248236", "0.62094456", "0.60870945", "0.6078204", "0.59798265", "0.5959787", "0.5950257", "0.5932757", "0.58885247", "0.5873576", "0.58387613", "0.58340204", "0.5829027", "0.5801688", "0.5796202", "0.5783644", "0.5781686", "0.57812...
0.0
-1
Retrieve first data of repository, or create new Entity
public function firstOrCreate(array $attributes = []);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findOneEntity()\n {\n $company = $this->em->getRepository('APICoreBundle:Company')->findOneBy([\n 'title' => 'Test Company'\n ]);\n\n if ($company instanceof Company) {\n return $company;\n }\n\n return $this->createEntity();\n }", "p...
[ "0.69085836", "0.6349321", "0.6272332", "0.6013648", "0.6005854", "0.59974056", "0.5992053", "0.5964169", "0.5964169", "0.5964169", "0.59245723", "0.58984715", "0.5878729", "0.5856606", "0.58538646", "0.5825818", "0.5805329", "0.57861966", "0.5742425", "0.57242286", "0.571416...
0.0
-1
Insert new record into database
public function insert($attributes);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createNew() {\n $this->db->insert($this->tableName, $this->mapToDatabase());\n $this->id = $this->db->insert_id();\n }", "public function insertRecord()\n\t{\n\t\tif($this->user->hasRight($this->getHandler()->getAddRight()))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$record = $this-...
[ "0.7519285", "0.74086577", "0.7300573", "0.72487354", "0.7213725", "0.7169047", "0.7165296", "0.7108887", "0.7078733", "0.7057451", "0.70544875", "0.7054119", "0.70453686", "0.70348287", "0.6979119", "0.6963362", "0.6917416", "0.68957126", "0.6874601", "0.6865012", "0.6856195...
0.0
-1
Update a entity in repository by model
public function update($id, array $attributes);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($entity);", "public function update($entity);", "public function update($entity)\n {\n \n }", "public function update($entity){ \n //TODO: Implement update record.\n }", "public function update(stubObject $entity);", "public function update(Entity $entity);",...
[ "0.74115294", "0.74115294", "0.71164316", "0.706642", "0.7039792", "0.6995776", "0.69682", "0.68942565", "0.6874243", "0.6826137", "0.6796669", "0.67930496", "0.6779532", "0.6744282", "0.6704778", "0.6573136", "0.6553765", "0.65467274", "0.64862984", "0.6480552", "0.6440242",...
0.0
-1
Create or update a record matching the attributes, and fill it with values.
public function updateOrCreate(array $attributes, array $values = []);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateOrCreateRecord(array $record) {\n /** @var CmfDbModel|KeyValueModelHelpers $this */\n if (empty($record['key'])) {\n throw new DbModelException($this, '$record does not contain [key] key or its value is empty');\n } else if (!array_key_exists('value', $record))...
[ "0.6513278", "0.64137524", "0.6407186", "0.6340457", "0.6192482", "0.609686", "0.6059493", "0.60562354", "0.59924245", "0.593393", "0.5900355", "0.5859465", "0.58454156", "0.5824891", "0.580954", "0.57782364", "0.5773031", "0.5712245", "0.56930876", "0.56304836", "0.5617712",...
0.63327456
4
Get an array with the values of a given column.
public function pluck($column, $key = null);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCol() : array\n\t{\n\t\treturn $this->fetchAllFromColumn();\n\t}", "public function result_column($column)\n {\n $output = array();\n\n if (is_bool($this->result))\n {\n return $output;\n }\n\n while ($row = $this->result->fetch_assoc())\n ...
[ "0.7637657", "0.7627025", "0.7569935", "0.7388444", "0.73434395", "0.72554815", "0.725229", "0.7224806", "0.71995115", "0.7098746", "0.7085926", "0.70714974", "0.70001453", "0.6970375", "0.6969906", "0.69535625", "0.69414085", "0.69306844", "0.69168395", "0.68833756", "0.6856...
0.0
-1
Retrieve all data of repository, paginated
public function paginate($limit = null, $columns = ['*']);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchAll()\n {\n return Accessory::paginate(25);\n }", "protected function getAll(){\n return $this->orderBy('id','desc')->paginate(10);\n }", "public function findAllWithPagination(): LengthAwarePaginator;", "public function findAllWithPagination(): LengthAwarePaginato...
[ "0.74444866", "0.74282986", "0.73016363", "0.73016363", "0.7294588", "0.6995143", "0.6995143", "0.6995143", "0.6994534", "0.6994534", "0.68970305", "0.68278205", "0.6815231", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0.67807215", "0....
0.0
-1
Run the database seeds.
public function run() { $this->command->info('Seeding Memberships'); $membership = [ [ 'name' => 'Sky Member', 'direct_bonus' => '10%', ], [ 'name' => 'Iron', 'direct_bonus' => '12%', ], [ 'name' => 'Steel', 'direct_bonus' => '15%', ], [ 'name' => 'Crystal', 'direct_bonus' => '18%', ], [ 'name' => 'Master', 'direct_bonus' => '20%', ], [ 'name' => 'Champion', 'direct_bonus' => '25%', ], [ 'name' => 'Titan', 'direct_bonus' => '25%', ], ]; foreach($membership as $member) { DB::table('membership')->insert([ 'name' => $member['name'], 'direct_bonus' => $member['direct_bonus'], ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
put your code here
public function post() { $this->data = $this->param(); foreach ($this->data as $ms) { $muestra = new Muestra(); $muestra->tomamuestra_fecha = $ms['fechatoma']; $muestra->tomamuestra_hora = $ms['horatoma']; $muestra->recepcionmuestra_fecha = $ms['fecharecepcion']; $muestra->recepcionmuestra_hora = $ms['horarecepcion']; $muestra->tipomatrizanalizada_id = $ms['tipomatriz']; $muestra->tipomuestra_id = $ms['tipomuestra']; $muestra->codigomuestra = $ms['codigomuestra']; $muestra->lugartomamuestra_id = $ms['lugarmuestra']; $muestra->lugartomamuestratexto = $ms['lugartomamuestratexto']; $muestra->formato_id = $ms['formato_id']; $muestra->save(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n //\n \n }", "public function run()\n\t{\n\t\t//\n\t}", "public function preExecute(){\n\n\t\n\t}", "function script()\n {\n }", "public function run()\n {\n \n }", "public function run()\n {\n \n }", "public...
[ "0.60586566", "0.59289104", "0.5919654", "0.5899511", "0.5838488", "0.5838488", "0.58356965", "0.5814271", "0.5814271", "0.57796824", "0.5701954", "0.5700516", "0.5685669", "0.5684617", "0.5684617", "0.5684617", "0.5639208", "0.563027", "0.56278986", "0.56231225", "0.5620407"...
0.0
-1
escapeXML function helps you escape special characters in XML
function escapeXML($strItem, $forDataURL) { //Common replacements $findStr = array("&", "<", ">", "'"); $repStr = array("&amp;", "&lt;", "&gt;", "&apos;"); $strItem = str_replace($findStr, $repStr, $strItem); //We've not considered any special characters here. //You can add them as per your language and requirements. //Return return $strItem; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function xml_escape($value)\n{\n return htmlspecialchars(preg_replace('#[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F]+#', '',\n $value), ENT_QUOTES);\n}", "public static function escapeXML( string $xml, array $escape ) {\n\n // Escape HTML.\n $xml = self::escapeHTML($xml, $escape);\n\n // Escape query st...
[ "0.8183405", "0.81185", "0.76584536", "0.762911", "0.7500431", "0.73642755", "0.7314889", "0.7307573", "0.72541493", "0.71971595", "0.7114054", "0.7102265", "0.7026569", "0.6823563", "0.6746851", "0.67413294", "0.6724982", "0.66889006", "0.6618022", "0.6611725", "0.6592711", ...
0.7584177
4
getPalette method returns a value between 15 depending on which paletter the user wants to plot the chart with. Here, we just read from Session variable and show it In your application, you could read this configuration from your User Configuration Manager, database, or global application settings
function getPalette() { //Return return (((!isset($_SESSION['palette'])) || ($_SESSION['palette']=="")) ? "2" : $_SESSION['palette']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getColorPalette() {\n\t\treturn 'XLSConfig::$systemPalette';\n\t}", "public function tcb_get_palettes_from_config() {\n\t\treturn ! empty( $this->skin_palettes_config['palette'] ) ? $this->skin_palettes_config['palette'] : [];\n\t}", "public function getPaletteColours() {\n\t\treturn array(\n\t...
[ "0.6487676", "0.5982131", "0.5815626", "0.5804494", "0.5717699", "0.5594531", "0.54597574", "0.53283125", "0.5303035", "0.5261232", "0.5253047", "0.5227681", "0.5208537", "0.5196157", "0.51812506", "0.5174102", "0.5156563", "0.51425695", "0.50963384", "0.5065445", "0.506498",...
0.7155442
0
getAnimationState returns 0 or 1, depending on whether we've to animate chart. Here, we just read from Session variable and show it In your application, you could read this configuration from your User Configuration Manager, database, or global application settings
function getAnimationState() { //Return return (($_SESSION['animation']<>"0") ? "1" : "0"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAnimation($param){\n $this->_config_mapper(array('showAnim' => $param)); \n }", "public function isSequencedAnimation()\n {\n return $this->sequencedAnimation;\n }", "public function getAnimated()\r\n {\r\n return $this->animated;\r\n }", "function Ge...
[ "0.59224045", "0.5508384", "0.5494885", "0.5485116", "0.54485595", "0.54107696", "0.51833314", "0.50292295", "0.4976681", "0.49281514", "0.49083036", "0.49083036", "0.49083036", "0.48390016", "0.48361978", "0.47406563", "0.46791282", "0.46033108", "0.45613772", "0.44695055", ...
0.6935687
0
getCaptionFontColor function returns a color code for caption. Basic idea to use this is to demonstrate how to centralize your cosmetic attributes for the chart
function getCaptionFontColor() { //Return a hex color code without # //FFC30C - Yellow Color return "666666"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}", "public function getTextColor() {}", "public function getTextColor() {}", "public function getFontColor()\n {\n if (ar...
[ "0.6232591", "0.5990622", "0.59901017", "0.59293044", "0.5877246", "0.58543503", "0.5795254", "0.57243913", "0.5675407", "0.56454533", "0.56267", "0.5616569", "0.55259067", "0.5494671", "0.54927963", "0.54718196", "0.54341197", "0.5401345", "0.5379341", "0.5346611", "0.532326...
0.8533714
0
MonthName function converts a numeric integer into a month name Param: $intMonth a numver between 112, otherwise defaults to 1 Param: $flag if true, short name; if true, long name;
function MonthName($intMonth,$flag) { $arShortMonth = array (1=>"Jan", 2=>"Feb", 3=>"Mar", 4=>"Apr", 5=>"May", 6=>"Jun", 7=>"Jul", 8=>"Aug", 9=>"Sep", 10=>"Oct", 11=>"Nov", 12=>"Dec"); $arLongMonth = array (1=>"January", 2=>"February", 3=>"March", 4=>"April", 5=>"May", 6=>"June", 7=>"July", 8=>"August", 9=>"September", 10=>"October", 11=>"November", 12=>"December"); if ($intMonth<1 || $intMonth>12) $intMonth=1; if ($flag) return $arShortMonth[$intMonth]; else return $arLongMonth[$intMonth]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMonthName($var=false){\n\tif (!$var) $var=@$this->actmonth;\n\tif ($this->monthNames) return $this->monthNames[$var-1];\n\tswitch($var){\n\t\tcase 1: return $this->jan;\n\t\tcase 2: return $this->feb;\n\t\tcase 3: return $this->mar;\n\t\tcase 4: return $this->apr;\n\t\tcase 5: return $this->may;\n\t\tc...
[ "0.75161004", "0.74652904", "0.7144807", "0.7098847", "0.7093419", "0.7051912", "0.7020693", "0.6910796", "0.68853194", "0.68797356", "0.6863898", "0.6691211", "0.6668919", "0.6650689", "0.66392004", "0.6626972", "0.65991753", "0.65896904", "0.65835977", "0.65091485", "0.6477...
0.80633587
0
Checks the credentials, if correct the LoggedIn session is set to true.
public function doLogin($username) { $_SESSION[Strings::$sessionLocation] = true; $_SESSION[Strings::$sessionUsername] = $username; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function checkAuth()\n {\n $this->isAuthenticated = false;\n $isLoggedIn = is_user_logged_in();\n\n if ($isLoggedIn) {\n $this->username = wp_get_current_user()->user_login;\n $id = wp_get_current_user()->ID;\n $meta = get_user_meta($id, 'wp_capabili...
[ "0.74131954", "0.7312797", "0.7286231", "0.7178735", "0.7157975", "0.7142332", "0.7106648", "0.7104867", "0.7069757", "0.7027854", "0.70036083", "0.6982118", "0.6962405", "0.6922792", "0.68994653", "0.68857527", "0.6879094", "0.6866214", "0.6853381", "0.682701", "0.6816029", ...
0.0
-1
When a user wants to logout, the session is returned to be null.
public function doLogout($message = '') { $_SESSION[Strings::$sessionLocation] = null; $this->save($message); header(Strings::$headerRedirectString); exit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logout()\n {\n return $this->_user->logout('/inloggen');\n }", "public function logout()\n {\n DbModel::logUserActivity('logged out of the system');\n\n //set property $user of this class to null\n $this->user = null;\n\n //we call a method remove insid...
[ "0.76927483", "0.7637352", "0.7557203", "0.7519175", "0.74897796", "0.7475519", "0.74734765", "0.74223876", "0.7407034", "0.7385174", "0.73758626", "0.73521185", "0.73419976", "0.734172", "0.7329475", "0.73267126", "0.73198104", "0.73075217", "0.73051906", "0.72971433", "0.72...
0.0
-1
Function for checking if a user is currently logged in or not.
public function isLoggedIn() { if(!(isset($_SESSION[Strings::$sessionLocation])) || $_SESSION[Strings::$sessionLocation] === false) { return false; } else { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isLoggedIn()\n {\n return (bool)Users::getCurrentUser();\n }", "public function isCurrentlyLoggedIn() {}", "public function isLoggedIn()\n {\n return ($this->userInfo->userid ? true : false);\n }", "function wv_is_user_loggedin() {\n $output = 0;\n ...
[ "0.8470185", "0.84182245", "0.8369745", "0.8337277", "0.8335983", "0.8335983", "0.831586", "0.8312709", "0.82547545", "0.8250588", "0.8223358", "0.8221309", "0.8179276", "0.81488985", "0.8136568", "0.81245434", "0.81224453", "0.81077695", "0.80807716", "0.8061728", "0.8052918...
0.0
-1
These functions were originally located in a MessageView class that now is deleted. Function for saving a message to the session.
public function save($string) { $_SESSION[Strings::$message] = $string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save()\n {\n /* BENCHMARK */ $this->benchmark->mark('func_save_start');\n\n $message=$this->get_input_vals();\n\n // create conversation or get\n \tif (0==$message['cid'] &&\n is_numeric($message['uid']))\n \t{\n $this->load->model('node_...
[ "0.7069534", "0.68828976", "0.65439385", "0.65314984", "0.6490935", "0.6409848", "0.63511276", "0.6346633", "0.6311775", "0.620563", "0.61426276", "0.612741", "0.6115879", "0.6071533", "0.6045948", "0.5988397", "0.59733033", "0.5972189", "0.59654236", "0.59636277", "0.5928682...
0.62418205
9
Function for retrieving the message, present it, and delete it.
public function load() { if(isset($_SESSION[Strings::$message])) { $ret = $_SESSION[Strings::$message]; } else { $ret = Strings::$emptyString; } $_SESSION[Strings::$message] = Strings::$emptyString; return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function messageDelete(Message $message);", "public function delete() {\n\t\t$message = $this->discussion->message(['id' => $this->request->id]);\n\n\t\tif ($this->discussion->pull_message($message)) {\n\t\t\treturn $this->render(['head' => true, 'status' => 204]);\n\t\t}\n\n\t\treturn $this->render(['head' => t...
[ "0.7165039", "0.70746726", "0.6632186", "0.65899706", "0.65297425", "0.65070647", "0.6403707", "0.63769984", "0.6239005", "0.6159924", "0.6130472", "0.60903484", "0.6079431", "0.607659", "0.6022567", "0.601643", "0.60094184", "0.59993154", "0.59977055", "0.59827805", "0.59628...
0.0
-1
public function lista($organigrama_id = '', $estado2 = '', $condicion = '')
public function lista($where = '', $group = '') { $sql = "SELECT * FROM f_listado_cargos() " . $where . " " . $group; //echo "---->".$sql; $this->_db = new Cargos(); return new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listar_anuncios($opcao){\n $arrayAnuncios=[];\n //Peciso disto por causa de pesquisas pelo nome/localizacao e pelas pesquisas das caracteristicas\n $saber=0;\n $nova=\"\";\n if($opcao==-1)$saber=2;\n if(!strcmp($opcao[0],\"*\")==true){\n\n for ($i=0; $i <strlen($opcao) ; $i++) {\n ...
[ "0.6698018", "0.6599022", "0.65928453", "0.63955367", "0.6388347", "0.6320224", "0.62810683", "0.6246455", "0.6156479", "0.61469203", "0.61369365", "0.61183906", "0.61096436", "0.6107095", "0.6095871", "0.60911703", "0.6089838", "0.6086996", "0.6083015", "0.6043202", "0.60387...
0.0
-1
public function listapac($estado = '', $organigrama_id = '',$fecha_ini='',$fecha_fin='')
public function listapac($estado = '', $where = '') { //$where = ''; if ($estado == 1) { $where .= " and estado is NULL "; } $sql = "select * from f_listado_pacs() where baja_logica=1 " . $where . " order by fecha_ini asc"; $this->_db = new Cargos(); return new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function citas_aplicarFiltrosCitas($fechaInicial, $fechaFinal, $usuarios, $tipoCita, $idPropietario, $paciente){\n \t\n\t\t\t$resultado = array();\n\t\t\t//$adicionQuery = \"WHERE 1 \";\n\t\t\t\n\t\t\tif(sizeof($usuarios) > 0){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(sizeof($usuarios) > 1){\n\t\t\t\t\t$andOr...
[ "0.6901112", "0.67792714", "0.6762469", "0.66537935", "0.66196746", "0.6592385", "0.65196514", "0.64192045", "0.63940555", "0.63709646", "0.6342002", "0.6335485", "0.63296986", "0.63169634", "0.628279", "0.6238928", "0.6208654", "0.62078506", "0.6202557", "0.62000996", "0.619...
0.73345286
0
/ Get Filtros resolucion administrativa
public function getFiltroResolucion() { $resultado = array(); $sql = " SELECT STRING_AGG(v.tipo_resolucion,',') AS o_resultado FROM ( SELECT CAST(r.tipo_resolucion AS CHARACTER VARYING) FROM cargos c INNER JOIN resoluciones r ON c.resolucion_ministerial_id = r.id WHERE c.baja_logica = 1 GROUP BY r.id,r.tipo_resolucion ORDER BY r.id ) AS v "; $this->_db = new Cargos(); $arr = new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql)); if (count($arr) > 0) { /** * Para agregar un valor nulo al inicio se añade una coma */ $res = $arr[0]->o_resultado; $resultado = explode(",", $res); } return $resultado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function consultarFacturadoresResolucion(){\n\t\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT FR.idFacturadoresResolucionDian, FR.idFacturador, FR.idResolucionDian, F.identificacion, F.nombre, F.apellido,\n\t\t\t\t\tR.numeroResolucion, R.porcentajeIva\n\t\t\t\t\t\n\t\t\t\t\tFrom tb_facturado...
[ "0.6685429", "0.6644077", "0.66257435", "0.6587123", "0.65055615", "0.6404183", "0.6392657", "0.63387376", "0.6313482", "0.6233679", "0.614075", "0.613282", "0.613", "0.6087136", "0.60679007", "0.60503024", "0.60485876", "0.5980749", "0.59609485", "0.59381795", "0.5934838", ...
0.561657
93
/ Get Filtros Organigrama
public function getFiltroOrganigrama() { $resultado = array(); $sql = " SELECT STRING_AGG(v.unidad_administrativa,',') AS o_resultado FROM ( SELECT CAST(o.unidad_administrativa AS CHARACTER VARYING) FROM cargos c INNER JOIN organigramas o ON c.organigrama_id = o.id WHERE c.baja_logica = 1 GROUP BY o.unidad_administrativa ORDER BY o.unidad_administrativa ) AS v "; $this->_db = new Cargos(); $arr = new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql)); if (count($arr) > 0) { /** * Para agregar un valor nulo al inicio se añade una coma */ $res = $arr[0]->o_resultado; $resultado = explode(",", $res); } return $resultado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOrganismsList();", "function cc_get_agency($rif){\n\t\n\t$rif = (string) trim($rif);\n\t$id = (int) substr($rif, 0, 2);\n\t\n\t// MAP\n\t$agenzie_agenti_user = array();\n\t$agenzie_agenti_user[1] = array( \"fave_property_agency\" => 2788, \"fave_agents\" => 72 , \"post_author\" => 3 );\n\t$agenzie_a...
[ "0.6026584", "0.5952716", "0.59357095", "0.59337276", "0.5872608", "0.58144784", "0.57564837", "0.573382", "0.5731017", "0.57223165", "0.5711162", "0.56917065", "0.56406826", "0.5638387", "0.5636814", "0.5597572", "0.55887747", "0.55887544", "0.5586273", "0.55570966", "0.5541...
0.7230269
0
/ Get Filtros Gestiones
public function getFiltroGestiones() { $resultado = array(); $sql = " SELECT STRING_AGG(v.gestion,',') AS o_resultado FROM ( SELECT CAST(c.gestion AS CHARACTER VARYING) FROM cargos c WHERE c.baja_logica = 1 GROUP BY c.gestion ORDER BY c.gestion ) AS v "; $this->_db = new Cargos(); $arr = new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql)); if (count($arr) > 0) { /** * Para agregar un valor nulo al inicio se añade una coma */ $res = $arr[0]->o_resultado; $resultado = explode(",", $res); } return $resultado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function obtenerGestores(){\n $this->gestorAccesoDatos->conectar();\n $resultado = $this->gestorAccesoDatos->obtenerUsuarios();\n $this->gestorAccesoDatos->cerrarConexion();\n return $resultado;\n }", "public function index()\n {\n return Gestion::all();\n }", ...
[ "0.6357477", "0.6357208", "0.6235793", "0.6089351", "0.60213995", "0.56351733", "0.55685556", "0.556232", "0.55154854", "0.5500638", "0.5434658", "0.5382303", "0.5359452", "0.53449714", "0.5306931", "0.52833253", "0.5259125", "0.5226622", "0.5217131", "0.5199532", "0.51728874...
0.5267135
16
/ Get Filtros Gestiones
public function getFiltroTipoCargo() { $resultado = array(); $sql = " SELECT STRING_AGG(v.condicion,',') AS o_resultado FROM ( SELECT co.condicion FROM cargos c INNER JOIN finpartidas f ON c.fin_partida_id = f.id INNER JOIN condiciones co ON f.condicion_id = co.id WHERE c.baja_logica=1 GROUP BY co.condicion ORDER BY co.condicion asc ) AS v"; $this->_db = new Cargos(); $arr = new Resultset(null, $this->_db, $this->_db->getReadConnection()->query($sql)); if (count($arr) > 0) { /** * Para agregar un valor nulo al inicio se añade una coma */ $res = $arr[0]->o_resultado; $resultado = explode(",", $res); } return $resultado; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return Gestion::all();\n }", "public function obtenerGestores(){\n $this->gestorAccesoDatos->conectar();\n $resultado = $this->gestorAccesoDatos->obtenerUsuarios();\n $this->gestorAccesoDatos->cerrarConexion();\n return $resultado;\n }", ...
[ "0.63563466", "0.6356137", "0.62354094", "0.60881704", "0.6023164", "0.56371707", "0.5571168", "0.55628157", "0.5517878", "0.5500299", "0.5436062", "0.5381042", "0.53599423", "0.53464836", "0.5306314", "0.5284384", "0.5267171", "0.52604467", "0.5225281", "0.52166754", "0.5199...
0.0
-1
Removing rows from main and child tables
function remove_rows($table_id, $data) { $cmsEditDel = new cmsEditDel($table_id, $data); $delete_id = $cmsEditDel->dbChange(); unset($cmsEditDel); if (empty($delete_id)) return; $child = getChildTables($table_id); reset($child); while (list($table_id, $field_name) = each($child)) { remove_rows($table_id, array($field_name => $delete_id)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function wipeAll() {\n\t\tforeach($this->getTables() as $t) {\n\t\t\tforeach($this->getKeys($t) as $k) {\n\t\t\t\t$this->adapter->exec(\"ALTER TABLE \\\"{$k['FKTABLE_NAME']}\\\" DROP FOREIGN KEY \\\"{$k['FK_NAME']}\\\"\");\n\t\t\t}\n\t\t\t$this->adapter->exec(\"DROP TABLE \\\"$t\\\"\");\n\t\t}\n\t\tforeach(...
[ "0.6095954", "0.59917754", "0.5934367", "0.5908167", "0.5868326", "0.5856703", "0.58388597", "0.5837527", "0.58169955", "0.58147717", "0.57563835", "0.572309", "0.56729496", "0.5660669", "0.5636311", "0.561395", "0.5613614", "0.56091005", "0.5607987", "0.55925155", "0.5534732...
0.6799626
0
Return a new Printable with the given string limit.
public function withStringLimit(int $strlim): Printable { return new Printable($this->value, $this->callable, $strlim, $this->arrlim); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function str_limit($string, $limit = 100, $end = '...')\n {\n return str::limit($string, $limit, $end);\n }", "abstract public function _limit($str, $limit, $offset = false);", "static function limit(string $s, int $limit = 100, string $end = '...'): string {\n if (mb_strlen($s) <= $limit) ...
[ "0.5799131", "0.579068", "0.5733761", "0.5699269", "0.5647924", "0.55872667", "0.5587126", "0.5572459", "0.5565704", "0.55547523", "0.55515724", "0.5452892", "0.5441698", "0.5441663", "0.54207546", "0.5406397", "0.5391213", "0.53860396", "0.53741574", "0.5363558", "0.5341977"...
0.7650457
0
Return a new Printable with the given array limit.
public function withArrayLimit(int $arrlim): Printable { return new Printable($this->value, $this->callable, $this->strlim, $arrlim); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function limit($limit)\n {\n return self::from(Iterables::limit($this, $limit));\n }", "public static function limit($limit);", "public function withStringLimit(int $strlim): Printable\n {\n return new Printable($this->value, $this->callable, $strlim, $this->arrlim);\n }", "p...
[ "0.55312455", "0.52996206", "0.5266579", "0.5221374", "0.5221374", "0.517468", "0.5163341", "0.51078963", "0.50517434", "0.50471324", "0.50427085", "0.502774", "0.5012319", "0.50084686", "0.49883428", "0.49859542", "0.49719012", "0.4968724", "0.49675462", "0.4964598", "0.4963...
0.77780515
0
Return a string representation of the value.
public function __toString() { $type = gettype($this->value); switch ($type) { case 'boolean': return $this->boolean($this->value); break; case 'integer': return $this->int($this->value); break; case 'double': return $this->float($this->value); break; case 'string': return $this->string($this->value); break; case 'array': return $this->array($this->value); break; case 'object': return $this->object($this->value); break; case 'resource': return $this->resource($this->value); break; case 'NULL': return 'NULL'; break; default: return '(unknown type)'; break; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toString() : string\n {\n return strval($this->value);\n }", "public function toString() {\n\t\treturn serialize($this->_value);\n\t}", "final public function __toString()\n {\n return strval($this->value);\n }", "public function toString() : string\n ...
[ "0.8820216", "0.8721727", "0.8686113", "0.8641774", "0.85874397", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", "0.85621846", ...
0.7960075
56
Return a formatted string from the given boolean.
private function boolean(bool $value): string { return $value ? 'true' : 'false'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bool2str($bool) {\n\tif($bool ===false)\n\t\treturn 'false';\n\telse\n\t\treturn 'true';\n}", "protected function bool2str($bool) {\n return ($bool) ? 'TRUE' : 'FALSE';\n }", "public function boolToStr($boolean)\n {\n return ($boolean === true) ? 'true' : 'false';\n }", "publi...
[ "0.76360065", "0.753772", "0.7517138", "0.749033", "0.74505115", "0.73258454", "0.72389305", "0.71839064", "0.71364594", "0.7055966", "0.6977256", "0.6956871", "0.69325626", "0.68662333", "0.6744326", "0.65629977", "0.65500355", "0.6546062", "0.6451136", "0.64468485", "0.6443...
0.70637375
9
Return a formatted string from the given int.
private function int(int $value): string { return (string) $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function int_to_str($i) {\n\treturn implode('.', int_to_digits($i));\n}", "public static function int2str(int $i): string\n {\n return base_convert(dechex($i), 16, 36);\n }", "public static function format(int $number): string {\n $f = new \\NumberFormatter(\"en-GB\", \\NumberFormatter::SPE...
[ "0.71575207", "0.7118322", "0.6943423", "0.69011384", "0.6761853", "0.650833", "0.64829963", "0.6481777", "0.6473558", "0.6335727", "0.61677736", "0.6141808", "0.61243224", "0.611594", "0.61088216", "0.6056044", "0.60090363", "0.59998924", "0.59091663", "0.5902771", "0.589281...
0.6642792
5
Return a formatted string from the given float.
private function float(float $value): string { return (string) $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function stringifyFloat($float)\n {\n return rtrim(rtrim(sprintf('%F', $float), '0'), '.');\n }", "private function floatToString(float $float): string\n {\n $string = (string)$float;\n\n if (preg_match('~\\.(\\d+)E([+-])?(\\d+)~', $string, $matches) === 1) {\n ...
[ "0.7938568", "0.77587324", "0.7663572", "0.762563", "0.74475366", "0.71144634", "0.70554686", "0.697903", "0.69431853", "0.68895704", "0.6722446", "0.66893077", "0.6596752", "0.6564021", "0.6397567", "0.6396771", "0.6337307", "0.61600065", "0.6122503", "0.59950125", "0.599483...
0.7295886
5
Return a formatted string from the given string. Prepend the string with an ellipsis when it is longer than the limit.
private function string(string $value): string { if ($this->callable && is_callable($value)) { return sprintf('function %s()', $value); } return strlen($value) > $this->strlim ? $this->quoted(substr($value, 0, $this->strlim) . '...') : $this->quoted($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myTruncate2($string, $limit, $break=\" \", $pad=\"...\")\n{\n if(strlen($string) <= $limit) return $string;\n\n $string = substr($string, 0, $limit);\n if(false !== ($breakpoint = strrpos($string, $break))) {\n $string = substr($string, 0, $breakpoint);\n }\n\n return $string . $pad;\n}", "funct...
[ "0.7725753", "0.7652887", "0.7643238", "0.75900453", "0.75834084", "0.75232357", "0.75127375", "0.74889237", "0.7488746", "0.74815345", "0.7468255", "0.74299043", "0.7411431", "0.7411197", "0.7386736", "0.7365229", "0.7320503", "0.7305366", "0.72062933", "0.7199724", "0.71689...
0.0
-1
Return a formatted string from the given array.
private function array(array $value): string { if ($this->callable && is_callable($value)) { $class = ! is_string($value[0]) ? $this->classname($value[0]) : $value[0]; $method = $value[1]; return sprintf('function %s::%s()', $class, $method); } $slice = array_slice($value, 0, $this->arrlim, true); $elems = $this->isAssociative($slice) ? array_map([$this, 'arrayPair'], array_keys($slice), $slice) : array_map([$this, 'arrayValue'], $slice); return vsprintf('[%s%s]', [ implode(', ', $elems), count($value) > $this->arrlim ? ', ...' : '', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function ArrayToString ($array)\n {\n $str = null;\n if (is_array($array))\n foreach ($array as $valore) {\n if(is_string($valore))\n $str = $str.\"-\".$valore;\n else{$str=$str.\"\\n\".$valore->__toString();}\n }\n ...
[ "0.78601587", "0.78493977", "0.7774893", "0.77623475", "0.73470896", "0.7331457", "0.72853905", "0.7284715", "0.72781044", "0.72200525", "0.7121584", "0.7077615", "0.7067114", "0.69619787", "0.6941993", "0.69417655", "0.6884951", "0.6858953", "0.680556", "0.68046755", "0.6804...
0.6333802
47
Return a formatted string for the given key => value pair.
private function arrayPair($key, $val): string { $key_str = is_int($key) ? $key : $this->quoted($key); $val_str = $this->arrayValue($val); return sprintf('%s => %s', $key_str, $val_str); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function format($key, $val)\n {\n if (is_bool($val)) {\n return sprintf(\"%s\", $key);\n } else {\n return sprintf(\"%s%s%s%s%s\", $key, $this->_split, $this->_quote, $val, $this->_quote);\n }\n }", "...
[ "0.71842706", "0.7097965", "0.6583337", "0.6288014", "0.6182426", "0.61046255", "0.6099138", "0.6026585", "0.60127693", "0.5998821", "0.5954709", "0.59534186", "0.59448034", "0.5806678", "0.57813424", "0.5775526", "0.5774439", "0.57735425", "0.57613176", "0.5754763", "0.57199...
0.0
-1
Return a formatted strinf for the given array value.
private function arrayValue($val): string { return ! is_array($val) ? (string) new Printable($val, $this->callable, $this->strlim) : '[...]'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function fmt($val){\r\n if (is_array($val)) {\r\n $buf = array();\r\n foreach ($val as $k=>$v) {\r\n $buf[] = self::fmt($k) . '=>' . self::fmt($v);\r\n }\r\n return 'array(' . implode(', ', $buf) . ')';\r\n }\r\n if (is_string($...
[ "0.70892054", "0.70743716", "0.6995256", "0.694504", "0.69274706", "0.6820102", "0.6771172", "0.67605066", "0.6653382", "0.66412145", "0.6629372", "0.6623236", "0.6594954", "0.656861", "0.65500265", "0.6543388", "0.6529599", "0.6529238", "0.64880055", "0.6413589", "0.6394316"...
0.6668806
8
Return a formatted string from the given object.
private function object($value): string { $class = $this->classname($value); if ($class == \Closure::class) { return 'function {closure}()'; } return ($this->callable && is_callable($value)) ? sprintf('function %s::__invoke()', $class) : sprintf('Object(%s)', $class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function objectAsString($object);", "public function objectToString($obj);", "function objectToString( &$object ) {\n\n\t}", "public function format($object, $format)\n {\n return $object->format($format);\n }", "function toString ($object)\n{\n\treturn get_class($object);\n}", "pub...
[ "0.74279374", "0.7420128", "0.68975186", "0.68241805", "0.68169683", "0.67029935", "0.6640796", "0.66158426", "0.65539575", "0.6550896", "0.65468526", "0.65013593", "0.65013593", "0.65013593", "0.6470318", "0.6438645", "0.6395432", "0.63893306", "0.6386968", "0.6375427", "0.6...
0.0
-1
Return a formatted string from the given resource.
private function resource($value): string { return (string) $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dumpResource($resource, $format = 'html')\n {\n $this->checkResourceParam($resource, true);\n\n if (isset($this->index[$resource])) {\n $properties = $this->index[$resource];\n } else {\n return '';\n }\n\n $plist = array();\n forea...
[ "0.72970563", "0.6715958", "0.6566269", "0.6277017", "0.6277017", "0.6186849", "0.6111677", "0.6071556", "0.6042277", "0.6020532", "0.59589577", "0.59408116", "0.5888256", "0.58469653", "0.58182526", "0.57464063", "0.57165956", "0.57059216", "0.569613", "0.5692319", "0.567758...
0.5337834
43
Return a quoted string.
private function quoted(string $value): string { return sprintf('\'%s\'', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function intoQuote($string){ return \"'\".$string.\"'\"; }", "public function quote($string)\n {\n return $string;\n }", "function Quote( $text ) {\n\t\treturn '\\'' . getEscaped( $text ) . '\\'';\n\t}", "protected function quote(?string $value): string {\n\n\t\t\t$quote = $this->q...
[ "0.76372737", "0.7116245", "0.68340015", "0.6698825", "0.66868883", "0.6665269", "0.6660876", "0.66060334", "0.6601523", "0.65798753", "0.6541228", "0.6525636", "0.6521907", "0.6472696", "0.645455", "0.6454229", "0.6442873", "0.64425737", "0.64340484", "0.6418185", "0.6410671...
0.7508239
1
Return the classname of the given object.
private function classname($value): string { $class = get_class($value); return preg_match('/^class@anonymous/', $class) ? 'class@anonymous' : $class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getClassName($object)\n {\n if (!static::isObject($object)) {\n throw new \\InvalidArgumentException('Param $object is not object type.');\n }\n return get_class($object);\n }", "public function getClassName( $object ) {\n\t\tif ( !\\is_object( $object...
[ "0.803258", "0.8000159", "0.76642525", "0.7644215", "0.75797004", "0.75261647", "0.7477878", "0.741998", "0.7391454", "0.7370593", "0.7324694", "0.72672856", "0.717568", "0.7171539", "0.7117209", "0.7059098", "0.7059098", "0.7031992", "0.7002794", "0.695349", "0.69474", "0....
0.0
-1
Return whether the given array is associative.
private function isAssociative(array $value): bool { return count(array_filter(array_keys($value), 'is_string')) > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isAssociative( array &$array )\n {\n return count(array_filter(array_keys($array), 'is_string')) > 0;\n }", "public static function isAssoc($array) {\n $return = true;\n foreach(array_keys($array) as $a) {\n $return = $return & is_string($a);\n }\n retu...
[ "0.8472658", "0.84039444", "0.8336737", "0.83296174", "0.8319503", "0.830065", "0.82802474", "0.8274557", "0.82632333", "0.8244767", "0.8239783", "0.81908685", "0.8184574", "0.8161016", "0.8159468", "0.8145837", "0.8145683", "0.8133168", "0.8124042", "0.8123998", "0.8099353",...
0.7652363
47
create a task and give it some dummy data for this example
public function indexAction(Request $request) { $article = new Post(); $article->setDate(new \DateTime('today')); ; $form = $this->createFormBuilder($article) ->add('image', FileType::class, array('label' => "Image")) // ->add('image', FileType::class, array('label' => "Image")) // ->add('image', 'file') ->add('titre', TextType::class, array('label' => "Titre")) ->add('article', TextareaType::class, array('label' => "Article")) ->add('auteur', TextType::class, array('label' => "Auteur")) ->add('date', DateType::class, array('label' => "Date")) ->add('save', SubmitType::class, array('label' => 'Créer un article')) ->getForm(); if ($request->isMethod('POST')){ $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($article); $em->flush(); $request->getSession()->getFlashBag()->add('notice', 'Annonce bien enregistrée'); return $this->redirectToRoute('jg_form_valid'); // return $this->redirectToRoute('jg_form_valid', array('id' => $article->getId())); // return $this->render("JGFormBundle:Default:valid.html.twig", array( // 'titre' => $titre, // )); } } return $this->render('JGFormBundle:Default:index.html.twig', array( 'form' => $form->createView(), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateTask()\n {\n }", "public function createTask()\n {\n return factory($this->model)->create();\n }", "public function instantiate($task);", "public function run()\n { \n factory(Task::class,5)->create();\n \n /*\n $date = \\Carbon\\...
[ "0.80974364", "0.6984518", "0.6972922", "0.6954161", "0.6893589", "0.6888547", "0.6866951", "0.6861794", "0.68391645", "0.6803488", "0.67698014", "0.67443424", "0.6708355", "0.6701192", "0.6700433", "0.669181", "0.6602728", "0.6602728", "0.65995365", "0.65809983", "0.65795684...
0.0
-1
Get list of target emails.
public function getTo(): iterable;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getRecipientEmails()\n {\n return $this->recipients\n ->map(function($user) {\n return $user->{User::COLUMN_EMAIL};\n })\n ->toArray();\n }", "public function get_emails() {\n\n\t\t$emails = array();\n\n\t\tforeach ( $this->setti...
[ "0.7263601", "0.72609824", "0.7215528", "0.72111434", "0.71579057", "0.71579057", "0.71130055", "0.70832914", "0.6968444", "0.68862325", "0.68136454", "0.6746407", "0.67319614", "0.6709346", "0.66817", "0.6647166", "0.6631594", "0.66088796", "0.65977633", "0.6581527", "0.6528...
0.0
-1
Get list of Cc emails.
public function getCc(): iterable;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCcEmails()\n {\n return $this->cc_emails;\n }", "public function getCcList(): string {\n\t\treturn $this->createEMailList($this->getCc());\n\t}", "public function getCc()\n {\n return $this->getAddressListFromHeader('cc', '\\Zend\\Mail\\Header\\Cc');\n }", "public...
[ "0.82332474", "0.76475674", "0.6949082", "0.69474703", "0.67353076", "0.67345697", "0.6712412", "0.662762", "0.65460145", "0.6544456", "0.64792466", "0.64251584", "0.63426346", "0.6269376", "0.62402177", "0.618871", "0.61698055", "0.6151413", "0.6143905", "0.61408985", "0.611...
0.6878432
4
Get list of Bcc emails.
public function getBcc(): iterable;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBccList(): string {\n\t\treturn $this->createEMailList($this->getBcc());\n\t}", "public function getCcEmails()\n {\n return $this->cc_emails;\n }", "public function getCcList(): string {\n\t\treturn $this->createEMailList($this->getCc());\n\t}", "public function getSubscriberE...
[ "0.79858184", "0.78118825", "0.72321475", "0.7092049", "0.7072787", "0.69521785", "0.6893801", "0.68477285", "0.6815625", "0.6790566", "0.6786614", "0.6766851", "0.6731078", "0.661084", "0.66004354", "0.65710896", "0.65681326", "0.6567035", "0.652824", "0.65194553", "0.651945...
0.65424365
18
Get subject of the email.
public function getSubject(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function retrieveSubject() : string {\n\n // Get header of current email\n $header = $this->getHeader();\n\n // Return the subject in \"ASCII\" format\n return $this->decodeMimeHeaderExtension($header->subject, false);\n }", "protected function getSubject()\n {\n ...
[ "0.84139824", "0.83461076", "0.8236247", "0.821378", "0.81589085", "0.81302947", "0.81113905", "0.80099833", "0.79848564", "0.79620343", "0.7918792", "0.79007953", "0.79007953", "0.78616744", "0.78403294", "0.7832319", "0.78322726", "0.78322726", "0.78322726", "0.78322726", "...
0.71307707
50
Get body of the email.
public function getBody(): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBody()\n {\n $parser = $this->getParser();\n $return = $parser->getMessageBody();\n return $return;\n }", "function getBody() {\n\t\treturn $this->getData('body');\n\t}", "function getBody() {\n\t\treturn $this->getData('body');\n\t}", "public function getBody():...
[ "0.8102492", "0.8044588", "0.8044588", "0.8005752", "0.800394", "0.79950976", "0.79762447", "0.79762447", "0.79762447", "0.7944881", "0.7937049", "0.7937049", "0.7937049", "0.7937049", "0.7928341", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", "0.7923522", ...
0.0
-1
Tells if body is in html format.
public function isHtml(): bool;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isHtml()\n\t{\n\t\treturn stripos($this->getContentType(), 'html') !== false;\n\t}", "static public function isHTML() {\n\t\treturn (self::$page_type === 0);\n\t}", "public function isHtml() {}", "public function isHTML(): bool\n\t{\n\t\treturn $this->isOfType( static::TYPE_HTML );\n\t}", "...
[ "0.8062697", "0.78244203", "0.7820633", "0.77645075", "0.7462531", "0.73192567", "0.73011106", "0.6984416", "0.6763567", "0.66424525", "0.66154706", "0.6466208", "0.6466208", "0.64329565", "0.6427029", "0.64014447", "0.6396571", "0.6383146", "0.637626", "0.6369965", "0.627816...
0.75239027
4
Generates web routes for this package
public static function webAdminRoutes(): void { Route::namespace("\\Orq\\Laravel\\Starter\\Controllers\\Admin")->group(function () { // 后台管理员 Route::get('/admin/index', 'AdminController@index')->name('AdminIndex'); Route::get('/admin/new', 'AdminController@new')->name('AdminNew'); Route::get('/admin/edit', 'AdminController@edit')->name('AdminEdit'); Route::post('/admin/save', 'AdminController@save')->name('AdminSave'); Route::post('/admin/deactivate', 'AdminController@deactivate')->name('AdminDeactivate'); Route::post('/admin/restore', 'AdminController@restore')->name('AdminRestore'); Route::post('/admin/update', 'AdminController@update')->name('AdminUpdate'); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateRoutes()\n {\n $routes = property_exists(app(), 'router')? app()->router->getRoutes() : app()->getRoutes();\n foreach ($routes as $route) {\n array_push($this->routes, [\n 'method' => $route['method'],\n 'uri' => $route['uri'],\n ...
[ "0.7081164", "0.7013278", "0.67365664", "0.67251235", "0.6692198", "0.66615874", "0.65961164", "0.65693074", "0.65519387", "0.65519387", "0.65511", "0.65273106", "0.6515862", "0.6506938", "0.64824796", "0.64783186", "0.6474731", "0.6471895", "0.6435286", "0.6415499", "0.64043...
0.0
-1
Get the subscription limit.
public function getLimit() { return $this->getParameter('limit'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public func...
[ "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.77126336", "0.7685298", "0.76822096", "0.7662637", "0.7659339", "0.7619435", "0.7586404", "0.7575164", "0.7575164", "0....
0.7127009
33
Set the subscription limit.
public function setLimit($value) { return $this->setParameter('limit', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_limit($limit);", "public function setLimit ($value)\r\n\t{\r\n\t\t$this->limit = $value;\r\n\t}", "public function set_limit($new_limit){\r\n $this->limit = $new_limit;\r\n }", "public function setLimit($limit)\n {\n $this->limit = $limit;\n }", "public function setLi...
[ "0.7482077", "0.735923", "0.7288998", "0.7288828", "0.7247278", "0.72467643", "0.7246248", "0.7243036", "0.71943617", "0.71943617", "0.7177133", "0.7158461", "0.7148062", "0.71408886", "0.70539623", "0.68898165", "0.68377405", "0.67593884", "0.67593884", "0.67593884", "0.6759...
0.62827444
58
Get the subscription status.
public function getStatus() { return $this->getParameter('status'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSubscriptionStatus() {\n return $this->subscription_status;\n\n }", "public function getSubscriptionStatus(): string\n {\n return $this->subscriptionStatus;\n }", "public function status_subscription(){\n\t\t\treturn true;\n\t\t}", "function getGatewaySubscriptionSta...
[ "0.8708604", "0.82055676", "0.74461526", "0.7387184", "0.7224202", "0.7202994", "0.71732104", "0.7020829", "0.6972461", "0.6831829", "0.6831829", "0.6831829", "0.6831829", "0.6802104", "0.6800041", "0.6787", "0.6757285", "0.6726304", "0.6717388", "0.6717388", "0.6717388", "...
0.0
-1
Set the subscription status.
public function setStatus($value) { return $this->setParameter('status', $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSubscriptionStatus($subscription_status) {\n\n $this->subscription_status = $subscription_status;\n\n }", "protected function setSubscriptionStatusData(Subscription $subscription): void\n {\n $this->configureStripeClient();\n $subscriptionData = $subscription->getSub...
[ "0.6746909", "0.66943824", "0.66855437", "0.6602242", "0.65964264", "0.6588046", "0.6580513", "0.65559995", "0.65559995", "0.65559995", "0.65559995", "0.65474576", "0.6535473", "0.6503861", "0.6475686", "0.64527154", "0.6423227", "0.6414667", "0.6414667", "0.63991314", "0.639...
0.0
-1
getSiblings returns a collection of this node's siblings
public function getSiblings(): CollectionAbstractInterface { if ($this->getTree()->rootTest($this)) { /** @var CollectionType $collection */ $collection = $this->tree->makeCollection(); $collection->push($this); } else { /** @var NodeType $parent */ $parent = $this->getParent(); /** @var CollectionType $collection */ $collection = $parent->getChildren(); } return $collection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSiblings($includeNode = false);", "public function getSiblings($level = 1)\n {\n \t$parent = $this->getParent();\n \tif(is_null($parent))\n \t{\n\n \t\treturn array($this);\n \t}\n return array_unique($parent->getChildren());\n \n\n }", "public function si...
[ "0.76249135", "0.744986", "0.72541404", "0.70989203", "0.701556", "0.68783224", "0.6876601", "0.6756548", "0.6668931", "0.6590744", "0.6581523", "0.65605664", "0.646825", "0.64154106", "0.639538", "0.63541013", "0.6270781", "0.6246842", "0.6246842", "0.613654", "0.60823673", ...
0.5888714
31
Settings for UploadFields : Main Image
function getCMSFields() { $f = new FieldList(); $image_field = new UploadField('SlideImage', _t('Content.SLIDEIMAGE','Slide image')); $image_field->getValidator()->allowedExtensions = array('jpg', 'gif', 'png'); $image_field->setFolderName('Uploads/sliderimages'); // DropDown to select link from SiteTree $treedropdownfield = new TreeDropdownField('ButtonLinkLocID', 'Button link location', 'SiteTree'); // Create Tabs $t = new TabSet( 'Root', new Tab( 'Main', new TextField("Heading", _t('Content.HEADING','Heading of Slide')), new TextField("Subtitle", _t('Content.SUBTITLE','Subtitle of Slide')), new HTMLEditorField("SlideContent", _t('Content.CONTENT','HTML-content to slide')), new TextField("ButtonText", _t('Content.BUTTONTEXT','Button text')), $treedropdownfield, new DropdownField('SlideTxtDisplay', _t('Content.SLIDETXTDISPLAY','Enable Texts over slide'),singleton('JumbotronSlideshowSlide')->dbObject('SlideTxtDisplay')->enumValues()), new CheckboxField('Published', _t('Content.PUBLISHED','Is item published?')) ), new Tab( 'Image', $image_field ), new Tab( 'FX', new DropdownField('SlideEffect', _t('Content.SLIDEEFFECT','SlideEffect'),singleton('JumbotronSlideshowSlide')->dbObject('SlideEffect')->enumValues()) ) ); $f->push($t); return $f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function upload_img()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '上传图片';\n $this->global['pageName'] = 'carousel_upload';\n $data['ret_Url'] = 'carousel_edit';\n\n $this->loadViews(\"up...
[ "0.6592604", "0.65460974", "0.64392287", "0.64333475", "0.64064604", "0.6393257", "0.63896954", "0.63801354", "0.63511944", "0.6338962", "0.6337418", "0.6318217", "0.63078433", "0.6302878", "0.6300249", "0.6278918", "0.6267141", "0.62612396", "0.6245401", "0.6235743", "0.6217...
0.0
-1
The config array already contains our servers configuration data parsed into an array for us to work on, now we need to process and build a new array of categorised data that we can use to produce a consistent view file for the world login pages to use. Categories we want: 1. General Settings CountUpgrades = If Upgrades are counted as building slots. NoSubsidies=1 ElectionsOn=1 SendingMoney=0 AlliesPageOn=1 TranscendingOn=1 RandomSeasons=1 RelayEconomy=0 MagnaAtApprentice=1 MaxInvestors=100 NoTradeCenter=1 2. Tycoon Upgrade Levels Apprentice.facLimit=50 Entrepreneur.facLimit=100 Tycoon.facLimit=200 Master.facLimit=350 Paradigm.facLimit=500 Legend.facLimit=501 3. Boosts ResInhabBoost=5 ConstBoost=3 CommerceBoost=1 4. Upgrade Levels CountUpgrades = If Upgrades are counted as building slots. MaxServiceUpgrades MaxOfficeUpgrades ResMaxUpgrade MaxRCenterUpgrade=50 5. Misc Settings Tutorial=0 RemoveVisitors=1 RepairRoads=0 VoteLevel=1 FightFacColonies=yes LifeAfterLegend = ? ServiceBuysBatched=1 RemoveVisitors=1 RoadZone=11 MinTaxesPer=20 MinCivicsWage=150 MaxSubPop=500 MixedPlanet=1 MixedDesire=1000 ServiceBuysBatched=1 6. Building Separation MinCommerceSep=2 MinOfficeSep=1 7. Thread Speeds / Priorities SimSpeed=3 DASpeed=4 CacheSpeed=4 IntSpeed=0 Trans=0
public static function processConfig($configArray) { $baseCategories = [ 'general_settings' => [ 'display_name' => 'General Settings', 'display' => 'block', 'settings' => [ 'CountUpgrades' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Count Upgrades', 'tool_tip' => 'Count upgrades as building slots', 'description' => 'Count upgrades as building slots', ], 'NoSubsidies' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Town Subsidies', 'tool_tip' => 'Town subsidies at low population', 'description' => 'Town subsidies at low population', ], 'ElectionsOn' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Elections', 'tool_tip' => 'Elections enabled or not', 'description' => 'Election of Mayor and Presidents enabled', ], 'SendingMoney' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Money Transfers', 'tool_tip' => 'Allow money transfers between players', 'description' => 'Allow money transfers between players', ], 'AlliesPageOn' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Allies', 'tool_tip' => 'Allow player alliances', 'description' => 'Allow player alliances', ], 'TranscendingOn' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Transcendence', 'tool_tip' => 'Allow nobility gain through transcendence', 'description' => 'Allow nobility gain through transcendence', ], 'RandomSeasons' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Random Seasons', 'tool_tip' => 'Random game seasons in suppose to spring, summer, autumn, winter cycle', 'description' => 'Random game seasons in suppose to spring, summer, autumn, winter cycle', ], 'RelayEconomy' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Recession Code', 'tool_tip' => 'Whether recession code is active in simulation', 'description' => 'Whether recession code is active in simulation', ], 'MagnaAtApprentice' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Apprentice Magna', 'tool_tip' => 'If apprentices with enough nobility can create magna companies', 'description' => 'If apprentices with enough nobility can create magna companies', ], 'MaxInvestors' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Max World Players', 'tool_tip' => 'Maximum player allowed to join this world', 'description' => 'Maximum player allowed to join this world', ], 'NoTradeCenter' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'No Trade Centre', 'tool_tip' => 'Prevent trade centre sales', 'description' => 'Prevent trade centre sales', ], ], ], 'tycoon_upgrade_levels' => [ 'display_name' => 'Tycoon Building Slots', 'display' => 'block', 'settings' => [ 'Apprentice.facLimit' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Apprentice', 'tool_tip' => 'Maximum building slots for this level', 'description' => 'Maximum building slots for this level', ], 'Entrepreneur.facLimit' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Entrepreneur', 'tool_tip' => 'Maximum building slots for this level', 'description' => 'Maximum building slots for this level', ], 'Tycoon.facLimit' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Tycoon', 'tool_tip' => 'Maximum building slots for this level', 'description' => 'Maximum building slots for this level', ], 'Master.facLimit' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Master', 'tool_tip' => 'Maximum building slots for this level', 'description' => 'Maximum building slots for this level', ], 'Paradigm.facLimit' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Paradigm', 'tool_tip' => 'Maximum building slots for this level', 'description' => 'Maximum building slots for this level', ], 'Legend.facLimit' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Legend', 'tool_tip' => 'Maximum building slots for this level', 'description' => 'Maximum building slots for this level', ], ], ], 'building_upgrade_levels' => [ 'display_name' => 'Building Max Upgrades', 'display' => 'block', 'settings' => [ 'CountUpgrades' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Count Upgrades', 'tool_tip' => 'Count building upgrades as a building slot', 'description' => 'Count building upgrades as a building slot', ], 'MaxServiceUpgrades' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Service Maximum', 'tool_tip' => 'Maximum upgrade level for services', 'description' => 'Maximum upgrade level for services', ], 'MaxOfficeUpgrades' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Office Maximum', 'tool_tip' => 'Maximum upgrade level for offices', 'description' => 'Maximum upgrade level for offices', ], 'ResMaxUpgrade' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Residential Maximum', 'tool_tip' => 'Maximum upgrade level for residencies', 'description' => 'Maximum upgrade level for residencies', ], 'MaxRCenterUpgrade' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Research Centre Maximum', 'tool_tip' => 'Maximum upgrade level for research centres', 'description' => 'Maximum upgrade level for research centres', ], ], ], 'misc_settings' => [ 'display_name' => 'Misc Settings', 'display' => 'block', 'settings' => [ 'Tutorial' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Tutorial Mode', 'tool_tip' => 'If enabled players are guided by a tutorial', 'description' => 'If enabled players are guided by a tutorial', ], 'RemoveVisitors' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Remove Visitors', 'tool_tip' => 'Prevent visitor access to the world', 'description' => 'Prevent visitor access to the world', ], 'RepairRoads' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Repair Roads', 'tool_tip' => 'Automatically repair roads', 'description' => 'Automatically repair roads', ], 'VoteLevel' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Vote Level', 'tool_tip' => 'Votes required for office', 'description' => 'Votes required for office', ], 'FightFacColonies' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Fighting faction colonies', 'tool_tip' => 'Fighting faction colonies', 'description' => 'Fighting faction colonies', ], 'LifeAfterLegend' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Life after Legend', 'tool_tip' => 'Whether Tycoon can continue level after legend', 'description' => 'Whether Tycoon can continue level after legend', ], 'ServiceBuysBatched' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Services Buy Batched', 'tool_tip' => 'Services buy supplies in batches', 'description' => 'Services buy supplies in batches', ], 'RoadZone' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Road Zone', 'tool_tip' => 'The zone that roads belong to', 'description' => 'The zone that roads belong to', ], 'MinTaxesPer' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Minimum Taxes', 'tool_tip' => 'Minimum tax level', 'description' => 'Minimum tax level', ], 'MinCivicsWage' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Minimum Civic Wages', 'tool_tip' => 'This is the minimum wage level a Tycoon can set for civic wages', 'description' => 'This is the minimum wage level a Tycoon can set for civic wages', ], 'MaxSubPop' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Maximum Subsidy Population', 'tool_tip' => 'The level of population after which subsidies will no longer be paid', 'description' => 'The level of population after which subsidies will no longer be paid', ], 'MixedPlanet' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Mixed Planet', 'tool_tip' => 'An as yet unknown setting', 'description' => 'An as yet unknown setting', ], 'MixedDesire' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Mixed Desire', 'tool_tip' => 'An as yet unknown setting', 'description' => 'An as yet unknown setting', ], ], ], 'boosts' => [ 'display_name' => 'Simulation Boosts', 'display' => 'block', 'settings' => [ 'ResInhabBoost' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Residential Boost', 'tool_tip' => 'Residential Boost', 'description' => 'Residential Boost', ], 'ConstBoost' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Construction Boost', 'tool_tip' => 'Construction Boost', 'description' => 'Construction Boost', ], 'CommerceBoost' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Commerce Boost', 'tool_tip' => 'Commerce Boost', 'description' => 'Commerce Boost', ], ], ], 'building_separation' => [ 'display_name' => 'Building Separation', 'display' => 'block', 'settings' => [ 'MinCommerceSep' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Commerce', 'tool_tip' => 'How far apart commerce buildings of the same class must be', 'description' => 'How far apart commerce buildings of the same class must be', ], 'MinOfficeSep' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Office', 'tool_tip' => 'How far apart office buildings of the same class must be', 'description' => 'How far apart office buildings of the same class must be', ], ], ], 'thread_speeds' => [ 'display_name' => 'Thread Speeds', 'display' => 'none', 'settings' => [ 'SimSpeed' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Model Server', 'tool_tip' => 'Simulation Speed', 'description' => 'Simulation Speed', ], 'DASpeed' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Direct Access', 'tool_tip' => 'Speed of something', 'description' => 'Speed of something', ], 'CacheSpeed' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Cache Server', 'tool_tip' => 'Cache server speed', 'description' => 'Cache server speed', ], 'IntSpeed' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Interface Server', 'tool_tip' => 'Interface Server speed', 'description' => 'Interface Server speed', ], 'Trans' => [ 'setting' => '', 'default' => '', 'display' => 'block', 'input_type' => 'text', 'display_name' => 'Transcendence', 'tool_tip' => 'Speed of transcendence', 'description' => 'Speed of transcendence', ], ], ], ]; foreach ($baseCategories as $categoryKey => &$category) { foreach ($category['settings'] as $settingName => &$setting) { $setting['setting'] = $configArray[$settingName] ?? $setting['default']; } } return self::makeTables($baseCategories); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function config_choose()\n {\n // Find all categories\n $hooks = find_all_hooks('systems', 'config');\n $categories = array();\n foreach (array_keys($hooks) as $hook) {\n require_code('hooks/systems/config/' . filter_naughty_harsh($hook));\n $ob = object_...
[ "0.5982476", "0.58706844", "0.5782111", "0.570049", "0.55908024", "0.552025", "0.53857785", "0.53610164", "0.52334493", "0.51933086", "0.51803577", "0.5179615", "0.51159894", "0.5115016", "0.50811833", "0.5073223", "0.5065959", "0.50629276", "0.5054828", "0.50415343", "0.5036...
0.68413734
0
function render_backend tersebut dari file core/MY_Controller.php
public function regis(){ $this->load->view('v_register'); // load view home.php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function render() {}", "protected function render() {}", "protected function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public function render() {}", "public fu...
[ "0.69994164", "0.69994164", "0.6999078", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", "0.6974671", ...
0.0
-1
Return null if no type can be inferred. Return MixedType if unknown type is inferred.
public function inferProperty($property) : ?\PHPStan\Type\Type;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function mixed(): Type\n {\n return new Type(null, 'mixed');\n }", "public static function mixed()\n {\n return self::builtinType('mixed');\n }", "public function getType(): ?Type\n {\n return $this->type;\n }", "public function singleType(): ?string\n ...
[ "0.61918867", "0.6068833", "0.579241", "0.55838156", "0.54610014", "0.54294926", "0.54294926", "0.54200906", "0.53860706", "0.5365065", "0.5269663", "0.5260746", "0.5260746", "0.5260746", "0.5260746", "0.5260746", "0.52369845", "0.52177685", "0.52108896", "0.5190625", "0.5190...
0.6049839
2
================================================== Theme's scripts and styles
function aitAdminEnqueueScriptsAndStyles() { $mapLanguage = get_locale(); aitAddScripts(array( 'ait-googlemaps-api' => array( //'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyC62AaIu5cD1nwSCmyO4-33o3DjkFCH4KE&sensor=false&amp;language='.$mapLanguage, 'file' => 'https://maps.google.com/maps/api/js?key=AIzaSyBL0QWiORKMYd585E4qvcsHcAR1R7wmdiY&sensor=false&amp;language='.$mapLanguage, 'deps' => array('jquery') ), 'ait-jquery-gmap3' => array('file' => THEME_JS_URL . '/libs/gmap3.min.js', 'deps' => array('jquery', 'ait-googlemaps-api')), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function kesha_theme_scripts() {\n\n // Register Custom CSS\n wp_register_style( 'theme', get_template_directory_uri() . '/dist/css/built.min.css', array(), rand(111,9999), 'all' );\n\n // Enqueue Styles\n wp_enqueue_style( 'theme' );\n\n // Register JS.\n wp_register_script( 'scripts', get_template_director...
[ "0.79306895", "0.7894831", "0.7872009", "0.78114784", "0.78007156", "0.778939", "0.7753214", "0.7753214", "0.7711944", "0.7658068", "0.765478", "0.76493424", "0.7612254", "0.76092017", "0.76031274", "0.7594466", "0.75871843", "0.7585172", "0.7578692", "0.7578647", "0.7561814"...
0.0
-1
================================================== Some helper functions and filters for theme
function default_menu(){ wp_nav_menu(array('menu' => 'Main Menu', 'fallback_cb' => 'default_page_menu', 'container' => 'nav', 'container_class' => 'mainmenu', 'menu_class' => 'menu clear')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _preview_theme_template_filter()\n {\n }", "function _preview_theme_stylesheet_filter()\n {\n }", "function get_themes()\n {\n }", "function display_themes()\n {\n }", "function ru_filter_styles(){\n $this->removestyle(\"bbp-default\");\n\n // download monitor...
[ "0.7392021", "0.71606", "0.6860981", "0.6654382", "0.6636914", "0.6632607", "0.6622213", "0.6515376", "0.64941436", "0.64453655", "0.64236516", "0.64127254", "0.637817", "0.63553226", "0.6341442", "0.63135827", "0.63041884", "0.6301728", "0.6277704", "0.62491447", "0.62195325...
0.0
-1
Some custom styles for slides in Revolution Slider admin
function aitRevSliderAdminStyles(){ wp_enqueue_style('ait-revolution-slider-admin-css', THEME_URL . '/design/admin-plugins/revslider.css'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sb_slideshow_edit_admin_style() {\n\tif (!sb_verify_post_type('slideshow')) return; // verify post type\n?>\n\t<style type=\"text/css\">\n\t\tth.column-id { width:50px; }\n\t\tth.column-shortcode { width:180px; }\n\t\tinput.urlfield { width:155px; }\n\t</style>\n<?php\n}", "function create_slider() {\n ...
[ "0.7163396", "0.6579227", "0.6411208", "0.6399297", "0.6370105", "0.63146704", "0.6293575", "0.6271795", "0.6225943", "0.62078696", "0.62013036", "0.61960953", "0.6153122", "0.61516774", "0.614801", "0.6116234", "0.6109848", "0.607009", "0.6043716", "0.6013781", "0.6012693", ...
0.7036279
1
This is a sample file URL, define your own! Duplicate below line as needed to exclude multiple files
function wp_rocket_exclude_from_cache_busting( $excluded_files = array() ) { $excluded_files[] = 'https://www.freerangecamping.com.au/directory/wp-json/api/v1/user'; $excluded_files[] = '/wp-json/api/v1/user'; $excluded_files[] = 'https://www.freerangecamping.com.au/directory/wp-json/api/v1/user/frc_login'; $excluded_files[] = '/wp-json/api/v1/user/frc_login'; return $excluded_files; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function addExcludeFile($vpath)\n\t{\n\t\t$files\t= config::get(\":siteFSexclude\", array());\n\t\t$files[$vpath]\t= $vpath;\n\t\tconfig::set(\":siteFSexclude\", $files);\n\t}", "public function disableConcatenateFiles() {}", "public function getSourceExcludes();", "function ignore($excl){\n $excl[...
[ "0.6092679", "0.60269", "0.59948575", "0.59231466", "0.5810132", "0.57174313", "0.5646342", "0.5641473", "0.56074303", "0.55814236", "0.55526775", "0.54456675", "0.54260945", "0.538938", "0.53664976", "0.53628534", "0.5352751", "0.5352365", "0.5324134", "0.53231615", "0.53138...
0.66079074
0