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
Add a text to the navbar.
public function text ($text, $options = []) { $tag = $this->_extractOption ('tag', $options, 'p') ; $options = $this->addClass ($options, 'navbar-text') ; $text = preg_replace_callback ('/<a([^>]*)?>([^<]*)?<\/a>/i', function ($matches) { $attrs = preg_replace_callback ('/class="...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add( $text ) {\n\t\t$this->page->append( $text );\n\t}", "function navbar()\r\n {\r\n }", "function printItemNavbar( $text, $link, $actual, $index ) {\n\n // seta a classe\n $cl = $index == $actual ? 'active' : '';\n\n // imprime o item\n echo \"<a href='\".site_url( $link ).\...
[ "0.61842436", "0.6087025", "0.60653627", "0.60146594", "0.5924701", "0.58487624", "0.5842211", "0.5810246", "0.5786524", "0.578005", "0.57748324", "0.575047", "0.57363844", "0.57216185", "0.56886643", "0.5604146", "0.55924135", "0.55720085", "0.5536469", "0.5516573", "0.55043...
0.62489104
0
Add a serach form to the navbar.
public function searchForm ($model = null, $options = []) { $align = $this->_extractOption ('align', $options, 'left') ; unset ($options['align']) ; $options = $this->addClass($options, ['navbar-form', 'navbar-'.$align]) ; return $this->Form->searchForm($model, $options) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addForm() {\n $this->view->displayForm();\n }", "function add_search_form($items, $args) {\nif( $args->theme_location == 'menu-principal' )\n\t $items .= '<li class=\"search\">\n\t\t\t\t\t<a class=\"search_icon\">\n\t\t\t\t\t\t<span class=\"spicewpsearch_icon\"></span>\n\t\t\t\t\t</a>...
[ "0.6047477", "0.58284336", "0.5738976", "0.56589955", "0.5631364", "0.56055796", "0.5585889", "0.55814785", "0.5566831", "0.55440766", "0.55274457", "0.5517016", "0.5504683", "0.5503433", "0.5472094", "0.54703414", "0.54465395", "0.5439266", "0.5425039", "0.542043", "0.541876...
0.5033412
86
Start a new menu, 2 levels: If not in submenu, create a dropdown menu, oterwize create hover menu.
public function beginMenu ($name = null, $url = null, $options = [], $linkOptions = [], $listOptions = []) { $res = ''; if ($this->_level == 0) { $options = is_array($name) ? $name : [] ; $options = $this->addClass ($options, ['nav', 'navbar-nav']); $res = $this->Html...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create_menu() {\n\t\tif ( get_network()->site_id !== get_current_blog_id() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//create new top-level menu\n\t\tadd_management_page(\n\t\t\t__( 'Sync newsletter', 'elemarjr' ),\n\t\t\t__( 'Sync newsletter', 'elemarjr' ),\n\t\t\t'manage_options',\n\t\t\t'sync-newsletter'...
[ "0.7365579", "0.67719513", "0.66532713", "0.6630727", "0.66284615", "0.65678376", "0.65408057", "0.6528235", "0.6496008", "0.6481294", "0.6475736", "0.64552546", "0.6430498", "0.6388561", "0.63588446", "0.63503534", "0.63491124", "0.6340017", "0.6320309", "0.6319807", "0.6304...
0.0
-1
Find category by ID.
public static function findByID($categoryID) { return self::where('categoryID', $categoryID)->first(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find($id)\n {\n return Category::findOrFail($id);\n }", "public function find($id): ?Category\n {\n return $this->model->find($id);\n }", "public function find($id)\n {\n try {\n return $this->category->find($id);\n } catch (Exception $e) {\...
[ "0.79099834", "0.77596533", "0.7722687", "0.7716146", "0.7690174", "0.75676817", "0.75472206", "0.74986047", "0.7488659", "0.74852705", "0.74188745", "0.735168", "0.73232484", "0.7305042", "0.72833675", "0.72822237", "0.7275362", "0.7258605", "0.72245276", "0.7212937", "0.718...
0.67457294
47
Find by category by slug
public static function findBySlug($categorySlug) { return self::where('slug->'.App::getLocale(), $categorySlug)->first(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findBySlugWithCategory($slug);", "public function findCategoryBySlug($slug);", "public function findBySlugWithCategoryAndTags($slug);", "function get_category_by_slug($slug)\n {\n }", "public function findBySlug($slug)\n {\n return Category::where('slug', $slug)\n ...
[ "0.85779524", "0.8359779", "0.74517024", "0.7445335", "0.7254354", "0.7177294", "0.71389866", "0.6980511", "0.6980511", "0.69639444", "0.69639444", "0.69639444", "0.69639444", "0.69639444", "0.679315", "0.6772538", "0.6700671", "0.6591197", "0.6553535", "0.6538956", "0.651054...
0.6629845
17
Find category by Post Type.
public static function findByPostType($postTypeSlug) { $postType = PostType::findBySlug($postTypeSlug); if($postType) { return self::where('postTypeID', $postType->postTypeID)->get(); } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function category(PostType $postType, Category $category)\n\t{\n\t\t\n\t\t MetaTag::setTitle($postType->title.\" - \".$category->title);\n MetaTag::setDescription($postType->description);\n MetaTag::setKeywords($postType->title);\n MetaTag::setFacebookTags([\n \t'title' => $p...
[ "0.64634806", "0.6253032", "0.6196113", "0.61755913", "0.5980419", "0.5965445", "0.59566706", "0.58833754", "0.58646864", "0.58084184", "0.5759454", "0.57170665", "0.5703813", "0.562897", "0.5618032", "0.561225", "0.5590744", "0.55857503", "0.5565525", "0.5565525", "0.5554727...
0.0
-1
Check if a category has posts.
public static function hasPosts($postType, $categoriesID) { if(DB::table(categoriesRelationTable($postType))->where('categoryID', $categoriesID)->count() ) { return true; }else{ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function has_posts() {\n\tif(($posts = IoC::resolve('posts')) === false) {\n\t\t$params['sortby'] = 'id';\n\t\t$params['sortmode'] = 'desc';\n\t\t\n\t\t$posts = Posts::list_all($params);\n\t\tIoC::instance('posts', $posts, true);\n\t}\n\t\n\treturn $posts->length() > 0;\n}", "public function hasPosts()\n\t{\n\t\...
[ "0.7438177", "0.7354948", "0.7157183", "0.7088383", "0.6971919", "0.69513637", "0.65975", "0.65319705", "0.6494458", "0.6474757", "0.6469547", "0.6413939", "0.6391314", "0.63445693", "0.6333965", "0.631355", "0.62695825", "0.6237783", "0.6194921", "0.6171557", "0.61671627", ...
0.6919697
6
Checks if a category is part of a menulink.
public static function isInMenuLinks($categoriesID) { $isInMenulinks = MenuLink::where('belongsToID', $categoriesID)->where('belongsTo', 'category')->count(); if ($isInMenulinks) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_category($category = '')\n {\n }", "function is_linked_category($category) {\r\n switch($category) {\r\n case 99999:\r\n case 99998:\r\n return true;\r\n }\r\n return false;\r\n }", "private function hasCategoryLinks() ...
[ "0.69045794", "0.68995816", "0.68143946", "0.6629379", "0.6563836", "0.6525694", "0.6268241", "0.6144462", "0.60889053", "0.5977813", "0.5943808", "0.59219265", "0.59155315", "0.5886372", "0.58811915", "0.58677614", "0.5846663", "0.58392215", "0.5788265", "0.5781857", "0.5731...
0.6082542
9
Add a category to a Menu.
public function addToMenu(Menu $menu) { if($this->postTypeID) { $data = [ 'menuID' => $menu->menuID, 'belongsToID' => $this->categoryID, 'belongsTo' => 'category', 'params' => $this->menuLinkParameters(), 'routeName'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add(Category $category);", "static function add_category($menu_params) {\n\n // requiered parameters\n self::check_params(__CLASS__, __FUNCTION__, $menu_params, array(\n 'title' => 'Param is requiered!',\n 'category_id' => 'Param is requiered! - this is the cat...
[ "0.70198417", "0.6900577", "0.6898877", "0.6847829", "0.66013134", "0.649265", "0.6484575", "0.6368133", "0.6361709", "0.6335254", "0.63196987", "0.6319349", "0.6315013", "0.63022584", "0.6286297", "0.62793344", "0.62701535", "0.6263611", "0.6245445", "0.61762744", "0.6144288...
0.5819434
52
Update category paremeters in MenuLink.
public static function updateMenulink($category) { if(self::isInMenuLinks($category->categoryID)) { $menuLinks = MenuLink::where('belongsToID', $category->categoryID)->where('belongsTo', 'category')->get(); foreach($menuLinks as $menuLink){ $menuLink->params = $catego...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateCategory()\n {\n Category::findOrFail($this->category_id)->update([\n 'category_name' => $this->categoryName,\n 'slug' => Str::slug($this->categoryName),\n 'class' => $this->class,\n\n ]);\n }", "function update_category_detail($siteD...
[ "0.6637239", "0.6608738", "0.6410886", "0.6363308", "0.6350768", "0.6263358", "0.62329215", "0.61355865", "0.610269", "0.60900724", "0.6084934", "0.6017539", "0.59868145", "0.5952465", "0.5940639", "0.5927756", "0.59276575", "0.5925042", "0.5905844", "0.58961517", "0.58833265...
0.7517595
0
Make parent child tree. (every category has a children array that contains his children).
public function makeChildrenTree($categories) { $tmp = []; foreach ($categories as $key => $category){ if(!key_exists('children', $category)) { $category->children = []; } // get children $children = $this->getChildren($category->categ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildParentsChildrenCategoriesHierarchy(): array\n {\n $categoriesDepths = $this->buildCategoriesDepths();\n $parentsChildrenDtos = [];\n $skippedCategoriesIds = [];\n\n foreach( $categoriesDepths as $categoryId => $depth ){\n\n $category = $this->ap...
[ "0.69632053", "0.68126905", "0.6769302", "0.66860455", "0.6643269", "0.6547215", "0.6450639", "0.64326674", "0.6418922", "0.64078414", "0.6407712", "0.6407447", "0.63696295", "0.6342336", "0.6326364", "0.6314725", "0.62747955", "0.6270214", "0.6259589", "0.6258637", "0.625619...
0.6209499
22
Get children of a category.
public function getChildren($parentID) { $tmp = []; foreach($this->categoryList as $key => $item){ if($item->parentID == $parentID) { $tmp[] = $item; } } return $tmp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getChildren() {\n\t\t$children = $this->categoryRepository->findAllChildren($this);\n\t\treturn $children;\n\t}", "public function getChildrensOf(CategoryInterface $category);", "public function getChildren()\n {\n $query = 'SELECT category_id FROM '. \\rex::getTablePrefix() .'d2u_mac...
[ "0.8179889", "0.7935016", "0.7770446", "0.7430902", "0.74063325", "0.73630244", "0.72989", "0.71102756", "0.7095638", "0.70528847", "0.7021155", "0.6986702", "0.69866234", "0.69525886", "0.6886143", "0.6864314", "0.68403125", "0.678981", "0.6710297", "0.6689161", "0.6688728",...
0.0
-1
Get all children tree of a parent.
public function getAllChildren($parentID) { $children = $this->getChildren($parentID); foreach ($children as $key => $child){ $this->categoriesToBeDeleted[$child->categoryID] = $child; $this->getAllChildren($child->categoryID); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function childrenRecursive()\n {\n return $this->children()->with('childrenRecursive');\n }", "public function childrenRecursive()\n {\n return $this->children()->with('childrenRecursive');\n }", "public function childrenRecursive()\n\t\t{\n\t\t\treturn $this->children()->with(...
[ "0.7453203", "0.7453203", "0.73830986", "0.72617626", "0.712919", "0.699496", "0.6988644", "0.69607943", "0.69370115", "0.6924143", "0.69212365", "0.6914096", "0.69106394", "0.6815943", "0.68080294", "0.67347986", "0.67284364", "0.67167115", "0.66863865", "0.66629815", "0.663...
0.62622577
71
Delete List of children.
public function deleteChildren(int $parentID, int $postTypeID) { $this->categoryList = self::where("postTypeID", $postTypeID)->get(); $this->getAllChildren($parentID); foreach($this->categoriesToBeDeleted as $cat){ // Post type should not be able to be deleted if it has posts ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function deleteChildren() {}", "public function deleteChildren(){\n $this->publicEnvironments()->delete();\n $this->privateEnvironments()->delete();\n $collections = Collection::where('project_id', $this->id)->get();\n\n foreach($collections as $collection){\n $collection->items()->del...
[ "0.8265445", "0.69849056", "0.69409126", "0.6756809", "0.65416926", "0.64437217", "0.64293283", "0.63052094", "0.6276008", "0.6245703", "0.62349564", "0.62146646", "0.61176044", "0.61090916", "0.60901797", "0.5929997", "0.59270346", "0.59261876", "0.5921347", "0.590726", "0.5...
0.55096513
54
Passes through all unknown calls onto the translator object.
public function __call($method, array $arguments) { $translator = $this->translator; $arguments = array_values($arguments); return $translator->$method(...$arguments); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function translator();", "private static function translator()\n {\n $files = ['Lang', 'Smiley'];\n $folder = static::$root.'Translator'.'/';\n\n self::call($files, $folder);\n\n $files = ['LanguageKeyNotFoundException', 'LanguageNotSupportedException'];\n ...
[ "0.67321956", "0.63414496", "0.6035033", "0.58905435", "0.58905435", "0.58658653", "0.5569538", "0.5551975", "0.5447768", "0.53850377", "0.53777415", "0.53148925", "0.52503395", "0.5223702", "0.5218721", "0.51916164", "0.51847345", "0.5177293", "0.5167865", "0.5056502", "0.50...
0.53125685
12
Function to run and test the program and print result to user
function queAna() { //creating new queue object $que = new Queue(); //getting prime no till 1000 $arr = getprime(1000); //checking prime numbers which are anagrams for ($i = 0; $i < count($arr); $i++) { for ($j = 0; $j < count($arr); $j++) { if ($i != $j) { /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run () {\r\n print \"\\n\";\r\n \r\n # Console spacing.\r\n foreach ( $this->tests as $test ) {\r\n if ( strlen( $test->name() ) > $this->longest_test_name_length )\r\n $this->longest_test_name_length = strlen( $test->name() );\r\n }\r\n ...
[ "0.6622198", "0.64429367", "0.64374435", "0.64324236", "0.63996875", "0.6388307", "0.6387756", "0.63232356", "0.62800866", "0.6198522", "0.6187246", "0.6143965", "0.6138922", "0.6130047", "0.61214525", "0.609882", "0.6098816", "0.6098087", "0.60899806", "0.608206", "0.6032243...
0.0
-1
Function to get the prime no in given range
function getprime($range) { //array to store prime no $prime = []; //variacle to set index $count = 0; for ($i = 2; $i < $range; $i++) { if (Utility::isprime($i)) { $prime[$count++] = $i; } } return $prime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Prime($n)\n{\n for($i=2; $i<$n; $i++)\n {\n if($n %$i ==0)\n\t {\n\t\t return 0;\n\t\t }\n }\n return 1;\n }", "function nprimo($n)\n {\n $primo=true;\n \n $i=2;\n while (($i< $n) & ($primo)){\n \n ...
[ "0.69071966", "0.67448616", "0.67437106", "0.67326856", "0.66097903", "0.65374184", "0.65290624", "0.64302117", "0.63991004", "0.6395262", "0.63912475", "0.6283297", "0.6210576", "0.61942106", "0.61900896", "0.61777586", "0.6157207", "0.61298525", "0.60897315", "0.6080911", "...
0.8158945
0
Denies setting an id of an immutable record. Throws an exception.
public function setId($id): void { throw new RecordException('Cannot change an id of an immutable record.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_id($id)\n\t{\n\t\t//set the id of the actual object. Nobody should do this.\n\t\treturn NOT_ALLOWED;\n\t}", "function setId($id) {\r\n\t\t// Set id and wipe data\r\n\t\t$this->_id = $id;\r\n\t}", "function setId($value){\n\t\t//echo \"setting ID to \".$value;\n\t\t$this->_id=$value;\n\t\t//echo \"...
[ "0.69752294", "0.6176088", "0.611316", "0.61036444", "0.60163367", "0.60119945", "0.5965352", "0.5958886", "0.5958886", "0.59584004", "0.5954457", "0.5951824", "0.59479004", "0.591563", "0.59006", "0.5877104", "0.58539987", "0.58493304", "0.58438617", "0.5839176", "0.58342767...
0.78829277
0
Performs general cleaning functions on data
private function sanitize_random($input) { $one = trim($input); $two = stripslashes($one); $return = htmlspecialchars($two); return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sanitiseData(): void\n {\n $this->firstLine = self::sanitiseString($this->firstLine);\n self::validateExistsAndLength($this->firstLine, 1000);\n $this->secondLine = self::sanitiseString($this->secondLine);\n self::validateExistsAndLength($this->secondLine, 1000);\n ...
[ "0.74333286", "0.7266174", "0.72291124", "0.7168278", "0.7124011", "0.705292", "0.6949787", "0.6888589", "0.6854102", "0.6851812", "0.68398815", "0.6827839", "0.6826571", "0.68038094", "0.68038094", "0.68038094", "0.68038094", "0.68038094", "0.676772", "0.6760442", "0.6735087...
0.0
-1
Validates a phone number
private function sanitize_phone($phone) { if (empty($phone)) { return false; } if (preg_match('/^[+]?([0-9]?)[(|s|-|.]?([0-9]{3})[)|s|-|.]*([0-9]{3})[s|-|.]*([0-9]{4})$/', $phone)) { return trim($phone); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validate_phone_number($phone)\n\t\t{\n\t\t\t// Allow +, - and . in phone number\n\t\t\t$filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\n\t\t\t// Remove \"-\" from number\n\t\t\t$phone_to_check = str_replace(\"-\", \"\", $filtered_phone_number);\n\t\t\t// Check the lenght of number...
[ "0.826107", "0.8146867", "0.80432236", "0.7989112", "0.7952532", "0.7930814", "0.7906691", "0.7869428", "0.782557", "0.78233105", "0.77366245", "0.7669982", "0.76321816", "0.76309514", "0.7517778", "0.7479392", "0.745683", "0.74535406", "0.7453168", "0.74396807", "0.74049157"...
0.6798838
66
Sets the data class variable
public function set_data($data) { $this->data = $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function setData($data) {}", "public function setData($data)\n {\n $this->_data = $data;\n }", "public function setData() {\n\t\t$this->import($this->get());\n\t}", "function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "function setData($data)\n\t{\n\t\t$this->data = ...
[ "0.70790046", "0.6990115", "0.68945223", "0.6881957", "0.6881957", "0.6881957", "0.6851844", "0.68491364", "0.6822401", "0.6807914", "0.67924696", "0.67772025", "0.67764556", "0.6773775", "0.67635477", "0.67623335", "0.67514896", "0.67304325", "0.67304325", "0.67304325", "0.6...
0.6648333
25
Sets the type class variable
public function set_type($type) { $check = ''; if (empty($type)) { $check = new WP_Error('forgot_type', __('Specify the data type to sanitize.', $this->plugin_name)); } if (is_wp_error($check)) { wp_die($check->get_error_message(), __('Forgot...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set($typeId, $class);", "function setType($type) {\n\t\t$this->_type = $type;\n\t}", "function setType($type) {\n\t\t$this->_type = $type;\n\t}", "public function setClass($class);", "public function setClass($class){\n $this->_class = $class;\n }", "function setType($type) {\n ...
[ "0.7236561", "0.69025236", "0.69025236", "0.68611073", "0.6805492", "0.6773723", "0.6699411", "0.66067976", "0.65672505", "0.65672505", "0.65672505", "0.6550795", "0.654392", "0.6508318", "0.64956826", "0.6479973", "0.6479973", "0.6477879", "0.64739853", "0.646793", "0.646793...
0.0
-1
Create a new GET request with the required parameters
public function get_user_info(OAuth_Consumer $consumer, OAuth_Token $token) { $url = 'https://api.linkedin.com/v1/people/~:(id,first-name,last-name,headline,member-url-resources,picture-url,location,public-profile-url)'; $request = OAuth_Request::forge('resource', 'GET', $url, array( 'oauth_consumer_key' => $co...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGetRequest(): ParameterBag { return $this->get; }", "private function newRequest($queryString= '') {\n return new Request(new TestInput('GET', '/'.$queryString));\n }", "public function & GetRequest ();", "private function initGetRequest()\n {\n $this\n ->addCurlOp...
[ "0.6881905", "0.67728555", "0.6693427", "0.66574484", "0.66235125", "0.66087985", "0.65796006", "0.64358807", "0.64358807", "0.64358807", "0.64358807", "0.64358807", "0.64358807", "0.64358807", "0.64358807", "0.6405585", "0.6402044", "0.6401777", "0.6391412", "0.63656855", "0...
0.0
-1
Instantiates the Model and Load classes
function __construct() { $this->load = new Load(); $this->model = new Model(); $this->home(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function init() {\n\t\tcore::loadClass(\"database\");\n\n\t\t/* Child tables */\n\t\tcore::loadClass(\"doorkey_model\");\n\t\tcore::loadClass(\"key_history_model\");\n\t}", "public function __construct() {\n $this->load = new Load();\n $this->model = new Model();\n }", "pu...
[ "0.74059755", "0.73941755", "0.7359586", "0.7278778", "0.7209426", "0.7067413", "0.7043376", "0.70078754", "0.6996288", "0.6994316", "0.69548005", "0.69172853", "0.68836665", "0.686296", "0.6830915", "0.681001", "0.6793108", "0.6773899", "0.67595494", "0.6750379", "0.6749394"...
0.64407235
73
Function that displays the view
function home() { $data = $this->model->user_info(); $this->load->view('mainView.php', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display()\n \t{\n \t\t$this->assign(\"__view\", $this->_view);\n \t\tparent::display();\n \t}", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function view()\n\t{\n\t\t// TODO Implement\t\n\t}", "public function actionView()\n\t{\n\t\t$this->r...
[ "0.8342671", "0.822674", "0.8211723", "0.8069244", "0.80444956", "0.80033183", "0.78948283", "0.78610516", "0.7820675", "0.77964765", "0.77833325", "0.7716576", "0.77064896", "0.76971924", "0.76970154", "0.76818407", "0.7680434", "0.7663264", "0.7663264", "0.76576406", "0.765...
0.0
-1
function for connecting to the database
function db_connect() { // Requiring the configuration file that holds the config data for connection require 'config.php'; try { $conn = new PDO("mysql:host=localhost;dbname=packsave", $config['DB_USER'], $config['DB_PASS']); $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } cat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function connectToDB() {}", "public function connect_db() {\n }", "public function connectDB() {}", "function connectDB();", "private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConn...
[ "0.8563752", "0.8514852", "0.85057884", "0.8452861", "0.83215505", "0.81249756", "0.80927604", "0.80416805", "0.80143887", "0.80126905", "0.7918791", "0.79169834", "0.7894085", "0.7870125", "0.78358555", "0.78251123", "0.7819531", "0.7817315", "0.7799797", "0.7794364", "0.778...
0.7622392
50
create the base and utility objects available to all models on model creation
public function __construct($admin = false) { $this->viewModel = new ViewModel(); if ($admin) { $this->adminViewData(); } else { $this->commonViewData(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function modelFactory();", "public function __construct()\n {\n $this->imageModel = new ImageModel();\n $this->userModel = new User();\n $this->psychologySupervisorModel = new PsychologySupervisor();\n $this->registerSupervisionModel = new RegisterSupervision();\...
[ "0.7049846", "0.68978715", "0.67930514", "0.6676647", "0.66736394", "0.66590863", "0.66406536", "0.6628065", "0.6504332", "0.6490862", "0.64901084", "0.64821476", "0.6467209", "0.64057404", "0.640281", "0.6331941", "0.62703705", "0.6230316", "0.6227217", "0.62157494", "0.6211...
0.0
-1
establish viewModel data that is required for all views in this method (i.e. the main template)
protected function commonViewData() { //print "Hello"; $this->viewModel->set("mainMenu", array("Home" => "home", "Help" => "help")); $this->viewModel->set("Basepath", "http://localhost/~georginfanger/georginfanger/"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewMain() {\n\t$view = new viewModel();\n\t$view->showMain();\t\n}", "private function init()\n\t{\n\t\tif(! $this->authUser = $this->auth->check_login()){\n\t\t\t$this->authUser->logged = false;\n\t\t}\n\t\t// Fill user object in view \n\t\t$this->data['authUser'] = $this->authUser;\n\n\t\t$this->data...
[ "0.6096046", "0.6082561", "0.60815376", "0.6061246", "0.6057159", "0.6035722", "0.5986987", "0.59405184", "0.59213686", "0.5908973", "0.584889", "0.58116674", "0.5791383", "0.5791383", "0.57855886", "0.5781217", "0.5704285", "0.56600296", "0.5655404", "0.56357574", "0.5629549...
0.725214
0
Upload a new image to sandbox
public function uploadImageAction(Request $request) { /** @var UploadedFile $uploadedFile */ $uploadedFile = $request->files->get('file'); $file = new TemporaryFile($uploadedFile); /** @var EventDispatcher $eventDispatcher */ $eventDispatcher = $this->get('event_dispatcher'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function upload(): void\n {\n // check if we have an old image\n if ($this->oldFileName !== null) {\n $this->removeOldFile();\n }\n\n if (!$this->hasFile()) {\n return;\n }\n\n $this->writeFileToDisk();\n\n $this->file = null;\n }"...
[ "0.6708627", "0.6414703", "0.63920164", "0.63920164", "0.63920164", "0.63920164", "0.63920164", "0.63920164", "0.6367539", "0.6367539", "0.6361794", "0.6354018", "0.6335886", "0.6326576", "0.6317613", "0.6305418", "0.6300573", "0.62887806", "0.62669593", "0.62623256", "0.6249...
0.0
-1
Delete a temporary file from sandbox and only sandbox
public function deleteAction(Request $request) { $path = $request->query->get('path'); try { $this->get('event_dispatcher')->dispatch(Events::TEMPORARY_FILE_DELETED_EVENT, new TemporaryFileDeletedEvent($path)); } catch (\Exception $e) { return new JsonResponse(array(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function deleteTempFile() {\n if ($this->datastreamInfo['content']['type'] == 'file' && $this->copied == TRUE) {\n unlink($this->datastreamInfo['content']['content']);\n }\n }", "private function deleteTemporaryFiles()\n {\n foreach ($this->temp as $file) {\n if (file_exi...
[ "0.7579932", "0.71778834", "0.7138377", "0.7137036", "0.696946", "0.6796721", "0.67330676", "0.6643069", "0.66374284", "0.657344", "0.6569541", "0.6506225", "0.6495539", "0.64552075", "0.6432344", "0.63925606", "0.6363795", "0.6350411", "0.6322465", "0.6297972", "0.6296432", ...
0.0
-1
Helper to have an array of all messages
protected function serializeViolations(ConstraintViolationListInterface $violations) { $messages = array(); foreach ($violations as $violation) { $messages[] = $violation->getMessage(); } return $messages; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllMsg() : array\n {\n return $this->messages;\n }", "public function getMessages(): array;", "public function getMessages(): array;", "public function getMessages(): array;", "public function all(): array\n {\n return $this->messages;\n }", "public function g...
[ "0.8482941", "0.8469884", "0.8469884", "0.8469884", "0.83735514", "0.82345134", "0.82345134", "0.82345134", "0.82345134", "0.82345134", "0.82345134", "0.82345134", "0.8199286", "0.81387866", "0.81387866", "0.8055821", "0.8050517", "0.802687", "0.802687", "0.802687", "0.802687...
0.0
-1
Stored routine with designation type map must return an array.
public function test1() { $map = $this->dataLayer->tstTestMap1(100); $this->assertInternalType('array', $map); $this->assertCount(3, $map); $this->assertEquals(1, $map['c1']); $this->assertEquals(2, $map['c2']); $this->assertEquals(3, $map['c3']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTypes(): array;", "public function getTypes(): array;", "#[Pure]\n\tpublic function getTypes()\n {\n }", "public function creataTypeArray()\n\t{\n\t\t$this->db->creataTypeArray();\n\t}", "public function __invoke() : array;", "public function __invoke() : array;", "public funct...
[ "0.6544251", "0.6544251", "0.6448956", "0.6383722", "0.6184032", "0.6184032", "0.6164517", "0.6130299", "0.6116017", "0.60268736", "0.60176975", "0.6003087", "0.59171027", "0.5907994", "0.58354706", "0.57747835", "0.5758925", "0.57138205", "0.56934845", "0.56919014", "0.56919...
0.0
-1
Stored routine with designation type map must return an empty array when no rows are selected.
public function test2() { $rows = $this->dataLayer->tstTestMap1(0); $this->assertInternalType('array', $rows); $this->assertCount(0, $rows); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function PgGetArraySelect(){\n if ($this->SQuery){\n if (pg_num_rows($this->SQuery)){\n return pg_fetch_all($this->SQuery); \n }else{\n return Array();\n }\n \n } else {\n die(\"NO Existe Consulta SELECT Va...
[ "0.6189226", "0.61876917", "0.6186371", "0.61021084", "0.6071037", "0.59617054", "0.59109676", "0.58570224", "0.5828386", "0.5791816", "0.57838017", "0.5776742", "0.57688", "0.57433486", "0.5742774", "0.57050025", "0.5656355", "0.56465846", "0.56465846", "0.5638546", "0.56283...
0.0
-1
Verify the authentication for a user.
public function testAuth() { /** @var \Drupal\users_jwt\UsersJwtKeyRepositoryInterface $key_repository */ $key_repository = $this->container->get('users_jwt.key_repository'); /** @var \Drupal\Core\Extension\ExtensionPathResolver $path_resolver */ $path_resolver = $this->container->get('extension.path.re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function doVerification() {\n $this->validate ( $this->request, $this->getRules () );\n $user = $this->_user->where ( StringLiterals::EMAIL, $this->decodeParam ( $this->request->user ) )->where ( 'otp', $this->request->otp )->first ();\n if (count ( $user ) > 0) {\n Auth::log...
[ "0.74501073", "0.71702045", "0.7142579", "0.70298433", "0.69589067", "0.6958328", "0.69259673", "0.68833214", "0.6811452", "0.6781231", "0.67470074", "0.6729156", "0.67122096", "0.67099416", "0.66835546", "0.66835546", "0.6677922", "0.6642837", "0.66400105", "0.663029", "0.66...
0.0
-1
Test a combination of user ID type and value as the claim.
protected function dotestAuth(string $id_type, string $id_value, string $module_path) { $iat = \Drupal::time()->getRequestTime(); $good_payload = [ 'iat' => $iat, 'exp' => $iat + 1000, 'drupal' => [ $id_type => $id_value, ], ]; $path = $module_path . '/tests/fixtures/user...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function val_user_identity($value) {\n $value = strtolower($this->input->prepare_user_identity_phone($value));\n if (empty($value)) return false;\n\n $this->load->model('user_model');\n if ($this->user_model->is($value) || $this->user_model->is_dod($value)) return false;\n \n return true;\n }", "fun...
[ "0.63037914", "0.6011664", "0.57577765", "0.57464755", "0.57295203", "0.56439453", "0.56439453", "0.5551737", "0.5490112", "0.54703146", "0.54371774", "0.5353186", "0.53392076", "0.53300005", "0.53179073", "0.52988803", "0.5255845", "0.5255643", "0.5235468", "0.52289945", "0....
0.5595652
7
Create a request with UsersJwt authorization header.
protected function createRequest($header_name, $token): Request { $request = Request::create('/'); $request->headers->set($header_name, 'UsersJwt ' . $token); return $request; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createNewRequest()\n { \n return $this->clientManager->createNewRequest('user');\n }", "public function generate_jwt_token($request) {\n \t$jwt = new Jwt_Auth_Public( 'jwt-auth', '1.1.0' );\n \treturn $jwt->generate_token($request);\n }", "public function ...
[ "0.6171909", "0.59389013", "0.5937782", "0.5822697", "0.57804376", "0.57697195", "0.5762346", "0.573369", "0.56888425", "0.56774914", "0.56774914", "0.56142706", "0.55928224", "0.55868185", "0.5564341", "0.55626774", "0.55427176", "0.55412066", "0.55345464", "0.55021286", "0....
0.65883183
0
Run the database seeds.
public function run() { factory(OauthClient::class,1)->create(); }
{ "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() { return view('User.notifications.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
translator ready mail ready addnews ready
function findgem_getmoduleinfo(){ $info = array( "name"=>"Find Gems", "version"=>"1.1", "author"=>"Eric Stevens", "category"=>"Forest Specials", "download"=>"core_module", ); return $info; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addNews($subj,$message,$un) \n{\n\tglobal $DB, $Core, $lang;\n if(!$subj | !$message)\n\t{\n\t\toutput_message('validation', $lang['field_left_blank']);\n\t}\n\telse\n\t{\n\t\t$post_time = time();\n\t\t$sql = \"INSERT INTO mw_news(title, message, posted_by, post_time) VALUES('\".mysqli_real_escape_str...
[ "0.60821956", "0.6044135", "0.6018612", "0.5988313", "0.5932511", "0.5881662", "0.58302015", "0.5825458", "0.5799679", "0.57918113", "0.5788206", "0.5777349", "0.57611394", "0.57611394", "0.57527363", "0.57365483", "0.57190454", "0.5717192", "0.5715659", "0.5710406", "0.56598...
0.0
-1
The cache name that should be referred to for the item. It should be unique.
public function getCacheName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cacheKey(): string {\n return self::CACHE_PREFIX . $this->id\n . ($this->revisionId ? '_r' . $this->revisionId : '');\n }", "public function cache_filename()\n {\n return $this->_name . '_' . $this->id() . '.' . $this->_type;\n }", "public function name()\n ...
[ "0.7451736", "0.7366291", "0.72203255", "0.71150684", "0.70588547", "0.70418394", "0.699582", "0.69731706", "0.69584334", "0.6934476", "0.6910383", "0.6909009", "0.6880617", "0.68594784", "0.67945385", "0.6749157", "0.6722326", "0.6696027", "0.6692169", "0.6685893", "0.666990...
0.7475258
0
The cache type of the item, such as the class name or something else.
public static function getCacheType();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCacheType(): string\n\t{\n\t\treturn $this->cacheType;\n\t}", "static protected function discoverCacheType()\n\t{\n\t\t$cache_config = Config::getInstance()->getConfig( 'cache' );\n\n\t\tif ( true !== $cache_config['active'] || !isset( $cache_config['client'] ) )\n\t\t{\n\t\t\treturn self::CAC...
[ "0.8212201", "0.7347926", "0.7108819", "0.6658575", "0.6586114", "0.654358", "0.6515891", "0.6465846", "0.63899", "0.63899", "0.63899", "0.63899", "0.63899", "0.63899", "0.63899", "0.63899", "0.63899", "0.63899", "0.6388832", "0.6388832", "0.6388832", "0.6369468", "0.6360...
0.8111389
1
Set stack trace for this span
public function addStacktrace(Stacktrace $stacktrace) { $this->stacktrace[] = $stacktrace; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setThrowable(\\Throwable $exception) : void\n {\n $this->exception = null;\n $this->throwable = $exception;\n }", "public function getColorfulText()\n {\n $output = \"\\033[1;31m--[ Agile Toolkit Exception ]---------------------------\\n\";\n $output .= get_cl...
[ "0.5554058", "0.5520527", "0.5505888", "0.5487589", "0.5484404", "0.543009", "0.543009", "0.5400799", "0.5378587", "0.5372434", "0.529956", "0.5287297", "0.5277981", "0.5267071", "0.5238786", "0.5197832", "0.51898795", "0.5161664", "0.514765", "0.51379913", "0.5121927", "0....
0.51370627
20
Set stack traces for this span
public function addStacktraces(array $stacktraces) { $this->stacktrace = $stacktraces; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function setTraceIssues(?string $level): void\n {\n self::$trace_issues = \\is_string($level) ? \\strtolower($level) : null;\n }", "public function setTraces($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\...
[ "0.5573773", "0.55255336", "0.53828454", "0.53828454", "0.52961034", "0.5267766", "0.5245591", "0.51540023", "0.5145107", "0.5124897", "0.5065407", "0.5048626", "0.503867", "0.50313044", "0.5015122", "0.5005588", "0.49872667", "0.49206713", "0.4911014", "0.4906071", "0.490016...
0.6150863
0
Get current stack straces
public function getStacktrace() { return $this->stacktrace; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStackFrameList(){\n return $this->_get(1);\n }", "public function getStack()\n {\n return $this->stack;\n }", "public function stackFrames()\n {\n return $this->stackFrames;\n }", "public function getStack(){\r\n return $this->stack;\r\n }", "pu...
[ "0.6602076", "0.6332762", "0.62920916", "0.62600565", "0.6161599", "0.61570185", "0.608657", "0.5733001", "0.57324654", "0.5681833", "0.5608143", "0.5584803", "0.5506179", "0.5482485", "0.5431837", "0.5384378", "0.5352697", "0.5320601", "0.525224", "0.52492464", "0.52435184",...
0.54636747
14
The actual compare function
public function compare(\morph\Object $objectA, \morph\Object $objectB) { $compare = null; $propertyA = (float)$objectA->{$this->propertyName}; $propertyB = (float)$objectB->{$this->propertyName}; if ($propertyA == $propertyB){ $compare = 0; }else{ $comp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function compare();", "abstract protected function _compare($val1, $val2);", "public static function compare($a,$b);", "public function getValueCompare();", "public function getComparison();", "public function comparator();", "public function compare($item);", "function cmp($a, $b) {\n ...
[ "0.90044045", "0.79739976", "0.7593064", "0.75320464", "0.7281555", "0.70871794", "0.70537275", "0.70528513", "0.69707984", "0.685085", "0.6823544", "0.681698", "0.6801732", "0.6756934", "0.6716562", "0.6596662", "0.658869", "0.65628445", "0.6549852", "0.651249", "0.6501288",...
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { $usuario = Auth::User(); //se ele e master if($usuario->tipo_usuario_id!=8){ return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }"...
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.789145...
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'txt_nome_dirigente' => 'required|min:3|max:100', 'txt_cargo_dirigente' => 'required|min:3|max:100', 'txt_cpf_dirigente' => 'required|cpf', 'txt_email_dirigente' => 'required|email|max:50', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the sche...
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.76830...
0.0
-1
This file is part of Moodle Moodle is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Moodle is distributed in the hope that it will be useful, ...
function tab($courseid, $blockid, $forum, $chatid, $groupid, $current_tab = 'description') { global $CFG; $tabs = array(); $row = array(); $inactive = array(); $activated = array(); if (!$groupid) { // Imprime o map somente se houver grupo. $inactive[] = 'map'; } $row[] = new...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emarking_tabs_markers_training($context, $cm, $emarking, $generalprogress, $delphiprogress) {\n global $CFG;\n global $USER;\n global $OUTPUT;\n // Tab's icons.\n $timeicon = $OUTPUT->pix_icon('i/scheduled', null);\n $scalesicon = $OUTPUT->pix_icon('i/scales', null);\n // Array for ta...
[ "0.60516214", "0.5771939", "0.5499494", "0.54204106", "0.536496", "0.5340804", "0.5325748", "0.52133566", "0.5121222", "0.5110195", "0.51094055", "0.50951904", "0.50829667", "0.50597686", "0.50427544", "0.5019478", "0.49688765", "0.495233", "0.4933551", "0.4931426", "0.492157...
0.6692174
0
Returns the number of rows in the result set.
public function countRows(): int { $result = $this->_getResult()->numRows(); // Returns an integer on success and an \PEAR_Error object on failure return is_int($result) ? $result : 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rowCount()\n {\n return sasql_num_rows($this->result);\n }", "function getNumRows() {\r\n\t\t\tif($this->privateVars['resultset']) {\r\n\t\t\t\tif(@mysql_num_rows($this->privateVars['resultset']))\r\n\t\t\t\t\treturn mysql_num_rows($this->privateVars['resultset']);\r\n\t\t\t}\r\n\t\t...
[ "0.87383956", "0.86342347", "0.853513", "0.84997714", "0.8485993", "0.848368", "0.8483505", "0.84724575", "0.84670234", "0.84536296", "0.8445434", "0.84350556", "0.84254295", "0.84165835", "0.84165835", "0.84165835", "0.84159964", "0.8402735", "0.8380751", "0.8377546", "0.837...
0.8635328
1
Fetch a row from the resultset. Returns the entry at index $i of the result set.
public function fetchRow(int $rowNumber) { $fetchMode = defined('MDB2_FETCHMODE_ASSOC') ? \MDB2_FETCHMODE_ASSOC : 2; $result = $this->_getResult()->fetchRow($fetchMode, $rowNumber); // Returns an array on success and an \PEAR_Error object on failure return !is_object($result) ? $result : arr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetch() {\n\t\t$this->checkResultSet();\n\t\treturn $this->fetchRowAssoc();\n\t}", "public function fetch()\n {\n $row = oci_fetch_row($this->statement);\n return $row;\n }", "protected function fetch_row()\n\t{\n\t\treturn $this->resResult->fetch(PDO::FETCH_NUM);\n\t}", "...
[ "0.73296666", "0.72471863", "0.7115753", "0.71148026", "0.7083625", "0.70492256", "0.69811034", "0.6924426", "0.6916434", "0.69108367", "0.69106585", "0.68850267", "0.6874188", "0.6841943", "0.6804316", "0.673232", "0.67134947", "0.66592777", "0.66526955", "0.6618312", "0.660...
0.0
-1
Fetch and return all rows from the result set.
public function fetchAll(): array { $fetchMode = defined('MDB2_FETCHMODE_ASSOC') ? \MDB2_FETCHMODE_ASSOC : 2; $result = $this->_getResult()->fetchAll($fetchMode); // Returns an array on success and an \PEAR_Error object on failure return is_array($result) ? $result : array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchRowset()\n\t{\n\t\t$this->_query();\n\n\t\treturn $this->stmt->fetchAll(\\PDO::FETCH_ASSOC);\n\t}", "public function fetchAll()\r\n {\r\n $this->query();\r\n return $this->sth->fetchAll();\r\n }", "public function fetchAll() {\n\n if (!$this->results) {\n\n ...
[ "0.8331557", "0.8224567", "0.80545473", "0.7929729", "0.7804775", "0.77821684", "0.77669024", "0.776528", "0.7713718", "0.76758885", "0.7666382", "0.7639692", "0.7631574", "0.76187915", "0.75597906", "0.75306714", "0.7500867", "0.7500867", "0.7500867", "0.7500867", "0.7487914...
0.0
-1
Fetch and return a column from the current row pointer position.
public function fetchColumn(int $column = 0): array { $result = $this->_getResult()->fetchCol($column); // Returns an array on success and an \PEAR_Error object on failure return is_array($result) ? $result : array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchColumn(int $column = 0);", "public function fetchColumn($columnIndex = 0);", "public function fetchColumn() {\n if ($this->result === true) {\n return false;\n }\n\n // Are we running PHP >=8.1?\n if (PHP_VERSION_ID >= 80100) {\n $value = $...
[ "0.7588229", "0.7535507", "0.7368912", "0.7349814", "0.7104362", "0.700907", "0.6980491", "0.6929551", "0.68755525", "0.68660414", "0.68551505", "0.6815733", "0.6815733", "0.68142235", "0.6810806", "0.67779076", "0.67694247", "0.67677987", "0.6733517", "0.67180616", "0.670942...
0.5903009
88
Fetch single column from the given row of the result set.
public function fetchOne(int $column = 0, int $rowNumber = 0) { $result = $this->_getResult()->fetchOne($column, $rowNumber); // Returns a string on success and an \PEAR_Error object on failure return is_scalar($result) ? $result : ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetRowColumn($row,$column){\n\t\t\treturn @mysql_result($this->result,$row,\"$column\");\n\t\t}", "public function fetchColumn(int $column = 0);", "public function fetchColumn() {\n if ($this->result === true) {\n return false;\n }\n\n // Are we running PHP >=8.1?\n ...
[ "0.7889324", "0.7539398", "0.7342854", "0.7144077", "0.69778484", "0.68681407", "0.68555975", "0.6829767", "0.671859", "0.6628352", "0.657481", "0.6499783", "0.64283055", "0.64239275", "0.64185816", "0.63999856", "0.6399425", "0.63932717", "0.63919514", "0.6365539", "0.636484...
0.62019604
36
/ A membership can have many renovations
public function Renovation(){ return $this->hasMany('renovacion','membresia_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cicleinscription_get_vacancies_remaning(){\n\t\n}", "public function invitationsRecus() {\n \n return DB::table('invitation')\n ->where('emetteur_id', $this->id)\n ->where('recepteur_id', Auth::User()->id)\n ->where('status', 0)\n ->exists();\n\n...
[ "0.5455347", "0.53481835", "0.5281724", "0.521807", "0.51331896", "0.50953597", "0.50559235", "0.50358844", "0.49756807", "0.49724904", "0.49699783", "0.49644145", "0.49586934", "0.49461773", "0.4919814", "0.48991203", "0.4887426", "0.48854008", "0.4881569", "0.48723692", "0....
0.5682586
0
/ A parent has a membership
public function Parents(){ return $this->hasOne('padre','membresia_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasParent() {}", "public function hasParent();", "public function hasParent();", "public function hasParent();", "public function hasParent()\n {\n }", "public function hasParentId(){\n return $this->_has(3);\n }", "public function isParent();", "public function isParent...
[ "0.7230965", "0.716311", "0.716311", "0.716311", "0.70236635", "0.69151527", "0.68573695", "0.6606775", "0.63333863", "0.6286975", "0.6242075", "0.6211456", "0.6193828", "0.61032355", "0.6101755", "0.6101755", "0.6101755", "0.6101755", "0.6095612", "0.60929596", "0.6088635", ...
0.5937338
35
Run the database seeds.
public function run() { DB::table('participant_types')->delete(); $records = [ ['name' => "Employee"], ['name' => "Spouse"], ['name' => "Partner"], ['name' => "Child"], ['name' => "Parent"], ['name' => "Extended Family Member"] ...
{ "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() { $event = Event::all(); return $event; }
{ "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() { // }
{ "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) { $request->validate([ 'title' =>'required|string|max:255', 'date' =>'required|date', 'time' =>'required', 'image' =>'required|file', 'description' =>'required' ]);...
{ "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(Event $event) { return new EventResource($event); }
{ "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(Event $event) { return new EventResource($event); }
{ "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) { $event = Event::findOrFail($id); $event->title = $request->title; $event->date = $request->date; $event->time = $request->time; $event->image = is_null($request->imagePath) ? $event->imagePath : 'text'; $event->descript...
{ "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(Event $event) { $event->delete(); return response()->json(null, 204); }
{ "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
Create the event listener.
public function __construct() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addRequestCreateListener($listener);", "public function onEvent();", "private function init_event_listeners() {\n\t\t// add_action('wp_ajax_example_action', [$this, 'example_function']);\n\t}", "public function listener(Listener $listener);", "protected function setupListeners()\n {\n ...
[ "0.65685207", "0.62875676", "0.6221792", "0.6197413", "0.61627764", "0.6129312", "0.6096226", "0.6056844", "0.6051069", "0.6041841", "0.596228", "0.596194", "0.5957539", "0.59439605", "0.58821785", "0.58821785", "0.5874665", "0.5864387", "0.5856076", "0.584338", "0.5824244", ...
0.0
-1
Create a new aurhentication with the endpoint.
public function __construct(MoipAuthentication $moipAuthentication, $endpoint = 'sandbox') { $this->moipAuthentication = $moipAuthentication; $this->endpoint = \Config::get('moip.url.' . $endpoint); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n // handled by client\n }", "public function create()\n {\n //Not Used because using API Route\n }", "public function create()\n {\n $this->cpAuthorize();\n }", "public function __construct()\n {\n $this->authentication = new Auth...
[ "0.5449579", "0.5421882", "0.5399548", "0.5378872", "0.5350708", "0.5335045", "0.53112507", "0.53087753", "0.5241542", "0.52339345", "0.52223057", "0.5218823", "0.52166164", "0.5208037", "0.51771176", "0.5176046", "0.5173368", "0.51728266", "0.5162047", "0.5157261", "0.515657...
0.0
-1
Create a new api connection instance.
public function createConnection(HTTPConnection $http_connection) { $http_connection->initialize($this->endpoint, true); $http_connection->addHeader('Accept', 'application/json'); $http_connection->setAuthenticator($this->moipAuthentication); return $http_connection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function api ()\n {\n return new Api($this->url, $this->port);\n }", "public function __construct() {\n if (!$this->api) {\n $this->api = new Wrapper();\n }\n }", "static public function api(): Api\n {\n return new Api;\n }", "public function __con...
[ "0.6843653", "0.6809767", "0.653734", "0.63781655", "0.6218249", "0.62134784", "0.619328", "0.617405", "0.615744", "0.6134391", "0.6134391", "0.6134391", "0.6129505", "0.612909", "0.6110133", "0.608595", "0.608026", "0.6064431", "0.60418785", "0.60283834", "0.59972966", "0....
0.0
-1
Create new Plans instance.
public function plans() { return new Plan($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(PlanningStoreRequest $request)\n {\n\n\n\n if($Planning = Planning::create($request->except('roles', 'permissions')) ) {\n return new PlanningResource($Planning);\n }\n \n }", "public function create()\n {\n $this->authorize('create', Plan::...
[ "0.6477332", "0.6415851", "0.64115614", "0.63549334", "0.63347363", "0.6299453", "0.62700987", "0.6258132", "0.61654556", "0.6082073", "0.6033417", "0.6019013", "0.60089403", "0.59414583", "0.59314644", "0.59280103", "0.5916841", "0.5868435", "0.5825511", "0.5824516", "0.5784...
0.57570785
22
Create new Billing Info instance.
public function billingInfos() { return new BillingInfo($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateDefaultBillingWithReservation() {\n return new Billing();\n }", "public function create()\n {\n return view('billing::create');\n }", "public function create()\n {\n return view('billing::create');\n }", "private function generateDefaultBilling() {...
[ "0.6470694", "0.6039081", "0.6039081", "0.5971785", "0.59071326", "0.5743507", "0.573313", "0.5625403", "0.5610547", "0.56057733", "0.5597813", "0.55963236", "0.5592163", "0.55727917", "0.55717385", "0.5567481", "0.5543487", "0.5542238", "0.5534692", "0.5531217", "0.55172026"...
0.62406504
1
Create new Subscriber instance.
public function subscribers() { return new Subscriber($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createSubscriber();", "protected function subscriber()\n {\n return Subscriber::connection(1, [\n 'id' => 1,\n 'payload' => [\n 'query' => 'subscription { onPostCreated { id } }',\n 'variables' => [],\n 'operationName' =...
[ "0.82489216", "0.72450936", "0.67727983", "0.661997", "0.65834314", "0.654749", "0.6532735", "0.63951296", "0.63371754", "0.6264962", "0.62305635", "0.622792", "0.6138845", "0.6096697", "0.6072859", "0.6032218", "0.6029099", "0.6006208", "0.5975712", "0.59531957", "0.590516",...
0.6386006
8
Create a new Subscription instance.
public function subscriptions() { return new Subscription($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n $subscription = new Subscription();\n\n return $subscription;\n }", "function createObject() {\n\t\treturn new InstitutionalSubscription();\n\t}", "public function __construct()\n {\n $this->subscription = new Subscription();\n }", "public funct...
[ "0.85392255", "0.73278034", "0.72578204", "0.72071785", "0.7053173", "0.69039595", "0.67673475", "0.67636335", "0.67546886", "0.6713553", "0.6652339", "0.6533789", "0.65286106", "0.6461284", "0.64533013", "0.63908494", "0.63785213", "0.63754284", "0.6340799", "0.63401586", "0...
0.65591764
11
Create a new Invoice instance.
public function invoices() { return new Invoice($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function createNew(): Invoice {\n return new Invoice();\n }", "public function createInvoice()\n {\n $class = $this->class;\n\n return new $class;\n }", "public function createInvoice(Invoice $invoice): Invoice;", "public function createInvoice()\r\n {\r\n }"...
[ "0.8449245", "0.8397223", "0.82045454", "0.81029445", "0.7537925", "0.7402321", "0.72521687", "0.72495294", "0.7206147", "0.7167472", "0.7145911", "0.7145911", "0.7145911", "0.7145911", "0.7053372", "0.7047809", "0.6992998", "0.69655645", "0.6958713", "0.69263303", "0.6899388...
0.6335295
56
Create a new Payment instance.
public function payments() { return new Payment($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createPayment()\n\t{\n\n\t}", "protected function createPayment() {\n /* @var \\Drupal\\commerce_payment\\Plugin\\Commerce\\PaymentGateway\\PaymentGatewayInterface $payment_gateway */\n $payment_gateway = $this->order->payment_gateway->entity;\n $payment_method = $this->order->payment_me...
[ "0.7870808", "0.7763901", "0.75403476", "0.7448342", "0.7366734", "0.69253695", "0.69115764", "0.6855279", "0.68303514", "0.6828394", "0.6769017", "0.6769017", "0.67545223", "0.6710586", "0.667321", "0.6663093", "0.6630997", "0.65884906", "0.6585618", "0.6579959", "0.6519246"...
0.64183354
27
Create a new Coupon instance.
public function coupons() { return new Coupon($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create(CouponRequest $request)\n {\n try {\n $this->checkForDuplicateCode($request);\n\n $newCoupon = Coupon::create([\n 'code' => $request->input('coupon-code'),\n 'discount_amount' => (is_null($request->input('coupon-amount')) || $requ...
[ "0.6911831", "0.6741546", "0.65726393", "0.65515625", "0.6523609", "0.64885324", "0.64301455", "0.63662714", "0.6265149", "0.6261297", "0.62600565", "0.6182279", "0.6180253", "0.61760104", "0.6162332", "0.6156909", "0.61242497", "0.6089394", "0.6064047", "0.5988931", "0.59791...
0.7282196
0
Create a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this-...
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.687...
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "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) { date_default_timezone_set('Asia/Manila'); $user = Auth::user(); $trans_list_of_products = $request->input('trans_list_of_products'); $trans_list_of_products_decoded = json_decode($trans_list_of_products); $customer_details = $reque...
{ "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.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($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "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) { // }
{ "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
Lists a bowler with a given id
public function view($id) { $this->layout = false; $bowler = $this->Bowler->findById($id); $bowlerData['bowlers']['bowler'][] = $bowler['Bowler']; $this->set('bowlerData', $bowlerData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function list_get($id) {\n\n //$id = $this->get('id');\n\n if (!$id) {\n\n $this->response(\"No item ID specified!\", 400);\n\n exit;\n }\n\n $list = $this->List_model->getListById($id);\n\n if ($list) {\n\n //$list = $this->appendItems($list);\n...
[ "0.67219615", "0.66445196", "0.66234434", "0.6579122", "0.63811845", "0.63753885", "0.6371353", "0.63317615", "0.62901664", "0.6266477", "0.6220397", "0.62024266", "0.61889267", "0.6181603", "0.6178872", "0.6130129", "0.6082913", "0.608169", "0.6056793", "0.6013368", "0.60110...
0.6333744
7
run the sql from file
public function run() { $this->runQueriesFromSqlFile('1.3.4.3'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n $filename = __DIR__ . DS . 'other_thirdcode.sql';\n $content = file_get_contents($filename);\n $rows = explode(PHP_EOL,$content);\n foreach($rows as $row){\n\t\t\t$ret1 = preg_match('/^insert/', $row);\n if($ret1>0){\n $ret = db()...
[ "0.7253043", "0.7172986", "0.69777167", "0.6808357", "0.6736685", "0.65802383", "0.65547025", "0.65397286", "0.646412", "0.6410348", "0.6311992", "0.6251648", "0.6251156", "0.61900336", "0.6159083", "0.6131143", "0.60709876", "0.6053908", "0.60528064", "0.60421795", "0.602756...
0.7114437
2
CHECK CART FOR ITEMS
function getPartner() { $table = $this->get_table(); $query = $this->db->get($table); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkStock()\n {\n DB::beginTransaction();\n try{\n foreach ($this->cart as $item){\n $unit = Itens::find($item->id);\n $qtd = !empty($unit->quantity) ? $unit->quantity : $unit->weight;\n\n if($qtd >= $item->qty){\n ...
[ "0.56047094", "0.53368104", "0.53189075", "0.5258508", "0.52559185", "0.5225007", "0.512455", "0.5117181", "0.5106038", "0.51001006", "0.50958437", "0.5092517", "0.5081725", "0.50704736", "0.5058316", "0.5018543", "0.5010633", "0.50097203", "0.4986379", "0.49745286", "0.49733...
0.0
-1
Run the database seeds.
public function run() { foreach (json_decode(Storage::get('provinsi.json')) as $row){ Provinsi::create([ 'no_prov' => $row->no_prov, 'nama' => $row->nama ]); } }
{ "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
/$idventa = $idventa_reg; $alm=$this>Empresa_model>leerAlmacenIdentificadorEmpresa($this>session>sucursal>idempresa); $emp=$this>Empresa_model>leerEmpresaPorIdentificador($alm>rel_empresa); Informacion del registro de venta $registro_venta = $this>Venta_model>leerRegistroVenta($idventa); Detalle de venta $detalle_venta...
public function imprimirFacturaGrande($idventa_reg) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onDevolucion() {\n try {\n if ($this->input->post('Venta') !== '' && $this->input->post('Venta') > 0) {\n $Datos = $this->ventas_model->onCrearFolio($this->input->post('TP'));\n $vta = $this->dvm->getVentabyID($this->input->post('Venta'));\n ...
[ "0.70804447", "0.7056116", "0.70163125", "0.7016204", "0.69603395", "0.69470924", "0.69459856", "0.69406796", "0.69257", "0.68913454", "0.68781406", "0.6835421", "0.68307877", "0.68129164", "0.680103", "0.6781885", "0.6760402", "0.6752206", "0.6743059", "0.67291486", "0.67269...
0.0
-1
Display a listing of the resource.
public function index() { $packages = Package::latest()->paginate(10); return view('admin.packages.index',compact('packages')); }
{ "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('admin.packages.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(StorePackageRequest $request) { $request->persist(); return redirect()->back()->with('status' , __('admin.created') ); }
{ "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) { $package = Package::find($id); return view('admin.packages.show',compact('package')); }
{ "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($id) { $package = Package::find($id); return view('admin.packages.edit',compact('package')); }
{ "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(EditPackageRequest $request, $id) { $request->persist($id); return redirect()->back()->with('status' , __('admin.updated') ); }
{ "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(Request $request, $id) { if ($request->ajax()) { Package::find($id)->delete(); return response(['msg' => 'deleted', 'status' => 'success']); } }
{ "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
this file contain utility functions. Display any one dimensional array.
function array_display($array_name) { $r = ''; $r .= '<style> table,td,th{border: solid 2px black;}</style>'; $r .= '<table>'; $r .= '<tr>'; $r .= '<th>Index/Key</th>'; $r .= '<th>Value</th>'; $r .= '</tr>'; foreach ($array_name as $index => $value) { $r .= '<tr>'; $r .= ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function DisplayArray($array)\r\n {\r\n $depth = 0;\r\n if (is_array($array))\r\n {\r\n echo \"Array (<br />\";\r\n for($i = 0; $i < count($array); $i ++)\r\n {\r\n if (is_array($array[$i]))\r\n {\r\n D...
[ "0.80476594", "0.7499233", "0.7270005", "0.7220955", "0.72057635", "0.7188512", "0.71643245", "0.7163542", "0.7153869", "0.7047916", "0.7042678", "0.70073354", "0.7004684", "0.6985143", "0.6974765", "0.6940716", "0.69273895", "0.6926022", "0.6877305", "0.67691374", "0.6745472...
0.6392114
40
MultiDimensional Array Display Function.
function multiple_arrayDisplay($multiple_array) { $r = ''; $r .= '<style> td,th{border: solid 2px black;}</style>'; $r .= '<table>'; $r .= '<tr>'; foreach ($multiple_array[0] as $key => $value) { $r .= '<th>'.$key.'</th>'; } $r .= '</tr>'; foreach ($multiple_array as $key => $val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function DisplayArray($array)\r\n {\r\n $depth = 0;\r\n if (is_array($array))\r\n {\r\n echo \"Array (<br />\";\r\n for($i = 0; $i < count($array); $i ++)\r\n {\r\n if (is_array($array[$i]))\r\n {\r\n D...
[ "0.7384269", "0.6975198", "0.6926616", "0.6807112", "0.6619322", "0.6619322", "0.6619322", "0.6522776", "0.64492434", "0.6446065", "0.63740855", "0.6367178", "0.6297108", "0.62789", "0.6263028", "0.625825", "0.625113", "0.6126222", "0.6108217", "0.6086835", "0.6082916", "0....
0.6437139
10
table_display($table) display any 2d table.
function table_display($table) { $out = ''; $out = '<style> td,th{border: solid 2px black;}</style>'; if (count($table) == 0) { //table is empty return 'table is empty'; } $out .= '<table>'; //table header $col_names = array_keys($table[0]); $out .= '<tr>'; foreach (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display() {\r\n echo '<table cols=\"3\" style=\"font-size:large; font-weight:bold\">';\r\n echo '<tr>'; \r\n for ($pos = 0; $pos < 9; $pos++) { \r\n echo $this->show_cell($pos); \r\n if ($pos % 3 == 2) {\r\n ...
[ "0.6965441", "0.66469234", "0.65742457", "0.64775217", "0.6408495", "0.6390145", "0.63698506", "0.63594264", "0.63343126", "0.631149", "0.6289206", "0.62838733", "0.626554", "0.62059027", "0.61975217", "0.6184834", "0.61773705", "0.61337674", "0.6118748", "0.61180013", "0.610...
0.7068991
0
Check that $_FILE (the uploaded file) contains a valid image extension must be: .jpg , .JPG , .gif ou .png. $file_input the file input name on the HTML form $Max_Size maximum file size in Kb, default 500kb returns "OK" or error message
function Photo_Uploaded_Is_Valid($file_input, $Max_Size = 500000) { //Must havein HTML <form enctype="multipart/form-data" .. //otherwise $_FILE is undefined // $file_input is the file input name on the HTML form if (!isset($_FILES[$file_input])) { return 'No image uploaded'; } if ($_FILES[$file...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ValidFile($iInput) {\n\t\tif(is_uploaded_file($_FILES[$iInput]['tmp_name'])){ \n\t\t\tif($_FILES[$iInput]['error'] == 0){ //file uploaded succesfully\t\n\t\t\t\t//check if file 12 bytes or larger and an image?\n\t\t\t\tif( preg_match('/^image\\b/',$_FILES[$iInput]['type']) && filesize($_FILES[$iInp...
[ "0.76163924", "0.75154805", "0.7370217", "0.7330946", "0.7160955", "0.7128784", "0.7041342", "0.702815", "0.7003825", "0.69577986", "0.6933683", "0.6931522", "0.69238645", "0.6886302", "0.68595546", "0.6843471", "0.6783882", "0.6768791", "0.67466944", "0.6723041", "0.6707816"...
0.7805798
0
Function to save uploaded image in folder (and display image for testing). $file_input is the file input name on the HTML form.
function Picture_Save_File($file_input, $target_dir) { $message = Photo_Uploaded_Is_Valid($file_input); // voir fonction if ($message === 'OK') { // Check that there is no file with the same name // already exists in the target folder // using file_exists() ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function savetheuploadedfile() {\n\t\t$public_dir = 'public/images/';\n\t\t$baseurl = base_url();\n\t\tif ($_FILES['file']['name']) {\n\t\t\t\tif (!$_FILES['file']['error']) {\n\t\t\t\t\t\t$name = md5(rand(100, 200));\n\t\t\t\t\t\t$ext = explode('.', $_FILES['file']['name']);\n\t\t\t\t\t\t$filename = $name ...
[ "0.68281496", "0.6510763", "0.6353013", "0.63384074", "0.6251029", "0.622962", "0.6216302", "0.6200369", "0.6160553", "0.6132774", "0.61121356", "0.6107005", "0.6081792", "0.6079462", "0.60745174", "0.60721964", "0.60607755", "0.6048333", "0.6048333", "0.6035969", "0.60334194...
0.6916206
0
Display a listing of the resource.
public function index() { $downs = Downpayment::orderBy('int_down_percentage')->get(); return view('maintenance.downpayment.index')->with('downs', $downs); }
{ "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() { // }
{ "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