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
Returns the users table name.
public function getUsersTable(): string { return $this->wpDatabase->users; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function usersTableName()\n {\n $userModel = config('follow.user');\n\n return (new $userModel)->getTable();\n }", "protected function usersTableName()\n {\n $userModel = config('blockable.user');\n\n return (new $userModel)->getTable();\n }", "protected function...
[ "0.8544462", "0.84915346", "0.84786963", "0.7810116", "0.7630838", "0.758305", "0.75527304", "0.7514389", "0.750927", "0.7500093", "0.74678063", "0.7461887", "0.7459838", "0.7451488", "0.74341524", "0.74341524", "0.74251807", "0.74131954", "0.73988944", "0.73988473", "0.73978...
0.8175607
3
Returns the capabilities table name.
public function getCapabilitiesTable(): string { return $this->wpDatabase->prefix . 'capabilities'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function table () : string {\n return $this->guessName();\n }", "public function get_table_name(){\n return $this->table_name();\n }", "public function table_name ()\n {\n return $this->app->table_names->entries;\n }", "public static function get_table_name()\n {\n ...
[ "0.6169111", "0.6114315", "0.60538644", "0.60117435", "0.60007954", "0.5954046", "0.59467447", "0.588956", "0.5870642", "0.58676094", "0.58490413", "0.58490413", "0.5840889", "0.58398116", "0.5820934", "0.5809534", "0.5802723", "0.57901794", "0.57836616", "0.5760849", "0.5745...
0.8647794
0
Returns the database charset.
public function getCharset(): string { $charsetCollate = ''; $mySlqVersion = $this->getVariable('SELECT VERSION() as mysql_version'); if (version_compare($mySlqVersion, '4.1.0', '>=')) { if (!empty($this->wpDatabase->charset)) { $charsetCollate = "DEFAULT CHARACTER SET {$this->wpDatabase->charset}"; } if (!empty($this->wpDatabase->collate)) { $charsetCollate .= " COLLATE {$this->wpDatabase->collate}"; } } return $charsetCollate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCharset()\n {\n return $this->_db->getOption('charset');\n }", "function getDatabaseEncoding() {\n\t\t$sql = \"SELECT getdatabaseencoding() AS encoding\";\n\n\t\treturn $this->selectField($sql, 'encoding');\n\t}", "public static function determine_charset() {\n global $wpdb;\...
[ "0.849715", "0.7903555", "0.78589004", "0.7693013", "0.74389035", "0.74038225", "0.7383289", "0.7383289", "0.7357609", "0.7354884", "0.7345841", "0.73182094", "0.73182094", "0.73182094", "0.73182094", "0.73182094", "0.73182094", "0.73182094", "0.73182094", "0.7287384", "0.728...
0.7819284
3
Clear all session data
public static function clear(): void { $_SESSION = []; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clearAll() {\n $this->startSession();\n $_SESSION = array();\n $this->sessionData = null;\n session_write_close();\n }", "private function clear() {\n $_SESSION = array();\n\n // Destroy the session cookie and cookie header\n $sessionCookie = Cookie::loadCo...
[ "0.902381", "0.841063", "0.8377037", "0.83707196", "0.830303", "0.8258824", "0.82224584", "0.8222114", "0.82154024", "0.81413114", "0.8049824", "0.80485845", "0.797528", "0.7945675", "0.7935988", "0.79216295", "0.79112494", "0.78588563", "0.7824183", "0.78149515", "0.77971286...
0.8303488
4
Send the password reset notification.
public function sendPasswordResetNotification($token) { $this->notify(new ResetPasswordNotification($token)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendResetPasswordEmail()\n {\n $passwordReset = $this->generateResetPasswordToken();\n\n SendEmailJob::dispatch($this, 'forgot-password', 'Reset Your Password', ['props' => $passwordReset])->onQueue('account-notifications');\n }", "public function sendResetEmail()\n {\n ...
[ "0.8414636", "0.79653764", "0.79469335", "0.78665715", "0.786064", "0.7854703", "0.785211", "0.7841399", "0.7839549", "0.7831625", "0.7826701", "0.7817392", "0.78084904", "0.7804854", "0.7804854", "0.779783", "0.779783", "0.77977175", "0.778931", "0.778931", "0.778931", "0....
0.7748881
54
Registers student in database and returns it's cookie in &$cookie variable.
public function register_student(Student $student): string { $cookie = SecurityUtil::generate_token(); $stmt = $this->db->prepare('INSERT INTO students(forename, surname, email, group_id, exam_results, birth_year, is_foreign, gender, cookie) VALUES (?,?,?,?,?,?,?,?,?)'); $stmt->execute(array(strval($student->forename), strval($student->surname), strval($student->email), strval($student->group_id), intval($student->exam_results), intval($student->birth_year), intval($student->is_foreign), intval($student->gender), $cookie)); $stmt->closeCursor(); return $cookie; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_student_with_cookie(string $cookie) {\n $query = $this->db->prepare('SELECT * FROM students WHERE cookie=?');\n $query->execute(array($cookie));\n if (($row = $query->fetch(\\PDO::FETCH_NUM))) {\n $query->closeCursor();\n return StudentsTableGateway::c...
[ "0.6709638", "0.6058455", "0.57694584", "0.5768314", "0.56677556", "0.5641499", "0.56099653", "0.5607244", "0.5606758", "0.55897784", "0.55764514", "0.55637705", "0.5539231", "0.552666", "0.5525856", "0.54604083", "0.54546404", "0.5445741", "0.54391295", "0.5424575", "0.53910...
0.73264164
0
Updates student with cookie $cookie with data from $student.
public function update_student(string $cookie, Student $student) { $stmt = $this->db->prepare('UPDATE students SET forename=?, surname=?, email=?, group_id=?, exam_results=?, birth_year=?, is_foreign=?, gender=? WHERE cookie=?'); $stmt->execute(array(strval($student->forename), strval($student->surname), strval($student->email), strval($student->group_id), intval($student->exam_results), intval($student->birth_year), intval($student->is_foreign), intval($student->gender), $cookie)); $stmt->closeCursor(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, Student $student)\n {\n $student->frist_name=$request->frist_name;\n $student->last_name=$request->last_name;\n $student->date=$request->date;\n $student->mobile=$request->mobile;\n $student->status=$request->status;\n $student...
[ "0.5966551", "0.57385606", "0.570764", "0.5673814", "0.5631362", "0.55689603", "0.555878", "0.55534416", "0.55418015", "0.55287653", "0.5524608", "0.55244565", "0.5510976", "0.55019224", "0.5476816", "0.5471941", "0.5435862", "0.54301465", "0.54301465", "0.54301465", "0.54301...
0.76887363
0
Parses result from database query and returns complete Student class instance.
private static function create_student_from_row(array $row): Student { $student = new Student; $student->forename = strval($row[0]); $student->surname = strval($row[1]); $student->email = strval($row[2]); $student->gender = intval($row[3]); $student->group_id = strval($row[4]); $student->exam_results = intval($row[5]); $student->birth_year = intval($row[6]); $student->is_foreign = intval($row[7]); return $student; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllStudents(){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_StudentDAO->getAllStudents();\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in StudentDAO.getAllStudents()\");\t\t\n\n\t\treturn $Result;\n\t}", "public function readStudent($Stu...
[ "0.7109167", "0.67337406", "0.6501042", "0.63812774", "0.6379051", "0.62099516", "0.62000626", "0.59828913", "0.59824216", "0.59491175", "0.58682024", "0.5856539", "0.58382154", "0.5834255", "0.57742083", "0.5772948", "0.57482386", "0.57328165", "0.57233965", "0.56795424", "0...
0.55378234
31
Returns true if student with such email is registered.
public function is_student_with_email_registered(string $email): bool { $query = $this->db->prepare("SELECT COUNT(email) FROM students WHERE email=? LIMIT 1"); $query->execute(array($email)); $result = $query->fetch(\PDO::FETCH_NUM); $is_registered = intval($result[0]) != 0; $query->closeCursor(); return $is_registered; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _emailIsRegistered($email_address) {\r\n\t\t$model = Mage::getModel('customer/customer');\r\n $model->setWebsiteId(Mage::app()->getStore()->getWebsiteId())->loadByEmail($email_address);\r\n\t\tif ($model->getId()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\...
[ "0.76334846", "0.7613865", "0.75923437", "0.7552959", "0.7488753", "0.737985", "0.73501045", "0.7347746", "0.7314342", "0.72081333", "0.72076625", "0.72055066", "0.7196411", "0.7185854", "0.7172241", "0.7167042", "0.71586055", "0.7145895", "0.71443695", "0.7119543", "0.711170...
0.8252167
0
Returns student that has specified cookie associated with it or null if student with such cookie does not exist.
public function get_student_with_cookie(string $cookie) { $query = $this->db->prepare('SELECT * FROM students WHERE cookie=?'); $query->execute(array($cookie)); if (($row = $query->fetch(\PDO::FETCH_NUM))) { $query->closeCursor(); return StudentsTableGateway::create_student_from_row($row); } else { $query->closeCursor(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get($cookieName);", "public function getStudentById($id) {\n return CaStudent::find($id);\n }", "protected function getCookie($cookieName): ?\\Symfony\\Component\\HttpFoundation\\Cookie\n {\n foreach ($this->response->headers->getCookies() as $cookie) {\n if ($coo...
[ "0.547046", "0.5353633", "0.5267596", "0.5195249", "0.5139253", "0.51037514", "0.5069651", "0.5068924", "0.50631714", "0.50557184", "0.50419325", "0.5025451", "0.5008431", "0.500584", "0.5004192", "0.5001277", "0.4968902", "0.4951131", "0.49074987", "0.49074197", "0.49029255"...
0.832616
0
Queries database to get students ordered by field $order_field, sorted in ascending or descending order, with page and entries limit.
public function get_all_students(string $order_field = 'forename', int $order_dir = self::ORDER_ASC, int $page = 0, int $limit = 50): array { $order_field = htmlentities($order_field); $order_dir = $order_dir == self::ORDER_ASC ? 'ASC' : 'DESC'; $query_string = "SELECT forename, surname, group_id, exam_results FROM students ORDER BY $order_field $order_dir LIMIT :limit_start, :limit_end"; $query = $this->db->prepare($query_string); $query->bindValue(':limit_start', $page * $limit, \PDO::PARAM_INT); $query->bindValue(':limit_end', $limit, \PDO::PARAM_INT); $query->execute(); $students = array(); while (($row = $query->fetch(\PDO::FETCH_NUM))) { $student = new Student; $student->forename = $row[0]; $student->surname = $row[1]; $student->group_id = $row[2]; $student->exam_results = $row[3]; array_push($students, $student); } $query->closeCursor(); return $students; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find_students(\n string $keyword,\n string $order_by = 'forename',\n $order_dir = self::ORDER_ASC,\n $page = 0,\n $limit = 50,\n &$total_students_count = null\n ) {\n $order_by = htmlentities($order_by);\n $order_dir = $order_dir == self::O...
[ "0.616", "0.60952854", "0.5740891", "0.55644876", "0.5533499", "0.54793864", "0.5469629", "0.54504913", "0.5431375", "0.5425937", "0.5385806", "0.53659475", "0.5357207", "0.5322595", "0.5277525", "0.52250534", "0.5207958", "0.52028984", "0.5193226", "0.5177072", "0.51706195",...
0.6418716
0
Searches all students by keyword, ordered by field and has page and limit. Optional $total_students_count reference can be set to rethieve number of found students.
public function find_students( string $keyword, string $order_by = 'forename', $order_dir = self::ORDER_ASC, $page = 0, $limit = 50, &$total_students_count = null ) { $order_by = htmlentities($order_by); $order_dir = $order_dir == self::ORDER_ASC ? 'ASC' : 'DESC'; $query_string = "SELECT forename, surname, group_id, exam_results FROM students WHERE CONCAT(forename, ' ', surname, ' ', group_id, ' ', exam_results) LIKE :keyword ORDER BY $order_by $order_dir LIMIT :limit_start, :limit_end"; $query = $this->db->prepare($query_string); $query->bindValue(':keyword', "%{$keyword}%", \PDO::PARAM_STR); $query->bindValue(':limit_start', $page * $limit, \PDO::PARAM_INT); $query->bindValue(':limit_end', $limit, \PDO::PARAM_INT); $query->execute(); $students = array(); while ($row = $query->fetch(\PDO::FETCH_NUM)) { $student = new Student; $student->forename = $row[0]; $student->surname = $row[1]; $student->group_id = $row[2]; $student->exam_results = $row[3]; array_push($students, $student); } $query->closeCursor(); if (isset($total_students_count)) { if ($page == 0 && count($students) < $limit) { $total_students_count = count($students); } else { $query_string = "SELECT COUNT(*) FROM students WHERE CONCAT(forename, ' ', surname, ' ', group_id, ' ', exam_results) LIKE :keyword ORDER BY $order_by $order_dir"; $query = $this->db->prepare($query_string); $query->bindValue(':keyword', "%{$keyword}%", \PDO::PARAM_STR); $query->execute(); $total_students_count = intval($query->fetch(\PDO::FETCH_NUM)[0]); $query->closeCursor(); } } return $students; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchStudent($search_text)\n {\n $studentModel = new StudentModel();\n return $studentModel->searchStudent($search_text);\n }", "public function getStudents(SearchData $data)\n\t{\n\t\t$text = $data->getSearchText(); $field = $data->getSearchField();\n\t\t$sortBy = $dat...
[ "0.6035083", "0.58750355", "0.57831717", "0.5546936", "0.5355939", "0.53487027", "0.5302857", "0.5272335", "0.5251378", "0.5246081", "0.5229187", "0.52196443", "0.5211386", "0.51994693", "0.51252383", "0.51155794", "0.5108214", "0.50786155", "0.505331", "0.50347716", "0.49977...
0.7679351
0
Get the validation rules used to validate passwords.
protected function passwordRules() { return ['required', 'string', new Password, 'confirmed', new \Valorin\Pwned\Pwned(300),]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrievePasswordValidationRules()\n {\n return $this->startAnonymous()->uri(\"/api/tenant/password-validation-rules\")\n ->get()\n ->go();\n }", "private function passwordRules() {\n return [\n 'password' => 'required|alpha_num|between:3,20|co...
[ "0.8030672", "0.785479", "0.78045386", "0.77467126", "0.76056427", "0.7537521", "0.75033", "0.7403564", "0.7369104", "0.7363189", "0.735682", "0.7320071", "0.7307134", "0.7288101", "0.7253632", "0.7239631", "0.71973854", "0.7195799", "0.7177747", "0.7149591", "0.71382856", ...
0.78386426
2
Sprawdza czy uzytkownik jest moderatorem
public function czy_jest_moderatorem($login) { $login = $this->zabezpiecz($login); $zapytanie = " SELECT jest_moderatorem FROM ".$this->nazwa_tabeli." WHERE login='".$login."'; "; $wynik_zapytania = $this->pobierz($zapytanie); if (!empty($wynik_zapytania)) { return (int)$wynik_zapytania[0]['jest_moderatorem']; } else { return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function masodik()\n {\n }", "private function metodo_privado() {\n }", "public function AggiornaPrezzi(){\n\t}", "function rekamMedis($nomor_pasien)\n\t{\n\n\t}", "public static function dodajArtikelVKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiD...
[ "0.66274434", "0.63037413", "0.6297443", "0.62826574", "0.61840385", "0.6107162", "0.6100896", "0.60748297", "0.60352844", "0.6033968", "0.60143685", "0.5995286", "0.59736466", "0.5964401", "0.58924884", "0.58597356", "0.5822165", "0.58219224", "0.5792247", "0.575652", "0.575...
0.0
-1
sprawdza ilosc wytepowania danego elementu
public function sprawdz_ilosc($warunek) { $warunek_zapytania = null; foreach ($warunek as $klucz => $wartosc) { $warunek_zapytania.=''.$klucz.' = "'.$wartosc.'" and '; } $warunek_zapytania = rtrim($warunek_zapytania, ' and '); $zapytanie = " SELECT count(*) FROM ".$this->nazwa_tabeli." WHERE ".$warunek_zapytania."; "; $wynik = $this->pobierz($zapytanie); if (!empty($wynik)) { return (bool)$wynik[0]['count(*)']; } else { return 0; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getElementos();", "public function getElement();", "public function getElement();", "function ausgabe_gespeicherte_elemente($spalte_zur_ausgabe,$tabelle,$spalte_wert,$vergleichswert) {\n\t$mysqli=MyDatabase();\n\t$abfrage=\"SELECT `$spalte_zur_ausgabe` FROM $tabelle WHERE `$spalte_wert` LIKE ...
[ "0.68370986", "0.63284373", "0.63284373", "0.5733809", "0.557302", "0.5476403", "0.54666114", "0.5434427", "0.54329014", "0.539957", "0.53337765", "0.53163826", "0.5295397", "0.52914464", "0.52906", "0.52780163", "0.52746904", "0.52696455", "0.5261297", "0.5231834", "0.522477...
0.0
-1
pobiera informacje potrzebne do zalogowania
public function pobierz_info_o_uzytkowniku($uzytkownik_id) { $zapytanie = " SELECT jest_moderatorem,uzytkownik_id,zalogowany,login FROM pk_uzytkownicy WHERE uzytkownik_id='".$uzytkownik_id."'; "; $wynik_zapytania = $this->pobierz($zapytanie); if (!empty($wynik_zapytania)) { $wynik['jest_moderatorem'] = $wynik_zapytania[0]['jest_moderatorem']; $wynik['zalogowany'] = $wynik_zapytania[0]['zalogowany']; $wynik['uzytkownik_id'] = $wynik_zapytania[0]['uzytkownik_id']; $wynik['login'] = $wynik_zapytania[0]['login']; return $wynik; } else { return array(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function PrintAuthInfo() \n {\n if($this->IsAuthenticated())\n echo \"Du är inloggad som: <b>\" . $this->GetAcronym() . \"</b> (\" . $this->GetName() . \")\";\n else\n echo \"Du är <b>UTLOGGAD</b>.\";\n }", "public function info_login()\r\n\t{ \r\n\t\treturn $this->login;\r\n\t}", "functi...
[ "0.6446858", "0.6217593", "0.6187472", "0.60865164", "0.6036789", "0.6023596", "0.602167", "0.59373236", "0.5923722", "0.5921291", "0.59011495", "0.58782405", "0.58782405", "0.58782405", "0.5867783", "0.5854629", "0.5846771", "0.58432376", "0.582222", "0.58194077", "0.5814045...
0.0
-1
Get the list of players hidden from the given application. This method is only available to user accounts for your developer console. (applications.listHidden)
public function listHidden($applicationId, $optParams = array()) { $params = array('applicationId' => $applicationId); $params = array_merge($params, $optParams); return $this->call('listHidden', array($params), 'Google\Service\GamesManagement\HiddenPlayerList'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function listHiddenExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE visible = FALSE ORDER BY creation_date ASC\");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$list = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($list, $e...
[ "0.6301318", "0.622639", "0.5670769", "0.5609927", "0.53892356", "0.5331992", "0.5331992", "0.5303199", "0.5295577", "0.5260307", "0.52600515", "0.5214672", "0.5212481", "0.52022666", "0.51759416", "0.51689917", "0.5164226", "0.5107169", "0.5101624", "0.5082389", "0.5082389",...
0.85996217
0
the $_POST[] array will contain the passed in filename and data the directory "data" is writable by the server (chmod 777) the file path needs to be adjusted accordingly! original $filename = "data/".$_POST['filename']; $filename = $_POST['filename']; $data = $_POST['filedata']; write the file to disk file_put_contents($filename, $data);
function file_force_contents($dir, $contents){ $parts = explode('/', $dir); $file = array_pop($parts); $dir = ''; foreach($parts as $part) if(!is_dir($dir .= "/$part")) mkdir($dir); file_put_contents("$dir/$file", $contents); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function write($data, $filename = '', $uploadDir = '');", "public function writeFile($data);", "function file_write ($filename, $data) {\r\n $fd = fopen($filename, 'w') or die(\"Can't open file $filename for write!\");\r\n fwrite($fd, $data);\r\n fclose($fd);\r\n }", "public fu...
[ "0.75383896", "0.72276694", "0.71149033", "0.68754756", "0.683221", "0.6700459", "0.66856956", "0.6653385", "0.6607837", "0.65004", "0.63690287", "0.63530046", "0.63428164", "0.63415575", "0.6330973", "0.6328753", "0.6324954", "0.627159", "0.62673455", "0.62563133", "0.623465...
0.0
-1
Add new user registrstion data into sp_system_account table in database
public function SystemRegistration() { $type = $this->input->post('type', TRUE); $data = array( 'SP_USER_ID' => $this->input->post('userid', TRUE), 'SP_USERNAME' => $this->input->post('username', TRUE), 'SP_PASSWORD' => $this->input->post('password', TRUE), 'SP_CREATED_DATETIME' => date("Y-m-d h:i:sa") ); if($type == 'RES'){ $query = $this->db->insert("sp_system_account", $data); } else if($type == 'EMP'){ $query = $this->db->insert("sp_emp_system_account", $data); } echo '<script>alert("Data added to the database")</script>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 =...
[ "0.6878499", "0.6557917", "0.6556032", "0.65061903", "0.64495754", "0.6430277", "0.6421327", "0.6413087", "0.6339189", "0.63242", "0.6319407", "0.63005817", "0.62986434", "0.629851", "0.6280509", "0.6278733", "0.62737674", "0.6250473", "0.6229247", "0.6220118", "0.621235", ...
0.65982103
1
Gets query for [[Requests]].
public function getRequests() { return $this->hasMany(Request::className(), ['users_id' => 'id']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listRequests()\r\n {\r\n return $this->BunqClient->getHttpService()->get(\r\n $this->getResourceEndpoint()\r\n );\r\n }", "public function getRequests()\n {\n return $this->requests;\n }", "public function getRequests() {\n\n $requests = isset(...
[ "0.6555001", "0.6524387", "0.6518647", "0.6465791", "0.6450774", "0.64392257", "0.6371482", "0.636667", "0.636667", "0.636667", "0.636667", "0.636667", "0.636667", "0.636667", "0.636667", "0.636667", "0.63283074", "0.6276411", "0.6256098", "0.62537354", "0.62537354", "0.622...
0.6586359
0
Display a listing of the resource.
public function index() { $recruitmentCollection = Recruitment::all(); return view('admin.pages.recruitment.index', ['recruitmentCollection' => $recruitmentCollection]); }
{ "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() { $facilities = Facility::all(); return view('admin.pages.recruitment.create', ['facilities' => $facilities]); }
{ "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) { $title = $request->input('title'); $content = $request->input('content'); $expireDate = $request->input('expire-date'); $facilityId = $request->input('facility'); $recruitment = new Recruitment(); $recruitment->title = $title; $recruitment->content = $content; $recruitment->expire_date = $expireDate; $recruitment->facility_id = $facilityId; $recruitment->save(); return redirect()->action('Admin\RecruitmentController@index'); }
{ "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.7286258", "0.71454436", "0.7132821", "0.6640289", "0.6621105", "0.6566493", "0.65255576", "0.65087926", "0.6448317", "0.63752604", "0.63736314", "0.6365631", "0.6365631", "0.6365631", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0.634229", "0....
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { $recruitment = Recruitment::findOrFail($id); return view('admin.pages.recruitment.edit',['recruitment' => $recruitment]); }
{ "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, $id) { $recruitment = Recruitment::findOrFail($id); $title = $request->input('title'); $content = $request->input('content'); $expireDate = $request->input('expire-date'); $recruitment->title = $title; $recruitment->content = $content; $recruitment->expire_date = $expireDate; $recruitment->save(); return redirect()->action('Admin\RecruitmentController@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($id) { $recruitment = Recruitment::findOrFail($id); $recruitment->delete(); return redirect()->action('Admin\RecuitmentController@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
Quote variable to make safe
static function quote_smart($value) { // Stripslashes if (get_magic_quotes_gpc()) { $value = stripslashes($value); } // Quote if not a number or a numeric string if (!is_numeric($value)) { $value = "'" . mysql_real_escape_string($value) . "'"; //$value = "'" . mysql_escape_string($value) . "'"; } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function escapeQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"'\",\"||\",$var);\n\t\t\t$string = str_replace('\"','||||',$string);\n\t\t}\n\n\t\treturn $string;\n\t}", "function escapeQuote($var)\n\t{\n\t\tif (isset($var))\n\t\t{\n\t\t\t$string = str_replace(\"'\",\"||\",$var);\n\t\...
[ "0.737082", "0.737082", "0.737082", "0.73158336", "0.72339064", "0.7165936", "0.70910263", "0.7048306", "0.7046936", "0.69996476", "0.69871086", "0.6886376", "0.68825895", "0.6848325", "0.67703646", "0.6755965", "0.6711628", "0.6691397", "0.6605037", "0.6570181", "0.65698934"...
0.6419618
37
Add New Job Board
public function AddNewJobBoard(Request $request){ $validator = Validator::make($request->all(), [ 'title' => 'required', ]); if ($validator->fails()) { toastr()->error('Something is wrong!'); return Redirect::back() ->withErrors($validator) // send back all errors to the login form ->withInput(); } else { $job = new JobBoard; $job ->title = request('title'); if ($job->save()){ toastr()->success('success'); }else{ toastr()->error('Something is wrong!'); } } return Redirect(route('super_admin.AllJobBoards')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addJobToPB()\n {\n $input = Request::onlyLegacy('board_ids', 'job_id');\n\n $validator = Validator::make($input, ProductionBoard::getJobRule());\n if ($validator->fails()) {\n return ApiResponse::validation($validator);\n }\n\n $boardIds = arry_fu($i...
[ "0.6762308", "0.6753874", "0.6596264", "0.6239229", "0.6139006", "0.59675926", "0.5929389", "0.5929213", "0.5799491", "0.57727873", "0.5702986", "0.56169224", "0.55919904", "0.5582509", "0.55611134", "0.5537929", "0.55319196", "0.5512059", "0.5506892", "0.5499711", "0.5475455...
0.62912506
3
Get the value of fname
public function getFname() { return $this->fname; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValue(){\r\n\t\tif(\r\n\t\t\tisset($_FILES[$this->name]['tmp_name'])\r\n\t\t\t&& (strlen($_FILES[$this->name]['tmp_name']) > 0)\r\n\t\t\t&& ($_FILES[$this->name]['size'] > 0)\r\n\t\t\t&& ($_FILES[$filedataName]['error'] == UPLOAD_ERR_OK)\r\n\t\t){\r\n\t\t\treturn $_FILES[$this->name]['name'];\r\...
[ "0.71827716", "0.7181915", "0.71200114", "0.7060546", "0.70385677", "0.7003385", "0.69323593", "0.6900736", "0.6852542", "0.6831277", "0.6792071", "0.6773533", "0.6738374", "0.67096066", "0.66835725", "0.66803074", "0.66803074", "0.66803074", "0.66708565", "0.66708565", "0.66...
0.6862342
8
Set the value of fname
public function setFname($fname) { $this->fname = $fname; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setFilename($filename);", "public function setFileName(?string $value): void {\n $this->getBackingStore()->set('fileName', $value);\n }", "public function setFileName($file);", "public static function setFile($file) {}", "public function setFileName($fileName);", "function setFilename(...
[ "0.7122451", "0.7013953", "0.6939653", "0.688097", "0.6843747", "0.6822313", "0.67072594", "0.66640747", "0.6618327", "0.6585598", "0.6579825", "0.6571687", "0.65692556", "0.6528824", "0.6517772", "0.65009093", "0.64815235", "0.647033", "0.6456483", "0.6438303", "0.6428161", ...
0.0
-1
Get the value of lname
public function getLname() { return $this->lname; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_lName() {\n return $this->lName;\n }", "function getLname() {\n return $this->lname;\n }", "public function getUser_lname()\n {\n return $this->user_lname;\n }", "function getRHUL_LastName() {\n return getRHUL_LDAP_FieldValue(\"last_name\");\n}", "public...
[ "0.7913818", "0.7850836", "0.7211258", "0.6657328", "0.65321", "0.65043265", "0.6403536", "0.6360928", "0.6269534", "0.6268541", "0.62588906", "0.62476116", "0.6121237", "0.6091806", "0.6089751", "0.60895306", "0.60679746", "0.60576785", "0.60477626", "0.6040168", "0.6040168"...
0.80444074
0
Set the value of lname
public function setLname($lname) { $this->lname = $lname; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setLname($name){\n $this->lname = $name;\n }", "function set_lName($lName) {\n $this->lName = $lName;\n }", "public function setLname($lName)\r\n {\r\n $this->_lName = $lName;\r\n }", "public function setLNameAttribute($value)\n {\n if (!empty($value)) {\n ...
[ "0.8557611", "0.82276577", "0.80930346", "0.74619657", "0.7136587", "0.7077719", "0.70706016", "0.69499314", "0.6727604", "0.66608304", "0.6603706", "0.6577636", "0.64747137", "0.64547676", "0.6447978", "0.63410527", "0.62194854", "0.6211447", "0.6193318", "0.6186898", "0.616...
0.7128883
5
Get the value of role
public function getRole() { return $this->role; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRole() \n {\n return $this->_fields['Role']['FieldValue'];\n }", "public function getRole() : string;", "public function getRole();", "public function getRole();", "public function getRole() {}", "public function getRole(){\n return $this->role; \n }", ...
[ "0.8129179", "0.8017992", "0.8013211", "0.8013211", "0.79927534", "0.78890836", "0.78564334", "0.7799827", "0.7775966", "0.77745354", "0.7763718", "0.7759792", "0.7709466", "0.7688766", "0.76838654", "0.76545465", "0.7616813", "0.760234", "0.7595512", "0.75506413", "0.7512758...
0.7666169
22
Set the value of role
public function setRole($role) { $this->role = $role; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setRole($value)\n\t{\n\t\t$this->setState('__role', $value);\n\t}", "public function setIdRole($value)\n {\n $this->_id_role = $value;\n }", "public function setRole($role);", "public function set_role($role)\n {\n }", "static function setRole(&$rsData, $role)\n {\n ...
[ "0.82835597", "0.78808606", "0.7789412", "0.77275306", "0.74382114", "0.7409325", "0.7394439", "0.7342247", "0.73273116", "0.7322493", "0.730556", "0.7260974", "0.7260974", "0.7142301", "0.7075005", "0.70564085", "0.69947547", "0.69947547", "0.69803995", "0.6961131", "0.69352...
0.0
-1
Get the value of address
public function getAddress() { return $this->address; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getaddress(){\n $address = $this->_run('getaddress');\n return $address;\n }", "public function getAddr()\n {\n return $this->get(self::_ADDR);\n }", "public function getAddress() {\n //return the value address\n return $this->Address;\n }", "pri...
[ "0.74435276", "0.7415336", "0.73110294", "0.72923505", "0.72674245", "0.721881", "0.71517885", "0.7002647", "0.70006824", "0.6994938", "0.69899654", "0.6973104", "0.6973104", "0.6956581", "0.6883949", "0.6883949", "0.6878861", "0.6878861", "0.6877591", "0.68236125", "0.680667...
0.6742297
43
Set the value of address
public function setAddress($address) { $this->address = $address; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAddress($value)\n {\n $this->_address = $value;\n }", "public function setAddress(?string $value): void {\n $this->getBackingStore()->set('address', $value);\n }", "public function setAddress($address);", "public function setAddress($address);", "public function se...
[ "0.81244016", "0.76944613", "0.7458949", "0.7458949", "0.74519795", "0.74448115", "0.7364291", "0.7319397", "0.7288095", "0.720247", "0.71611726", "0.7151073", "0.7149305", "0.7149305", "0.7149305", "0.71045876", "0.7081741", "0.70363235", "0.7034446", "0.6992214", "0.6957686...
0.0
-1
Get the value of dob
public function getDob() { return $this->dob; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDobd() {\n\t\treturn $this->container['dobd'];\n\t}", "public function getDob(){\n //this fait réference à element de la classe\n return $this -> dob;\n }", "public function getDob()\n {\n return $this->dob;\n }", "public function getDob($id){\n $do...
[ "0.7421253", "0.7302416", "0.7062554", "0.7061207", "0.680913", "0.6623972", "0.6574356", "0.65171504", "0.64703614", "0.6450547", "0.6444015", "0.64436305", "0.6429188", "0.64249486", "0.63577336", "0.6346458", "0.6178267", "0.6168935", "0.61671555", "0.61200714", "0.6115204...
0.7102742
3
Set the value of dob
public function setDob($dob) { $this->dob = $dob; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDob($quote, $dob)\n {\n $customer = $quote->getCustomer();\n if ($customer) {\n $customer->setDob($dob->toString(\"yyyy-MM-dd HH:mm:ss\"));\n if ($quote->getCustomerId()) {\n $customer->save();\n }\n }\n if (Mage::app...
[ "0.6788573", "0.67746323", "0.671156", "0.66482395", "0.6548903", "0.6119371", "0.61135185", "0.6091314", "0.599191", "0.5945076", "0.5942602", "0.59025836", "0.5878366", "0.5814377", "0.57762396", "0.576074", "0.56201124", "0.5573033", "0.5570834", "0.552923", "0.54883134", ...
0.5837182
14
Get the value of doi
public function getDoi() { return $this->doi; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getBookDOI()\n {\n return $this->mBook['doi'];\n }", "public function getDod();", "public function getDateI(){\n return $this->dateI;\n }", "public function getD() {}", "public function getDni() {\r\n return $this->dni;\r\n }", "public functi...
[ "0.67642194", "0.66320604", "0.6440463", "0.6343033", "0.63270223", "0.6298013", "0.6297631", "0.62934816", "0.62696093", "0.6246562", "0.62402904", "0.62035906", "0.6183823", "0.61810625", "0.617435", "0.60745245", "0.60634387", "0.604051", "0.6009992", "0.599249", "0.595574...
0.7826824
0
Set the value of doi
public function setDoi($doi) { $this->doi = $doi; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setOrden($iorden = '')\n {\n $this->iorden = $iorden;\n }", "public function getDoi()\n {\n return $this->doi;\n }", "private function setCodigoOrdem($iCodigoOrdem){\n $this->iCodigoOrdem = $iCodigoOrdem;\n }", "public function setDDI(string $ddi)\n {\n $this-...
[ "0.6353836", "0.6238903", "0.61709654", "0.6119155", "0.6070443", "0.6070443", "0.6070443", "0.6070443", "0.6005381", "0.5983266", "0.5829005", "0.5772334", "0.5743229", "0.5728895", "0.5716428", "0.5706191", "0.5603965", "0.5603965", "0.5603164", "0.5603164", "0.5583135", ...
0.63389164
1
Get the value of facility
public function getFacility() { return $this->facility; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFacility();", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", ...
[ "0.7492259", "0.630601", "0.630601", "0.630601", "0.630601", "0.630601", "0.630601", "0.630601", "0.630601", "0.630601", "0.630601", "0.630601", "0.630601", "0.630601", "0.630601", "0.6304625", "0.6304625", "0.6304625", "0.6304625", "0.6304625", "0.62992364", "0.62992364", ...
0.77125245
1
Set the value of facility
public function setFacility($facility) { $this->facility = $facility; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setFacilityStatus(){\n\t\t$this->UpdateVisitors();\n\n\t\t/** Update Available Rooms */\n\t\t$this->UpdateAvailableRooms();\n\n\t}", "public function getFacility()\n {\n return $this->facility;\n }", "public function getFacility()\n {\n return $this->facility;\n }", ...
[ "0.66508675", "0.581512", "0.581512", "0.5664312", "0.5585751", "0.5564506", "0.55525863", "0.55438197", "0.55438197", "0.5542491", "0.5542491", "0.5542491", "0.5542491", "0.5542491", "0.5542491", "0.5542491", "0.5542491", "0.5542491", "0.5542491", "0.5542491", "0.55043393", ...
0.56744623
3
Get the value of id
public function getId() { return $this->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getId(){\n\t\t\treturn $this->$id;\n\t\t}", "public function getId()\n {\n return $this->getValue('id');\n }", "public function getId() {\n\t\treturn $this -> data['id'];\n\t}", "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "function getID() {\n\t\treturn $this->dat...
[ "0.7754662", "0.75793916", "0.7551659", "0.74928856", "0.7472705", "0.74458975", "0.7434864", "0.7434864", "0.7430539", "0.74155563", "0.74155563", "0.7328889", "0.7290596", "0.72736657", "0.72599036", "0.72599036", "0.7255901", "0.7255519", "0.7254729", "0.7254729", "0.72547...
0.0
-1
Set the value of id
public function setId($id) { $this->id = $id; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetId($value) { $this->id=$value; }", "function setId($value) {\n $this->_id = intval($value);\n }", "public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }", "function set_id($id) {\...
[ "0.88871074", "0.843179", "0.8386374", "0.82243615", "0.8207132", "0.8197505", "0.8139511", "0.81316125", "0.8130276", "0.81274986", "0.8092258", "0.80916125", "0.807949", "0.80521345", "0.80423075", "0.8040586", "0.8028681", "0.8028681", "0.80261153", "0.8006119", "0.8002501...
0.0
-1
Get the value of mname
public function getMname() { return $this->mname; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_name()\n\t{\n\t\treturn $this->m_name;\n\t}", "private function get_name()\n\t{\n\t\treturn $this->m_name;\n\t}", "public function getName(){\n return $this->m_name;\n }", "public function getname(){\n \t//return $this->msg;\n \treturn $this->phone;\n }", ...
[ "0.7597905", "0.7597905", "0.72722447", "0.71127045", "0.6980993", "0.6882744", "0.6882744", "0.6879845", "0.6814856", "0.67908955", "0.6788789", "0.67657447", "0.67657447", "0.67657447", "0.6754371", "0.674864", "0.67078817", "0.6699472", "0.66981417", "0.66917473", "0.66784...
0.79557544
0
Set the value of mname
public function setMname($mname) { $this->mname = $mname; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setName( $name ) {\n\t\t$this->mName = $name;\n\t}", "public function setName ($name){\n\t\tif($name){\n\t\t\t$this->Item['name'] = substr($name, 0,100);\n\t\t}\n\t}", "function setName($value) {\n $this->name = $value;\n }", "public function setName($_name)\n {\n if (is_str...
[ "0.7997464", "0.7737779", "0.76728547", "0.76541483", "0.76306844", "0.7621135", "0.7610936", "0.7587928", "0.75707453", "0.7559033", "0.7559033", "0.7559033", "0.7559033", "0.7559033", "0.75577015", "0.75532573", "0.7544041", "0.7529499", "0.7529499", "0.7512441", "0.7512441...
0.0
-1
Get the value of registration_no
public function getRegistration_no() { return $this->registration_no; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRegistrationNo() :string\n {\n return $this->registrationNo;\n }", "public function getRegistrationNumber() {\n\t\treturn self::$_registrationNumber;\n\t}", "function getRegistrationID()\n { \n return $this->getValueByFieldName('registration_id');\n }", "public ...
[ "0.8395688", "0.784082", "0.7824128", "0.7662472", "0.7537308", "0.65893686", "0.6525186", "0.6495188", "0.63346237", "0.63072807", "0.6274422", "0.62463826", "0.6242624", "0.6202847", "0.62003464", "0.61889696", "0.61779964", "0.60931057", "0.6083957", "0.6040344", "0.602573...
0.87550956
0
Set the value of registration_no
public function setRegistration_no($registration_no) { $this->registration_no = $registration_no; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRegistrationNumber($value) {\n\t\tself::$_registrationNumber = $value;\n\t}", "public function getRegistration_no()\n {\n return $this->registration_no;\n }", "public function setRegnoAttribute($value)\n\t{\n\t\t$this->attributes['regno'] = strtoupper($value);\n\t}", "function...
[ "0.8287362", "0.72694427", "0.6898891", "0.68369603", "0.68369603", "0.66409755", "0.6420064", "0.62922776", "0.61337554", "0.603553", "0.60330504", "0.5982624", "0.5947121", "0.5947121", "0.5947121", "0.5947121", "0.587415", "0.5867765", "0.5852872", "0.5836964", "0.5831999"...
0.63314325
7
Get the value of sex
public function getSex() { return $this->sex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getsex()\n {\n return $this->sex;\n }", "public function getSex()\n {\n return self::SEX[$this->sex];\n }", "public function getSex()\n {\n $result = null;\n if (isset($this->userInfo['sex'])) {\n $result = $this->userInfo['sex'] == 1;\n ...
[ "0.82747465", "0.81837356", "0.7885566", "0.7861007", "0.774871", "0.72744715", "0.71192294", "0.70662874", "0.70535696", "0.6866704", "0.6866704", "0.68566686", "0.6834514", "0.68128353", "0.67801815", "0.6740106", "0.6406413", "0.6382734", "0.63543236", "0.6319572", "0.6287...
0.81860244
5
Set the value of sex
public function setSex($sex) { $this->sex = $sex; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSex($var)\n {\n GPBUtil::checkEnum($var, \\Greeter\\Sex::class);\n $this->sex = $var;\n\n return $this;\n }", "public function setSex($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->sex !== $v) {\n $th...
[ "0.72463864", "0.71183664", "0.7106186", "0.7085968", "0.69886273", "0.6836706", "0.67000926", "0.66995806", "0.66995806", "0.66995806", "0.66995806", "0.66995806", "0.6661438", "0.6638188", "0.6546843", "0.6511446", "0.64403236", "0.6269495", "0.6265266", "0.62251437", "0.62...
0.6931698
6
module: invite.php send email invitations to join social network
function invite_post(&$a) { if(! local_channel()) { notice( t('Permission denied.') . EOL); return; } check_form_security_token_redirectOnErr('/', 'send_invite'); $max_invites = intval(get_config('system','max_invites')); if(! $max_invites) $max_invites = 50; $current_invites = intval(get_pconfig(local_channel(),'system','sent_invites')); if($current_invites > $max_invites) { notice( t('Total invitation limit exceeded.') . EOL); return; }; $recips = ((x($_POST,'recipients')) ? explode("\n",$_POST['recipients']) : array()); $message = ((x($_POST,'message')) ? notags(trim($_POST['message'])) : ''); $total = 0; if(get_config('system','invitation_only')) { $invonly = true; $x = get_pconfig(local_channel(),'system','invites_remaining'); if((! $x) && (! is_site_admin())) return; } foreach($recips as $recip) { $recip = trim($recip); if(! $recip) continue; if(! valid_email($recip)) { notice( sprintf( t('%s : Not a valid email address.'), $recip) . EOL); continue; } if($invonly && ($x || is_site_admin())) { $code = autoname(8) . srand(1000,9999); $nmessage = str_replace('$invite_code',$code,$message); $r = q("INSERT INTO `register` (`hash`,`created`) VALUES ('%s', '%s') ", dbesc($code), dbesc(datetime_convert()) ); if(! is_site_admin()) { $x --; if($x >= 0) set_pconfig(local_channel(),'system','invites_remaining',$x); else return; } } else $nmessage = $message; $account = $a->get_account(); $res = mail($recip, sprintf( t('Please join us on Red'), $a->config['sitename']), $nmessage, "From: " . $account['account_email'] . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n" . 'Content-transfer-encoding: 8bit' ); if($res) { $total ++; $current_invites ++; set_pconfig(local_channel(),'system','sent_invites',$current_invites); if($current_invites > $max_invites) { notice( t('Invitation limit exceeded. Please contact your site administrator.') . EOL); return; } } else { notice( sprintf( t('%s : Message delivery failed.'), $recip) . EOL); } } notice( sprintf( tt("%d message sent.", "%d messages sent.", $total) , $total) . EOL); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionNotifyToJoin(){\n $message = new YiiMailMessage;\n $message->view = 'system';\n $message->subject = \"We are happy to see you soon on Cofinder\"; // 11.6. title change\n $message->from = Yii::app()->params['noreplyEmail'];\n \n // send newsletter to all in waiting list\n ...
[ "0.7199417", "0.7125716", "0.7115572", "0.705077", "0.68972075", "0.6883876", "0.68287945", "0.6762444", "0.66559535", "0.66342825", "0.65153986", "0.6506937", "0.64730334", "0.63889724", "0.63649994", "0.6363457", "0.6293094", "0.6255181", "0.62535155", "0.6250759", "0.62253...
0.6358927
16
Create a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this-...
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.687...
0.0
-1
Show the application dashboard.
public function index(){ $entradas = DB::table('entradas') ->select('entradas.*', DB::raw('produtos.nome AS produto'), DB::raw('fornecedores.nome AS fornecedor')) ->leftJoin('produtos', 'produtos.id', 'entradas.produto') ->leftJoin('fornecedores', 'fornecedores.id', 'entradas.fornecedor') ->where('entradas.status', '0') ->orderBy('entradas.data_solicitacao', 'desc') ->get(); $saidas = DB::table('saidas') ->select('saidas.*', DB::raw('produtos.nome AS produto'), DB::raw('tipos_saidas.nome AS tipo')) ->leftJoin('produtos', 'produtos.id', 'saidas.produto') ->leftJoin('tipos_saidas', 'tipos_saidas.id', 'saidas.tipo') ->where('saidas.status', '0') ->orderBy('saidas.data_saida', 'desc') ->get(); $entrada_mensal = 0; foreach($entradas as $e): if(date('m', strtotime($e->data_entrega)) == date('m')): $entrada_mensal += $e->valor_total; endif; endforeach; $saida_mensal = 0; foreach($saidas as $s): if(date('m', strtotime($s->data_saida)) == date('m')): $saida_mensal += $s->preco_total; endif; endforeach; $entrada_anual = 0; foreach($entradas as $e): if(date('y', strtotime($e->data_entrega)) == date('y')): $entrada_anual += $e->valor_total; endif; endforeach; $saida_anual = 0; foreach($saidas as $s): if(date('y', strtotime($s->data_saida)) == date('y')): $saida_anual += $s->preco_total; endif; endforeach; $lucro_mensal = $saida_mensal - $entrada_mensal; $lucro_anual = $saida_anual - $entrada_anual; //Charts $chart = new OneChart; $chart->labels(['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez']); $chart->dataset('R$ ', 'line', [get_ap(1, 2020), get_ap(2, 2020), get_ap(3, 2020), get_ap(4, 2020), get_ap(5, 2020), get_ap(6, 2020), get_ap(7, 2020), get_ap(8, 2020), get_ap(9, 2020), get_ap(10, 2020), get_ap(11, 2020), get_ap(12, 2020)]) ->linetension(0.2); $chart->options([ 'maintainAspectRatio' => false, 'elements' => [ 'line' => [ 'borderColor' => 'rgba(78, 115, 223, 1)', ], 'point' => [ 'borderColor' => 'rgba(78, 115, 223, 1)', 'backgroundColor' => 'rgba(78, 115, 223, 1)' ] ], 'layout' => [ 'padding' => [ 'left' => 10, 'right' => 25, 'top' => 25, 'bottom' => 0 ] ], 'scales' => [ 'xAxes' => [[ 'time' => [ 'unit' => 'date' ], 'gridLines' => [ 'display' => false, 'drawBorder' => false ], 'ticks' => [ 'maxTicksLimit' => 12 ] ]], 'yAxes' => [[ 'ticks' => [ 'maxTicksLimit' => 7, 'padding' => 10, // Include a dollar sign in the ticks //'callback' => function(value, index, values) { // return '$' + number_format(value); //} ], 'gridLines' => [ 'color' => "rgb(234, 236, 244)", 'zeroLineColor' => "rgb(234, 236, 244)", 'drawBorder' => false, 'borderDash' => [2], 'zeroLineBorderDash' => [2] ] ]], ], 'legend' => [ 'display' => false ], 'tooltips' => [ 'pointBackgroundColor' => "rgba(78, 115, 223, 1)", 'pointBorderColor' => "rgba(78, 115, 223, 1)", 'backgroundColor' => "rgb(255,255,255)", 'bodyFontColor' => "#858796", 'titleMarginBottom' => 10, 'titleFontColor' => '#6e707e', 'titleFontSize' => 14, 'borderColor' => '#dddfeb', 'borderWidth' => 1, 'xPadding' => 15, 'yPadding' => 15, 'displayColors' => false, 'intersect' => false, 'mode' => 'index', 'caretPadding' => 10, //'callbacks': { // 'label': function(tooltipItem, chart) { // var datasetLabel = chart.datasets[tooltipItem.datasetIndex].label || ''; // return datasetLabel + ': $' + number_format(tooltipItem.yLabel); // } //} ] ]); //EndCharts $data = array('entradas' => $entradas, 'saidas' => $saidas, 'entrada_mensal' => $entrada_mensal, 'saida_mensal' => $saida_mensal, 'saida_anual' => $saida_anual, 'lucro_mensal' => $lucro_mensal, 'lucro_anual' => $lucro_anual, 'chart' => $chart); return view('home', compact('data')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n ...
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", ...
0.0
-1
Forces initialization of the proxy
public function __load() { $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', array()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _initProxy() {\n\t\t$options = $this->getOptions();\n\t\t$this->_config->setAutoGenerateProxyClasses(isset($options['proxy']['autoGenerateProxyClasses']) ? $options['proxy']['autoGenerateProxyClasses'] : true);\n\t\t$this->_config->setProxyDir(isset($options['proxy']['directory']) ? $options['pr...
[ "0.75635636", "0.6560218", "0.65170795", "0.6495727", "0.6461294", "0.6409547", "0.6353856", "0.6326196", "0.630571", "0.6300076", "0.6300076", "0.6300076", "0.6300076", "0.6299988", "0.6299988", "0.62994456", "0.62994456", "0.62994456", "0.62994456", "0.62994456", "0.6299445...
0.0
-1
Register any application services.
public function register() { if ($this->app->runningInConsole()) { $this->commands([ Console\Commands\ReverseGenerateAllMigrations::class, ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n ...
[ "0.78798115", "0.7601541", "0.7493926", "0.73860854", "0.7369017", "0.73060066", "0.72911495", "0.72905713", "0.7279868", "0.72693264", "0.72689337", "0.72660935", "0.7248237", "0.7217507", "0.72099274", "0.71999437", "0.71971434", "0.719557", "0.7177418", "0.7176995", "0.716...
0.0
-1
Return the IP address
function address() { return ($this->address); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function ip_address()\n\t{\n\t\t//return $this->ip2int(ipaddress::get());\n\t\t//return $this->ip2int(server('REMOTE_ADDR'));\n\t\treturn server('REMOTE_ADDR');\n\t}", "function ip()\n {\n return util::ip();\n }", "public function ipAddress(){\n return $this->getServerVar('REMOTE_ADDR...
[ "0.8677948", "0.8548067", "0.8535441", "0.8387756", "0.8387756", "0.8384594", "0.83003634", "0.8287876", "0.8285251", "0.82846546", "0.8281637", "0.8265914", "0.82452756", "0.82396024", "0.8236909", "0.8235141", "0.82177573", "0.8198259", "0.8198259", "0.8186077", "0.8185348"...
0.0
-1
Return the network that the address sits in
function network(){ return (long2ip((ip2long($this->address)) & (ip2long($this->netmask())))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNetwork() {\n return $this->getValue('network');\n }", "public function getNetwork()\n {\n return $this->network;\n }", "public function getNetwork()\n {\n return $this->network;\n }", "public function getNetworkAddress()\n {\n return $this->_n...
[ "0.7977561", "0.7733832", "0.7733832", "0.765445", "0.7567131", "0.74935967", "0.717745", "0.717745", "0.6902588", "0.6861764", "0.68512464", "0.6730181", "0.6660419", "0.66421014", "0.659016", "0.6568117", "0.6542858", "0.653752", "0.65373695", "0.6483959", "0.64754814", "...
0.8100448
0
Return the broadcast that the address sits in
function broadcast(){ return (long2ip(ip2long($this->network()) | (~(ip2long($this->netmask()))))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getBroadcast()\n {\n return new Address(self::LONG_BROADCAST);\n }", "public function getBroadcastAddress()\n\t{\n\t\treturn $this->last_ip;\n\t}", "public function getBroadcast( $full = false )\n\t{\n\t\tif( !$this->valid ) { return null; }\n\t\tif( !$full ) \n\t\t{\n\t\t\t...
[ "0.8530555", "0.7783517", "0.73421144", "0.6952528", "0.6876339", "0.67278516", "0.6628287", "0.63725954", "0.6313243", "0.631144", "0.6306961", "0.6157539", "0.61327916", "0.6109643", "0.61061317", "0.6049008", "0.60018235", "0.60018235", "0.5975159", "0.5895933", "0.5850361...
0.806475
1
Return the inverse mask of the netmask
function inverse(){ return (long2ip(~(ip2long("255.255.255.255") << (32-$this->netbits)))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNetworkMask()\n {\n return $this->_networkMask;\n }", "public static function getInverse()\n {\n return static::$inverse;\n }", "public function invert();", "public function getMask()\n {\n return $this->mask;\n }", "public function getMask()\n {...
[ "0.6481294", "0.6447863", "0.63235265", "0.6158406", "0.6158406", "0.6158406", "0.609541", "0.5848408", "0.57776564", "0.5749856", "0.5649876", "0.56173724", "0.55995834", "0.5596441", "0.55600125", "0.5549641", "0.5507285", "0.5492938", "0.54663867", "0.5409502", "0.53976536...
0.79440266
0
/ ocPortal Copyright (c) ocProducts, 20042012 See text/EN/licence.txt for full licencing information. NOTE TO PROGRAMMERS: Do not edit this file. If you need to make changes, save your changed file to the appropriate _custom folder If you ignore this advice, then your website upgrades (e.g. for bug fixes) will likely kill your changes /EXTRA FUNCTIONS: levenshtein Calculate Levenshtein distance between two strings, but work past the PHP function's character limit.
function fake_levenshtein($a,$b) { // Some stripping, for performance, and because white space doesn't matter so much in HTML anyway $a=preg_replace('#\s#','',$a); $b=preg_replace('#\s#','',$b); $a_len=strlen($a); $b_len=strlen($b); if (($a_len<255) && ($b_len<255)) { return levenshtein($a,$b); } $percent=0.0; return max($a_len,$b_len)-similar_text($a,$b,$percent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function levenshtein(\n string $str1,\n string $str2,\n int $insertionCost = 1,\n int $replacementCost = 1,\n int $deletionCost = 1\n ): int {\n $result = ASCII::to_ascii_remap($str1, $str2);\n\n return \\levenshtein($result[0], $result[1], $inserti...
[ "0.6785128", "0.6781519", "0.65867275", "0.65479004", "0.62977195", "0.6205906", "0.61821884", "0.6146887", "0.6087803", "0.599907", "0.59939563", "0.59591377", "0.5924997", "0.5919254", "0.5912637", "0.5811615", "0.58082855", "0.576025", "0.5753487", "0.57044023", "0.5699912...
0.7875869
0
Standard modular info function.
function info() { $info=array(); $info['supports_advanced_import']=false; $info['product']='HTML website (page extraction and basic themeing)'; $info['import']=array( 'pages', ); return $info; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getInfoModule() {}", "public static function getModuleInfo() {\n\t\treturn array(\n\t\t\t'title' => '',\t\t// printable name/title of module\n\t\t\t'version' => 1, \t// version number of module\n\t\t\t'summary' => '', \t// 1 sentence summary of module\n\t\t\t'href' => '', \t\t// URL to more in...
[ "0.84160095", "0.72893524", "0.7254345", "0.72026986", "0.7151509", "0.7132021", "0.71054757", "0.71054757", "0.7064856", "0.69737536", "0.6972297", "0.6968399", "0.69545126", "0.69392365", "0.69040686", "0.687185", "0.6835813", "0.6763964", "0.6720192", "0.67136663", "0.6710...
0.6633785
31
Probe a file path for DB access details.
function probe_db_access($file_base) { return array(NULL,NULL,NULL,NULL); // No DB connection needed }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function probe_db_access($file_base)\n\t{\n\t\t$dbname='';\n\t\t$dbuser='';\n\t\t$dbpasswd='';\n\t\t$table_prefix='';\n\t\tif (!file_exists($file_base.'/config.php'))\n\t\t\twarn_exit(do_lang_tempcode('BAD_IMPORT_PATH',escape_html('config.php')));\n\t\trequire($file_base.'/config.php');\n\t\t$INFO=array();\n\t\t$I...
[ "0.6443201", "0.6162542", "0.6098885", "0.54332876", "0.5347867", "0.5033905", "0.50252146", "0.50097924", "0.50057846", "0.4993126", "0.49599037", "0.4949606", "0.49376366", "0.4861799", "0.48533604", "0.4835742", "0.4825499", "0.48177904", "0.48081613", "0.48027727", "0.479...
0.68069917
0
Standard import function to get extra fields to ask for when starting the import.
function get_extra_fields() { // Give user options // - where to copy files from [actually this field is in admin_import.php] // - theme to save into (advise they should use Theme Wizard to create a theme with similar colour first) // - whether to Comcode-convert // - whether to fix invalid XHTML // - the base URL to use to turn absolute URLs into relative URLs $fields=new ocp_tempcode(); $themes=new ocp_tempcode(); require_code('themes2'); $_themes=find_all_themes(); require_code('form_templates'); foreach ($_themes as $theme=>$theme_title) { $themes->attach(form_input_list_entry($theme,($theme==$GLOBALS['FORUM_DRIVER']->get_theme()),$theme_title)); } $fields=form_input_list(do_lang_tempcode('THEME'),do_lang_tempcode('THEME_TO_SAVE_INTO'),'theme',$themes,NULL,true); $fields->attach(form_input_tick(do_lang_tempcode('WHETHER_CONVERT_COMCODE'),do_lang_tempcode('DESCRIPTION_WHETHER_CONVERT_COMCODE'),'convert_to_comcode',false)); $fields->attach(form_input_tick(do_lang_tempcode('FIX_INVALID_HTML'),do_lang_tempcode('DESCRIPTION_FIX_INVALID_HTML'),'fix_html',true)); $fields->attach(form_input_line(do_lang_tempcode('installer:BASE_URL'),do_lang_tempcode('DESCRIPTION_IMPORT_BASE_URL'),'base_url',get_base_url(),true)); return $fields; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prepareImport();", "abstract protected function loadFields();", "function acf_prepare_fields_for_import($fields = array())\n{\n}", "function prepare_field_for_import($field)\n {\n }", "public function importAction()\n {\n $this->importParameters = $this->importParameters + $...
[ "0.7156191", "0.6604578", "0.656531", "0.654261", "0.6532817", "0.64557654", "0.6393603", "0.632438", "0.6302899", "0.62302256", "0.6172691", "0.61352086", "0.6112579", "0.6061103", "0.5940896", "0.5885205", "0.5854674", "0.5843368", "0.5834569", "0.580938", "0.58027273", "...
0.58351517
18
Filter HTML that has been read, to make it more compatible with ocPortal.
function _html_filter($file_contents,$fix_html,$base_url,$files,$file_base) { // If selected, clean up all the HTML if ($fix_html==1) { require_code('xhtml'); $file_contents=xhtmlise_html($file_contents); } // Strip base URL if ($base_url!='') { $file_contents=str_replace($base_url.'/','',$file_contents); $file_contents=str_replace(escape_html($base_url.'/'),'',$file_contents); } // Extra sense for rewriting local URLs in templates to image links and page-links $matches=array(); $num_matches=preg_match_all('# (src|href)="([^"]*)"#',$file_contents,$matches); for ($i=0;$i<$num_matches;$i++) { $this_url=$matches[2][$i]; $this_url=preg_replace('#^\.*/#','',$this_url); if (trim($this_url)=='') continue; if ((strpos($this_url,'://')===false) || (substr($this_url,0,strlen($base_url))==$base_url)) { if (strpos($this_url,'://')!==false) $this_url=substr($this_url,strlen($base_url)); $decoded_url=rawurldecode($this_url); if (substr($decoded_url,0,2)=='./') $decoded_url=substr($decoded_url,2); // Links to directories in a deep path will be changed so underscores replace slashes if ((substr(trim($decoded_url),-4)=='.htm') || (substr(trim($decoded_url),-5)=='.html')) { if (substr_count($decoded_url,'/')>1) { $last_slash_pos=strrpos($decoded_url,'/'); $decoded_url=str_replace('/','_',substr($decoded_url,0,$last_slash_pos)).substr($decoded_url,0,$last_slash_pos); } $decoded_url=trim(preg_replace('#(^|/)index\.htm[l]#','${1}start.htm',$decoded_url)); $stripped_decoded_url=preg_replace('#\..*$#','',$decoded_url); if (strpos($stripped_decoded_url,'/')===false) $stripped_decoded_url='/'.$stripped_decoded_url; list($zone,$page)=explode('/',$stripped_decoded_url,2); if ($page=='index') $page='start'; $file_contents=str_replace($matches[2][$i],'{$PAGE_LINK*,'.$zone.':'.$page.'}',$file_contents); } else { if (in_array($decoded_url,$files)) { $target=get_custom_file_base().'/uploads/website_specific/'.$decoded_url; $create_path=$target; do { @mkdir(dirname($create_path),0777); $create_path=dirname($create_path); } while (strlen($create_path)>1); @unlink($target); @copy($file_base.'/'.$decoded_url,$target); /*if (substr($decoded_url,-4)=='.css') Not needed, as relative paths maintained { $css_file=file_get_contents($target); $css_file=preg_replace('#(url\([\'"]?)(\.*'.'/)?#','${1}{$BASE_URL;}/uploads/website_specific/',$css_file); $my_css_file=fopen($target,'wt'); fwrite($my_css_file,$css_file); fclose($my_css_file); }*/ fix_permissions($target); sync_file($target); } $decoded_url='uploads/website_specific/'.$decoded_url; $file_contents=str_replace('src="'.$matches[2][$i].'"','src="{$BASE_URL*}/'.str_replace('%2F','/',rawurlencode($decoded_url)).'"',$file_contents); $file_contents=str_replace('href="'.$matches[2][$i].'"','href="{$BASE_URL*}/'.str_replace('%2F','/',rawurlencode($decoded_url)).'"',$file_contents); } } } return $file_contents; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function acf_allow_unfiltered_html()\n{\n}", "public function get_html_filtered()\n\t{\n\t\t$html = (isset($this->HTML_rewritten))?$this->HTML_rewritten:$this->HTML;\n\t\treturn $html;\n\t}", "public function filter()\n {\n $domDoc = new DOMDocument();\n @$domDoc->loadHTML($this->_input);\n ...
[ "0.72773576", "0.71214604", "0.6977644", "0.6531794", "0.64767236", "0.638794", "0.6367833", "0.62749046", "0.62062246", "0.617901", "0.61759275", "0.613826", "0.60583246", "0.5941571", "0.59339017", "0.591166", "0.58950996", "0.5872319", "0.58669734", "0.5844491", "0.5840836...
0.5518275
37
/ Try and strip out a bit of HTML from the start/end of another bit of HTML, but with rough levenshtein matching.
function levenshtein_strip_search($to_strip,$subject,$backwards,$i) { $best=mixed(); $best_at=$i; // Find all tag start/end positions (comparison reference points), loading them into the search list, ordered by position $up_to=min(strlen($subject),intval(floatval(strlen($to_strip))*1.5)); $positions=array(); for (;$i<$up_to;$i++) { if ($i!=0) { if ($backwards) { $next_tag_a=strrpos(substr($subject,0,strlen($subject)-$i),'<'); // Makes performance reasonable, by only checking at tag points $next_tag_b=strrpos(substr($subject,0,strlen($subject)-$i),'>'); } else { $next_tag_a=strpos($subject,'<',$i); // Makes performance reasonable, by only checking at tag points $next_tag_b=strpos($subject,'>',$i); } $next_tag=(($next_tag_b!==false) && (($next_tag_a===false) || ((!$backwards) && ($next_tag_b<$next_tag_a)) || (($backwards) && ($next_tag_b>$next_tag_a))))?($next_tag_b+1):$next_tag_a; if ($next_tag===false) { $i=(strlen($subject)-1); } else { $possible_i=$backwards?(strlen($subject)-$next_tag):$next_tag; if ($possible_i!=$i) $i=$possible_i; } } $lev=NULL; //$lev=fake_levenshtein($backwards?substr($subject,-$i):substr($subject,0,$i),$to_strip); For efficiency the next loop has a more intelligent searching algorithm, to narrow down on the peak $positions[]=array($i,$lev); } do { $cnt=count($positions); $point_a=intval(3.0*floatval($cnt)/8.0); $point_b=intval(5.0*floatval($cnt)/8.0); if (($cnt<24)/*The peak algorithm breaks down on small data sets due to integer rounding problems and local maxima*/ || ($point_a==$point_b)) break; // Okay now we need to scan manually over the few that are left // Take the 3/8 point of the search list, and find it's levenshtein distance if (is_null($positions[$point_a][1])) $positions[$point_a][1]=fake_levenshtein($backwards?substr($subject,-$positions[$point_a][0]):substr($subject,0,$positions[$point_a][0]),$to_strip); // Take the 5/8 point of the search list, and find it's levenshtein distance if (is_null($positions[$point_b][1])) $positions[$point_b][1]=fake_levenshtein($backwards?substr($subject,-$positions[$point_b][0]):substr($subject,0,$positions[$point_b][0]),$to_strip); // If the 3/8 point has a higher or equal levenshtein distance, throw away everything to the left of the 3/8 point if ($positions[$point_a][1]>=$positions[$point_b][1]) { array_splice($positions,0,$point_a); } else { // Therefore the 5/8 point has a higher levenshtein distance: throw away everything to the right of the 5/8 point array_splice($positions,$point_b); } } while (true); // Repeats until the 3/8 or 5/8 points are the same, due to indivisibility ('break' line does this) // Loop over the remaining results, finding the smallest levenshtein distance remaining- this is our result foreach ($positions as $p) { list($i,$lev)=$p; if (is_null($lev)) $lev=fake_levenshtein(substr($subject,0,$i),$to_strip); if ((is_null($best)) || ($lev<$best)) { $best=$lev; $best_at=$i; } } $ret=$backwards?substr($subject,0,(strlen($subject)-$best_at)):substr($subject,$best_at); return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fake_levenshtein($a,$b)\n{\n\t// Some stripping, for performance, and because white space doesn't matter so much in HTML anyway\n\t$a=preg_replace('#\\s#','',$a);\n\t$b=preg_replace('#\\s#','',$b);\n\n\t$a_len=strlen($a);\n\t$b_len=strlen($b);\n\tif (($a_len<255) && ($b_len<255))\n\t{\n\t\treturn levensht...
[ "0.66552365", "0.64995414", "0.621105", "0.60338384", "0.5911528", "0.5900712", "0.5835277", "0.58032435", "0.57883596", "0.57505953", "0.5735508", "0.5716121", "0.5677012", "0.56532794", "0.5579318", "0.5571299", "0.5549155", "0.5539184", "0.5526101", "0.5524667", "0.5513304...
0.5803494
7
Social media records belong to a user.
public function user() { return $this->belongsTo(User::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMedia()\n {\n return $this->hasOne(SocialMedias::className(), ['ID' => 'MediaID']);\n }", "public function social_media()\n {\n return $this->belongsToMany('App/SocialMedia', 'booking_social', 'social_media_id', 'social_media_id');\n }", "public function social_medi...
[ "0.59426606", "0.5926344", "0.5901218", "0.5758446", "0.5747517", "0.5467249", "0.54639876", "0.5435317", "0.53810346", "0.53544426", "0.53537315", "0.5303098", "0.5287551", "0.52844995", "0.52835214", "0.5280238", "0.5241176", "0.521756", "0.5209823", "0.52093697", "0.517771...
0.0
-1
Check if the token for the given platform should be updated.
public function tokenShouldBeUpdated($platform) { $column = "{$platform}_token_expires_at"; if (is_null($this->{$column})) return false; return abs($this->{$column}->diffInDays(Carbon::now())) < 5; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _checkToken(KCommandContext $context)\n {\n //Check the token\n if($context->caller->isDispatched())\n { \n $method = KRequest::method();\n \n //Only check the token for PUT, DELETE and POST requests (AND if the view is not 'ipn')\n ...
[ "0.6649083", "0.6447405", "0.64136004", "0.6374985", "0.6330699", "0.6250541", "0.6232401", "0.62169236", "0.60993737", "0.60864365", "0.60815614", "0.6073139", "0.60583574", "0.60432965", "0.6028193", "0.6021344", "0.6001476", "0.59973156", "0.5965654", "0.59267867", "0.5912...
0.777244
0
Update the token for the given platform.
public function updateToken($platform, $token, $expiresAt) { $this->update([ "{$platform}_token" => $token, "{$platform}_token_expires_at" => $expiresAt, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Token $token): void;", "private function token_update(string $token)\n {\n $this->token_created = time();\n $this->token_expires = $this->token_created + 86399;\n $this->token = $token;\n $this->headers['Authorization'] = \" Bearer {$token}\";\n\n if (...
[ "0.695692", "0.6497835", "0.6494313", "0.6305641", "0.59625626", "0.58398116", "0.5798282", "0.577874", "0.5765891", "0.5718073", "0.55874026", "0.554934", "0.5528818", "0.55178976", "0.5502151", "0.5467011", "0.5462225", "0.5452806", "0.5438698", "0.5436424", "0.5375439", ...
0.75539255
0
Find the user that owns a panel control
public function user() { return $this->belongsTo(User::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOwner() {\n // no need to check whether exist because of database constrain\n return User::getUserById($this->owner_id);\n }", "function getOwner() {\n $user =& Element_Factory::makeElement( 'Bm_Users' );\n $user->get( $this->author );\n\n return $user->lo...
[ "0.6427889", "0.637395", "0.6220266", "0.59854937", "0.5897451", "0.5886269", "0.58796287", "0.5838225", "0.5837719", "0.5817941", "0.5799231", "0.57690775", "0.57572156", "0.5687743", "0.56811434", "0.567804", "0.56626207", "0.56424075", "0.5624052", "0.56193334", "0.5610599...
0.0
-1
Returns the format from request attribute.
public function getFromServerRequestAttribute(ServerRequestInterface $request): ?string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormat() {}", "public function getFormat() {}", "public function getFormat() {}", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "public function getFormat();", "pro...
[ "0.7277233", "0.7277233", "0.7277233", "0.71954083", "0.71954083", "0.71954083", "0.71954083", "0.71954083", "0.71954083", "0.70541227", "0.6969076", "0.6947404", "0.69441056", "0.69441056", "0.69441056", "0.69441056", "0.69441056", "0.69441056", "0.69441056", "0.69441056", "...
0.0
-1
Returns the format from the file extension in uri path (ie .html).
public function getFromServerRequestUriPath(ServerRequestInterface $request): ?string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getFileType()\n {\n $uriString = $this->uri->getPath();\n\n if (substr($uriString, strlen($uriString) - 1) == \"/\") {\n return 'html';\n }\n\n $pathParts = pathinfo($uriString);\n\n if (!array_key_exists('extension', $pathParts)) {\n ret...
[ "0.8003951", "0.7307928", "0.70932746", "0.7020413", "0.6961978", "0.6752111", "0.6690923", "0.66869766", "0.6613125", "0.65198576", "0.64406717", "0.64288485", "0.63573444", "0.6357243", "0.63548803", "0.6338404", "0.6317988", "0.6317749", "0.6313275", "0.63115746", "0.63085...
0.0
-1
Returns format from server request headers.
public function getFromServerRequestHeaderLine(ServerRequestInterface $request): ?string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHTTPFormat()\n {\n return $this->getMessage(self::FORMAT_HTTP);\n }", "public function providerNormalizeHeaderName()\n {\n return [\n [\"content-type\", false, \"Content-Type\"],\n [\"content_type\", false, \"Content-Type\"],\n [\...
[ "0.6775294", "0.62969786", "0.62265664", "0.62265664", "0.62265664", "0.6210119", "0.61461973", "0.60684794", "0.60684794", "0.60684794", "0.6059531", "0.60479856", "0.60394937", "0.5952297", "0.59360105", "0.5909855", "0.5904658", "0.5871471", "0.5866123", "0.5833174", "0.58...
0.0
-1
Returns the content type based on the format. The format must exists on the map.
public function getContentTypeByFormat(string $format): string;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContentType(string $format = Header::FORMAT_RAW)\n {\n $value = $this->header_fields['Content-Type'] ?? null;\n if ($format === Header::FORMAT_RAW || empty($value))\n return $value;\n\n $type = $value['type'];\n $keywords = $value['parameters'];\n\n ...
[ "0.7052816", "0.6576673", "0.65522236", "0.6496637", "0.6467648", "0.64384794", "0.6351507", "0.62789536", "0.62630117", "0.62327254", "0.62106085", "0.61709976", "0.61629397", "0.61046547", "0.6102573", "0.60904175", "0.60904175", "0.60904175", "0.60904175", "0.60904175", "0...
0.8024541
0
Result of matching activator.
public function matches(MessageReceived $message): bool { return hash_equals($this->value, $message->getData()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function runMatch()\n {\n }", "public function getMatch();", "public function GetMatch ();", "public function getMatchFound()\n {\n return $this->get('MatchFound');\n }", "public static function match(){\n list($controllerType, $controller, $action) = self::_getControllerVa...
[ "0.6465107", "0.62666297", "0.60758287", "0.5881427", "0.58534116", "0.5822084", "0.58026344", "0.5791101", "0.57583886", "0.57134324", "0.5689382", "0.56647265", "0.5600322", "0.55921376", "0.5538274", "0.55337244", "0.55295575", "0.5526837", "0.5526837", "0.5525984", "0.552...
0.0
-1
Profile Part Ends Change Password
public function cngpassword() { return view('user.CngPassword'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function changePassword() {}", "function regiomino_user_change_password($account, $password) {\r\n\t//watchdog('pwdaction', '@password', array('@password' => $password));\r\n $edit['pass'] = $password;\r\n user_save($account, $edit);\r\n}", "public function changePassword() {\n\t\t//assign public c...
[ "0.8063074", "0.7654416", "0.7639106", "0.7632592", "0.7628891", "0.7497626", "0.73471516", "0.73316795", "0.72622335", "0.7158412", "0.7121406", "0.7106407", "0.7091751", "0.70721126", "0.70565873", "0.70486015", "0.70438725", "0.7037777", "0.7024159", "0.701274", "0.7000702...
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "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($client_form_id) { //dd('working'); { $time_before_interval = available_doctor::all()->where('client_forms_id', $client_form_id)->first(); if($time_before_interval) { $time_before_interval->time_before_appointment; } else { $time_before_interval = ''; } $appoint_date_range = appointment_limits::all()->where('client_forms_id', $client_form_id)->first(); return view('forms.pedim.pedim-consent-for-rapid-covid-19-testing.create')->with(array('time_before_interval'=>$time_before_interval, 'client_form_id' => $client_form_id, 'appoint_date_range' => $appoint_date_range)); // } //return view('forms.pedim.pedim-consent-for-rapid-covid-19-testing.create'); // }
{ "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) { // $valiedation_from_array = [ 'patient_name' => 'required', 'patient_email' => 'required', 'telephone' => 'required', 'sign_responsible_party' => 'required', 'date' => 'required' ]; $this->validate($request, $valiedation_from_array); //dd($request->sign_responsible_party); $sign_responsible_party = app('App\Http\Controllers\SignaturePadController')->upload_signature($request->sign_responsible_party,'/app/public/forms/signatures/PedimConsentForRapidCovid19Testing/'); //dd($sign_responsible_party); $consent_for_covid19 = new Pedim_consent_for_rapid_covid19_testings(); $consent_for_covid19->patient_name = request('patient_name'); $consent_for_covid19->is_patient_minor = request('is_patient_minor'); $consent_for_covid19->parent_guardian = request('parent_guardian'); $consent_for_covid19->patient_email = request('patient_email'); $consent_for_covid19->telephone = request('telephone'); $consent_for_covid19->sign_responsible_party = $sign_responsible_party; $consent_for_covid19->date = request('date'); $consent_for_covid19->client_forms_id = request('client_forms_id'); $consent_for_covid19->status = 'active'; $consent_for_covid19->save(); session()->flash("success","Successfully Submited"); return view('forms.status'); }
{ "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($id) { // }
{ "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 submissions($client_form_id) { $submissions = Pedim_consent_for_rapid_covid19_testings::all()->where('client_forms_id', $client_form_id); //dd($submissions); $client_id = Client_forms::all()->where('id', $client_form_id)->first()->clients_id; return view('forms.pedim.pedim-consent-for-rapid-covid-19-testing.submissions')->with(array('submissions'=>$submissions,'client_id'=>$client_id)); // }
{ "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, Pedim_consent_for_rapid_covid19_testings $consent_for_covid19) { $is_sign_responsible_party_updated = "nullable"; if(request('sign_responsible_party_updated') == "yes") { $is_sign_responsible_party_updated = "required"; } // $valiedation_from_array = [ 'patient_name' => 'required', 'patient_email' => 'required', 'telephone' => 'required', 'sign_responsible_party' => $is_sign_responsible_party_updated, 'date' => 'required' ]; $this->validate($request, $valiedation_from_array); //dd($is_witness_signature_update); $sign_responsible_party = $request->sign_responsible_party_src; if(request('sign_responsible_party_updated') == "yes") { $patient_signature = app('App\Http\Controllers\SignaturePadController')->update_signature($request->sign_responsible_party,$sign_responsible_party); } //dd($sign_responsible_party); $consent_for_covid19->patient_name = request('patient_name'); $consent_for_covid19->is_patient_minor = request('is_patient_minor'); $consent_for_covid19->parent_guardian = request('parent_guardian'); $consent_for_covid19->patient_email = request('patient_email'); $consent_for_covid19->telephone = request('telephone'); $consent_for_covid19->sign_responsible_party = $sign_responsible_party; $consent_for_covid19->date = request('date'); $consent_for_covid19->client_forms_id = request('client_forms_id'); $consent_for_covid19->status = 'active'; $update_status = $consent_for_covid19->save(); if($update_status) { if(Auth::guard('clients')->check()) { session()->flash("success","Successfully Updated"); return redirect()->route('client.PedimConsentForRapidCovid19Testing.submissions',$consent_for_covid19->client_forms_id); } else { session()->flash("success","Successfully Updated"); return redirect()->route('PedimConsentForRapidCovid19Testing.submissions',$consent_for_covid19->client_forms_id); } } else { session()->flash("warning","Some thing went wrong, please Update again"); return redirect()->back(); } }
{ "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
Get state property name in database
public function getStatePropertyName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatePropertyName()\n {\n // TODO: Implement getStatePropertyName() method.\n }", "function getName() \n {\n return $this->getValueByFieldName( 'statevar_name' );\n }", "public function getStateName() {\n return $this->getValueOrDefault('StateName');\n }", ...
[ "0.74585956", "0.7376751", "0.73566014", "0.70646137", "0.7060109", "0.70086235", "0.69524527", "0.68009424", "0.6537173", "0.64801645", "0.635834", "0.6296718", "0.62672263", "0.62672263", "0.624579", "0.6240301", "0.62165886", "0.61909497", "0.618941", "0.6187186", "0.61827...
0.8029509
0
Initialize table fields and keys
public function __construct($name, $prefix = '', $options = [], $keys = []) { $this->name = $name; $this->prefix = $prefix; foreach ($options as $field => $params) { $this->addField( $field, isset($params->type) ? $params->type : '', isset($params->null) ? $params->null : '', isset($params->default) ? $params->default : null, isset($params->auto_increment) ? $params->auto_increment : false ); } foreach ($keys as $key => $item) { $this->addKey( $key, isset($item->type) ? $item->type : '', isset($item->fields) ? $item->fields : [], isset($item->references) ? $item->references : (object) [] ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _initsTable() {}", "protected function initTableFields()\r\n {\r\n $this->addField(self::$ID, STRING, \"\");\r\n $this->addField(self::$USER_ID, STRING, \"\");\r\n $this->addField(self::$LOGIN_TIME, STRING, date('Y-m-d H:i:s'));\r\n $this->addField(self::$LOGOUT_...
[ "0.81043327", "0.78281784", "0.7771047", "0.7753414", "0.7122549", "0.7010211", "0.6992761", "0.6865606", "0.6821684", "0.6805741", "0.6665814", "0.66375244", "0.6600636", "0.65905076", "0.6579079", "0.6548154", "0.65062636", "0.6476496", "0.64624083", "0.6442878", "0.6436639...
0.0
-1
Get SQL Create table query
public function create($if_not_exists = false) { $db = DB::getInstance(); $query = []; $query[] = 'CREATE TABLE'; if ($if_not_exists) { $query[] = 'IF NOT EXISTS'; } $query[] = $db->quoteIdentifier($this->prefix . $this->name); $fields = []; foreach ($this->fields as $item) { $fields[] = ' ' . $item; } foreach ($this->keys as $item) { $fields[] = ' ' . $item; } $query[] = "(\n" . implode(",\n", $fields) . "\n)"; return implode(' ', $query); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _createTableSql()\n\t{\n\t\treturn 'CREATE TABLE ' . $this->getTable() . ' (pgt_iou VARCHAR(255) NOT NULL PRIMARY KEY, pgt VARCHAR(255) NOT NULL)';\n\t}", "public function createSQL() {\n\n\t\t$query = <<<SQL\nCREATE TABLE IF NOT EXISTS `$this->tablename` (\n instance char(32) NOT NULL, \n ...
[ "0.7776228", "0.77748144", "0.7470253", "0.74101365", "0.7265081", "0.7220711", "0.71551836", "0.6993099", "0.6965169", "0.695906", "0.6886494", "0.6815277", "0.67790824", "0.675989", "0.67580026", "0.67430943", "0.66946286", "0.66936153", "0.6693107", "0.6690374", "0.6672120...
0.61404926
75
Get alter table SQL query
public function alter($action) { $db = DB::getInstance(); return implode(' ', ['ALTER TABLE', $db->quoteIdentifier($this->prefix . $this->name), $action]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function alterTable()\n\t{\n\t\treturn $this->getColumnSql();\n\t}", "public function alterTable() {\n return $this->getActionByName('AlterTable');\n }", "protected function RetAlterTable() {\n\n if (!isset($this->\n tables[0])) {\n\n throw new \\Except...
[ "0.79755735", "0.73031193", "0.7079177", "0.6902226", "0.64334065", "0.62297297", "0.6213535", "0.6213535", "0.6213535", "0.6213535", "0.62089795", "0.6147364", "0.6141399", "0.6127889", "0.6121445", "0.6117868", "0.607008", "0.60157955", "0.5973097", "0.5951937", "0.5924784"...
0.6064808
17
Get drop table SQL query
public function drop() { $db = DB::getInstance(); $query = []; $query[] = 'DROP TABLE'; $query[] = $db->quoteIdentifier($this->prefix . $this->name); return implode(' ', $query); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Sql_Table_Drop_Query($table=\"\")\n {\n $query=\n \"DROP TABLE \".$this->Sql_Table_Name_Qualify($table);\n \n return $query;\n }", "function dropTable($table);", "public function dropTable() {\n return $this->getActionByName('DropTable');\n }", "public...
[ "0.7771863", "0.7501942", "0.73481894", "0.729972", "0.726458", "0.7083596", "0.70446044", "0.6984809", "0.6950296", "0.6942693", "0.6918562", "0.68849415", "0.68755233", "0.68344533", "0.6789826", "0.67854446", "0.6769908", "0.6698548", "0.6683217", "0.668204", "0.6646355", ...
0.72759223
4
Method to set the value of field cd_upload
public function setCdUpload($cd_upload) { $this->cd_upload = $cd_upload; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPostedFileValue($value)\n {\n $this->postedFileValue = $value;\n }", "public function getCdUpload()\n {\n return $this->cd_upload;\n }", "public function setFieldUpload($field) {\n if ($this->_field != $field) {\n $this->_error = array(); //reset e...
[ "0.6660154", "0.65259826", "0.6297142", "0.62842464", "0.60300136", "0.59976494", "0.58631796", "0.5741895", "0.5739307", "0.57348025", "0.5687963", "0.56508666", "0.56404227", "0.5626338", "0.56211424", "0.5617124", "0.56123054", "0.5542114", "0.5523304", "0.5500729", "0.549...
0.6371875
2
Method to set the value of field nome_original
public function setNomeOriginal($nome_original) { $this->nome_original = $nome_original; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNomeOriginal()\n {\n return $this->nome_original;\n }", "public function setNome($valor){\n\t\t\t$this->nome = $valor;\n\t\t}", "public function setOriginal($original) {\n $this->original = $original;\n }", "public function setNome(string $nome)\n {\n $this->nome = ...
[ "0.70677775", "0.682121", "0.6700084", "0.66432124", "0.6596507", "0.6540798", "0.64683306", "0.64674664", "0.6414192", "0.6398249", "0.63628215", "0.6355459", "0.6327835", "0.62343425", "0.62245715", "0.6217916", "0.62158847", "0.6193311", "0.61726695", "0.61005515", "0.6063...
0.7242172
0
Method to set the value of field nome_servidor
public function setNomeServidor($nome_servidor) { $this->nome_servidor = $nome_servidor; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setNome($valor){\n\t\t\t$this->nome = $valor;\n\t\t}", "public function setNome(string $nome)\n {\n $this->nome = $nome;\n }", "public function __set($nome, $valor) {\n $this->nome = $valor;\n }", "public function setNome($nome){$this->nome = $nome;}", "public function setNome($n...
[ "0.73387665", "0.717196", "0.6969411", "0.6924648", "0.65975106", "0.655566", "0.6554729", "0.6540505", "0.6503627", "0.6447819", "0.6439541", "0.6399224", "0.6370958", "0.63449794", "0.63076293", "0.63076293", "0.62762564", "0.6244232", "0.62433267", "0.61327714", "0.6037281...
0.6993073
2
Method to set the value of field criacao
public function setCriacao($criacao) { $this->criacao = $criacao; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCodiCasa($value) {\n\t\t//validando de que el valor sea un id\n\t\tif ($this->validateId($value)) {\n\t\t\t//seteando valor a la variable codigo\n\t\t\t$this->codi_casa = $value;\n\t\t\t//retornar true\n\t\t\treturn true;\n\t\t} else {\n\t\t\t//retornar respuesta falso\n\t\t\treturn false;\n\t\t...
[ "0.66423506", "0.6546943", "0.61181074", "0.6107178", "0.6070252", "0.60441506", "0.6015068", "0.5943377", "0.593679", "0.59134215", "0.5910824", "0.5906458", "0.5891543", "0.5891543", "0.58684635", "0.58350706", "0.581029", "0.5766895", "0.57628703", "0.5722614", "0.5710173"...
0.5990275
7
Method to set the value of field cd_unidade
public function setCdUnidade($cd_unidade) { $this->cd_unidade = $cd_unidade; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCdUnidade()\n {\n return $this->cd_unidade;\n }", "public function getCdUnidade()\n {\n return $this->cd_unidade;\n }", "public function getCdUnidade()\n {\n return $this->cd_unidade;\n }", "public function set_cidade($cidade) : void\n {\n ...
[ "0.68391323", "0.68391323", "0.68391323", "0.5659448", "0.55715996", "0.5527033", "0.54557294", "0.54533553", "0.54512596", "0.54287773", "0.5334689", "0.5301682", "0.5257077", "0.5256725", "0.52545744", "0.5235187", "0.5166406", "0.51635116", "0.5145499", "0.512182", "0.5071...
0.68695664
2
Returns the value of field cd_upload
public function getCdUpload() { return $this->cd_upload; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUploadField()\n {\n return $this->component->getUploadField($this->gridField);\n }", "public function getUploadField()\n {\n return $this->component->getUploadField($this->gridField);\n }", "public function getUpload()\n {\n return $this->upload;\n }", ...
[ "0.68408227", "0.68408227", "0.66643214", "0.66268486", "0.6564458", "0.6535333", "0.6522831", "0.63106287", "0.6280272", "0.6131156", "0.60866815", "0.60702777", "0.6067642", "0.60273373", "0.5986972", "0.5936652", "0.5916832", "0.5899086", "0.58965564", "0.5895438", "0.5858...
0.8222352
0
Returns the value of field nome_original
public function getNomeOriginal() { return $this->nome_original; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOriginalName();", "public function getOriginalName(): string\n {\n\t\treturn $this->originalName;\n\t}", "public function getOriginalName(): string\n {\n return $this->originalName;\n }", "public function getOrigName()\n\t{\n\t\treturn $this->orig_name;\n\t}", "public fun...
[ "0.73793334", "0.7119979", "0.7117137", "0.6848476", "0.6753146", "0.6499393", "0.6499393", "0.6499393", "0.6494902", "0.64807713", "0.64557254", "0.6444984", "0.64137906", "0.6411266", "0.6394351", "0.6394351", "0.63934386", "0.6386252", "0.6360294", "0.63450533", "0.6331429...
0.8355088
0
Returns the value of field nome_servidor
public function getNomeServidor() { return $this->nome_servidor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCodServico()\n {\n return $this->cod_servico;\n }", "public function getNomeCliente(){/*Retorna o nome_cliente*/\n\t\t\treturn $this-> nome_cliente;\n\t\t}", "public function getNomeCliente()\n {\n return $this->nomeCliente;\n }", "public function ...
[ "0.69079536", "0.6736135", "0.64302427", "0.6347406", "0.6347406", "0.6347406", "0.6346834", "0.63139397", "0.630358", "0.6301365", "0.62405103", "0.62099123", "0.62091714", "0.62060136", "0.61876327", "0.61823", "0.6175906", "0.6166591", "0.61536473", "0.6127688", "0.6127506...
0.7344503
0
Returns the value of field criacao
public function getCriacao() { return $this->criacao; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCriado()\n {\n return $this->criado;\n }", "public function getCriado()\n {\n return $this->criado;\n }", "public function getDataCriacao()\n {\n return $this->data_criacao;\n }", "public function getCriadoEm()\n {\n return $this->criadoEm;\...
[ "0.71624106", "0.71624106", "0.71553564", "0.67221636", "0.6653139", "0.66279083", "0.65327036", "0.63310283", "0.62943107", "0.62517685", "0.62043154", "0.61702466", "0.6147272", "0.6122027", "0.61099327", "0.6057166", "0.6003059", "0.5984513", "0.5976216", "0.5925433", "0.5...
0.7461751
0
Returns the value of field cd_unidade
public function getCdUnidade() { return $this->cd_unidade; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUnidadeNegocioCdUnidade()\n {\n return $this->unidade_negocio_cd_unidade;\n }", "public function setCdUnidade($cd_unidade)\n {\n $this->cd_unidade = $cd_unidade;\n\n return $this;\n }", "public function setCdUnidade($cd_unidade)\n {\n $this->cd_unid...
[ "0.6871589", "0.6421246", "0.6421246", "0.6421246", "0.6388626", "0.63526624", "0.6349171", "0.62974226", "0.6073321", "0.60729706", "0.60101306", "0.5959698", "0.5853402", "0.58499104", "0.58496034", "0.5815484", "0.5804457", "0.5783452", "0.5766077", "0.5762123", "0.5733495...
0.8509885
2
Initialize method for model.
public function initialize() { $this->hasMany('cd_upload', 'App\Models\Empresa', 'logo', array('alias' => 'Empresa')); $this->hasMany('cd_upload', 'App\Models\EmpresaHasArquivos', 'cd_upload', array('alias' => 'EmpresaHasArquivos')); $this->hasMany('cd_upload', 'App\Models\EmpresaHasLinkCentralcompras', 'cd_upload', array('alias' => 'EmpresaHasLinkCentralcompras')); $this->hasMany('cd_upload', 'App\Models\LancamentoHasUpload', 'cd_upload', array('alias' => 'LancamentoHasUpload')); $this->hasMany('cd_upload', 'App\Models\LiquidacaoHasUpload', 'cd_upload', array('alias' => 'LiquidacaoHasUpload')); $this->hasMany('cd_upload', 'App\Models\NfentradaHasUpload', 'cd_upload', array('alias' => 'NfentradaHasUpload')); $this->hasMany('cd_upload', 'App\Models\UploadHas', 'upload_cd_upload', array('alias' => 'UploadHas')); $this->belongsTo('cd_unidade', 'App\Models\UnidadeNegocio', 'cd_unidade', array('alias' => 'UnidadeNegocio')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this ->model = $this ->makeModel($this ->model());\n }", "protected function _construct()\n {\n $this->_init(Model::class, ResourceModel::class);\n }", "public function initialize()\n {\n }", "public function initialize()\n {...
[ "0.77167964", "0.7618666", "0.75896466", "0.75896466", "0.75786567", "0.7461966", "0.7461966", "0.7461966", "0.7457713", "0.7457713", "0.74557793", "0.74555385", "0.7455282", "0.7455282", "0.7455282", "0.7455282", "0.7455282", "0.7455282", "0.7455282", "0.7455282", "0.7455282...
0.0
-1
Returns table name mapped in the model.
public function getSource() { return 'upload'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTableName() {\n return $this->mapping['table'];\n }", "public function getTableSingular()\n {\n if (($table = Str::snake(class_basename($this))) == 'model' && $this->table) {\n $table = Str::singular($this->table);\n }\n\n return $table;\n }", ...
[ "0.8312817", "0.8077538", "0.8021308", "0.7993723", "0.799214", "0.7990018", "0.7976349", "0.79729253", "0.7949751", "0.7947712", "0.79443485", "0.79384196", "0.79293746", "0.79216576", "0.791839", "0.7917182", "0.78892344", "0.78598475", "0.78576475", "0.78576475", "0.785764...
0.0
-1
Allows to query a set of records that match the specified conditions
public static function find($parameters = null) { return parent::find($parameters); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function andWhere($conditions);", "public function findWhere(array $conditions);", "public function queryAll($campos=\"*\",$criterio=\"\");", "public function find(array $conditions = []);", "function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n...
[ "0.6721339", "0.6677765", "0.65267944", "0.643077", "0.63835347", "0.6346577", "0.6162914", "0.60881853", "0.6075321", "0.60288733", "0.5927973", "0.5920629", "0.5913403", "0.58825314", "0.58817285", "0.587325", "0.587325", "0.587325", "0.587325", "0.587325", "0.587325", "0...
0.0
-1
Allows to query the first record that match the specified conditions
public static function findFirst($parameters = null) { return parent::findFirst($parameters); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_one_by( $conds = array()) {\n\n\t\t// where clause\n\t\t$this->custom_conds( $conds );\n\n\t\t// query the record\n\t\t$query = $this->db->get( $this->table_name );\n\n\t\tif ( $query->num_rows() == 1 ) {\n\t\t// if there is one row, return the record\n\t\t\treturn $query->row();\n\t\t} else {\n\t\t//...
[ "0.7025978", "0.69965726", "0.6781371", "0.677133", "0.6497457", "0.6466081", "0.64445204", "0.63424104", "0.63296795", "0.63279945", "0.63215864", "0.62905324", "0.62835777", "0.626551", "0.62304837", "0.6230216", "0.61969143", "0.61615145", "0.6151198", "0.6109936", "0.6091...
0.0
-1