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
look through all files found in crawl for CSS files and parse them for images
private function parseCSS(){ // collect all unique values from the arrays in $links $css_links = array(); foreach ($this->links as $key => $paths) { foreach ($paths as $key => $value) { $css_links[] = $value; } } $css_links = array_unique($css_links); sort($css_links); // loop through all values look for files foreach ($css_links as $value) { if(count(explode('.', $value)) > 1){ $temp = explode('.', $value); $qry = false; // if a file is found, see if it has a querystring foreach ($temp as $key => $css) { if(count(explode('?', $css)) > 1){ $temp[$key] = explode('?', $css); $qry = $key; } } // if it has a query string, remove it if($qry){ $type = $temp[$qry][0]; // otherwise, just grab the extension } else { $type = count($temp); $type = $temp[$type-1]; } // check if the file extension is css if($type === 'css'){ // ensure path to file exists $path = 'http://'.$this->url.$value; if(@file_get_contents($path)){ // add file to $visited $this->visited[] = $value; // set current path for relativePathFiX() $dir = explode('/', $value); array_pop($dir); $this->current_path = implode('/', $dir).'/'; // open the file to start parsing $file = file_get_contents($path); $imgs = array(); // find all occurrences of the url() method used to include images preg_match_all("%.*url\('*(.*)[^\?]*\).*\)*%", $file, $matches); // loop through occurrences foreach ($matches[1] as $key => $img) { // check if a query string is attached to the image (used to prevent caching) if(count(explode('?', $img)) > 1){ // if there is, remove it and fix the path $temp = explode('?', $img); $imgs[] = $this->relativePathFix($temp[0]); } else { // if there isn't a query string, make sure to remove the closing bracket $temp = explode(')', $img); $imgs[] = $this->relativePathFix($temp[0]); } } // if images were found, add them to $links if(count($imgs) > 0){ $this->links[$value] = $imgs; } } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findCssFiles();", "private function getImageIntoCss(): void\n {\n preg_match_all(self::REGEX_IMAGE_FORMAT, $this->sContents, $aHit, PREG_PATTERN_ORDER);\n\n for ($i = 0, $iCountHit = count($aHit[0]); $i < $iCountHit; $i++) {\n $sImgPath = PH7_PATH_ROOT . $this->sBaseUrl . $aH...
[ "0.7313089", "0.682833", "0.67335427", "0.6691646", "0.6673036", "0.6495293", "0.6486712", "0.6344852", "0.6308274", "0.6184599", "0.6152373", "0.6046938", "0.60176307", "0.5997407", "0.59607375", "0.5951366", "0.5904705", "0.58877546", "0.5876533", "0.58764654", "0.5857931",...
0.80734646
0
formats array contents ready for display (default: php)
public function output($type = 'php'){ // crawl the site $this->crawl(); $this->parseCSS(); // switch statement to make it easy to add different output formats switch($type){ case 'php': // for php format, return an array of page count, $visited and $links $return['crawl']['paths_total'] = count($this->visited); sort($this->visited); $return['crawl']['paths'] = $this->visited; $temp = array(); foreach ($this->links as $key => $value) { foreach ($value as $key => $value) { $temp[] = $value; } } $temp = array_unique($temp); sort($temp); $return['crawl']['links_total'] = count($temp); $return['crawl']['links'] = $temp; ksort($this->links); // loop through all arrays in $links to add the per-page total foreach ($this->links as $path => $links) { $return['link_map'][$path.':'.count($links)] = $links; } break; case 'xml': // for xml, make an xml document of $links and save to the server using the domain that was crawled as the filename $xml_doc = new DOMDocument(); $xml_doc->formatOutput = true; $root = $xml_doc->createElement('site_crawl'); // pages visited $visited = $xml_doc->createElement('crawled'); $visited_count = $xml_doc->createAttribute('total'); $visited_count->value = count($this->visited); $visited->appendChild($visited_count); foreach ($this->visited as $key => $value) { $path = $xml_doc->createElement('page', 'http://'.$this->url.$value); $path_id = $xml_doc->createAttribute('path'); $path_id->value = $value; $path->appendChild($path_id); $visited->appendChild($path); } // links per page $links = $xml_doc->createElement('links'); // loop through all the arrays in $links foreach ($this->links as $file_path => $hrefs) { // create element for each array $path = $xml_doc->createElement('page'); $path_id = $xml_doc->createAttribute('path'); // use array's key (path crawled) as element's ID $path_id->value = $file_path; $path->appendChild($path_id); // loop through all links in each array, adding to element foreach ($hrefs as $href) { $link = $xml_doc->createElement('link', 'http://'.$this->url.$href); $link_id = $xml_doc->createAttribute('path'); $link_id->value = $href; $link->appendChild($link_id); $path->appendChild($link); } $links->appendChild($path); } $root->appendChild($visited); $root->appendChild($links); $xml_doc->appendChild($root); $xml_doc->normalizeDocument(); // create filename from domain name $name = explode('.', $this->url); if(count($name) > 2){ $name = $name[1]; } else { $name = $name[0]; } $name .= '_sitecrawl.xml'; $xml_file = fopen($name, 'w'); fwrite($xml_file, $xml_doc->saveXML()); fclose($xml_file); $return = $name; break; case 'sitemap': // new DOMDocument $xml_doc = new DOMDocument(); $xml_doc->formatOutput = true; // root 'urlset' element with URI of the schema $root = $xml_doc->createElement('urlset'); $xmlns = $xml_doc->createAttribute('xmlns'); $xmlns->value = 'http://www.sitemaps.org/schemas/sitemap/0.9'; $root->appendChild($xmlns); // create the individual 'url' elements sort($this->visited); foreach ($this->visited as $key => $value) { $url = $xml_doc->createElement('url'); $loc = $xml_doc->createElement('loc', 'http://'.$this->url.$value); $url->appendChild($loc); $root->appendChild($url); } // finish up $xml_doc->appendChild($root); $xml_doc->normalizeDocument(); // name, save and return $name = 'sitemap.xml'; $xml_file = fopen($name, 'w'); fwrite($xml_file, $xml_doc->saveXML()); fclose($xml_file); $return = $name; break; } return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function htmldump ( $array ) {\r\n\t\tforeach($array as $key => $val) {\r\n\t\t\t$return .= $this->ul(\r\n\t\t\t\t\t\t$this->li($this->font($key)) .\r\n\t\t\t\t\t\t\t$this->ul(\r\n\t\t\t\t\t\t\t\t$this->font(is_array($val) ? $this->htmldump($val) : $this->li($val))\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\t\t}\r\n...
[ "0.6870602", "0.6686884", "0.63665843", "0.6327682", "0.6309093", "0.63050085", "0.6256581", "0.62448615", "0.61482674", "0.61482674", "0.61482674", "0.61468863", "0.61433005", "0.6129108", "0.60966706", "0.6089941", "0.6084735", "0.60721046", "0.60689163", "0.5991353", "0.59...
0.0
-1
Create the structure for the displayed month
function mkMonth ($month) { $head = "<div class='fullwidth'>"; $head .= "<div class='month'>"; $head .= date("F", mktime(0,0,0,$month)); $head .= "</div>"; $head .= "<div id='jresult'>"; $head .= "</div>"; $head .= "<div id='week'>"; $head .= "<table class='days'>"; $head .= "<td>"; $head .= "Sunday"; $head .= "</td>"; $head .= "</table>"; $head .= "<table class='days'>"; $head .= "<td>"; $head .= "Monday"; $head .= "</td>"; $head .= "</table>"; $head .= "<table class='days'>"; $head .= "<td>"; $head .= "Tuesday"; $head .= "</td>"; $head .= "</table>"; $head .= "<table class='days'>"; $head .= "<td>"; $head .= "Wednesday"; $head .= "</td>"; $head .= "</table>"; $head .= "<table class='days'>"; $head .= "<td>"; $head .= "Thursday"; $head .= "</td>"; $head .= "</table>"; $head .= "<table class='days'>"; $head .= "<td>"; $head .= "Friday"; $head .= "</td>"; $head .= "</table>"; $head .= "<table class='days'>"; $head .= "<td>"; $head .= "Saturday"; $head .= "</td>"; $head .= "</table>"; $head .= "</div>"; echo $head; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function monthCreator($from,$to){\n\n$month='';\nforeach (h_many_M($from,$to) as $i) {\n\n$d = DateTime::createFromFormat('!m', $i);\n$m = $d->format('F').' '.$i;\n\n $month.=' \n<th class=\"planning_head_month\" colspan=\"28\">'.$m.'</th>\n ';\n}\necho $month;\n}", "public function get_month_permastruct()\...
[ "0.73935616", "0.7041853", "0.67926854", "0.66831195", "0.66279286", "0.6617421", "0.6536828", "0.6473009", "0.6435724", "0.6414517", "0.64120907", "0.6408968", "0.6383224", "0.63521445", "0.6348271", "0.63159007", "0.631117", "0.6222103", "0.62045795", "0.61959517", "0.61901...
0.72050965
1
Structure for days in month
function mkDays ($numDays, $month, $year) { for ($i = 1; $i <= $numDays; $i++) { $eachDay[$i] = $i; } foreach($eachDay as $day => &$wkday) { $wkday = date("w", mktime(0,0,0,$month,$day,$year)); } foreach($eachDay as $day=>&$wkday) { echo "<table class='box' id=$day month=$month year=$year>"; echo "<td>"; echo $day; echo "</td>"; echo "</table>"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDaysInMonth()\r\n {\r\n return Data_Calc::diasInMonth($this->mes, $this->ano);\r\n }", "function get_month_days_cm ($fecha) {\n $labels = array();\n $month = month_converter($fecha->month);\n $monthdays = cal_days_in_month(CAL_GREGORIAN, $fecha->month, $fecha->year);\n $i = 0...
[ "0.7518319", "0.72533256", "0.7217392", "0.7164777", "0.696042", "0.65474784", "0.6517745", "0.64557636", "0.6450885", "0.6434415", "0.6407145", "0.63869834", "0.6367303", "0.6364206", "0.63265246", "0.6236349", "0.62038857", "0.6175482", "0.6172973", "0.61692995", "0.6165821...
0.57789725
61
Fill in empty days before the beginning of the month
function emptyDays ($empty, $numDays, $month, $year) { for ($i = 1; $i <= $numDays; $i++) { $eachDay[$i] = $i; } foreach($eachDay as $day => &$wkday) { $wkday = date("w", mktime(0,0,0,$month,$day,$year)); } if ($eachDay[1] == 1) { echo $empty; } elseif ($eachDay[1] == 2) { echo $empty; echo $empty; } elseif ($eachDay[1] == 3) { echo $empty; echo $empty; echo $empty; } elseif ($eachDay[1] == 4) { echo $empty; echo $empty; echo $empty; echo $empty; } elseif ($eachDay[1] == 5) { echo $empty; echo $empty; echo $empty; echo $empty; echo $empty; } elseif ($eachDay[1] == 6) { echo $empty; echo $empty; echo $empty; echo $empty; echo $empty; echo $empty; } else { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function reset() {\n\t\t$this->_monthTimestamp = $this->_dayTimestamp = mktime(0,0,0,$this->_currentMonth,1,$this->_currentYear);\n\t\t$this->_currentMonthNumDays = intval(date('t',$this->_monthTimestamp));\n\t\t$this->_dateArray = array_fill(1, 31, \"\");\n\t\t$this->_preWeekArray = array();\n\t\t$this->_postWeek...
[ "0.6746664", "0.6631151", "0.6227279", "0.6015293", "0.5929362", "0.5886088", "0.5858518", "0.5784595", "0.5748587", "0.57197934", "0.57119304", "0.5710816", "0.57087296", "0.56523407", "0.56404144", "0.5566514", "0.5531001", "0.548413", "0.5470734", "0.54680187", "0.54668605...
0.5780536
8
/ Algorithm: 1. Get notification settings 2. Get to know who to notify (array of users) 3. Iterate users 3.1 Send Browser notification 3.2 Send Email notification
public function notifyViaEmailOrBrowser(EventTrigger $eventTrigger) { // Getting permissions for particular event $sql = 'Select * from notifications_manage WHERE event_id=:event_id AND (email="1" OR browser="1")'; $notifications = NotificationsManage::findBySql($sql, [':event_id' => $eventTrigger->event_id])->all(); foreach ($notifications as $notification) { switch ($notification['role']) { case 'admin': $eventNotificationTypes = $this->getEventNotificationTypes($eventTrigger->event_id, 'admin'); if (!$eventNotificationTypes['browser'] && !$eventNotificationTypes['email']) { break; } else { // EAGER LOADING // Select all users that have role -> admin and allowed to send them email notifications $admins = $this->returnUsersWithNotificationsOnByGroup('admin'); $this->determinEventType($eventTrigger, $admins, 'admin', $eventNotificationTypes); break; } case 'moderator': $eventNotificationTypes = $this->getEventNotificationTypes($eventTrigger->event_id, 'moderator'); if (!$eventNotificationTypes['browser'] && !$eventNotificationTypes['email']) { break; } else { // EAGER LOADING // Select all users that have role -> moderator and allowed to send them email notifications $moderators = $this->returnUsersWithNotificationsOnByGroup('moderator'); $this->determinEventType($eventTrigger, $moderators, 'moderator', $eventNotificationTypes); break; } case 'registeredUser': $eventNotificationTypes = $this->getEventNotificationTypes($eventTrigger->event_id, 'registeredUser'); if (!$eventNotificationTypes['browser'] && !$eventNotificationTypes['email']) { break; } else { // EAGER LOADING // Select all users that have role -> registeredUser and allowed to send them email notifications $registeredUsers = $this->returnUsersWithNotificationsOnByGroup('registeredUser'); $this->determinEventType($eventTrigger, $registeredUsers, 'registeredUser', $eventNotificationTypes); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _send_email_notifications () {\n// TODO\n/*\n\t\tif (module('forum')->SETTINGS['SEND_NOTIFY_EMAILS']) return false;\n\t\t// Get emails to process\n\t\t$Q5 = db()->query('SELECT * FROM '.db('forum_email_notify').' WHERE topic_id='.intval($topic_info['id']));\n\t\twhile ($A5 = db()->fetch_assoc($Q5)) if (!F...
[ "0.7426494", "0.70351636", "0.70201355", "0.69475675", "0.6827156", "0.67342126", "0.6729391", "0.6700509", "0.66959125", "0.66824865", "0.65648675", "0.65417683", "0.65299207", "0.6506631", "0.64796877", "0.6459044", "0.6376755", "0.6348012", "0.63380975", "0.63247913", "0.6...
0.6168883
34
Returns list of notification types [browser or email]
protected function getEventNotificationTypes($event_id, $role){ return [ 'browser' => NotificationsManage::find()->where(['event_id' =>$event_id])->andWhere(['role' => $role])->one()->browser == 1, 'email' => NotificationsManage::find()->where(['event_id' =>$event_id])->andWhere(['role' => $role])->one()->email == 1 ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNotificationTypes()\n {\n return $this->notifications;\n }", "public function get_notification_types()\n {\n return false;\n }", "public function getNotifyType()\n\t{\n\t\treturn array( 'comments', ipsRegistry::getClass('class_localization')->words['gbl_comments_lik...
[ "0.7681822", "0.7360493", "0.73193216", "0.67300886", "0.6563138", "0.65533835", "0.65118444", "0.64671165", "0.630164", "0.62663674", "0.623087", "0.62062883", "0.6194235", "0.6186474", "0.6162245", "0.6142312", "0.61413944", "0.6092246", "0.60905945", "0.60882276", "0.60749...
0.5890036
34
User's role (manager or employee) Login() Authenticates user's login information and starts session if verified
public function Login($userid, $password) { // Don't procede if username and password fields are blank if ($userid != '' && $password != '') { // Attempt DB connection $conn = mysqli_connect($_SESSION["SERVER"], $_SESSION["DBUSER"], $_SESSION["DBPASS"], $_SESSION["DATABASE"]); if (!$conn) { // Output error details die('Unable to connect. Error: ' . mysqli_error($conn)); } // Format SQL for query $userid = mysqli_real_escape_string($conn, $userid); $sql = "SELECT * FROM Users WHERE User_Name = '$userid' "; if ($Result = mysqli_query($conn, $sql)) { $count = mysqli_num_rows($Result); $Row = mysqli_fetch_array($Result, MYSQLI_ASSOC); // Check if there is only one row with specified user_id and // match password to hash if ($count == 1 && password_verify($password, $Row['User_Password'])) { // Ses session ID and User information Session::SetUserID($Row['User_ID']); $this->id = $Row['User_ID']; $this->firstname = $Row['User_Firstname']; $this->lastname = $Row['User_Lastname']; $this->username = $Row['User_Name']; $this->role = $Row['User_Role']; mysqli_close($conn); return true; } else { // Authenitcation failure mysqli_close($conn); return false; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function login() {\n\t\tif ($this->_identity === null) {\n\t\t\t$this->_identity = new UserIdentity($this->username, $this->password, $this->loginType);\n\t\t\t$this->_identity->authenticate();\n\t\t}\n\t\tif ($this->_identity->errorCode === UserIdentity::ERROR_NONE) {\n\t\t\t$duration = $this->rememberMe ?...
[ "0.70636326", "0.7061329", "0.7050518", "0.7023874", "0.69901687", "0.69826776", "0.6905505", "0.68899155", "0.68850625", "0.68605936", "0.6835764", "0.68155366", "0.68106693", "0.6779353", "0.6773212", "0.6770201", "0.67564005", "0.6749095", "0.67448395", "0.6737694", "0.673...
0.0
-1
GetFirstName() Return's user's first name only
public function GetFirstName() { return $this->firstname; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getuserFirstName()\n {\n return $this->userFirstName;\n }", "public function getUserFirstName () {\n\t\treturn ($this->userFirstName);\n\t}", "public function getUserFirstName() :string {\n\t\treturn($this->userFirstName);\n\t}", "public function getFirstName();", "public funct...
[ "0.8616866", "0.85368204", "0.85030794", "0.83826214", "0.8323782", "0.8253516", "0.8253516", "0.82480055", "0.82092226", "0.8185678", "0.8164657", "0.8164657", "0.8164657", "0.81520176", "0.81369776", "0.81369776", "0.81369776", "0.81369776", "0.81369776", "0.81208384", "0.8...
0.8143166
14
GetLastName() Returns user's last name only
public function GetLastName() { return $this->lastname; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserLastName () {\n\t\treturn ($this->userLastName);\n\t}", "public function getUserLastName() :string {\n\t\treturn($this->userFirstName);\n\t}", "public function getuserLastName()\n {\n return $this->userLastName;\n }", "public function getLastName();", "public function ge...
[ "0.8605469", "0.8555658", "0.8540084", "0.82813394", "0.8205732", "0.82057273", "0.81825197", "0.8125636", "0.8088655", "0.8088655", "0.8087347", "0.8070587", "0.8066874", "0.805054", "0.8033346", "0.8033346", "0.8033346", "0.8033346", "0.8033346", "0.80258036", "0.80258036",...
0.8068257
12
GetUsername() Returns user's username only
public function GetUsername() { return $this->username; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUsername();", "public function getUsername();", "public function getUsername();", "public function getUsername();", "public function getUsername();", "public function getUsername() {}", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", ...
[ "0.8656025", "0.8656025", "0.8656025", "0.8656025", "0.8656025", "0.84136355", "0.8246191", "0.8246191", "0.8246191", "0.8169937", "0.8168453", "0.81662846", "0.80738807", "0.8070408", "0.8070408", "0.8070408", "0.804463", "0.8024169", "0.80169356", "0.80066293", "0.7990061",...
0.8000178
20
GetFullName() Returns user's name in format "Firstname Lastname (username)"
public function GetFullName() { return $this->firstname . " " . $this->lastname . " (" . $this->username . ")"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFullName()\n {\n if (! $this->_getVar('user_name')) {\n $name = ltrim($this->_getVar('user_first_name') . ' ') .\n ltrim($this->_getVar('user_surname_prefix') . ' ') .\n $this->_getVar('user_last_name');\n\n if (! $name) {\n ...
[ "0.88807863", "0.8406179", "0.818946", "0.81530416", "0.81102824", "0.80676764", "0.79877394", "0.7919875", "0.79179424", "0.7893183", "0.7893183", "0.7892198", "0.7879585", "0.7817252", "0.77925134", "0.7786947", "0.7780658", "0.7770078", "0.7744989", "0.7738218", "0.7735202...
0.83666515
2
GetUserID() Return's user's ID number
public function GetUserID() { return $this->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_user_id();", "public function getUserID() {\n\t\tif (is_numeric($this->user_id)) {\n\t\t\treturn $this->user_id;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public function getUserID(){\n return($this->userID);\n }", "protected static function getUserID()\r\n {\r\n ...
[ "0.83754134", "0.83009905", "0.8201869", "0.81995666", "0.8148632", "0.8148632", "0.80815613", "0.80815613", "0.80815613", "0.80635446", "0.80485123", "0.80380726", "0.802951", "0.7978551", "0.79627794", "0.79020417", "0.79020417", "0.79020417", "0.79020417", "0.79020417", "0...
0.7910976
15
GetUserRole() Returns 1 for Manager or 0 for Employee
public function GetUserRole() { return $this->role; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getRole(){\n\t$user = new Pas_User_Details();\n $person = $user->getPerson();\n if($person){\n \treturn $person->role;\n } else {\n \treturn false;\n }\n }", "public function getRole() {}", "public function getRole();", "public function getRole();", "function getRol...
[ "0.7872344", "0.7593834", "0.7592852", "0.7592852", "0.7550908", "0.7520922", "0.7488806", "0.745582", "0.74337673", "0.74128824", "0.73357975", "0.73357975", "0.73347485", "0.7302454", "0.7289681", "0.7289425", "0.72725517", "0.7239393", "0.7239005", "0.71804416", "0.7073247...
0.718014
20
Logout() Closes session and returns to login screen
public static function Logout() { Session::CloseSession(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function logOut()\n {\n self::startSession();\n session_destroy();\n }", "public function logout()\n { \n Session_activity::delete();\n \n Session_activity::delete_session();\n \n $conf = $GLOBALS['CONF'];\n $ossim_li...
[ "0.8442549", "0.8360225", "0.83082336", "0.8288833", "0.82682294", "0.8265262", "0.82278305", "0.82249373", "0.821423", "0.8210084", "0.82098794", "0.8203934", "0.82014424", "0.8174821", "0.81561655", "0.8118859", "0.81179655", "0.80941784", "0.8085273", "0.8083066", "0.80751...
0.8388605
1
Display a listing of the resource.
public function index() { // return view($this->folder.'/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() { // return view($this->folder.'/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) { // // print_r($request->all()); $text = $request->text; // validation if (empty($text)) { $title = "Failed"; $message = 'Data is Empty'; $type = 'danger'; } else{ $crud = new Crud; $crud->text = $text; $save = $crud->save(); if ($save) { $title = "Success"; $message = 'Saved Data Successfully'; $type = 'success'; } else{ $title = "Failed"; $message = 'Failed to Save Data'; $type = 'danger'; } } $json = [ 'title'=>$title, 'message'=>$message, 'type'=>$type, 'state'=>'show' ] ; return $json; }
{ "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 edit($id) { // $data = Crud::find($id); return view($this->folder.'/edit',compact('data'));; }
{ "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) { // $text = $request->text; // validasi if (empty($text)) { $title = "Failed"; $message = 'Data is Empty'; $type = 'danger'; } else{ $crud = Crud::find($id); $crud->text = $text; $save = $crud->save(); if ($save) { $title = "Success"; $message = 'Data Updated Successfully'; $type = 'success'; } else{ $title = "Failed"; $message = 'Failed to Update Data'; $type = 'danger'; } } $json = [ 'title'=>$title, 'message'=>$message, 'type'=>$type, 'state'=>'show' ] ; return $json; }
{ "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) { // $crud = Crud::find($id); if (count($crud) > 0 ) { $delete = $crud->delete(); if ($delete) { $title = "Success"; $message = 'Deleted Data Successfully'; $type = 'success'; } else{ $title = "Failed"; $message = 'Failed to Delete Data'; $type = 'danger'; } } else{ $title = "Failed"; $message = 'Failed to Delete Data'; $type = 'danger'; } $json = [ 'title'=>$title, 'message'=>$message, 'type'=>$type, 'state'=>'show' ] ; return $json; }
{ "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
Submit a survey for the first time
public function insert_submission($survey_id, $data, $current_page = 0, $complete = FALSE) { $hash = md5( microtime() . $survey_id . $this->session->userdata('session_id') ); $data = array( 'hash' => $hash, 'member_id' => $this->session->userdata('member_id'), 'survey_id' => $survey_id, 'data' => json_encode($data), 'created' => time(), 'completed' => $complete ? time() : NULL, 'current_page' => $current_page ); $this->db->insert('vwm_surveys_submissions', $data); return $this->db->affected_rows() > 0 ? $hash : FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function submit_survey_post()\n\t\t{\n\t\t\t$testId = $this->post('testId');\n\t\t\t$uuid = $this->post('uuid');\n\t\t\t$weekSend = $this->post('weekSend');\n\t\t\tif(!empty($testId) &&\n\t\t\t\t!empty($uuid) &&\n\t\t\t\t!empty($weekSend)\n\t\t\t)\n\t\t\t{\n\t\t\t\t$insertData = array(\n\t\t\t\t\t'ts_uuid' ...
[ "0.69874746", "0.67204213", "0.6670898", "0.66456157", "0.6603026", "0.6557397", "0.6527744", "0.64886016", "0.64543456", "0.6264102", "0.6160785", "0.61414486", "0.61368847", "0.60913616", "0.6037287", "0.6034831", "0.600105", "0.59627587", "0.5957348", "0.5951941", "0.59515...
0.0
-1
Delete an individual survey submission
public function delete_survey_submission($id) { if ( isset($id) ) { $this->db->delete('vwm_surveys_submissions', array('id' => $id)); } elseif ( isset($survey_id) ) { $this->db->delete('vwm_surveys_submissions', array('survey_id' => $id)); } return $this->db->affected_rows() > 0 ? TRUE : FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDeleteSurvey()\n {\n $survey = Survey::factory()->create();\n $surveyId = $survey->id;\n\n $response = $this->json('DELETE', \"survey/{$surveyId}\");\n\n $response->assertStatus(204);\n $this->assertDatabaseMissing('survey', ['id' => $surveyId]);\n }", ...
[ "0.704928", "0.6927132", "0.6782566", "0.67519563", "0.6743712", "0.67242193", "0.6659275", "0.6654835", "0.65483344", "0.6547482", "0.6538272", "0.6526627", "0.6492822", "0.64676714", "0.64564884", "0.6453267", "0.6381312", "0.63810337", "0.6379219", "0.6363803", "0.63554263...
0.7071134
0
Delete all survey submissions for a particular survey
public function delete_survey_submissions($survey_id) { $this->db->delete('vwm_surveys_submissions', array('survey_id' => $survey_id)); return $this->db->affected_rows() > 0 ? TRUE : FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Delete($surveyid)\n\t{\n\t\t$surveyid = (int)$surveyid;\n\t\t$prefix = $this->Db->TablePrefix;\n\n\t\t// First Delete all Widgets Associated with the form,\n\t\t$widgets = $this->getWidgets($surveyid);\n\t\tforeach ($widgets as $key=>$widget) {\n\t\t\t\t// for each widget delete all the fields rela...
[ "0.67710656", "0.65085137", "0.65076256", "0.6371583", "0.6282924", "0.62668693", "0.61472", "0.61339176", "0.6004049", "0.5990968", "0.59772944", "0.59734684", "0.5972448", "0.5812081", "0.5793504", "0.57799935", "0.57547843", "0.5746567", "0.57342863", "0.573265", "0.570542...
0.6699532
1
Update a previously created survey
public function update_submission($hash, $data, $current_page = 0, $complete = FALSE) { // Get previously created survey submission $query = $this->db->where('hash', $hash)->limit(1)->get('vwm_surveys_submissions'); // Make sure that this submission exists if ($query->num_rows() > 0) { $row = $query->row(); // Combine old and new submission data $previous_data = json_decode($row->data, TRUE); $new_data = $previous_data; foreach($data as $question_id => $question_data) { $new_data[ $question_id ] = $question_data; } $new_data = json_encode($new_data); $data = array( 'data' => $new_data, 'updated' => time(), 'completed' => $complete ? time() : NULL, 'current_page' => $current_page, ); $this->db ->where('hash', $hash) ->update('vwm_surveys_submissions', $data); return $this->db->affected_rows() > 0 ? TRUE : FALSE; } // If this submission does not exist else { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateSurvey()\n {\n $survey = Survey::factory()->create();\n\n $response = $this->json('PATCH', \"survey/{$survey->id}\", [\n 'survey' => ['epilogue' => 'epilogue your behind']\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('...
[ "0.783796", "0.7607503", "0.7607503", "0.73462087", "0.73462087", "0.7274194", "0.7178802", "0.7178802", "0.69725287", "0.69445485", "0.67672473", "0.66948223", "0.65750146", "0.65455353", "0.6525728", "0.6514486", "0.6467296", "0.6417657", "0.64144254", "0.63971466", "0.6392...
0.0
-1
Get all submissions for a given survey If completed_since is set than we will check for all surveys completed since that time. This will be used to see if the user wants to compile new results based on the new completed survey submissions.
public function get_completed_survey_submissions($id, $completed_since = NULL) { $data = array(); $this->db ->order_by('completed', 'ASC') ->where('completed IS NOT NULL', NULL, TRUE) ->where('survey_id', $id); // If completed_since is set, only grab completed submissions AFTER that date if ($completed_since != NULL) { $this->db->where('completed >=', $completed_since); } $query = $this->db->get('vwm_surveys_submissions'); if ($query->num_rows() > 0) { foreach ($query->result() as $row) { $data[ $row->id ] = array( 'member_id' => (int)$row->member_id, 'survey_id' => (int)$row->survey_id, 'data' => json_decode($row->data, TRUE), 'created' => (int)$row->created, 'updated' => (int)$row->updated, 'completed' => (int)$row->completed, 'current_page' => (int)$row->current_page, 'complete' => (bool)$row->completed ); } } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function all_submissions($min_status = 0) {\n\t\tif (!$this->submitable()) return array();\n\t\tstatic $query;\n\t\tDB::prepare_query($query,\n\t\t\t\"SELECT * FROM `submission`\".\n\t\t\t\" WHERE `entity_path` = ? AND `status` >= ?\".\n\t\t\t\" ORDER BY `time` ASC\"\n\t\t);\n\t\t$query->execute(array($this->path(...
[ "0.5996727", "0.5936609", "0.54508674", "0.5380265", "0.5299355", "0.52664226", "0.51739275", "0.51614606", "0.5112784", "0.50744545", "0.50663435", "0.5055705", "0.50379115", "0.50034606", "0.49738628", "0.4944428", "0.49141344", "0.48513246", "0.48392534", "0.48335564", "0....
0.6841735
0
Get all survey submissions (but allow for a search filter)
public function get_survey_submissions($filters, $order_by = 'updated', $order_by_order = 'DESC') { $data = array(); $order_by = in_array($order_by, array('id', 'member_id', 'survey_id', 'created', 'updated', 'completed', 'complete')) ? $order_by : 'updated'; $order_by_order = in_array($order_by_order, array('ASC', 'DESC', 'RANDOM')) ? $order_by_order : 'DESC'; $this->db->order_by($order_by, $order_by_order); // Filter survey ID if ( isset($filters['survey_id']) AND $filters['survey_id']) { $this->db->where('survey_id', $filters['survey_id']); } // Filter member ID if ( isset($filters['member_id']) AND $filters['member_id']) { $this->db->where('member_id', $filters['member_id']); } // Filter group ID if ( isset($filters['group_id']) AND $filters['group_id']) { $this->db->join('members', 'members.member_id = vwm_surveys_submissions.member_id'); $this->db->where('group_id', $filters['group_id']); } // If a valid created from date was provided if ( isset($filters['created_from']) AND strtotime($filters['created_from']) ) { // If a valid created to date was provided as well if ( isset($filters['created_to']) AND strtotime($filters['created_to']) ) { /** * Add one day (86400 seconds) to created_to date * * If user is searching for all surveys created from 1/1/2000 to * 1/1/2000 it should show all surveys created on 1/1/2000. */ $this->db->where( '`created` BETWEEN ' . strtotime($filters['created_from']) . ' AND ' . (strtotime($filters['created_to']) + 86400), NULL, FALSE ); } // Just a created from date was provided else { $this->db->where( 'created >=', strtotime($filters['created_from']) ); } } // If a valid updated from date was provided if ( isset($filters['updated_from']) AND strtotime($filters['updated_from']) ) { // If a valid updated to date was provided as well if ( isset($filters['updated_to']) AND strtotime($filters['updated_to']) ) { /** * Add one day (86400 seconds) to updated_to date * * If user is searching for all surveys updated from 1/1/2000 to * 1/1/2000 it should show all surveys updated on 1/1/2000. */ $this->db->where( '`updated` BETWEEN ' . strtotime($filters['updated_from']) . ' AND ' . (strtotime($filters['updated_to']) + 86400), NULL, FALSE ); } // Just a updated from date was provided else { $this->db->where( 'updated >=', strtotime($filters['updated_from']) ); } } // Filter completed if ( isset($filters['complete']) AND $filters['complete'] !== NULL) { // Show completed subissions if ($filters['complete']) { $this->db->where('completed IS NOT NULL', NULL, TRUE); } // Show incomplete submissions else { $this->db->where('completed IS NULL', NULL, TRUE); } } $query = $this->db->get('vwm_surveys_submissions'); if ($query->num_rows() > 0) { foreach ($query->result() as $row) { $data[ (int)$row->id ] = array( 'id' => (int)$row->id, 'hash' => $row->hash, 'member_id' => (int)$row->member_id, 'survey_id' => (int)$row->survey_id, 'created' => (int)$row->created, 'updated' => (int)$row->updated, 'completed' => (int)$row->completed, 'complete' => (bool)$row->completed ); } } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSurveys() {\n return $this->_request(\n \"surveys/\"\n );\n }", "function getAll() {\r\n\t\treturn SurveyAnswerQuery::create()->find();\r\n\t}", "public function __invoke(): Collection|array\n {\n return Survey::all();\n }", "function all_submission...
[ "0.64325094", "0.64244294", "0.61194974", "0.60658884", "0.60614973", "0.59773904", "0.5884745", "0.58226883", "0.581804", "0.5790863", "0.5789288", "0.5775172", "0.57700557", "0.5765209", "0.5763232", "0.5725316", "0.57097596", "0.56432366", "0.5620622", "0.56064343", "0.559...
0.64346766
0
Get details from a prevously submitted survey
public function get_survey_submission($hash = NULL, $submission_id = NULL) { $data = array(); // If we have a submission hash if ($hash) { $this->db->where('hash', $hash); } // If we do not have a submission hash we must have a submission ID else { $this->db->where('id', $submission_id); } $query = $this->db->limit(1)->get('vwm_surveys_submissions'); if ($query->num_rows() > 0) { $row = $query->row(); $data = array( 'id' => (int)$row->id, 'hash' => $row->hash, 'member_id' => (int)$row->member_id, 'survey_id' => (int)$row->survey_id, 'data' => json_decode($row->data, TRUE), 'created' => (int)$row->created, 'updated' => (int)$row->updated, 'completed' => (int)$row->completed, 'current_page' => (int)$row->current_page, 'complete' => (bool)$row->completed ); } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionsurveydetails()\n {\n $model = new Troubleticket;\n $this->LoginCheck();\n $module = \"HelpDesk\";\n $urlquerystring = $_SERVER['QUERY_STRING'];\n $paraArr = explode(\"/\", $urlquerystring);\n $ticketId = $paraArr['2'];\n $storedata = $model...
[ "0.6340673", "0.6281586", "0.6280045", "0.62490594", "0.61598873", "0.60957825", "0.601392", "0.5995809", "0.5994953", "0.59703803", "0.5885166", "0.58823514", "0.5877491", "0.58746284", "0.58021843", "0.5799707", "0.57962775", "0.57939667", "0.5778306", "0.5776508", "0.57270...
0.5204321
83
See if a survey has been completed by the current user
public function is_complete($survey_id) { $query = $this->db ->where('survey_id', $survey_id) ->where('completed IS NOT NULL', NULL, TRUE) ->where('member_id', $this->session->userdata('member_id')) ->order_by('updated', 'DESC') ->limit(1) ->get('vwm_surveys_submissions'); if ($query->num_rows() > 0) { return TRUE; } else { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function questionnaire_user_complete($course, $user, $mod, $questionnaire) {\n global $CFG;\n require_once($CFG->dirroot . '/mod/questionnaire/locallib.php');\n\n if ($responses = questionnaire_get_user_responses($questionnaire->sid, $user->id, $complete = false)) {\n foreach ($responses as $respon...
[ "0.75086784", "0.7241403", "0.71344525", "0.70983624", "0.70219064", "0.686156", "0.67033005", "0.6701492", "0.65841794", "0.65590996", "0.6543528", "0.6487884", "0.6482565", "0.6481459", "0.64751357", "0.6446314", "0.64217484", "0.64139885", "0.6395755", "0.6344057", "0.6319...
0.7188206
2
Get all surveys completed or in progress by the current user If a member ID is set, use that. If submission hashes are found, use those. Save results to user_submissions property.
private function get_user_submissions($submission_hahses) { self::$user_submissions = array(); $member_id = $this->session->userdata('member_id'); // Make sure we have a member ID or some submission hashes to check if ( $member_id OR $submission_hahses ) { // If we have a member ID if ($member_id) { $this->db ->where('member_id', $member_id) ->or_where_in('hash', $submission_hahses ? $submission_hahses : ''); // CI does not like an empty array } // If we only have submission hashes else { $this->db->where_in('hash', $submission_hahses); } $query = $this->db ->order_by('completed, updated, created', 'DESC') ->get('vwm_surveys_submissions'); if ($query->num_rows() > 0) { // Loop through each submission foreach ($query->result() as $row) { // First key is either "completed" or "progress", second is survey ID, and value is the submission hash self::$user_submissions[ $row->completed ? 'complete' : 'progress' ][ $row->survey_id ] = $row->hash; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function user_submissions_progress($submission_hahses)\n\t{\n\t\t// If user submissions have not yet been gathered\n\t\tif (self::$user_submissions == NULL) { $this->get_user_submissions($submission_hahses); }\n\n\t\t// If we have some surveys in progress return an array of their hashes\n\t\treturn isset(se...
[ "0.58979917", "0.5864403", "0.56491774", "0.5584163", "0.5540704", "0.5500674", "0.54719305", "0.5454758", "0.5414054", "0.53811324", "0.5347915", "0.5323728", "0.52780086", "0.52272236", "0.5170256", "0.51539874", "0.5069158", "0.50341356", "0.49852288", "0.49704343", "0.493...
0.6154837
0
Get all surveys completed by the current user
public function user_submissions_complete($submission_hahses) { // If user submissions have not yet been gathered if (self::$user_submissions == NULL) { $this->get_user_submissions($submission_hahses); } // If we have some completed surveys return an array of their hashes return isset(self::$user_submissions['complete']) ? self::$user_submissions['complete'] : array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSurveys() {\n return $this->_request(\n \"surveys/\"\n );\n }", "public function getAllUserAvailableSurveys(){\n // $takenSurveys = \\App\\TakenSurvey::where('user_id', \\Auth::user()->id);\n $result = \\DB::table('surveys')->\n whereRaw('id...
[ "0.70288384", "0.633615", "0.61032325", "0.60768795", "0.6067278", "0.60088587", "0.59663516", "0.59495735", "0.59407634", "0.5937145", "0.58834386", "0.5830206", "0.581785", "0.5804144", "0.5754926", "0.5741124", "0.5706073", "0.5653799", "0.56431717", "0.5624406", "0.558970...
0.5180068
52
Get all surveys in progress by the current user
public function user_submissions_progress($submission_hahses) { // If user submissions have not yet been gathered if (self::$user_submissions == NULL) { $this->get_user_submissions($submission_hahses); } // If we have some surveys in progress return an array of their hashes return isset(self::$user_submissions['progress']) ? self::$user_submissions['progress'] : array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSurveys() {\n return $this->_request(\n \"surveys/\"\n );\n }", "public function getAllUserAvailableSurveys(){\n // $takenSurveys = \\App\\TakenSurvey::where('user_id', \\Auth::user()->id);\n $result = \\DB::table('surveys')->\n whereRaw('id...
[ "0.6652602", "0.6117724", "0.5956528", "0.5916422", "0.5807825", "0.5804387", "0.57642627", "0.5750422", "0.5711903", "0.57080066", "0.56722724", "0.56544435", "0.563402", "0.55712306", "0.5531804", "0.5487317", "0.5483295", "0.5439113", "0.54257715", "0.54192895", "0.536268"...
0.5328361
21
Check an array of submission hashes to see if it marks a completed survey
public function is_complete_by_hashes($survey_id, $submission_hashes) { $query = $this->db ->where('survey_id', $survey_id) ->where('completed IS NOT NULL', NULL, TRUE) ->where_in('hash', $submission_hashes) ->limit(1) ->get('vwm_surveys_submissions'); if ($query->num_rows() > 0) { return TRUE; } else { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_progress_by_hashes($survey_id, $submission_hashes)\n\t{\n\t\t$query = $this->db\n\t\t\t->where('survey_id', $survey_id)\n\t\t\t->where('completed IS NULL', NULL, TRUE)\n\t\t\t->where_in('hash', $submission_hashes)\n\t\t\t->order_by('updated', 'DESC')\n\t\t\t->limit(1)\n\t\t\t->get('vwm_surveys_s...
[ "0.6178807", "0.59711295", "0.5959456", "0.5868236", "0.5860308", "0.5852881", "0.57966447", "0.574047", "0.56483114", "0.55511385", "0.55195135", "0.5517042", "0.5457055", "0.54339623", "0.5426887", "0.54228735", "0.54208577", "0.5354125", "0.5342349", "0.533848", "0.5335340...
0.6854474
0
See if the current user has progress in the provided survey
public function is_progress($survey_id) { $query = $this->db ->where('survey_id', $survey_id) ->where('completed IS NULL', NULL, TRUE) ->where('member_id', $this->session->userdata('member_id')) ->order_by('updated', 'DESC') ->limit(1) ->get('vwm_surveys_submissions'); if ($query->num_rows() > 0) { $row = $query->row(); return $row->hash; } else { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_user_has_data_access($survey_id,$user_id)\n\t{\n\t\t$requests=$this->get_user_study_n_collection_requests($survey_id,$user_id);\n\t\t\t\n\t\t\tforeach($requests as $request)\n\t\t\t{\n\t\t\t\tif ($request['status']=='APPROVED')\n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\treturn F...
[ "0.6668665", "0.6657424", "0.6462117", "0.6414857", "0.63745147", "0.6373646", "0.62753797", "0.6224302", "0.6185834", "0.6037406", "0.5979025", "0.59544533", "0.5932114", "0.5910558", "0.5878628", "0.5799039", "0.5790695", "0.5786931", "0.57848215", "0.5761883", "0.57605815"...
0.6585163
2
Check an array of submission hashes to see if the current user has any progress in this survey
public function is_progress_by_hashes($survey_id, $submission_hashes) { $query = $this->db ->where('survey_id', $survey_id) ->where('completed IS NULL', NULL, TRUE) ->where_in('hash', $submission_hashes) ->order_by('updated', 'DESC') ->limit(1) ->get('vwm_surveys_submissions'); if ($query->num_rows() > 0) { $row = $query->row(); return $row->hash; } else { return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_progress($survey_id)\n\t{\n\t\t$query = $this->db\n\t\t\t->where('survey_id', $survey_id)\n\t\t\t->where('completed IS NULL', NULL, TRUE)\n\t\t\t->where('member_id', $this->session->userdata('member_id'))\n\t\t\t->order_by('updated', 'DESC')\n\t\t\t->limit(1)\n\t\t\t->get('vwm_surveys_submission...
[ "0.6453063", "0.63572836", "0.62184566", "0.614686", "0.5964588", "0.5960737", "0.58579767", "0.57735705", "0.5769345", "0.5744846", "0.57434314", "0.57242435", "0.56118435", "0.5611202", "0.5591954", "0.5563764", "0.55606085", "0.54936224", "0.54547346", "0.5449678", "0.5419...
0.66446465
0
Bootstrap any application services.
public function boot() { //视图间共享数据 view()->share('sitename','Laravel学院-- 我是共享数据'); //视图Composer view()->composer('hello',function($view) { $view->with('user', array('name' => 'test', 'avatar' => public_path('images/touxiang.jpg'))); }); //多个视图 view()->composer(['hello','home'],function($view) { $view->with('user', array('name' => 'test', 'avatar' => public_path('images/touxiang.jpg'))); }); //所有视图 view()->composer('*',function($view) { $view->with('user', array('name' => 'test', 'avatar' => public_path('images/touxiang.jpg'))); }); //和composer功能相同 因为实例化后立即消失 也许可以减少内存消耗吧 view()->creator('profile', 'App\Http\ViewCreators\ProfileCreator'); /* * 这个东西怎么理解呢 * share() 不可变共享数据 比如 网站名 网站地址之类的 * composer() 可变共享数据 比如用户名和头像 还有就是快速变化的信息 比如网站在线人数 * 这个每个页面加载都得请求 所以直接放到这里共享出来 */ // DB::listen(function($sql,$bindings,$time){ // echo 'SQL语句执行: '.$sql.',参数: '.json_encode($bindings).',耗时: '.$time.'ms'; // }); Post::saving(function($post){ echo 'saving event is fired<br>'; //看来同样道理 必须是可见的参数 //必须在fillable里 if($post->user_id == 1) return false; }); Post::creating(function($post){ echo 'creating event is fired<br>'; //看来同样道理 必须是可见的参数 //必须在fillable里 if($post->name == 'test content') return false; }); Post::created(function($post){ echo 'created event is fired<br>'; }); Post::saved(function($post){ echo 'saved event is fired<br>'; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public func...
[ "0.7344842", "0.7212776", "0.7207748", "0.7123287", "0.7109729", "0.70822036", "0.7076881", "0.70718396", "0.7051853", "0.7025475", "0.7011949", "0.70043486", "0.6955807", "0.69322443", "0.69319373", "0.69272774", "0.6911386", "0.69069713", "0.6898877", "0.6898432", "0.689659...
0.0
-1
Register any application services.
public function register() { // }
{ "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.7879658", "0.7600202", "0.74930716", "0.73852855", "0.736794", "0.7306089", "0.7291359", "0.72896826", "0.72802424", "0.7268026", "0.7267702", "0.72658145", "0.7249053", "0.72171587", "0.7208486", "0.7198799", "0.7196415", "0.719478", "0.7176513", "0.7176227", "0.7164647",...
0.0
-1
insertar un nuevo campo en la estructura
public function insertar($pidnomeav, $pnombre, $ptipo, $plongitud, $pnombre_mostrar, $pregex, $visible, $tipocampo, $descripcion) { $this->Instancia(); //-- verificar que no se repita el campo en la tabla $mg = ZendExt_Aspect_TransactionManager::getInstance(); $conn = $mg->getConnection('metadatos'); $query = Doctrine_Query::create($conn); $result = $query->from('NomCampoestruc ') ->where("idnomeav='$pidnomeav' AND nombre='$pnombre'") ->execute()->count(); if ($result > 0) return false; //-- buscar el id del proximo campo $idCampoNuevo = $this->buscaridproximo(); //-- insertar los valores $this->instance->idcampo = $idCampoNuevo; $this->instance->idnomeav = $pidnomeav; $this->instance->nombre = $pnombre; $this->instance->tipo = $ptipo; $this->instance->longitud = $plongitud; $this->instance->nombre_mostrar = $pnombre_mostrar; $this->instance->regex = $pregex; $this->instance->visible = $visible; $this->instance->tipocampo = $tipocampo; $this->instance->descripcion = $descripcion; try { $this->instance->save(); return $idCampoNuevo; } catch (Doctrine_Exception $ee) { if (DEBUG_ERP) echo(__FILE__ . ' ' . __LINE__ . ' ' . $ee->getMessage()); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insertar($objeto){\r\n\t}", "public function insert() {\n $conexion = StorianDB::connectDB();\n $insercion = \"INSERT INTO cuento (titulo, contenido, autor) VALUES (\\\"\".$this->titulo.\"\\\", \\\"\".$this->contenido.\"\\\", \\\"\".$this->autor.\"\\\")\";\n $conexion->exec($...
[ "0.6919016", "0.6855505", "0.6799637", "0.67825305", "0.6734514", "0.6702299", "0.66236323", "0.6611422", "0.65880764", "0.65611744", "0.65516", "0.65460014", "0.6527724", "0.6513393", "0.6512761", "0.651132", "0.64727205", "0.6453065", "0.64228815", "0.6421157", "0.6392726",...
0.0
-1
Eliminar un campo de la base de datos
public function eliminarCampo($pCampo) { try { $mg = ZendExt_Aspect_TransactionManager::getInstance(); $conn = $mg->getConnection('metadatos'); $query = Doctrine_Query::create($conn); // eliminar el campo $result = $query->delete('idcampo') ->from('NomCampoestruc') ->where("idcampo = '$pCampo'") ->execute(); return $result != 0; } catch (Doctrine_Exception $ee) { if (DEBUG_ERP) echo(__FILE__ . ' ' . __LINE__ . ' ' . $ee->getMessage()); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function eliminar() {\n //$this->delete();\n $campo_fecha_eliminacion = self::DELETED_AT;\n $this->$campo_fecha_eliminacion = date('Y-m-d H:i:s');\n $this->status = 0;\n $this->save();\n }", "public function eliminar($objeto){\r\n\t}", "public function Eliminar(){\n...
[ "0.6975732", "0.66022176", "0.65110576", "0.64433587", "0.6423955", "0.64115226", "0.64111334", "0.6383432", "0.6366389", "0.6353331", "0.6308395", "0.6302912", "0.62975776", "0.62965965", "0.62806696", "0.6273385", "0.6271693", "0.6261888", "0.6244422", "0.62344307", "0.6232...
0.0
-1
Devuelve a que tabla pertenece un campo detereminado
public function buscarTablaPertenece($idCampo) { $mg = ZendExt_Aspect_TransactionManager::getInstance(); $conn = $mg->getConnection('metadatos'); $query = Doctrine_Query::create($conn); $result = $query->select('t.idnomeav,t.nombre,t.fechaini,t.fechafin,t.root,t.concepto,t.externa, c.idcampo,c.idnomeav,c.nombre,c.tipo,c.longitud,c.nombre_mostrar,c.regex,c.descripcion,c.tipocampo,c.visible') ->from('NomNomencladoreavestruc t') ->innerJoin('t.NomCampoestruc c') ->where("c.idcampo='$idCampo'") ->execute() ->toArray(); $arreglo = isset($result[0]) ? $result[0] : array(); return $arreglo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTabla(){\n return $this->table;\n }", "function campo($tabla,$campo,$criterio,$pos,$and=''){\n\t$array=CON::getRow(\"SELECT $pos FROM $tabla WHERE $campo='$criterio' $and\");\n\treturn $array[$pos];\n}", "public function readTabla() {\r\n $query = 'SELECT * FROM ' . $this->t...
[ "0.6130924", "0.612813", "0.61228013", "0.6088793", "0.6077505", "0.60765314", "0.60525376", "0.5953618", "0.5934905", "0.5932946", "0.5902314", "0.58754915", "0.5836085", "0.5830674", "0.58153105", "0.57774013", "0.57771456", "0.5766048", "0.5763655", "0.5753449", "0.5747927...
0.5655446
31
Buscar el proximo id a escribir
public function buscaridproximo() { $mg = ZendExt_Aspect_TransactionManager::getInstance(); $conn = $mg->getConnection('metadatos'); $query = Doctrine_Query::create($conn); // eliminar el campo $result = $query->select('max(a.idcampo) as maximo') ->from('NomCampoestruc a') ->execute() ->toArray(); $proximo = isset($result[0]['maximo']) ? $result[0]['maximo'] + 1 : 1; return $proximo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function get_id();", "abstract public function getId();", "public function getId() ;", "abstract function getId();", "abstract public function getId();", "abstract public function getId();", "abstract public function getId();", "function getId(){\n\t\t\treturn $this->$id;\n\t\t}", ...
[ "0.6604153", "0.65951735", "0.65883327", "0.65542483", "0.6531945", "0.6531945", "0.6531945", "0.6510807", "0.649277", "0.649277", "0.64887536", "0.64875746", "0.64875746", "0.6475623", "0.6475623", "0.6475623", "0.64719975", "0.64656615", "0.64656615", "0.64532787", "0.64532...
0.0
-1
Buscar el proximo id a escribir
public function buscarCampos($limit, $start, $idtabla) { $mg = ZendExt_Aspect_TransactionManager::getInstance(); $conn = $mg->getConnection('metadatos'); $query = Doctrine_Query::create($conn); // eliminar el campo $result = $query->select('a.idcampo,a.idnomeav,a.nombre,a.tipo,a.longitud,a.nombre_mostrar,a.regex,a.descripcion,a.tipocampo,a.visible') /* $result = $query*/ ->from('NomCampoestruc a') ->where("idnomeav='$idtabla'") ->limit($limit) ->offset($start) ->execute() ->toArray(); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function get_id();", "abstract public function getId();", "public function getId() ;", "abstract function getId();", "abstract public function getId();", "abstract public function getId();", "abstract public function getId();", "function getId(){\n\t\t\treturn $this->$id;\n\t\t}", ...
[ "0.6605942", "0.6596532", "0.6589524", "0.65556204", "0.65333635", "0.65333635", "0.65333635", "0.6511701", "0.6494311", "0.6494311", "0.64906734", "0.6488928", "0.6488928", "0.6477109", "0.6477109", "0.6477109", "0.64734", "0.6467105", "0.6467105", "0.6454481", "0.6454481", ...
0.0
-1
Devuelve los valortes que presenta el campo parametrizado en la funcion
function valores($idCampo) { $mg = ZendExt_Aspect_TransactionManager::getInstance(); $conn = $mg->getConnection('metadatos'); $query = Doctrine_Query::create($conn); $result = $query->select('v.valor') ->from('NomValorestruc v') ->where("v.idcampo='$idCampo'") //->groupBy('v.valor') ->execute() ->toArray(); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function parameters();", "public function parameters();", "function getFieldAndValues($params) {\n global $conn;\n\n if (!is_array($params))\n exit('Parâmetro inválido!');\n\n $id = $params['id'];\n $mod = $params['modulo'];\n $pre = $params['pre'];\n $ref = isset($params['ref']...
[ "0.6492307", "0.6492307", "0.6463919", "0.6447743", "0.6447743", "0.6336619", "0.6336619", "0.6336619", "0.6336619", "0.6336619", "0.6336619", "0.6336619", "0.6336619", "0.63301295", "0.6307046", "0.62998766", "0.62679607", "0.626507", "0.626507", "0.626507", "0.626507", "0...
0.0
-1
Borrar la instancia vieja que poseia el modelo
public function Instancia() { $this->instance = null; $this->instance = new NomCampoestruc(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function borrarInscrito() {\n //Creamos la evaluacion\n leerClase('Evaluacion');\n leerClase('Estudiante');\n leerClase('Proyecto_dicta');\n $estudiante = new Estudiante($this->estudiante_id);\n $evaluacion = new Evaluacion($this->evaluacion_id);\n $protecto=$estudiante->getPro...
[ "0.7369728", "0.6677371", "0.6579571", "0.6573997", "0.6569192", "0.65533614", "0.63510525", "0.6287539", "0.6279832", "0.6276242", "0.62486464", "0.6215599", "0.62047327", "0.61994773", "0.6167614", "0.614694", "0.613519", "0.61055386", "0.60996264", "0.609714", "0.60897225"...
0.0
-1
Run the database seeds.
public function run() { // Omega-3 Index Feature DB::table('product_features')->insert([ 'product_id' => 1, // Basic 'feature_id' => 1 ]); DB::table('product_features')->insert([ 'product_id' => 2, // Plus 'feature_id' => 1 ]); DB::table('product_features')->insert([ 'product_id' => 3, // Complete 'feature_id' => 1 ]); // Omega-6:Omega-3 Ratio Feature DB::table('product_features')->insert([ 'product_id' => 2, // Plus 'feature_id' => 2 ]); DB::table('product_features')->insert([ 'product_id' => 3, // Complete 'feature_id' => 2 ]); // AA:EPA Ratio Feature DB::table('product_features')->insert([ 'product_id' => 2, // Plus 'feature_id' => 3 ]); DB::table('product_features')->insert([ 'product_id' => 3, // Complete 'feature_id' => 3 ]); // Trans Fat Index Feature DB::table('product_features')->insert([ 'product_id' => 2, // Plus 'feature_id' => 4 ]); DB::table('product_features')->insert([ 'product_id' => 3, // Complete 'feature_id' => 4 ]); // Full Fatty Acid Profile Feature DB::table('product_features')->insert([ 'product_id' => 3, // Complete 'feature_id' => 5 ]); // Personalized dietary recommendations DB::table('product_features')->insert([ 'product_id' => 1, // Basic 'feature_id' => 6 ]); DB::table('product_features')->insert([ 'product_id' => 2, // Plus 'feature_id' => 6 ]); DB::table('product_features')->insert([ 'product_id' => 3, // Complete 'feature_id' => 6 ]); // Fatty Acid Research Report DB::table('product_features')->insert([ 'product_id' => 3, // Complete 'feature_id' => 7 ]); // EPA+DHA content of commonly consumed seafood DB::table('product_features')->insert([ 'product_id' => 1, // Basic 'feature_id' => 8 ]); DB::table('product_features')->insert([ 'product_id' => 2, // Plus 'feature_id' => 8 ]); DB::table('product_features')->insert([ 'product_id' => 3, // Complete 'feature_id' => 8 ]); // Trans fat content of commonly consumed food DB::table('product_features')->insert([ 'product_id' => 2, // Plus 'feature_id' => 9 ]); DB::table('product_features')->insert([ 'product_id' => 3, // Complete 'feature_id' => 9 ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
Returns true if object can import $settings. False otherwise.
public function accept($settings) { $path = $settings->get_path(); $name = basename($path); $extentions = $this->get_extentions(); foreach ($extentions as $ext) { if (strpos($name, $ext) !== false) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_import_valid() {\n\t\t$import_settings = [\n\t\t\t'user',\n\t\t];\n\n\t\t$valid = true;\n\n\t\tforeach ( $import_settings as $setting ) {\n\t\t\tif ( empty( $this->import[ $setting ] ) ) {\n\t\t\t\t$valid = false;\n\t\t\t}\n\t\t}\n\n\t\treturn ( $this->is_core_valid() && $valid );\n\t}", "func...
[ "0.7262813", "0.68187976", "0.6600238", "0.6587092", "0.64160323", "0.63264275", "0.63264275", "0.63264275", "0.630294", "0.6283617", "0.6162057", "0.6121144", "0.6074711", "0.6063457", "0.60420066", "0.59918886", "0.59658635", "0.5959374", "0.5944522", "0.5933902", "0.592431...
0.59136224
21
HEADER HEADER HEADER HEADER HEADER HEADER HEADER HEADER HEADER HEADER HEADER Process table's header. I.e. the definition of the table
protected function process_header(import_settings $settings, $data) { $result = array(); $doc = $settings->get_dom(); $rows = $doc->getElementsByTagName('tr'); $head = $rows->item(0); $cols = $head->getElementsByTagName('th'); foreach ($cols as $col) { $name = $this->read($col, 'title'); $description = $this->read($col, 'description'); $type = $this->read($col, 'type'); $options = $this->read_list($col, 'options'); $f = array($this, 'process_header_' . $type); if (is_callable($f)) { $field = call_user_func($f, $settings, $data, $name, $description, $options); $result[] = $field; } else { $field = $this->process_header_default($settings, $type, $name, $description, $options); $result[] = $field; } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Header()\r\n{\r\n if($this->ProcessingTable)\r\n $this->TableHeader();\r\n}", "function header() {\n //\n //Get the fields in this sql \n $cols= $this->fields->get_array();\n //\n //Loop through the fields and display the <tds>\n foreach ($cols as $col...
[ "0.7683809", "0.7044155", "0.70072466", "0.69909793", "0.6925226", "0.6909512", "0.6841694", "0.6835884", "0.6806515", "0.67844623", "0.67467356", "0.6738118", "0.67264885", "0.67211795", "0.6707319", "0.6689692", "0.6682735", "0.6682308", "0.66798395", "0.66143167", "0.65856...
0.0
-1
Default procedure for importing a header i.e. a field's declaration.
protected function process_header_default(import_settings $settings, $data, $type, $name, $description, $options) { global $DB; $result = new object(); $result->dataid = $data->id; $result->type = $type; $result->name = $name; $result->description = $description; $result->param1 = is_array($options) ? implode("\n", $options) : $options; $result->param2 = null; $result->param3 = null; $result->param4 = null; $result->param5 = null; $result->param6 = null; $result->param7 = null; $result->param8 = null; $result->param9 = null; $result->param10 = null; $result->id = $DB->insert_record('data_fields', $result); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function importHeader($admin){\n\t return parent::importHeader($admin);\n\t}", "public function extObjHeader() {}", "function privReadFileHeader(&$p_header)\n {\n }", "public function getInputHeaders()\n {\n }", "abstract public function header();", "public function buildHea...
[ "0.64634645", "0.6364893", "0.6315047", "0.6170176", "0.6155428", "0.615142", "0.6057942", "0.60374886", "0.6011982", "0.5999342", "0.5976518", "0.5964499", "0.58784896", "0.5814454", "0.5814023", "0.5795496", "0.5786105", "0.5771543", "0.57566875", "0.57527673", "0.575083", ...
0.59568495
12
Imports a checkbox header i.e. a field's declaration.
protected function process_header_checkbox(import_settings $settings, $data, $name, $description, $options) { $result = $this->process_header_default($settings, $data, end(explode('_', __FUNCTION__)), $name, $description, $options); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function output_checkbox_row( string $label, string $key, bool $checked = false ): void {\n\twp_enqueue_style( 'wpinc-meta-field' );\n\t?>\n\t<div class=\"wpinc-meta-field-single checkbox\">\n\t\t<label>\n\t\t\t<span class=\"checkbox\"><input <?php name_id( $key ); ?> type=\"checkbox\" <?php echo esc_attr( $checke...
[ "0.63695353", "0.5883379", "0.58809394", "0.58807844", "0.57226795", "0.57156914", "0.57071275", "0.5695699", "0.56633687", "0.5649122", "0.5549496", "0.5474228", "0.5473855", "0.5447326", "0.54225916", "0.5406645", "0.5400897", "0.53399295", "0.5336694", "0.53366834", "0.532...
0.6030131
1
Imports a date header i.e. a field's declaration.
protected function process_header_date(import_settings $settings, $data, $name, $description, $options) { $result = $this->process_header_default($settings, $data, end(explode('_', __FUNCTION__)), $name, $description, $options); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function parseDate(object $header): void {\n\n if (property_exists($header, 'date')) {\n $date = $header->date;\n\n if (preg_match('/\\+0580/', $date)) {\n $date = str_replace('+0580', '+0530', $date);\n }\n\n $date = trim(rtrim($date));\n ...
[ "0.62307817", "0.591231", "0.5634141", "0.5621257", "0.55200434", "0.547975", "0.54533225", "0.5449354", "0.5261206", "0.5159231", "0.5139352", "0.50846297", "0.50423723", "0.5041895", "0.50371337", "0.5035094", "0.4972689", "0.49478891", "0.49268717", "0.49260876", "0.491950...
0.6072167
1
Imports a file header i.e. a field's declaration.
protected function process_header_file(import_settings $settings, $data, $name, $description, $options) { global $CFG, $COURSE; $result = $this->process_header_default($settings, $data, end(explode('_', __FUNCTION__)), $name, $description, $options); $result->param2 = max($CFG->maxbytes, $COURSE->maxbytes); global $DB; $DB->update_record('data_fields', $result); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function import();", "public function import(): void;", "public function loadHeader(): void\n {\n $this->openFile('r');\n\n $header = $this->getLine(false);\n --$this->line; // because we don't want to count header line\n\n $this->initializeHeader($header);\n }", "pri...
[ "0.5825536", "0.55880815", "0.555223", "0.55033123", "0.5476334", "0.54594433", "0.5393289", "0.53806776", "0.5344604", "0.53107595", "0.5280609", "0.5277587", "0.5267199", "0.5261294", "0.5201625", "0.51791", "0.5140578", "0.5124578", "0.51244515", "0.51139534", "0.50924206"...
0.46267387
89
Imports a menu header i.e. a field's declaration.
protected function process_header_menu(import_settings $settings, $data, $name, $description, $options) { $result = $this->process_header_default($settings, $data, end(explode('_', __FUNCTION__)), $name, $description, $options); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function v2_mumm_menu_link__menu_header(&$variables) {\n\n $element = $variables ['element'];\n $sub_menu = '';\n\n if ($element ['#below']) {\n $sub_menu = drupal_render($element ['#below']);\n }\n\n if (in_array('search-btn', $element['#localized_options']['attributes']['class'])) {\n\n $output = '<bu...
[ "0.6113794", "0.6066346", "0.5881728", "0.5825984", "0.5768642", "0.5755341", "0.5620417", "0.56002325", "0.55975974", "0.55110526", "0.5441443", "0.5436225", "0.5424692", "0.5401995", "0.53944194", "0.53746486", "0.536518", "0.53514105", "0.53514105", "0.5349178", "0.5345487...
0.5890757
2
Imports a multimenu header i.e. a field's declaration.
protected function process_header_multimenu(import_settings $settings, $data, $name, $description, $options) { $result = $this->process_header_default($settings, $data, end(explode('_', __FUNCTION__)), $name, $description, $options); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function importHeader($admin){\n\t return parent::importHeader($admin);\n\t}", "public function buildHeaderFields() {}", "public function defineHeader()\n {\n $this->header = new Header();\n }", "protected function output_header() {\n include dirname( __FILE__ ) . '/views/html-c...
[ "0.6312118", "0.5849796", "0.5717642", "0.56133515", "0.5545637", "0.5534794", "0.55178726", "0.54929554", "0.5487967", "0.54194546", "0.54021776", "0.5385378", "0.53764075", "0.53468424", "0.5338391", "0.53024846", "0.5293534", "0.5293432", "0.5278267", "0.5257394", "0.52502...
0.51488835
42
Imports a number header i.e. a field's declaration.
protected function process_header_number(import_settings $settings, $data, $name, $description, $options) { $result = $this->process_header_default($settings, $data, end(explode('_', __FUNCTION__)), $name, $description, $options); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function min_headings_num() {\n\t\t$this->section_data['general_min_headings_num'] = array(\n\t\t\t'name' \t\t\t\t\t=> 'general_min_headings_num',\n\t\t\t'label' \t\t\t\t=> __( 'Display TOC when', 'fixedtoc' ),\n\t\t\t'default' \t\t\t=> '',\n\t\t\t'type' \t\t\t\t\t=> 'number',\n\t\t\t'input_attrs'\t\t=> ar...
[ "0.51880145", "0.5137977", "0.5004235", "0.49478108", "0.49266407", "0.48821086", "0.4875254", "0.4813329", "0.48021185", "0.4799113", "0.47685233", "0.46652612", "0.46492574", "0.46343297", "0.46296328", "0.46275207", "0.46213627", "0.45985338", "0.45579165", "0.455238", "0....
0.6226848
0
Imports a radiobutton header i.e. a field's declaration.
protected function process_header_radiobutton(import_settings $settings, $data, $name, $description, $options) { $result = $this->process_header_default($settings, $data, end(explode('_', __FUNCTION__)), $name, $description, $options); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function createCheckboxRadio($input, $name) {\n include $_SERVER[\"DOCUMENT_ROOT\"] . \"/mvdv/core/view/templates/general/form/formelements/radiocheckbox.php\";\n }", "public static function renderRadio();", "public function defineHeaderButton(){\r\n $this->addnewctrl='';\r\n $thi...
[ "0.5305672", "0.51929915", "0.5192559", "0.517536", "0.517536", "0.517536", "0.517536", "0.517536", "0.51236653", "0.5028674", "0.49931952", "0.4927494", "0.4910817", "0.49040562", "0.48878166", "0.488666", "0.48583576", "0.48304302", "0.48169217", "0.4809677", "0.4804556", ...
0.5901773
0
Imports a text header i.e. a field's declaration.
protected function process_header_text(import_settings $settings, $data, $name, $description, $options) { $result = $this->process_header_default($settings, $data, end(explode('_', __FUNCTION__)), $name, $description, $autolink = true); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function statementHeader(string $text): void\n {\n }", "function setHeaderText($value) {\n $this->header_text = $value;\n}", "private function _header($text){\n echo '[*] ' . $text . PHP_EOL;\n }", "function import_text( $text ) {\r\n // quick sanity check\r\n if (e...
[ "0.6034784", "0.58935195", "0.56245434", "0.55620503", "0.5527571", "0.5523644", "0.5466935", "0.5460304", "0.5458527", "0.54272413", "0.54262334", "0.5407933", "0.54028666", "0.53963476", "0.53871566", "0.5360135", "0.53181714", "0.53011644", "0.52995664", "0.5290824", "0.52...
0.6070688
0
Imports a textarea header i.e. a field's declaration.
protected function process_header_textarea(import_settings $settings, $data, $name, $description, $options) { $result = $this->process_header_default($settings, $data, end(explode('_', __FUNCTION__)), $name, $description, $options); $result->param2 = 60; $result->param3 = 35; $result->param4 = 1; global $DB; $DB->update_record('data_fields', $result); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function createTextArea($input, $name) {\n include $_SERVER[\"DOCUMENT_ROOT\"] . \"/mvdv/core/view/templates/general/form/formelements/textarea.php\";\n }", "function bfa_add_html_inserts_header() {\r\n\tglobal $bfa_ata;\r\n\tif( $bfa_ata['html_inserts_header'] != '' ) bfa_incl('html_inse...
[ "0.5486219", "0.54106927", "0.5353058", "0.5314122", "0.5278608", "0.525247", "0.51403344", "0.5138327", "0.5132187", "0.51316994", "0.5102319", "0.51012313", "0.50904256", "0.50699586", "0.5052026", "0.5043884", "0.5042542", "0.50385123", "0.5025942", "0.5023656", "0.5021118...
0.5842437
0
Imports a url header i.e. a field's declaration.
protected function process_header_url(import_settings $settings, $data, $name, $description, $options) { $result = $this->process_header_default($settings, $data, end(explode('_', __FUNCTION__)), $name, $description, $autolink = true); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "#[Pure]\nfunction http_parse_headers($header) {}", "public static function loadHeader($url)\n\t{\n $models = self::model()->findAllByAttributes(array('type'=>Settings::SETTING_HEADER));\n foreach($models as $model){\n $data = explode('{*}',$model->condition);\n if(count($data) > ...
[ "0.584257", "0.5803464", "0.5531056", "0.5495312", "0.54339224", "0.54058033", "0.5372545", "0.52713007", "0.5231562", "0.5183688", "0.51526153", "0.5133383", "0.51253843", "0.51253843", "0.51253843", "0.5111218", "0.5063829", "0.50505126", "0.49994794", "0.49924287", "0.4988...
0.5735358
2
PROCESS BODY PROCESS BODY PROCESS BODY PROCESS BODY PROCESS BODY PROCESS BODY PROCESS BODY Process and import the body i.e. content of the table. Parses the table and calls the specialized import method based on the field's type.
protected function process_body(import_settings $settings, $data, $fields) { $doc = $settings->get_dom(); $list = $doc->getElementsByTagName('tbody'); $body = $list->item(0); $rows = $body->getElementsByTagName('tr'); foreach ($rows as $row) { $data_record = $this->get_data_record($data); //do not create datarecord if there are no rows to import $index = 0; $cells = $row->getElementsByTagName('td'); foreach ($cells as $cell) { $field = $fields[$index]; $type = $field->type; $f = array($this, 'process_data_' . $type); if (is_callable($f)) { call_user_func($f, $settings, $field, $data_record, $cell); } else { $this->process_data_default($settings, $field, $data_record, $cell); } $index++; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prepareImportContent();", "public function doImport() \n\t{ \n\t // first save the import object in the database\n $this->status = self::STATUS_IN_PROGRESS_IMPORT;\n $this->item_count = $this->getItemCount();\n\t $this->save(); \n\t \t \n\t // add an import object\n\t...
[ "0.6050659", "0.601217", "0.59888643", "0.59820735", "0.5856395", "0.5741842", "0.57190835", "0.55667895", "0.55624694", "0.55112386", "0.55014026", "0.54888356", "0.54544675", "0.5453983", "0.54128957", "0.5410939", "0.5394443", "0.53521615", "0.533543", "0.5309772", "0.5283...
0.63890934
0
On first call creates as data_record record used to link data object with its content. On subsequent calls returns the previously created record.
protected function get_data_record($data) { if ($this->_data_record) { return $this->_data_record; } global $USER, $DB; $this->_data_record = new object(); $this->_data_record->id = null; $this->_data_record->userid = $USER->id; $this->_data_record->groupid = 0; $this->_data_record->dataid = $data->id; $this->_data_record->timecreated = $time = time(); $this->_data_record->timemodified = $time; $this->_data_record->approved = true; $this->_data_record->id = $DB->insert_record('data_records', $this->_data_record); return $this->_data_record->id ? $this->_data_record : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addRecord()\n {\n $rec = new Record($this, true);\n $rec->markForInsert();\n $this->records[] = $rec;\n return $rec;\n }", "public function create($data)\n {\n try {\n $record = $this->model->create($data);\n } catch (\\Exception $e) {...
[ "0.6830509", "0.66752625", "0.65268564", "0.63946795", "0.6298123", "0.6273325", "0.61721206", "0.6119108", "0.6106025", "0.6050434", "0.6050434", "0.6048353", "0.6044807", "0.59401137", "0.59214187", "0.58682567", "0.5797092", "0.5792165", "0.57628447", "0.57008016", "0.5700...
0.7404586
0
Default import method for table's cell containing data.
protected function process_data_default(import_settings $settings, $field, $data_record, $value, $content1 = null, $content2 = null, $content3 = null, $content4 = null) { global $DB; $result = new object(); $result->fieldid = $field->id; $result->recordid = $data_record->id; $result->content = $value instanceof DOMElement ? $this->get_innerhtml($value) : $value; $result->content1 = $content1; $result->content2 = $content2; $result->content3 = $content3; $result->content4 = $content4; $result->id = $DB->insert_record('data_content', $result); return $result->id ? $result : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadRow() {}", "public function import()\n {\n return !empty($this->configs['rows_edit']) && $this->configs['rows_edit'] == 1 ? self::rows() : 'files.rows.table_import';\n }", "public function metaImport($data);", "function import(array $data);", "public function importFrom(...
[ "0.63299626", "0.61143297", "0.59934694", "0.5877443", "0.5824782", "0.5746604", "0.5714457", "0.56619513", "0.5623657", "0.55938387", "0.5514292", "0.5461218", "0.54609424", "0.5445703", "0.5427322", "0.5414182", "0.5407063", "0.53669685", "0.5324979", "0.5308429", "0.528428...
0.0
-1
Method for importing a checkbox data cell.
protected function process_data_checkbox(import_settings $settings, $field, $data_record, $value) { $result = $this->process_data_default($settings, $field, $data_record, $value); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function output_checkbox_row( string $label, string $key, bool $checked = false ): void {\n\twp_enqueue_style( 'wpinc-meta-field' );\n\t?>\n\t<div class=\"wpinc-meta-field-single checkbox\">\n\t\t<label>\n\t\t\t<span class=\"checkbox\"><input <?php name_id( $key ); ?> type=\"checkbox\" <?php echo esc_attr( $checke...
[ "0.55346096", "0.5344551", "0.5191674", "0.51886994", "0.518288", "0.5171274", "0.51545525", "0.50641865", "0.5053339", "0.50150746", "0.5008626", "0.48653644", "0.48485696", "0.4838679", "0.4827591", "0.48134705", "0.48091918", "0.48020542", "0.48018435", "0.47888786", "0.47...
0.55580056
0
Method for importing a date data cell.
protected function process_data_date(import_settings $settings, $field, $data_record, $value) { $value = $this->get_innerhtml($value); $parts = explode('.', $value); $d = $parts[0]; $m = $parts[1]; $y = $parts[2]; $value = mktime(0, 0, 0, $m, $d, $y); $result = $this->process_data_default($settings, $field, $data_record, $value); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function importDateContents($contents) : void\n {\n //==============================================================================\n // Import Date\n if (!empty($contents[\"date\"])) {\n if ($contents[\"date\"] instanceof DateTime) {\n $this->setRefreshA...
[ "0.63935465", "0.5383829", "0.5358083", "0.52945375", "0.5253769", "0.5250818", "0.52362937", "0.5230737", "0.5124974", "0.5115753", "0.51148826", "0.5112987", "0.5097512", "0.5081924", "0.50787884", "0.503333", "0.50328803", "0.49959266", "0.4974711", "0.49707046", "0.496569...
0.49546182
21
Method for importing a file data cell.
protected function process_data_file(import_settings $settings, $field, $data_record, $value) { $list = $value->getElementsByTagName('a'); $a = $list->item(0); $href = $a->getAttribute('href'); $text = $this->get_innerhtml($a); $result = $this->process_data_default($settings, $field, $data_record, $text); $file_record = new object(); $file_record->contextid = $this->get_context()->id; $file_record->component = 'mod_data'; $file_record->filearea = 'content'; $file_record->itemid = $result->id; $file_record->filepath = '/'; $file_record->filename = $result->content; $fs = get_file_storage(); $fs->create_file_from_pathname($file_record, dirname($settings->get_path()) . '/' . $href); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadData($path) {\n\t\t\n\t\t$this->properties->lines = 1;\n\t\t\n\t\t$sql = 'INSERT INTO '.$this->properties->table.' ('.implode(\", \", $this->properties->columns).') VALUES (:'.implode(\", :\", $this->properties->columns).')'; \n\t\t$statement = $this->properties->con->prepare($sql); \t\t\n\t\...
[ "0.6300637", "0.62099755", "0.61139774", "0.6057166", "0.60169125", "0.6001831", "0.5989238", "0.5974106", "0.5963025", "0.58676684", "0.58338594", "0.5825807", "0.58162385", "0.5810736", "0.5809496", "0.580495", "0.5782686", "0.575955", "0.5753459", "0.57440704", "0.57180536...
0.0
-1
Method for importing a menu data cell.
protected function process_data_menu(import_settings $settings, $field, $data_record, $value) { $result = $this->process_data_default($settings, $field, $data_record, $value); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function import(stdClass $menu, stdClass $row) {\n // Invoke migration prepare handlers\n $this->prepare($menu, $row);\n\n // Menus are handled as arrays, so clone the object to an array.\n $menu = clone $menu;\n $menu = (array) $menu;\n\n // Check to see if this is a new menu.\n $updat...
[ "0.5908261", "0.5792705", "0.57051396", "0.54172695", "0.5319359", "0.5317798", "0.5312159", "0.5190978", "0.51481056", "0.5128166", "0.5120202", "0.5109397", "0.50900304", "0.5056367", "0.50339824", "0.50128204", "0.5011929", "0.4975385", "0.49676278", "0.49517974", "0.49361...
0.4802837
34
Method for importing a multimenu data cell.
protected function process_data_multimenu(import_settings $settings, $field, $data_record, $value) { $value = $this->get_innerhtml($value); $parts = explode('<br/>', $value); $items = array(); $options = explode("\n", $field->param1); foreach ($options as $option) { $items[$option] = '#'; } foreach ($parts as $part) { $items[$part] = $part; } $value = implode('', $items); $result = $this->process_data_default($settings, $field, $data_record, $value); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function importFrom(array $data);", "function import(array $data);", "public function import(){\n include APPPATH.'third_party/PHPExcel.php';\n \n $excelreader = new PHPExcel_Reader_Excel2007();\n $loadexcel = $excelreader->load('uploads/'.$this->filename.'.xlsx'); /* Load fi...
[ "0.5941935", "0.5939636", "0.5757379", "0.57407624", "0.56725055", "0.5664429", "0.55651826", "0.5535334", "0.550323", "0.548339", "0.54818875", "0.5467036", "0.54592186", "0.542788", "0.5415725", "0.5340358", "0.5318185", "0.53129333", "0.5310183", "0.52994084", "0.5298575",...
0.4703026
89
Method for importing a number data cell.
protected function process_data_number(import_settings $settings, $field, $data_record, $value) { $result = $this->process_data_default($settings, $field, $data_record, $value); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCellsImportDataIntArray()\n {\n $book1 = \"Book1.xlsx\";\n $mydoc = \"myDocument.xlsx\";\n $ImportOption = \"ImportOption\";\n\n $data = new ImportIntArrayOption();\n $data->setDestinationWorksheet('Sheet1');\n $data->setFirstColumn(1);\n $dat...
[ "0.5837573", "0.53284067", "0.52543306", "0.5202485", "0.5182147", "0.51563007", "0.5153926", "0.5122473", "0.5105191", "0.5067507", "0.5045524", "0.50338566", "0.5031159", "0.5026738", "0.50197023", "0.50055516", "0.4991452", "0.49911588", "0.49648672", "0.4929456", "0.49221...
0.5444547
1
Method for importing a radiobutton data cell.
protected function process_data_radiobutton(import_settings $settings, $field, $data_record, $value) { $result = $this->process_data_default($settings, $field, $data_record, $value); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function process_header_radiobutton(import_settings $settings, $data, $name, $description, $options) {\r\n $result = $this->process_header_default($settings, $data, end(explode('_', __FUNCTION__)), $name, $description, $options);\r\n return $result;\r\n }", "public function import()\n\...
[ "0.51157725", "0.47869363", "0.4668854", "0.46299484", "0.45710236", "0.45428073", "0.45386532", "0.45222545", "0.45018837", "0.4486966", "0.44613567", "0.44118488", "0.4400204", "0.43842605", "0.43669873", "0.43482393", "0.43444", "0.43307984", "0.43288007", "0.43213406", "0...
0.5347019
0
Method for importing a text data cell.
protected function process_data_text(import_settings $settings, $field, $data_record, $value) { $result = $this->process_data_default($settings, $field, $data_record, $value); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function import_text( $text ) {\r\n // quick sanity check\r\n if (empty($text)) {\r\n return '';\r\n }\r\n $data = $text[0]['#'];\r\n return addslashes(trim( $data ));\r\n }", "function _loadDataText() {\r\n\t\treturn unserialize(file_get_contents($this->data_txt)...
[ "0.59995866", "0.59215665", "0.5731611", "0.5496381", "0.548323", "0.54112697", "0.53370017", "0.52918833", "0.5265808", "0.5169134", "0.515777", "0.515257", "0.5099399", "0.50760573", "0.5059764", "0.5056896", "0.505381", "0.505381", "0.5035706", "0.5021293", "0.50199836", ...
0.5542842
3
Method for importing a textarea data cell.
protected function process_data_textarea(import_settings $settings, $field, $data_record, $value) { $result = $this->process_data_default($settings, $field, $data_record, $value, true); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function convert_textarea_field() {\n\n\t\t// Create a new Textarea field.\n\t\tself::$field = new GF_Field_Textarea();\n\n\t\t// Add standard properties.\n\t\tself::add_standard_properties();\n\n\t\t// Add Textarea specific properties.\n\t\tself::$field->useRichTextEditor = rgar( self::$nf_field, 't...
[ "0.5420207", "0.524603", "0.5194765", "0.5126707", "0.51193887", "0.51129174", "0.5090459", "0.5061626", "0.5016948", "0.50030977", "0.49657747", "0.49424002", "0.48762652", "0.4853857", "0.48512346", "0.48473266", "0.48277137", "0.48229995", "0.4812099", "0.48112962", "0.480...
0.56925595
0
Method for importing a url data cell.
protected function process_data_url(import_settings $settings, $field, $data_record, $value) { $list = $value->getElementsByTagName('a'); $a = $list->item(0); $href = $a->getAttribute('href'); $text = $this->get_innerhtml($a); $result = $this->process_data_default($settings, $field, $data_record, $href, $text); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setData()\n {\n if($this->url != null)\n {\n if (($handle = fopen($this->url, \"r\")) !== FALSE) {\n while (($rows = fgetcsv($handle)) !== FALSE) {\n foreach($rows as $row)\n {\n $this->data[$thi...
[ "0.56360614", "0.54688984", "0.54011303", "0.5334175", "0.5296072", "0.52199614", "0.516939", "0.51646346", "0.51397234", "0.51350087", "0.5128872", "0.51220095", "0.5118983", "0.5114272", "0.50947046", "0.50837094", "0.5070334", "0.5070334", "0.5061316", "0.5061316", "0.5061...
0.49400556
31
Returns the context used to store files. On first call construct the result based on $mod. On subsequent calls return the cached value.
protected function get_context($mod=null) { if ($this->_context) { return $this->_context; } global $DB; $module = $DB->get_record('modules', array('name' => 'data'), '*', MUST_EXIST); $cm = $DB->get_record('course_modules', array('course' => $mod->course, 'instance' => $mod->id, 'module' => $module->id), '*', MUST_EXIST); $this->_context = get_context_instance(CONTEXT_MODULE, $cm->id); return $this->_context; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _context()\n {\n return $this->_file()->context;\n }", "function frmget_context() {\n\tglobal $CFG, $DB;\n //include this file for content /libdir/filelib.php\n return $systemcontext = context_system::instance();\t\n}", "public static function context() {\n\t\treturn self::g...
[ "0.64674646", "0.6071938", "0.5815943", "0.56743664", "0.5604517", "0.54792696", "0.5473542", "0.5459495", "0.5439038", "0.54256904", "0.54256904", "0.54256904", "0.54256904", "0.54256904", "0.5416612", "0.53899765", "0.5358736", "0.5349171", "0.5308736", "0.5301935", "0.5298...
0.6363582
1
Fetch first child of $el with class name equals to $name and returns all li in an array.
protected function read_list($el, $name) { $result = array(); $list = $el->getElementsByTagName('div'); foreach ($list as $div) { if (strtolower($div->getAttribute('class')) == $name) { $lis = $el->getElementsByTagName('li'); foreach ($lis as $li) { $result[] = trim(html_entity_decode($this->get_innerhtml($li))); } } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function read($el, $name, $default = '') {\r\n $list = $el->getElementsByTagName('div');\r\n foreach ($list as $div) {\r\n if (strtolower($div->getAttribute('class')) == $name) {\r\n $result = $this->get_innerhtml($div);\r\n $result = str_ireplace('<...
[ "0.61263555", "0.56702036", "0.5652199", "0.5628246", "0.55545205", "0.54151684", "0.5303527", "0.52979654", "0.52324617", "0.5228412", "0.5225914", "0.51862645", "0.5164076", "0.5162426", "0.5157026", "0.5079374", "0.5076307", "0.50721323", "0.5065997", "0.501336", "0.499664...
0.7723638
0
Fetch first child of $el with class name equals to $name and returns its inner html. Returns $default if no child is found.
protected function read($el, $name, $default = '') { $list = $el->getElementsByTagName('div'); foreach ($list as $div) { if (strtolower($div->getAttribute('class')) == $name) { $result = $this->get_innerhtml($div); $result = str_ireplace('<p>', '', $result); $result = str_ireplace('</p>', '', $result); return $result; } } return $default; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFirstChildByName($name) {\n foreach($this->__childs as $child) {\n if ($child->getName() == $name) {\n return $child;\n }\n }\n return null; \n }", "public function get($name) {\n\t\tif( isset($...
[ "0.6228843", "0.57680947", "0.566378", "0.56176656", "0.55473787", "0.54208755", "0.54067624", "0.5387862", "0.532956", "0.5317605", "0.5308805", "0.52735484", "0.52621186", "0.5230969", "0.5207049", "0.5177255", "0.5170779", "0.5135536", "0.5127617", "0.51206994", "0.5076852...
0.76925004
0
/ Get a user vendor using id
public function getVendor($id) { try { $objVendor = new Base_Model_ObtorLib_App_Core_Catalog_Dao_Vendor(); $vendor = $objVendor->getVendor($id); return $vendor; } catch (Exception $e) { throw new Base_Model_ObtorLib_App_Core_Catalog_Exception($e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function LoadVendorById($id)\n\t{\n\t\t$query = \"\n\t\t\tSELECT *\n\t\t\tFROM [|PREFIX|]vendors\n\t\t\tWHERE vendorid='\".(int)$id.\"'\n\t\t\";\n\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\treturn $GLOBALS['ISC_CLASS_DB']->Fetch($result);\n\t}", "public static function singlevendorData($i...
[ "0.7183253", "0.7124679", "0.7123659", "0.7055503", "0.6985259", "0.691563", "0.6832657", "0.67579836", "0.66758484", "0.6642664", "0.6637203", "0.6609589", "0.65987337", "0.6532635", "0.65079856", "0.6495991", "0.6475582", "0.6462445", "0.645556", "0.6418699", "0.6403276", ...
0.69789743
5
/ Add new user vendor
public function addVendor() { try { if (!($this->vendor instanceof Base_Model_ObtorLib_App_Core_Catalog_Entity_Vendor)) { throw new Base_Model_ObtorLib_App_Core_Catalog_Exception(" Vendor Entity not initialized"); } else { $objVendor = new Base_Model_ObtorLib_App_Core_Catalog_Dao_Vendor(); $objVendor->vendor = $this->vendor; return $objVendor->addVendor(); } } catch (Exception $ex) { throw new Base_Model_ObtorLib_App_Core_Catalog_Exception($ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cmst_vendor_add() {\n\t\tglobal $conn;\n\n\t\t// Initialize table object\n\t\t$GLOBALS[\"mst_vendor\"] = new cmst_vendor();\n\n\t\t// Intialize page id (for backward compatibility)\n\t\tif (!defined(\"EW_PAGE_ID\"))\n\t\t\tdefine(\"EW_PAGE_ID\", 'add', TRUE);\n\n\t\t// Initialize table name (for backward ...
[ "0.7153838", "0.66894406", "0.65576863", "0.63545036", "0.6278909", "0.617923", "0.61598206", "0.6151986", "0.61476517", "0.6111772", "0.6102482", "0.60807914", "0.6065119", "0.60534984", "0.60047746", "0.5991669", "0.59769064", "0.5942889", "0.59143776", "0.5905661", "0.5891...
0.667634
2
/ Update user vendor
public function updateVendor() { try { if (!($this->vendor instanceof Base_Model_ObtorLib_App_Core_Catalog_Entity_Vendor)) { throw new Base_Model_ObtorLib_App_Core_Catalog_Exception(" Vendor Entity not initialized"); } else { $objVendor = new Base_Model_ObtorLib_App_Core_Catalog_Dao_Vendor(); $objVendor->vendor = $this->vendor; return $objVendor->updateVendor(); } } catch (Exception $ex) { throw new Base_Model_ObtorLib_App_Core_Catalog_Exception($ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($vendor);", "public function update_vendor($id, $data)\n\t{\n\t\t// Unset, if neccessary\n\t\tif ($data['api_id'] == '0')\n\t\t\t$data['api_id'] = NULL;\n\t\t\n\t\tif (empty($data['orderemail']))\n\t\t\t$data['orderemail'] = NULL;\n\t\t\t\n\t\tif (empty($data['ordername']))\n\t\t\t$data['o...
[ "0.77089745", "0.678249", "0.6584451", "0.6425409", "0.6245101", "0.62318724", "0.62134546", "0.6159758", "0.6158834", "0.6122324", "0.6108975", "0.60946953", "0.602808", "0.59663606", "0.59483075", "0.59092873", "0.59023994", "0.58952296", "0.5860157", "0.5858423", "0.584987...
0.713382
1
/ Delete user vendor
public function deleteVendor() { try { if (!($this->vendor instanceof Base_Model_ObtorLib_App_Core_Catalog_Entity_Vendor)) { throw new Base_Model_ObtorLib_App_Core_Catalog_Exception(" Vendor Entity not initialized"); } else { $objVendor = new Base_Model_ObtorLib_App_Core_Catalog_Dao_Vendor(); $objVendor->vendor = $this->vendor; return $objVendor->deleteVendor(); } } catch (Exception $ex) { throw new Base_Model_ObtorLib_App_Core_Catalog_Exception($ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($vendor_id);", "public function destroy(User $vendor)\n {\n if($vendor->delete()) \n {\n flash('You have successfully deleted a vendor.')->success();\n return redirect()->route('vendors_index');\n }\n }", "function admin_delete_vendor($ven...
[ "0.774143", "0.7503988", "0.7308527", "0.7294549", "0.67808074", "0.67547584", "0.6706481", "0.66646624", "0.66543716", "0.6617822", "0.6571545", "0.65598375", "0.6483491", "0.6470965", "0.6464532", "0.6458848", "0.64038056", "0.64036804", "0.63682914", "0.6354817", "0.635481...
0.68224186
4
/ Search user vendors....
public function search() { try { if (!($this->vendor instanceof Base_Model_ObtorLib_App_Core_Catalog_Entity_Vendor)) { throw new Base_Model_ObtorLib_App_Core_Catalog_Exception(" Vendor Entity not initialized"); } else { $objVendor = new Base_Model_ObtorLib_App_Core_Catalog_Dao_Vendor(); $objVendor->vendor = $this->vendor; return $objVendor->search(); } } catch (Exception $ex) { throw new Base_Model_ObtorLib_App_Core_Catalog_Exception($ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getActiveVendors() {\n $this->resetResponse();\n if ($this->ci->session->userdata('user_id') != null) {\n $archived = $this->ci->input->post('archived', true);\n\n $result = $this->model->getActiveVendors('*', array(\"person_type\" => Globals::PERSON_TYPE_VENDOR, \"per...
[ "0.6522265", "0.64070505", "0.63639617", "0.62607735", "0.62493575", "0.62388426", "0.6212094", "0.6181377", "0.6116254", "0.6110841", "0.6058671", "0.6051379", "0.6045634", "0.603381", "0.6016279", "0.60091215", "0.5976708", "0.5961105", "0.5955323", "0.592257", "0.589258", ...
0.6957608
0
Display a listing of the Uploads.
public function index() { $module = Module::get('Uploads'); if(Module::hasAccess($module->id)) { return View('la.uploads.index', [ 'show_actions' => $this->show_action, 'listing_cols' => $this->listing_cols, 'module' => $module ]); } else { return redirect(config('laraadmin.adminRoute')."/"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index() {\n $this->data['title'] = \"Uploads\";\n $viewContent = $this->load->view('uploads/index', $this->data, true);\n renderWithLayout(array('content' => $viewContent), 'admin');\n }", "public function index()\n {\n $uploads=Auth::guard('team')->user()->uploa...
[ "0.69382066", "0.6876522", "0.6749682", "0.6725907", "0.6721007", "0.6666607", "0.6666607", "0.6640795", "0.66351545", "0.66273767", "0.6605901", "0.65982366", "0.6577865", "0.65707296", "0.6520642", "0.65011615", "0.64765644", "0.63927686", "0.6379982", "0.63731706", "0.6365...
0.71702826
1
Upload fiels via DropZone.js
public function upload_files() { if(Module::hasAccess("Uploads", "create")) { $input = Input::all(); if(Input::hasFile('file')) { /* $rules = array( 'file' => 'mimes:jpg,jpeg,bmp,png,pdf|max:3000', ); $validation = Validator::make($input, $rules); if ($validation->fails()) { return response()->json($validation->errors()->first(), 400); } */ $file = Input::file('file'); // print_r($file); $folder = storage_path('uploads'); $filename = $file->getClientOriginalName(); $date_append = date("Y-m-d-His-"); $upload_success = Input::file('file')->move($folder, $date_append.$filename); if( $upload_success ) { // Get public preferences // config("laraadmin.uploads.default_public") $public = Input::get('public'); if(isset($public)) { $public = true; } else { $public = false; } $upload = Upload::create([ "name" => $filename, "path" => $folder.DIRECTORY_SEPARATOR.$date_append.$filename, "extension" => pathinfo($filename, PATHINFO_EXTENSION), "caption" => "", "hash" => "", "public" => $public, "user_id" => Auth::user()->id ]); // apply unique random hash to file while(true) { $hash = strtolower(str_random(20)); if(!Upload::where("hash", $hash)->count()) { $upload->hash = $hash; break; } } $upload->save(); return response()->json([ "status" => "success", "upload" => $upload ], 200); } else { return response()->json([ "status" => "error" ], 400); } } else { return response()->json('error: upload file not found.', 400); } } else { return response()->json([ 'status' => "failure", 'message' => "Unauthorized Access" ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function uploadFiles () {\n\n}", "public function upload();", "public function dz_files()\n {\n if (!empty($_FILES) && $_FILES['file']) {\n $file = $_FILES['file'];\n\n\n foreach ($file['error'] as $key=>$error) {\n $uploadfile = sys_get_temp_dir().basen...
[ "0.67579", "0.67418575", "0.6719007", "0.6709469", "0.66359144", "0.6467819", "0.6426453", "0.6343955", "0.6312949", "0.62610024", "0.6251879", "0.62234145", "0.6213375", "0.61678827", "0.61585456", "0.6090904", "0.60703826", "0.6029251", "0.60124546", "0.5975467", "0.5960310...
0.0
-1
Get all files from uploads folder
public function uploaded_files() { if(Module::hasAccess("Uploads", "view")) { $uploads = array(); // print_r(Auth::user()->roles); if(Entrust::hasRole('SUPER_ADMIN')) { $uploads = Upload::all(); } else { if(config('laraadmin.uploads.private_uploads')) { // Upload::where('user_id', 0)->first(); $uploads = Auth::user()->uploads; } else { $uploads = Upload::all(); } } $uploads2 = array(); foreach ($uploads as $upload) { $u = (object) array(); $u->id = $upload->id; $u->name = $upload->name; $u->extension = $upload->extension; $u->hash = $upload->hash; $u->public = $upload->public; $u->caption = $upload->caption; $u->user = $upload->user->name; $uploads2[] = $u; } // $folder = storage_path('/uploads'); // $files = array(); // if(file_exists($folder)) { // $filesArr = File::allFiles($folder); // foreach ($filesArr as $file) { // $files[] = $file->getfilename(); // } // } // return response()->json(['files' => $files]); return response()->json(['uploads' => $uploads2]); } else { return response()->json([ 'status' => "failure", 'message' => "Unauthorized Access" ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFiles()\n {\n return R::findAll('upload');\n }", "public function getUploadedFiles() {}", "public function getFiles() {}", "public function getFiles();", "public function getFiles();", "public function getFiles();", "public function getFiles ();", "public f...
[ "0.8097441", "0.77835095", "0.7777596", "0.77612865", "0.77612865", "0.77612865", "0.76237845", "0.7439349", "0.7432571", "0.7399751", "0.73831296", "0.7307203", "0.7297809", "0.7290996", "0.72831875", "0.72307175", "0.7217953", "0.7200678", "0.71465343", "0.71094835", "0.709...
0.74029773
9
Update Uploads Public Visibility
public function update_public() { if(Module::hasAccess("Uploads", "edit")) { $file_id = Input::get('file_id'); $public = Input::get('public'); if(isset($public)) { $public = true; } else { $public = false; } $upload = Upload::find($file_id); if(isset($upload->id)) { if($upload->user_id == Auth::user()->id || Entrust::hasRole('SUPER_ADMIN')) { // Update Caption $upload->public = $public; $upload->save(); return response()->json([ 'status' => "success" ]); } else { return response()->json([ 'status' => "failure", 'message' => "Unauthorized Access 1" ]); } } else { return response()->json([ 'status' => "failure", 'message' => "Upload not found" ]); } } else { return response()->json([ 'status' => "failure", 'message' => "Unauthorized Access" ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update_public()\n {\n\t\tif(Module::hasAccess(\"Uploads\", \"edit\")) {\n\t\t\t$file_id = Input::get('file_id');\n\t\t\t$public = Input::get('public');\n\t\t\t\n\t\t\t\n\t\t\t$upload = Upload::find($file_id);\n\t\t\tif(isset($upload->id)) {\n\t\t\t\tif($upload->user_id == Auth::user()->id || Ent...
[ "0.7433434", "0.697364", "0.6724741", "0.6699069", "0.6688663", "0.6155418", "0.6049058", "0.6047401", "0.60376936", "0.5982526", "0.57420754", "0.5724763", "0.57083505", "0.56794137", "0.56685036", "0.56627905", "0.56376064", "0.5635653", "0.56148225", "0.56059617", "0.55955...
0.7411745
1
Remove the specified upload from storage.
public function delete_file() { if(Module::hasAccess("Uploads", "delete")) { $file_id = Input::get('file_id'); $upload = Upload::find($file_id); if(isset($upload->id)) { if($upload->user_id == Auth::user()->id || Entrust::hasRole('SUPER_ADMIN')) { // Update Caption $upload->delete(); return response()->json([ 'status' => "success" ]); } else { return response()->json([ 'status' => "failure", 'message' => "Unauthorized Access 1" ]); } } else { return response()->json([ 'status' => "failure", 'message' => "Upload not found" ]); } } else { return response()->json([ 'status' => "failure", 'message' => "Unauthorized Access" ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeUpload()\n {\n $this->picture = null;\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function destroy(Upload $upload)\n {\n //\n }", "public f...
[ "0.7655448", "0.76433665", "0.72342145", "0.72342145", "0.71981055", "0.67445457", "0.6612791", "0.65565807", "0.6443043", "0.64342856", "0.63688403", "0.6329244", "0.63290316", "0.63257235", "0.63138396", "0.623985", "0.6239807", "0.6173919", "0.6167067", "0.61502504", "0.61...
0.57325214
66
function dentro de function
function foo() { function bar() { echo 'Hola ya existo'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete() ;", "function delete() ;", "function eliminar($bd);", "public function Deletar(){\n \n // Istancia a classe \"Funcionario\" do arquivo \"funcionario_class\".\n $funcionario = new Funcionario();\n \n // Pega o id do funcionário para deletá-lo.\n $fun...
[ "0.6814692", "0.6814692", "0.65540314", "0.6523486", "0.6497647", "0.64578086", "0.6348373", "0.6335426", "0.6308106", "0.6308106", "0.6297902", "0.6266026", "0.6237742", "0.62325025", "0.62118465", "0.62025845", "0.61728764", "0.6170539", "0.61661446", "0.6158824", "0.615008...
0.0
-1
abstract protected function depositar($valor);
public function setSaldo($saldo){ $this->saldo = $saldo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function deposit($amount, $purse, $description);", "public function saldo_tarjeta();", "private function depositToWallet() {\n # there is not api_limited_quota/cashier_quota msg\n # transfer function has to return error_code and error_msg\n }", "function deposit($amount) {\n $this...
[ "0.67820275", "0.65763456", "0.64504224", "0.6382421", "0.60422665", "0.58828187", "0.5851321", "0.58293575", "0.58022547", "0.57219166", "0.5676708", "0.56763005", "0.5659702", "0.563477", "0.56176186", "0.56108904", "0.5600164", "0.55915964", "0.5564366", "0.556111", "0.555...
0.0
-1
Invoked when tick() is called for the first time.
public function call(StrandInterface $strand) { $strand->suspend(); $this->timer = $strand ->kernel() ->eventLoop() ->addTimer( $this->timeout, function () use ($strand) { $strand->resumeWithValue(null); } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function tick() {\n // per second, but possibly more often.\n }", "public function onTick() {\r\n\r\n }", "public function tick()\n {\n //\n }", "protected function tick() \n\t{\n\t\t// Override this for any process that should happen periodically.Will happen at least once\n\t\t...
[ "0.7644413", "0.74994016", "0.7381115", "0.7328958", "0.671734", "0.6624", "0.6420672", "0.6263767", "0.607879", "0.5950114", "0.58703583", "0.58589536", "0.5776857", "0.57665145", "0.57451814", "0.5726494", "0.56353414", "0.5605798", "0.5583754", "0.5562012", "0.55467767", ...
0.0
-1
Finalize the coroutine. This method is invoked after the coroutine is popped from the call stack.
public function finalize(StrandInterface $strand) { if ($this->timer) { $this->timer->cancel(); $this->timer = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function finalize() { }", "public function __finalize() {\n\t\t$this->flush_buffer();\n\t}", "protected function finalize() {\n // NOOP\n }", "protected function _finalize()\n\t{\n\t\t$this->_engine->callStage('_finalize');\n\t\t$this->setState($this->_engine->getState());\n\t}", "public functio...
[ "0.7027825", "0.69926697", "0.68124545", "0.67885053", "0.66749555", "0.66300815", "0.66300815", "0.65752995", "0.655043", "0.6361448", "0.6342267", "0.6305438", "0.6148988", "0.612323", "0.60401314", "0.6033174", "0.6032416", "0.6032416", "0.6032416", "0.6032416", "0.6032416...
0.0
-1
Run the database seeds.
public function run() { DB::table('users')->insert([ [ '_id' => new ObjectID('60265ff45737000029000978'), 'role_id' => '6028f7713e320000f40026bd', 'school_id' => '60264978b22e00009a006436', 'ern' => '12345saple', 'phone' => '1234Phone', 'name' => 'Thom-thom', 'fname' => 'Thomas Emmanuel', 'mname_id' => 5, 'mname_id' =>1484, 'lname_id' => 235, 'suffix' => 'III', 'email_verified_at' => '2020-05-16', 'address' => json_decode('{ "country":"Philippines", "region":"REGION I (ILOCOS REGION)", "province":"ILOCOS NORTE", "municipality":"ADAMS", "brgy":"Adams (Pob.)" }'), 'email' => 'dev@gmail.com', 'password' => Hash::make('password'), 'academic' => json_decode('{"school":"NEUST", "code":"05689", "address":"Cabanatuan", "category":"Private", "religion":"Catholic", "sy":"2018-2019"}'), //Academic Information 'platforms' => [ 'aEnrollment', 'aAdmission', 'aHeadquarter', 'aSF', 'aLibrary', 'aPageant', 'aInventory', 'aAccounting', 'aAttendance', 'aTracking', 'aGAA', 'aPoll', 'aTabulation', 'aForbidden' ], 'currentApp' => 'aHeadquarter' ], [ '_id' => new ObjectID('60265ff4573700002900097a'), 'role_id' => '6028f7713e320000f40026be', 'school_id' => '60264978b22e00009a006436', 'ern' => '6789', 'name' => 'Benedict', 'fname' => 'Benedict Earle Gabriel', 'mname_id' =>1484, 'lname_id' => 1321, 'email_verified_at' => '2020-05-16', 'email' => 'superadmin@gmail.com', 'password' => Hash::make('password'), 'position' => 'Superadmin', 'address' => json_decode('{ "country":"Philippines", "region":"REGION I (ILOCOS REGION)", "province":"ILOCOS NORTE", "municipality":"ADAMS", "brgy":"Adams (Pob.)" }'), // Permanent Address 'platforms' => [ 'aHeadquarter', 'aEnrollment', 'aAdmission', 'aSF', 'aLibrary', 'aPageant', 'aAttendance', 'aInventory', 'aAccounting', 'aTracking', 'aGAA', 'aPoll', 'aTabulation' ], 'currentApp' => 'aHeadquarter', 'profile' =>'Benedict Earle Gabriel.png' ], [ '_id' => new ObjectID('60265ff4573700002900097b'), 'role_id' => '6028f7713e320000f40026bf', 'school_id' => '60264978b22e00009a006436', 'empNum' => 100010151, 'name' => 'Thom', 'fname' => 'Thomas', 'mname_id' =>1484, 'lname_id' => 356, 'email_verified_at' => '2020-05-16', 'email' => 'admin@gmail.com', 'password' => Hash::make('password'), 'position' => 'Admin', 'address' => json_decode('{ "country":"Philippines", "region":"REGION I (ILOCOS REGION)", "province":"ILOCOS NORTE", "municipality":"ADAMS", "brgy":"Adams (Pob.)" }'), // Permanent Address 'platforms' => [ 'aHeadquarter', 'aEnrollment', 'aAdmission', 'aSF', 'aLibrary', 'aPageant', 'aAttendance', 'aInventory', 'aAccounting', 'aTracking', 'aGAA', 'aPoll', 'aTabulation' ], 'currentApp' => 'aHeadquarter', 'profile' =>'Thomas.png' ], [ '_id' => new ObjectID('60718bbdde580000250050ce'), 'role_id' => '6028f7713e320000f40026c0', 'school_id' => '60264978b22e00009a006436', 'empNum' => 100010152, 'name' => 'Channey', 'fname' => 'Channey Y\'dreo', 'lname_id' => 1156, 'mname_id' =>181, 'email_verified_at' => '2020-05-16', 'email' => 'principal@gmail.com', 'password' => Hash::make('password'), 'position' => 'Principal II', 'address' => json_decode('{ "country":"Philippines", "region":"REGION I (ILOCOS REGION)", "province":"ILOCOS NORTE", "municipality":"ADAMS", "brgy":"Adams (Pob.)" }'), // Permanent Address 'platforms' => [ 'aHeadquarter', 'aEnrollment', 'aAdmission', 'aSF', 'aLibrary', 'aPageant', 'aAttendance', 'aInventory', 'aAccounting', 'aTracking', 'aGAA', 'aPoll', 'aTabulation' ], 'currentApp' => 'aHeadquarter', 'profile' =>'Channey Y\'dreo.jpg' ], ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
Display a listing of the resource.
public function index() { $resultados = DB::table('resultados')->get(); return view('resultado.index', compact('resultados')); }
{ "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.7447426", "0.73628515", "0.73007894", "0.7249563", "0.7164474", "0.7148467", "0.71320325", "0.7104678", "0.7103152", "0.7100512", "0.7048493", "0.6994995", "0.69899315", "0.6935843", "0.6899995", "0.68999326", "0.6892163", "0.6887924", "0.6867505", "0.6851258", "0.6831236"...
0.0
-1
Show the form for creating a new resource.
public function create() { return view('resultado.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) { if($request->actualizar){ //$salidas = NotaVenta::where('fecha', '>=', $request->fechaInicial)->where('fecha', '<=', $request->fechaFinal)->get(); // return view('resultado.show', compact('salidas')); return view('resultado.show'); //return "hola"; } $salidas = NotaVenta::where('fecha', '>=', $request->fechaInicial)->where('fecha', '<=', $request->fechaFinal)->get(); // Resultado::create([ // 'nombre'=> $request->nombre, // 'fecha' => date('Y/m/d'), // 'hora' => date('H:i:s'), // ]); // $ventas = DB::table('nota_compras')->get(); // $compras = DB::table('nota_ventas')->get(); // //, compact('salidas', 'compras', 'ventas') return $salidas; // return "darwin"; }
{ "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(Resultado $resultado) { return view('resultado.show' ); }
{ "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.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit(Resultado $resultado) { return view('resultado.edit'); }
{ "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.7854417", "0.7692986", "0.72741747", "0.72416574", "0.7173436", "0.706246", "0.70551765", "0.698488", "0.6948513", "0.694731", "0.69425464", "0.6929177", "0.6902573", "0.6899662", "0.6899662", "0.6878983", "0.6865711", "0.6861037", "0.6858774", "0.6847512", "0.6836162", ...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Resultado $resultado) { // }
{ "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(Resultado $resultado) { $resultado->delete(); return redirect()->route('resultados.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
Test that the sanitized css matches a known good version
public function test_css_was_sanitized() { $unsanitized_css = file_get_contents( __DIR__ . '/unsanitized.css' ); $known_good_sanitized_css = file_get_contents( __DIR__ . '/sanitized.css' ); $maybe_sanitized_css = sanitize_unsafe_css( $unsanitized_css ); $this->assertEquals( $maybe_sanitized_css, $known_good_sanitized_css ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function safecss_filter_attr($css, $deprecated = '')\n {\n }", "function cleanStyleInformation($string) {\r\n\t\t$string = str_replace('&nbsp;', ' ', $string);\r\n\t\t$string = str_replace('&quot;', \"'\", $string);\r\n\t\t$string = ReTidy::decode_for_DOM_character_entities($string);\r\n\t\t/* // 2011-11-2...
[ "0.62958", "0.61226946", "0.6118173", "0.6066739", "0.6029883", "0.5999646", "0.5948778", "0.59352994", "0.5889052", "0.57163066", "0.55703104", "0.5520725", "0.55170554", "0.54799986", "0.54263294", "0.53980327", "0.53788733", "0.5351177", "0.53320503", "0.5310577", "0.52976...
0.8243286
0
Run the database seeds.
public function run() { User::truncate(); DB::table('role_user')->truncate(); $adminRole = Role::where('name', 'admin')->first(); $admin = User::create([ 'name' => 'Admin', 'email' => 'admin@admin.com', 'password' => Hash::make('secretAdmin'), 'country_code' => '0090', 'mobile' => '5510711558', 'discount_code' => 'admin01', 'status' => 'Active', 'created_at' => date('Y-m-d H:i'), 'updated_at' => date('Y-m-d H:i') ]); $admin->roles()->attach($adminRole); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.80140394", "0.7980541", "0.79775697", "0.79547316", "0.79514134", "0.79500794", "0.79444957", "0.794259", "0.79382807", "0.7937482", "0.7934376", "0.7892533", "0.7881253", "0.78794724", "0.7879101", "0.7875628", "0.787215", "0.7870168", "0.78515327", "0.7850979", "0.784195...
0.0
-1
this creates the divs for the summary fields
function createSummaryDivs($numRows, $groupType) { for ($i = 1; $i <= $numRows; $i++) { $divs .= "<div id=\"$i$groupType\"></div>\n"; } return $divs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildPaneSummary();", "function show() {\n global $post;\n \t\t/**\n\t\t * Use nonce for verification.\n\t\t */\n echo '<input type=\"hidden\" name=\"weddingvendor_meta_box_nonce\" value=\"', wp_create_nonce(basename(__FILE__)), '\" />';\n echo '<table class=\"form-table\">...
[ "0.59962493", "0.59763706", "0.58714974", "0.5822382", "0.5802656", "0.57680917", "0.573524", "0.5723683", "0.56696504", "0.56693673", "0.5666097", "0.5644782", "0.5620018", "0.5618954", "0.55702794", "0.5554211", "0.5536003", "0.55055", "0.5488495", "0.5485995", "0.548042", ...
0.6125534
0