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
function writeLog Fungsi ini akan menangani penulisan log.
protected function writeLog(string $type, string $description) { $log = new \app\models\Log(); $log->log_type = $type; $log->log_description = $description; $log->created_by = $_SESSION['USER']['id']; $log->created_at = date('Y-m-d H:i:s'); $log->remote_ip = $_SERVER[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function write()\n {\n echo 'database log write...';\n }", "private function writelog() {\r\n\r\n $dir = APP_PATH . 'tmp/log';\r\n //IF 'tmp/log' is file, delete it.\r\n if (is_file($dir)) {\r\n unlink(APP_PATH . 'tmp/log');\r\n }\r\n //IF 'tmp/l...
[ "0.73643374", "0.7152471", "0.7080219", "0.69366467", "0.6919771", "0.6873614", "0.687128", "0.68666655", "0.68610495", "0.68370354", "0.6800784", "0.67614275", "0.6751181", "0.67466253", "0.67196137", "0.6703445", "0.66557795", "0.66535044", "0.6636282", "0.6625219", "0.6593...
0.0
-1
function change Fungsi ini mengubah sistem
public function change(string $slug) { // [$system, $count] = $this->model('SystemModel')->get([ // ['sys_slug', $slug], // ]); // if ($count == 0) { // Flasher::setFlash('System tidak ditemukan!', 'change', 'error'); // } else { // unset($_SESSIO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function change();", "function change()\n {\n }", "public function edit_toko(){\n\t}", "public function changeFunc() {}", "protected function editar()\n {\n }", "public function change()\n {\n \n $this->execute('DELETE FROM cotz_cotizaciones_catalogo WHER...
[ "0.716005", "0.70549923", "0.66376096", "0.6631112", "0.66269696", "0.6615301", "0.64837277", "0.63324845", "0.63249177", "0.61849093", "0.61786366", "0.61038697", "0.6084519", "0.60754144", "0.603023", "0.6029506", "0.60290545", "0.6023275", "0.60228795", "0.6020307", "0.601...
0.0
-1
Add site home link if is paged front page
public function home() { $this->crumbs[] = new Crumb(__('Lolita Framework', 'lolita'), home_url('/')); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_home_page() {\n\t$homepage = get_page_by_title('Home');\n\t\n\tif ($homepage) {\n\t\tupdate_option('page_on_front', $homepage->ID);\n\t\tupdate_option('show_on_front', 'page');\n\t}\n}", "function get_home_front_page_url() {\r\n\r\n\t$front_page_ID = get_option( 'page_on_front' );\r\n\t$front_page_t...
[ "0.74679", "0.72521544", "0.718665", "0.7170717", "0.7132407", "0.7055061", "0.7055061", "0.70484984", "0.7030411", "0.70114356", "0.6989651", "0.6935988", "0.68859154", "0.6840831", "0.6817002", "0.6798628", "0.6783522", "0.67781717", "0.67521757", "0.6731354", "0.6731245", ...
0.0
-1
Add post parents link to breadcrumbs items
public function postParents($post_id) { $ancestors = get_post_ancestors($post_id); if (count($ancestors)) { foreach ($ancestors as $id) { $this->crumbs[] = new Crumb(get_the_title($id), get_permalink($id)); } } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Steps_prepare_parent_breadcrumbs($Step) {\n\tif ($Step && $Step->parent_guid) {\n\t\t$parents = array();\n\t\t$parent = get_entity($Step->parent_guid);\n\t\twhile ($parent) {\n\t\t\tarray_push($parents, $parent);\n\t\t\t$parent = get_entity($parent->parent_guid);\n\t\t}\n\t\twhile ($parents) {\n\t\t\t$par...
[ "0.6725706", "0.66608423", "0.66464376", "0.65852034", "0.63035524", "0.62786984", "0.625521", "0.62461954", "0.6217614", "0.6188396", "0.61750376", "0.61437464", "0.60688186", "0.6011111", "0.5995619", "0.59258574", "0.5907754", "0.590312", "0.5887999", "0.58823663", "0.5872...
0.5961281
15
Searches for term parents of hierarchical taxonomies. This function is similar to the WordPress function get_category_parents() but handles any type of taxonomy.
public function termParents($term_id, $taxonomy) { $ancestors = get_ancestors($term_id, $taxonomy, 'taxonomy'); array_unshift($ancestors, $term_id); if (count($ancestors)) { $ancestors = array_reverse($ancestors); foreach ($ancestors as $ancestor) { $t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function penci_get_term_parents( $term_id = '', $taxonomy = 'category' ) {\n\t\t$list = array();\n\n\t\t// If no term ID or taxonomy is given, return an empty array.\n\t\tif ( empty( $term_id ) || empty( $taxonomy ) ) {\n\t\t\treturn $list;\n\t\t}\n\n\t\tdo {\n\t\t\t$list[] = $term_id;\n\n\t\t\t// Get next parent ...
[ "0.7313571", "0.7129667", "0.7058357", "0.67662877", "0.61967045", "0.6165676", "0.6029577", "0.59574336", "0.59424204", "0.5900447", "0.5766153", "0.57583064", "0.57188976", "0.5718115", "0.5681629", "0.5680445", "0.5649787", "0.5642658", "0.5642601", "0.562844", "0.562545",...
0.60955215
6
Adds a post's terms from a specific taxonomy to the items array.
public function postTerms($post_id) { $taxonomy_name = $this->getMostUsedTaxonomy($post_id); $post_terms = wp_get_object_terms($post_id, $taxonomy_name, array('fields' => 'ids')); if (is_array($post_terms) && isset($post_terms[0])) { $branch = self::getBranchWithLargestAncestors...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_term_objects_to_posts() {\n \n $taxonomy = self::$taxonomy;\n \n foreach( $this->posts as $post_index => $current_post ) :\n // Get array of WP_Term category terms for the current post\n $terms = get_the_terms( $current_post, self::$taxonomy );\...
[ "0.67734736", "0.66669804", "0.66658217", "0.6472775", "0.63904774", "0.6362235", "0.6268447", "0.61853176", "0.61195606", "0.60992706", "0.6021164", "0.6012034", "0.5915025", "0.5909547", "0.5908359", "0.5904129", "0.58961135", "0.58721566", "0.5854551", "0.5843004", "0.5794...
0.5937434
12
Get branch with largest ancestors
public static function getBranchWithLargestAncestors(array $object_ids, $object_type, $resource_type) { $sorting_list = array(); $ancestors = self::getAncestors($object_ids, $object_type, $resource_type); if (!count($ancestors)) { $main_key = key($ancestors); } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cognitivefactory_tree_get_upper_branch($id, $includeStart = false, $returnordering = false) {\n global $CFG, $DB;\n\n $nodelist = array();\n $res = $DB->get_record('cognitivefactory_opdata', array('id' => $id));\n if ($includeStart) $nodelist[] = ($returnordering) ? $res->intvalue : $id ; \...
[ "0.6419409", "0.6216446", "0.6116643", "0.5980297", "0.5977099", "0.5919731", "0.58947027", "0.5887451", "0.5854866", "0.5827365", "0.5827365", "0.57830614", "0.5723122", "0.5613739", "0.5566877", "0.5552228", "0.5552221", "0.5510757", "0.5488893", "0.5467931", "0.5343768", ...
0.5448543
20
Get the most used taxonomy
public function getMostUsedTaxonomy($post_id) { $term_count_taxonomies = array(); $taxonomies = get_object_taxonomies(get_post($post_id)); foreach ($taxonomies as $taxonomy) { $terms = get_object_term_cache($post_id, $taxonomy); if (false === $terms) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function get_taxonomy() {\n\t\treturn filter_input( INPUT_GET, 'taxonomy', FILTER_DEFAULT, array( 'options' => array( 'default' => '' ) ) );\n\t}", "public function getTaxonomy()\n {\n return $this->taxonomy;\n }", "public function taxonomy();", "protected function get_current_taxonomy()...
[ "0.66029805", "0.6394088", "0.6349528", "0.61322385", "0.6112906", "0.60148185", "0.60064304", "0.6004334", "0.596449", "0.5953205", "0.58101404", "0.5790296", "0.57702893", "0.57638943", "0.5751057", "0.5687597", "0.5666659", "0.56469077", "0.5637444", "0.5604992", "0.548402...
0.6705054
0
Check db for username and public_id
public function admission_login() { $user = $this->loadModel('User', input()->id); $verified = false; $_username = $user->email; // Strip everything after @ from email address $string = explode('@', input()->username); // Check for a global company email extension $emailExt = $this->loadModel('Company')->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verifyAuth(){\n // on the config values. In this case we just check for user 0.\n $query = \"SELECT name FROM users WHERE user_id = 0\";\n try {\n $sth = $this->spdo->prepare($query);\n $sth->execute();\n }\n catch(PDOException $e) {\n endProcess(0,\"Could not get user infor...
[ "0.66348803", "0.628278", "0.62801635", "0.6275538", "0.62091804", "0.61247855", "0.6121619", "0.6100859", "0.60699105", "0.6069543", "0.6061591", "0.6056187", "0.60267115", "0.6005641", "0.59870285", "0.5979275", "0.5971568", "0.59686345", "0.59259844", "0.5921655", "0.59190...
0.0
-1
This is vars general file, PostVar,GetVar,SessionVar etc..
function PostVar($name, $default_value = false) { if (!isset($_POST)) { return false; } if (isset($_POST[$name])) { if (!get_magic_quotes_gpc()) { return InjectSlashes($_POST[$name]); } return $_POST[$name]; } return $default_value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadSesionVars() {\r\n\r\n $this->VARS = array(); \r\n\r\n $this->updateSessionExpireTime();\r\n\r\n $dati = $this->selectSessionVars();\r\n\r\n foreach($dati as $infos) { \r\n $this->VARS[$infos[\"name\"]]=unseria...
[ "0.7012175", "0.66432005", "0.6452023", "0.64487046", "0.64229107", "0.638447", "0.6354289", "0.63298756", "0.6250173", "0.6216289", "0.6202388", "0.6201449", "0.6193546", "0.6193429", "0.6169538", "0.6126079", "0.60988605", "0.60714054", "0.6064048", "0.604472", "0.6013538",...
0.0
-1
Get the File variable with no magic quotes in the values.
function FileVar($name, $default_value = false) { if (!isset($_FILES)) return false; if (isset($_FILES[$name]['name'])) { if (!get_magic_quotes_gpc()) return InjectSlashes($_FILES[$name]['name']); return $_FILES[$name]['name']; } return $default_value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function file($var=null)\n {\n if ($var) return $_FILE[$var] ?? null;\n\n return $_FILE;\n }", "public function getRawValue ()\n {\n return $this->files->getFile( $this->getName() );\n }", "public function getCleanFile()\n {\n return $this->_getCleanProperty('f...
[ "0.64237046", "0.6357497", "0.61674374", "0.6071658", "0.59258455", "0.58803195", "0.5830757", "0.5762742", "0.56103486", "0.55734986", "0.5565074", "0.5552078", "0.5518561", "0.5477841", "0.5477841", "0.5477841", "0.5449134", "0.54430497", "0.5440303", "0.5431993", "0.542123...
0.64107454
1
Get the posted variable with no magic quotes in the values.
function GetVar($name, $default_value = false) { if (!isset($_GET)) { return false; } if (isset($_GET[$name])) { if (!get_magic_quotes_gpc()) { return InjectSlashes($_GET[$name]); } return $_GET[$name]; } return $default_value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPost($key) {\n\t$value = '';\n\tif (isset($_POST[$key])) {\n\t\t$value = $_POST[$key];\n\t}\n\t// return $value;\n\t//Phan 2: Ham xu ly ky tu dac biet\n\treturn removeSpecialCharacter($value);\n}", "function cc_post_get( $var ) {\n\tcc_post_fail_if_not_valid( $var );\n\n\tif ( cc_post_isset( $var ) )...
[ "0.6822519", "0.6508382", "0.6503145", "0.6432839", "0.6393315", "0.6392963", "0.6255894", "0.62492055", "0.62284", "0.6200336", "0.6191534", "0.6181747", "0.61693156", "0.61075056", "0.6090354", "0.6035227", "0.60263294", "0.6005204", "0.59575707", "0.5948293", "0.5927071", ...
0.5533849
60
Not recommended but available, Request variable is either a GET, POST or COOKIE value
function RequestVar($name, $default_value = true) { if (!isset($_REQUEST)) return false; if (isset($_REQUEST[$name])) { if (!get_magic_quotes_gpc()) return InjectSlashes($_REQUEST[$name]); return $_REQUEST[$name]; } return $default_value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRequestVar()\n {\n return $this->_requestVar;\n }", "private function request($request=null){\r\n\r\n if(is_null($request)){\r\n\r\n $this->request = request_uri();\r\n\r\n }else{\r\n\r\n $this->request = $request;\r\n\r\n ...
[ "0.6274215", "0.61448586", "0.61092925", "0.6102159", "0.60894924", "0.6061228", "0.60447586", "0.6038846", "0.6014745", "0.5941613", "0.588716", "0.5880615", "0.5860722", "0.5854422", "0.5845554", "0.5845554", "0.5845554", "0.5845554", "0.5845554", "0.5845554", "0.5845554", ...
0.63062096
0
cookie variable with no magic quotes in the values.
function CookieVar($name, $default_value = true) { if (!isset($_COOKIE)) return $default_value; if (isset($_COOKIE[$name])) { if (!get_magic_quotes_gpc()) return InjectSlashes($_COOKIE[$name]); return $_COOKIE[$name]; } return $default_value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __toString(): string\r\n {\r\n if ($this->raw) $cookie = $this->name;\r\n\r\n else $cookie = str_replace(self::RESERVED_CHARS, self::RESERVED_CHARS_REPLACEMENT, $this->name); //Replacing reserved chars\r\n\r\n $cookie .= \"=\";\r\n\r\n if ($this->value === null) {\r\n...
[ "0.7131526", "0.6715928", "0.66761434", "0.6589781", "0.65255135", "0.6507503", "0.6441999", "0.62629044", "0.6210463", "0.61782056", "0.6169294", "0.60959786", "0.60453457", "0.6032168", "0.59380794", "0.590579", "0.58871585", "0.58754385", "0.58665156", "0.5861957", "0.5846...
0.7040464
1
SessionVar variable with no magic quotes in the values.
function SessionVar($name, $default_value = false) { if (!isset($_SESSION)) { return $default_value; } else if (isset($_SESSION[$name])) { return $_SESSION[$name]; } return $default_value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_sessionstring()\n {\n \treturn \"$this->_session_name=$this->_session_id\";\n }", "static public function session( $var, $default = NULL )\r\n\t\t{\r\n\t\t\treturn isset( $_SESSION[ $var ] ) ? stripslashes( trim( $_SESSION[ $var ] ) ) : $default;\r\n\t\t}", "function getValue()\r\n...
[ "0.6153137", "0.5695846", "0.5649044", "0.557168", "0.5432836", "0.5259281", "0.525598", "0.52459925", "0.5238516", "0.51784426", "0.5174954", "0.5173571", "0.51711595", "0.51578194", "0.5133893", "0.51271266", "0.5072098", "0.5066656", "0.5066348", "0.50519115", "0.50499076"...
0.5238157
9
Inject Slashes if magicquotes of
function InjectSlashes($value) { if (is_array($value)) { reset($value); while (list($key, $val) = each($value)) $value[$key] = InjectSlashes($val); return $value; } return addslashes($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addSlashes(&$value){\nreturn $value = \"'$value'\";\n}", "function addslashes_strings_only($value)\n {\n }", "protected function quote_escaped()\n {\n }", "public function addSlashes( $t );", "function _put_safe_slashes ($text = \"\") {\n\t\t$text = str_replace(\"'\", \"...
[ "0.73387116", "0.732507", "0.7023051", "0.69918966", "0.69446754", "0.69358253", "0.691925", "0.69078296", "0.6887307", "0.6867342", "0.6845253", "0.68094975", "0.6806862", "0.6792091", "0.67573464", "0.6706648", "0.6700177", "0.668022", "0.6646282", "0.6621263", "0.66130793"...
0.6523605
36
EliminateSlashes get_magic_quotes_gpc() == true
function EliminateSlashes($value) { if (is_array($value)) { reset($value); while (list($key, $val) = each($value)) $value[$key] = EliminateSlashes($val); return $value; } return stripslashes($value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _remove_magic_quotes()\n {\n if(get_magic_quotes_gpc()) {\n $_GET = $this->_strip_slashes_deep($_GET);\n $_POST = $this->_strip_slashes_deep($_POST);\n $_COOKIE = $this->_strip_slashes_deep($_COOKIE);\n }\n }", "public function removeMagicQuot...
[ "0.8489133", "0.8376537", "0.8358635", "0.82394737", "0.8117513", "0.8115007", "0.80812377", "0.7923795", "0.78854924", "0.78694826", "0.7842625", "0.7822052", "0.77171355", "0.7683883", "0.75012505", "0.7329409", "0.7318122", "0.72659045", "0.7261165", "0.72473824", "0.72196...
0.0
-1
Replace Special character to ''
function replace_specialChar($vTitle) { $rs_catname = $vTitle; $spstr = "�#�#�#�#�#�#�#�#�#�#�#�#�#�#�##�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�#�"; $spArr = @explode("#", $spstr);...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _remove_special_chars($keyword) {\n //\t$keyword = str_replace('\"', '\\\"', $keyword);\n return $keyword;\n}", "function remove_strange_chars($txt){\n\t\treturn(str_replace(array('<','>',\"'\",\";\",\"&\",\"\\\\\"),'',$txt));\n\t}", "public function removeSpecialChars()\n {\n $this->input...
[ "0.6958952", "0.69503814", "0.68559974", "0.68270534", "0.6685045", "0.6652214", "0.6621676", "0.6616402", "0.6613646", "0.6613646", "0.6549812", "0.65081376", "0.6500428", "0.64832747", "0.6465219", "0.64422905", "0.64230484", "0.6421694", "0.6406246", "0.6404418", "0.637763...
0.6055213
34
Get Special Character from htmlentities of that character
function ChangeToSpecialChar($vTitle) { $rs_catname = $vTitle; $spstr = "&iexcl;#&cent;#&pound;#&yen;#&sect;#&uml;#&copy;#&laquo;#&not;#&reg;#&deg;#&plusmn;#&acute;#&micro;#&para;##&middot;#&cedil;#&raquo;#&iquest;#&Agrave;#&Aacute;#&Acirc;#&Atilde;#&Auml;#&Aring;#&AElig;#&Ccedil;#&Egrave;#&Eacute;#&Ecirc;#&E...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function specialCharsToHTML( $str )\n {\n $search = array(\n 'á', 'é', 'í', 'ó', 'ú',\n 'Á', 'É', 'Í', 'Ó', 'Ú',\n 'ñ', 'Ñ', '¿', '¡'\n );\n $replace = array(\n '&aacute;', '&eacute;', '&iacute;', '&oacute;', '&uacute;',\n '&Aacute;', '&Ea...
[ "0.6947594", "0.681536", "0.6741272", "0.6713604", "0.66439146", "0.6614129", "0.6572494", "0.6535862", "0.6492173", "0.6457078", "0.64229894", "0.6422246", "0.6407662", "0.6373916", "0.6369826", "0.63575757", "0.63519675", "0.63463295", "0.6335674", "0.6334063", "0.6329216",...
0.0
-1
replace given string to another in a string Used on restaurant detail page.
function FrontgetReplace($str, $frlp, $trlp) { $reqstr = str_replace($frlp, $trlp, $str); return $reqstr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tpl_modifier_replace($string, $search, $replace)\r\n{\r\n\treturn str_replace($search, $replace, $string);\r\n}", "function smarty_modifier_myreplace($string, $search) {\n\tif (count($search) > 0) {\n\t\t$newstring = strtr($string, $search);\n\t\treturn $newstring;\n\t} else {\n\t\treturn $string;\n\t}\...
[ "0.640134", "0.63971454", "0.6310503", "0.6263212", "0.6254047", "0.6254047", "0.6240745", "0.62279683", "0.6143493", "0.6096184", "0.6044394", "0.5983438", "0.5958176", "0.5950945", "0.59274155", "0.5836681", "0.58195853", "0.58045965", "0.5776366", "0.5754938", "0.5733894",...
0.6555261
0
Create cache files for Front End Use
function include_caching($file) { $cachefile = SITE_CACHES_FILES . $file; $cachetime = 5 * 60; //secondes if (file_exists($cachefile) && (time() - $cachetime < filemtime($cachefile))) { include($cachefile); } else { $fp = fopen($cachefile, 'w'); fwrite($fp, ob_get_contents...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function _createCacheFile() {\r\n $paths = array();\r\n $paths['apps'] = File::getDirectoriesNames(ZEEYE_APPS_PATH);\r\n $paths['libs'] = File::getDirectoriesNames(ZEEYE_LIBS_PATH);\r\n File::write(ZEEYE_TMP_PATH . self::CACHE_FILE_PATH, '<?php ' . PHP_EOL . '$paths = ' ....
[ "0.8032596", "0.7266751", "0.7152086", "0.70346427", "0.69950426", "0.6909286", "0.6856285", "0.68492174", "0.6748739", "0.67213154", "0.6671114", "0.66402024", "0.6599811", "0.6592925", "0.65740734", "0.65656614", "0.6564179", "0.65263647", "0.65126586", "0.6494167", "0.6493...
0.64248854
25
/ Make Size Format
function MakeSize($str, $type) { $rStr = @explode("x", $str); if ($type == 'inch') { $reqSize = $rStr[0] . '"' . "x" . $rStr[1] . '"'; } elseif ($type == 'feet') { $reqSize = $rStr[0] . "'" . 'x' . $rStr[1] . "'"; } return $reqSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormatSize() {}", "function cre_resize_bytes($size) {\n $count = 0;\n $format = array(\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\");\n while(($size/1024)>1 && $count<8) {\n $size=$size/1024;\n $count++;\n }\n $return = number_format($size,0,'','.').\" ...
[ "0.7121262", "0.70816237", "0.70796096", "0.703981", "0.7020994", "0.7018977", "0.6930491", "0.68126315", "0.67599154", "0.6747278", "0.67432666", "0.6733968", "0.6709159", "0.6695767", "0.6690823", "0.66784334", "0.66070783", "0.6592121", "0.6577123", "0.6540927", "0.6517070...
0.63992476
30
replace given string to another in a string Used on restaurant detail page.
function FrontgetReqRep($str, $relpace) { $reqstr = @explode($relpace, $str); return $reqstr[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function FrontgetReplace($str, $frlp, $trlp) {\r\n $reqstr = str_replace($frlp, $trlp, $str);\r\n return $reqstr;\r\n}", "function tpl_modifier_replace($string, $search, $replace)\r\n{\r\n\treturn str_replace($search, $replace, $string);\r\n}", "function smarty_modifier_myreplace($string, $search) {\n\ti...
[ "0.6555733", "0.6402055", "0.6398407", "0.63118523", "0.6263725", "0.6255635", "0.6255635", "0.62413645", "0.6228513", "0.6145391", "0.609663", "0.60454404", "0.598438", "0.59583044", "0.5951317", "0.59274614", "0.58377564", "0.58201134", "0.5805351", "0.57760084", "0.5755291...
0.0
-1
Convert Size on Feet to Inch
function ConvertFeettoInch($size, $sizetype) { $vSize = @explode("x", $size); if ($sizetype == 'feet') { $h = $vSize[0] * 12; $w = $vSize[1] * 12; } else { $h = $vSize[0]; $w = $vSize[1]; } $reqsize = $h . "x" . $w; return $reqsize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convert_mm_to_inches($mmsize)\n{\n if (strpos($mmsize, \"x\")!==false)\n {\n // separated by x\n $sizes = explode(\"x\", $mmsize);\n $sep = 'x';\n }\n elseif (strpos($mmsize, \"&\")!==false)\n {\n // separated by &\n $sizes = explode(\"&\", $mmsize);\...
[ "0.7218597", "0.707158", "0.66565835", "0.66483855", "0.6492572", "0.63490313", "0.63467", "0.63165903", "0.6254541", "0.624985", "0.6219829", "0.6118946", "0.6107312", "0.61064196", "0.6064713", "0.60634553", "0.598942", "0.5984127", "0.5977499", "0.5967978", "0.59661895", ...
0.83945704
0
Display a listing of the resource.
public function index() { return View('trader.index', compact('traders')); }
{ "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() { /** Agregar metodo por empresa de usuario * Si no es Owner, dependera de la empresa de trabajo * para administrador en adelante **/ $establecimiento = Establecimiento::lista()->lists('name', 'id'); /** OJO **/ $secciones = Seccion::Lists('name', 'id'); $estado = Userst...
{ "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(TradersFormRequest $request) { $trader = Trader::create($request->all()); $name = $trader->name; $seccion = $trader->establecimiento->name; Session::flash('flash_message', 'El nuevo registro de "'. $name .'" en "'. $seccion .'"" a sido creado'); if($request->input('main_form') != 1){ ...
{ "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) { $trader = Trader::findOrFail($id); if(Auth::user()->hasRole(['centro-acopio', 'currier', 'cliente'])){ if($trader->estado->id != 1){ return redirect()->back()->with('flash_message', 'ATENCIÓN!!! Este perfil a sido desactivado o suspendido, habla con tu supervisor o administrador...
{ "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) { $trader = Trader::findOrFail($id); /** Agregar metodo por empresa de usuario * Si no es Owner, dependera de la empresa de trabajo * para administrador en adelante **/ $establecimiento = Establecimiento::lista()->lists('name', 'id'); /** OJO **/ $secciones = Seccion::li...
{ "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(TradersFormRequest $request, $id) { $trader = Trader::findOrFail($id); $trader->update($request->all()); Session::flash('flash_message', 'El nuevo a sido editado'); return redirect()->route('personal.show', $trader->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
Check if user is admin
public function userIsAdmin($userName) { $this->db->execute("SELECT role FROM users WHERE name='$userName'"); $res = $this->db->fetchOne(); if ($res->role != 1) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isAdminUser() {}", "function is_admin()\n {\n //is a user logged in?\n\n //if so, check admin status\n\n //returns true/false\n\n }", "function is_user_admin()\n {\n }", "private function isAdmin() {\n\t\tif (Auth::user()->user == 1) {\n\t\t\treturn true;\n...
[ "0.9027777", "0.8695937", "0.8691268", "0.86369", "0.8591458", "0.85899", "0.8571316", "0.8515396", "0.8502602", "0.84922993", "0.84898376", "0.8481368", "0.8479492", "0.8438324", "0.8438324", "0.8427587", "0.8396876", "0.83731365", "0.8363124", "0.8329772", "0.8312123", "0...
0.0
-1
Function to create links for sorting.
public function orderby($column, $route) { return <<<EOD <span class='orderby'> <a href="{$route}orderby={$column}&order=asc">&darr;</a> <a href="{$route}orderby={$column}&order=desc">&uarr;</a> </span> EOD; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate_sort_links($user_search, $sort) {\n $sort_links = '';\n\n switch ($sort) {\n // Sorted by ascending job title\n case 1:\n $sort_links .= '<td><a href=\"' . $_SERVER['PHP_SELF'] . '?usersearch='\n . $user_search . '&sort=2\...
[ "0.7302465", "0.7016542", "0.6994662", "0.6820956", "0.67789036", "0.6756788", "0.6687556", "0.6682599", "0.6678033", "0.66494364", "0.66352123", "0.6600864", "0.6532268", "0.64101744", "0.63309103", "0.6320381", "0.6226152", "0.62194616", "0.621642", "0.6171456", "0.61586213...
0.0
-1
Adds user to the database
public function addUser($name, $pass, $rePass, $role, $gravatar) { // Check if username exists if ($this->app->access->exists($name)) { echo "<div class='container'><p>Användaren existerar redan! Välj ett annat användarnamn.</p>"; header("Refresh:2; create_user"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function addUser()\n {\n // ADD NEW DATA TO A TABLE\n // MAKE SURE TO SEND USERS TO THE /users page when a user is added\n }", "public function addUser() {\n $db = new ClassDB();\n $db->connect();\n\n $result = $db->getConnection()->prepare('INSE...
[ "0.8193425", "0.8150622", "0.8081003", "0.7878645", "0.7746147", "0.76312715", "0.76024634", "0.7544496", "0.7487822", "0.7426746", "0.74245465", "0.73878723", "0.7358185", "0.73415476", "0.7335648", "0.73262537", "0.7305713", "0.7299163", "0.7296498", "0.72883123", "0.727637...
0.0
-1
Get categories and their popularity
public function getCategoryCloud() { $sql = " SELECT PC.id as cat_id, PC.category, P2C.id, P2C.cat_id, COUNT(P2C.id) AS amount FROM Prod2Cat AS P2C LEFT OUTER JOIN ProdCategory AS PC ON PC.id = P2C.cat_id GROUP BY P2C.cat_id ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getPopularCategories()\n {\n $query = Queries::$getPopularCategories;\n\n try {\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n $result = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n $this->successResponse($result);\n } catc...
[ "0.6856333", "0.6606608", "0.648939", "0.6299891", "0.62710917", "0.62520313", "0.62520313", "0.6238672", "0.6093382", "0.6090886", "0.60602975", "0.6052847", "0.5987166", "0.5983488", "0.59693944", "0.5967071", "0.59436905", "0.5925538", "0.59227276", "0.58903617", "0.585686...
0.60414016
12
Get userId from userName
public function getUserId($user) { $sql = "SELECT id FROM users WHERE name = '$user'"; $res = $this->db->executeFetch($sql); $res = $res->id; return $res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserId($userName)\n {\n $sql = \"SELECT id FROM fos_user WHERE username = :username\";\n $stmt = $this->connection->prepare($sql);\n $stmt->bindValue(\"username\", $userName);\n $stmt->execute();\n $res = $stmt->fetch();\n return intval($res['id']);\n...
[ "0.7713086", "0.7673868", "0.7673868", "0.7673868", "0.7673868", "0.7673868", "0.7673868", "0.7673868", "0.7673868", "0.7673868", "0.76495916", "0.7519041", "0.7485491", "0.74818623", "0.74818623", "0.7472115", "0.7468829", "0.74465775", "0.7439943", "0.73775417", "0.7325574"...
0.0
-1
Search for product by name or description
public function searchProducts($searchString) { $sql = "SELECT P.id, (select COUNT(id) FROM Product) as rows, P.name, P.description, P.image, P.recommended, GROUP_CONCAT(DISTINCT PC.category) AS category, P.price, Offer.new_price, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchProduct($search)\n {\n $this->db->connect();\n $sql = \"SELECT * FROM $this->table WHERE name LIKE ? OR description LIKE ? OR category LIKE ?;\";\n $resultset = $this->db->executeFetchAll($sql, array_fill(0, 3, \"%\" . $search . \"%\"));\n return $resultset;\n ...
[ "0.7037194", "0.6914308", "0.68668985", "0.68640274", "0.68614966", "0.68442464", "0.6747434", "0.67449933", "0.66041446", "0.6599186", "0.6482557", "0.647466", "0.64701426", "0.6462877", "0.6438939", "0.64340615", "0.6429461", "0.64115316", "0.6410219", "0.6372476", "0.63655...
0.6111054
45
Show all user accounts
public function showAccounts($orderby = 'name', $order = 'ASC') { $this->db->execute("SELECT id, name, email, gravatar, role FROM users ORDER BY $orderby $order"); $res = $this->db->fetchAll(); // executeFetchAll return $res; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function allUsers()\n {\n $users = $this->user->findAll();\n $this->show('admin/allusers', ['users' => $users]);\n }", "function displayAllUser() {\n\t\t$sql = \"SELECT * FROM accounts\";\n\t\t$result = $this->connection->query($sql);\n\t\techo \"Displays all users\";\n\t\techo '<table...
[ "0.80555576", "0.77406096", "0.762703", "0.75738955", "0.7534897", "0.7504366", "0.74898595", "0.748887", "0.748887", "0.74568874", "0.7433274", "0.74007285", "0.73866457", "0.7367021", "0.7366568", "0.7359326", "0.7354032", "0.73539466", "0.73515534", "0.7340846", "0.7339855...
0.0
-1
Create navigation among pages.
public function getPageNavigation($page, $max, $min = 1) { $nav = "<a href='" . $this->getQueryString(array('page' => $min)) . "'>&lt;&lt;</a> "; $nav .= "<a href='" . $this->getQueryString(array('page' => ($page > $min ? $page - 1 : $min) )) . "'>&lt;</a> "; for ($i=$min; $i<=$max; $i++) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate_page_nav ( $db ){\n\t\treturn \"\n\t\t\t\t\".generate_site_nav($db);\n\t}", "function _navSetup()\n\t{\n\t\t// get the path to the current page\n\t\t$this->path = $this->getPath($this->area, $this->page);\n\t\t\n\t\t// reset the navigational elements\n\t\t$this->nav = array();\n\t\t\n\t\t// we ...
[ "0.71068513", "0.7080048", "0.7064319", "0.68888676", "0.68515664", "0.68149006", "0.66705847", "0.657559", "0.6574159", "0.65615386", "0.6427047", "0.6393412", "0.639238", "0.6347253", "0.63456297", "0.63244474", "0.63088495", "0.6304778", "0.62786794", "0.6277477", "0.62400...
0.0
-1
Create links for hits per page.
public function getHitsPerPage($hits) { $nav = "Träffar per sida: "; foreach ($hits as $val) { $nav .= "<a href='" . $this->getQueryString(array('hits' => $val)) . "'>$val</a> "; } return $nav; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createPageLinks()\n {\n $pageLinks = array();\n\n if ($this->totalPages > 10) {\n $startRange = $this->page - floor($this->range/2);\n $endRange = $this->page + floor($this->range/2);\n\n //Start range\n if ($startRange <= 0) {\n ...
[ "0.6871946", "0.6680411", "0.65084296", "0.6453792", "0.6416074", "0.6162673", "0.61202663", "0.60656077", "0.60585266", "0.59019804", "0.5864804", "0.5863869", "0.58144003", "0.58132714", "0.5766889", "0.57469416", "0.57469416", "0.57441646", "0.5730499", "0.56876296", "0.56...
0.52617437
55
Use the current querystring as base, modify it according to $options and return the modified query string.
public function getQueryString($options, $prepend = '?') { // parse query string into array $query = array(); parse_str($_SERVER['QUERY_STRING'], $query); // Modify the existing query string with new options $query = array_merge($query, $options); // Return the modi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getQueryString($options, $prepend='?') {\n // parse query string into array\n $query = array();\n parse_str($_SERVER['QUERY_STRING'], $query);\n \n // Modify the existing query string with new options\n $query = array_merge($query, $options);\n \n // Return the modified querystring\n return $prepen...
[ "0.7274767", "0.711158", "0.68992716", "0.6612023", "0.61407006", "0.6107886", "0.6067695", "0.6044313", "0.59670705", "0.5952654", "0.5940188", "0.5872233", "0.5862615", "0.5831775", "0.5824068", "0.5815448", "0.581423", "0.5800863", "0.57914156", "0.57883996", "0.57678235",...
0.6501622
4
Get most sold products
public function getMostSoldProduct($limit = '1') { $this->db->execute("SELECT R.product, R.items, SUM(R.items) AS sold, P.description, P.name, P.image FROM `OrderRow`AS R LEFT OUTER JOIN Product AS P ON R.product = P.id ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function find_higest_saleing_product($limit){\n global $db;\n $sql = \"SELECT p.name, COUNT(s.product_id) AS totalSold, SUM(s.qty) AS totalQty\";\n $sql .= \" FROM sales s\";\n $sql .= \" LEFT JOIN products p ON p.id = s.product_id \";\n $sql .= \" GROUP BY s.product_id\";\n $sql .= \" ORDER BY SUM(s....
[ "0.7582982", "0.7498848", "0.71561944", "0.69956684", "0.6806291", "0.675018", "0.66137046", "0.65906835", "0.6473135", "0.64597464", "0.63842136", "0.63748246", "0.6347561", "0.6285435", "0.62667745", "0.6223408", "0.6223272", "0.61933804", "0.61716205", "0.61368245", "0.613...
0.74315476
2
Define if announcement can be dismissed
public function setDismissable($bool) { $this->dismissable = $bool; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isDismissible(): bool\n {\n return $this->dismissible;\n }", "protected function isStatusDismissed()\n {\n return $this->getStatus() === self::STATUS_DISMISSED;\n }", "function canDismiss($user) {\n \treturn $this->getUserId() == $user->getId();\n }", "public f...
[ "0.70370185", "0.6456746", "0.6104604", "0.59166163", "0.56528807", "0.5602168", "0.5566911", "0.55319244", "0.5515312", "0.54751027", "0.54587114", "0.5443661", "0.5419922", "0.5388675", "0.53861773", "0.5378653", "0.5345419", "0.5343759", "0.53398", "0.5325782", "0.5294116"...
0.5229823
27
Set the name of this announcement
public function setName($name) { if (!is_string($name)) { throw new Exception('Name must be a string'); } $this->name = preg_replace("/[^a-zA-Z0-9_]+/", "", $name); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setName($name)\n {\n $this->_name = $name;\n }", "public function setName($name)\n {\n $this->_name = $name;\n }", "public function setName($name)\n {\n $this->_name = $name;\n }", "public function setName($name)\n {\n $this->_name = $name;\n ...
[ "0.7500354", "0.7500354", "0.7500354", "0.7500354", "0.7474437", "0.7439988", "0.74163663", "0.7408417", "0.7408417", "0.74000436", "0.73983645", "0.739825", "0.739825", "0.739825", "0.739825", "0.739825", "0.739825", "0.7396046", "0.73900473", "0.73725706", "0.73725706", "...
0.0
-1
Set the title of this announcement
public function setTitle($title) { $this->title = $title; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTitle($title) {\r\n $this->_title = $title;\r\n }", "public function setTitle($title) {\r\n $this->title = $title;\r\n }", "public function setTitle($title) {\n $this->_title = $title;\n }", "public function setTitle($title) {\n $this->_title = $title;\n ...
[ "0.79837865", "0.7968202", "0.79653215", "0.79419917", "0.7935527", "0.7920843", "0.7920843", "0.7913216", "0.7913216", "0.7911611", "0.79059327", "0.79059327", "0.79059327", "0.7900872", "0.78972805", "0.7891776", "0.7891776", "0.7891776", "0.7891776", "0.7891776", "0.789177...
0.0
-1
Set the heading of this announcement
public function setHeading($heading) { $this->heading = $heading; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setHeading($h)\n\t{\n\t\t$this->_headingText=$h;\n\t}", "function set_heading()\n\t{\n\t\t$args = func_get_args();\n\t\t$this->heading = $this->_prep_args($args);\n\t}", "public function setHeading($var)\n {\n GPBUtil::checkDouble($var);\n $this->heading = $var;\n\n return $thi...
[ "0.8044966", "0.7395246", "0.6890738", "0.6690357", "0.6496962", "0.63836145", "0.62960356", "0.6287221", "0.6279528", "0.62336063", "0.6228237", "0.62102336", "0.61218226", "0.6119339", "0.6111601", "0.6089011", "0.6078367", "0.60138553", "0.5990851", "0.59080684", "0.588891...
0.636149
6
Set the content of this announcement
public function setContent($content) { $this->content = $content; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setContent($content){\n $this->_content = $content;\n }", "protected function setContent() {}", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setContent($content);", "public function setCon...
[ "0.7455095", "0.744482", "0.74317396", "0.74317396", "0.74317396", "0.74317396", "0.74317396", "0.74317396", "0.74317396", "0.74317396", "0.74317396", "0.74317396", "0.7352828", "0.72611874", "0.72558486", "0.72472763", "0.72313184", "0.72175986", "0.7215092", "0.717205", "0....
0.5910661
85
Set the footer of this announcement
public function setFooter($footer) { $this->footer = $footer; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function defineFooter()\n {\n $this->footer = new Footer();\n }", "public function setFooter() {\n\n // set the footer html.\n echo '<div class=\"footer\">\n \n </div>\n </div>\n </body>\n</html>' . PHP_EOL;\n }", "function set_footer() {\...
[ "0.7582049", "0.75790864", "0.7327594", "0.7311569", "0.730717", "0.7288832", "0.725705", "0.72454345", "0.7226048", "0.7198613", "0.7182465", "0.71715087", "0.7117021", "0.7101465", "0.7099482", "0.7096122", "0.7068294", "0.7049024", "0.704255", "0.703959", "0.7036456", "0...
0.6622328
71
Set the SS template that this announcement should use to render with. The default is the FQCN
public function setTemplate($template) { $this->template = $template; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTemplate(string $template);", "public function setTemplate($template);", "public function setTemplate($template);", "function setTemplate($template);", "function _setTemplate($template = null) {\n if (empty($template)) {\n $backtrace = debug_backtrace();\n if...
[ "0.6720405", "0.65640235", "0.65640235", "0.64706266", "0.6376285", "0.6333843", "0.6333431", "0.6281091", "0.6278573", "0.62737405", "0.6271603", "0.62185913", "0.61983925", "0.6180355", "0.6164226", "0.6161687", "0.6104155", "0.6051642", "0.59688145", "0.5959936", "0.595265...
0.6108657
16
Return the template to render this announcement with
public function getTemplate() { return $this->template; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function forTemplate()\n {\n return $this->renderWith($this->defaultTemplate());\n }", "protected function template() {\n\t\treturn '';\n\t}", "public function render()\n\t{\n\t\t$template = $this->template\n\t\t\t? '<div class=\"wkm-template\" for=\"' .$this->id. '\">' .$this->template. '<...
[ "0.69763005", "0.69255555", "0.6916336", "0.68359303", "0.67668706", "0.6755597", "0.66481274", "0.6626279", "0.65985006", "0.65972877", "0.65707386", "0.65576315", "0.65576315", "0.6554446", "0.64819413", "0.64138633", "0.640421", "0.6400523", "0.6397581", "0.63860935", "0.6...
0.6309457
47
CX Events List Section Helpers functions to display events related data in the grid
function obj_cx_events_list_section( $events, $bottom_banner, $pagination, $event_list_deets = null, $section_classes = null, $bg_shapes = null ) { $sec_meta = decide_section_meta( 'event-list-section', $section_classes, $event_list_deets, $bg_shapes ); if ( ! empty( $event_list_deets ) ) { do_section_top( $sec_m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function obj_do_cx_events_list( $events ) {\n\tif (is_array($events) ) {\n echo '<div class=\"event-list-grid\">';\n foreach ($events as $event ) {\n obj_do_cx_event_item_output($event);\n }\n echo '</div>';\n }\n}", "function ShowEvents()\n {\n $this->ReadEven...
[ "0.78498334", "0.7236979", "0.7017266", "0.7009315", "0.699223", "0.6922443", "0.6915301", "0.6868072", "0.6734911", "0.66499925", "0.6647157", "0.66308135", "0.6611031", "0.6596573", "0.6560581", "0.65400994", "0.6506537", "0.6479158", "0.64785296", "0.6461053", "0.6459901",...
0.68128026
8
Generate the inner content of the event list wrapper
function obj_cx_events_list_inner( $events, $bottom_banner, $pagination, $event_list_deets = null ) { echo '<h3 class="section-title green">Upcoming events</h3>'; obj_do_cx_events_list_filter( $events ); obj_do_cx_events_list( $events ); obj_do_cx_event_bottom_banner_output( $bottom_banner ); obj_do...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function obj_do_cx_events_list( $events ) {\n\tif (is_array($events) ) {\n echo '<div class=\"event-list-grid\">';\n foreach ($events as $event ) {\n obj_do_cx_event_item_output($event);\n }\n echo '</div>';\n }\n}", "private function makeDayEventListHTML()\n\t{\n\t\t$sh...
[ "0.6842564", "0.6603555", "0.6529645", "0.6372589", "0.6218623", "0.61129034", "0.60898525", "0.6053805", "0.59469587", "0.58949643", "0.5894375", "0.5858712", "0.5826435", "0.5808398", "0.5785451", "0.57779014", "0.5746479", "0.57371944", "0.57312787", "0.5708856", "0.570390...
0.62439334
4
Display the filter form for the events
function obj_do_cx_events_list_filter( $events ) { $months = evt_helper_get_year_months( $events ); $types = evt_helper_get_event_types( $events ); $search_term = evt_helper_get_search_term(); $reset_display = 'none'; if ('' !== $search_term ) { $reset_display = 'block'; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _report_filters_ui()\n\t{\n\t\t$filter = View::factory('actionable_filter');\n\t\t$filter->render(TRUE);\n\t}", "function ShowFilterList() {\n\t\tglobal $dealers_reports;\n\t\tglobal $ReportLanguage;\n\n\t\t// Initialize\n\t\t$sFilterList = \"\";\n\n\t\t// Field StartDate\n\t\t$sExtWrk = \"\";\n\...
[ "0.67403555", "0.66237015", "0.6620433", "0.6577908", "0.6572314", "0.64820915", "0.64757985", "0.64642227", "0.6451821", "0.64418465", "0.64270884", "0.6377905", "0.6345389", "0.633572", "0.633212", "0.6311437", "0.6264589", "0.6210457", "0.61994237", "0.6182095", "0.6170857...
0.7078388
0
Get the event list and output
function obj_do_cx_events_list( $events ) { if (is_array($events) ) { echo '<div class="event-list-grid">'; foreach ($events as $event ) { obj_do_cx_event_item_output($event); } echo '</div>'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEvents();", "public function getEvents();", "function getEvents() {\n return [];\n }", "public function getEvents()\n {\n $main_actions = [\n 'event' => \\adminer\\lang('Create event'),\n ];\n\n $headers = [\n \\adminer\\lang('Name'),\n ...
[ "0.75446177", "0.75446177", "0.69783545", "0.68900436", "0.68223184", "0.6792754", "0.6733685", "0.6697508", "0.6671387", "0.66636574", "0.66521245", "0.6602853", "0.65057135", "0.649367", "0.64738405", "0.6468673", "0.64546865", "0.6447733", "0.64385986", "0.6423811", "0.638...
0.6841274
4
Return true if the action should be runned false if not.
public function isRunnable(array $params) { return !empty($params["changelogPath"]) && $params["changelogPath"] !== false && $this->fs->exists($params["changelogPath"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function shouldExecute()\n {\n return !$this->job->isDryRun() || $this->get('executeInPreview');\n }", "public function hasActions();", "public function getShouldExecute() : bool\n {\n }", "public function isAction()\n {\n $args = func_get_args();\n forea...
[ "0.7589109", "0.7481878", "0.7410246", "0.73359376", "0.7289572", "0.7228687", "0.7101281", "0.7097566", "0.70013845", "0.70006734", "0.6990252", "0.69859177", "0.69463724", "0.68819815", "0.68428653", "0.6783247", "0.6782791", "0.676211", "0.673929", "0.6722324", "0.6685747"...
0.0
-1
Returns requirements for running this Action.
public static function getRequirements() { return array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRequirements() {\n\t\treturn $this->requirements;\n\t}", "public function getRequirements()\n {\n return $this->requirements;\n }", "public function getRequirements() {\n return $this->requirements;\n }", "abstract public function getRequirements();", "public funct...
[ "0.7894959", "0.7878293", "0.7849802", "0.77669126", "0.71365976", "0.7003118", "0.6928247", "0.6928247", "0.65077627", "0.646628", "0.64326686", "0.6355253", "0.629222", "0.629222", "0.629222", "0.629222", "0.62566215", "0.6255724", "0.6107295", "0.61017555", "0.6070575", ...
0.7545743
4
Displays a particular model.
public function actionView($id) { $this->render($this->path_view.'view',array( 'model'=>$this->loadModel($id), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionView() {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }", "public function actionView()\n {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n...
[ "0.75535107", "0.7553186", "0.7542682", "0.7540008", "0.74330246", "0.74330246", "0.74330246", "0.74330246", "0.74330246", "0.73394006", "0.7160726", "0.71322334", "0.712746", "0.70615447", "0.7022298", "0.6983485", "0.69753826", "0.6958109", "0.6945592", "0.69437367", "0.694...
0.0
-1
Creates a new model. If creation is successful, the browser will be redirected to the 'view' page.
public function actionCreate() { //if(!Yii::app()->user->checkAccess(Params::DEFAULT_CREATE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administrator'));} $model=new PPJadwaldokterM; $listHari = array( 'Senin'=> 'Senin', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n\t{\n\t\t//\n\t\t// if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\t\t// try {\n\t\t// $model->save();\n\t\t// Yii::$app->session->setFlash('alert', [\n\t\t// 'body' => Yii::$app->params['cre...
[ "0.79611313", "0.79000247", "0.78687686", "0.75944376", "0.75330836", "0.74855393", "0.7461119", "0.7461119", "0.7461119", "0.7461119", "0.7448935", "0.74430025", "0.74393713", "0.74307716", "0.74092305", "0.7408396", "0.7384483", "0.73768485", "0.7333238", "0.7333016", "0.73...
0.0
-1
Updates a particular model. If update is successful, the browser will be redirected to the 'view' page.
public function actionUpdate($id) { //if(!Yii::app()->user->checkAccess(Params::DEFAULT_UPDATE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administrator'));} $model=$this->loadModel($id); $listHari = array( 'Senin'=> 'Senin', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdate()\n {\n if (!$model = $this->findModel()) {\n Yii::$app->session->setFlash(\"error\", Yii::t('modules/user', \"You are not logged in.\"));\n $this->goHome();\n } else if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Y...
[ "0.79061323", "0.77129716", "0.76959306", "0.7601889", "0.7600844", "0.7488874", "0.7481669", "0.747756", "0.74704474", "0.74602824", "0.7458783", "0.7458539", "0.7458539", "0.74576205", "0.74522936", "0.74473876", "0.744536", "0.74405336", "0.74304587", "0.74178094", "0.7416...
0.0
-1
Deletes a particular model. If deletion is successful, the browser will be redirected to the 'admin' page.
public function actionDelete($id) { if(Yii::app()->request->isPostRequest) { // we only allow deletion via POST request //if(!Yii::app()->user->checkAccess(Params::DEFAULT_DELETE)){throw new CHttpException(401,Yii::t('mds','You are prohibited to access this page. Contact Super Administra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionDelete()\r\n {\r\n $this->_userAutehntication();\r\n\r\n switch($_GET['model'])\r\n {\r\n /* Load the respective model */\r\n case 'posts': \r\n $model = Post::model()->findByPk($_GET['id']); \r\n ...
[ "0.75141525", "0.75074947", "0.74224156", "0.7376121", "0.73703206", "0.7281982", "0.7234119", "0.72131765", "0.71906054", "0.71853113", "0.7169009", "0.7166612", "0.7162838", "0.7125431", "0.70979434", "0.70088696", "0.70082563", "0.7008243", "0.69863313", "0.6968707", "0.69...
0.0
-1
Returns the data model based on the primary key given in the GET variable. If the data model is not found, an HTTP exception will be raised.
public function loadModel($id) { $model=PPJadwaldokterM::model()->findByPk($id); if($model===null) throw new CHttpException(404,'The requested page does not exist.'); return $model; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Residencebaseinfo::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model...
[ "0.6997261", "0.69638866", "0.68569964", "0.6705791", "0.6649421", "0.66426146", "0.66365725", "0.66270196", "0.66238034", "0.6618576", "0.6614784", "0.6612998", "0.6559414", "0.65578026", "0.6541776", "0.65416086", "0.6534812", "0.6534454", "0.65291643", "0.6528117", "0.6524...
0.64302963
30
Performs the AJAX validation.
protected function performAjaxValidation($model) { if(isset($_POST['ajax']) && $_POST['ajax']==='rdjadwaldokter-m-form') { echo CActiveForm::validate($model); Yii::app()->end(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ajaxValidationAction()\n {\n if($this->_request->getPost('ajax_submit',false, Request::FILTER_INT))\n $result = 'ok_ajax';\n else\n $result = 'ok';\n $messages = array();\n\n if(!$this->validate())\n {\n $this->collectValidateE...
[ "0.79766375", "0.7535804", "0.6860131", "0.6860131", "0.6833871", "0.6784885", "0.6775202", "0.67711323", "0.6764112", "0.6737663", "0.67355454", "0.6724824", "0.67199975", "0.6704958", "0.66932213", "0.6688998", "0.66856104", "0.6685253", "0.6685253", "0.6685253", "0.6684122...
0.0
-1
Initializes the manager, removing expired locks
public function __construct() { $lockPath = $this->getLockPath(); $this->lockPathAndFilename = $lockPath . md5(FLOW_PATH_ROOT) . '_Flow.lock'; $this->lockFlagPathAndFilename = $lockPath . md5(FLOW_PATH_ROOT) . '_FlowIsLocked'; $this->removeExpiredLock(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init()\n {\n if ($this->autoRelease) {\n $locks = &$this->_locks;\n register_shutdown_function(function () use (&$locks) {\n foreach ($locks as $lock) {\n $this->release($lock);\n }\n });\n }\n }",...
[ "0.65700257", "0.5941498", "0.59093344", "0.5601446", "0.5590234", "0.55478567", "0.539809", "0.5350153", "0.5348513", "0.53433025", "0.52624315", "0.5261633", "0.5237513", "0.51924056", "0.5180532", "0.5173305", "0.5168155", "0.5147384", "0.5145289", "0.5138552", "0.51291746...
0.5662913
3
Returns the absolute path to a directory that should contain the lock files
protected function getLockPath() { return rtrim(sys_get_temp_dir(), '/') . '/'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lockDir(): string\n {\n return $this->root.'/var/lock';\n }", "protected function _getCliLockDir()\n {\n return HaloBase::getInstance()->getScriptLockPath();\n }", "function dirPath() {return (\"../../../../\"); }", "protected function getFileSnapshotDirectory(): string\n ...
[ "0.7803838", "0.70882094", "0.64677894", "0.64637214", "0.6453238", "0.6450293", "0.64373654", "0.63613033", "0.6319849", "0.6242815", "0.6223127", "0.61976165", "0.61470884", "0.6120226", "0.61185527", "0.61091924", "0.60853636", "0.60711145", "0.6062443", "0.6043631", "0.60...
0.78949994
0
Tells if the site is currently locked
public function isSiteLocked() { return file_exists($this->lockFlagPathAndFilename); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isLocked();", "public function isLocked();", "public function isLocked();", "public function isLocked() {}", "private function isLocked() {\n return true === $this->status->is_locked;\n }", "public function checkLock() {\n\t\t$this->autoRender = false;\n\t\t\n\t\t$HttpSocket = new Htt...
[ "0.7734488", "0.7734488", "0.7734488", "0.7718145", "0.73412627", "0.7235753", "0.7131352", "0.7097957", "0.70707387", "0.70191306", "0.6960159", "0.69568294", "0.6947334", "0.6936892", "0.69143236", "0.6891341", "0.6873583", "0.68654096", "0.6654583", "0.6627831", "0.6615889...
0.7629369
4
Exits if the site is currently locked
public function exitIfSiteLocked() { if ($this->isSiteLocked() === TRUE) { $this->doExit(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function doExit() {\n\t\tif (FLOW_SAPITYPE === 'Web') {\n\t\t\theader('HTTP/1.1 503 Service Temporarily Unavailable');\n\t\t\treadfile(FLOW_PATH_FLOW . 'Resources/Private/Core/LockHoldingStackPage.html');\n\t\t} else {\n\t\t\t$expiresIn = abs((time() - self::LOCKFILE_MAXIMUM_AGE - filemtime($this->lockFl...
[ "0.7518456", "0.6500489", "0.6442265", "0.63166636", "0.6300901", "0.6286986", "0.62186277", "0.6215603", "0.6161106", "0.611809", "0.6110722", "0.6059644", "0.6059644", "0.6059644", "0.60594964", "0.5909938", "0.5908488", "0.5908488", "0.5908488", "0.5908488", "0.5908488", ...
0.7781014
0
Locks the site for further requests.
public function lockSiteOrExit() { touch($this->lockFlagPathAndFilename); $this->lockResource = fopen($this->lockPathAndFilename, 'w+'); if (!flock($this->lockResource, LOCK_EX | LOCK_NB)) { fclose($this->lockResource); $this->doExit(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lock() {\n if (!authenticated()) {\n header('Location: ' . R . 'auth/?referer=' . $_SERVER['REQUEST_URI']);\n exit();\n }\n}", "public function lock() {}", "public function lock()\n {\n $this->lock = true;\n }", "public function lock()\n {\n $this->locked =...
[ "0.6972747", "0.67661196", "0.6563253", "0.6494385", "0.6350959", "0.6295932", "0.62935144", "0.62935144", "0.62935144", "0.62935144", "0.62935144", "0.62546086", "0.6190486", "0.6173493", "0.6125473", "0.603985", "0.6031565", "0.59846056", "0.59661597", "0.58755785", "0.5858...
0.65974545
2
Unlocks the site if this request has locked it.
public function unlockSite() { if (is_resource($this->lockResource)) { flock($this->lockResource, LOCK_UN); fclose($this->lockResource); } @unlink($this->lockFlagPathAndFilename); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function exitIfSiteLocked() {\n\t\tif ($this->isSiteLocked() === TRUE) {\n\t\t\t$this->doExit();\n\t\t}\n\t}", "public function lockSiteOrExit() {\n\t\ttouch($this->lockFlagPathAndFilename);\n\t\t$this->lockResource = fopen($this->lockPathAndFilename, 'w+');\n\t\tif (!flock($this->lockResource, LOCK_EX | ...
[ "0.6962182", "0.6330336", "0.6303332", "0.62574786", "0.6138356", "0.6117705", "0.6117705", "0.6117705", "0.6117705", "0.6117705", "0.6102593", "0.61019194", "0.6085819", "0.60683596", "0.5912106", "0.57919365", "0.5779712", "0.56537235", "0.5644656", "0.56439143", "0.5540309...
0.74115705
0
Exit and emit a message about the reason.
protected function doExit() { if (FLOW_SAPITYPE === 'Web') { header('HTTP/1.1 503 Service Temporarily Unavailable'); readfile(FLOW_PATH_FLOW . 'Resources/Private/Core/LockHoldingStackPage.html'); } else { $expiresIn = abs((time() - self::LOCKFILE_MAXIMUM_AGE - filemtime($this->lockFlagPathAndFilename))); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function quit() {\n echo $this->promptMessage('bye') . PHP_EOL . PHP_EOL;\n exit;\n }", "function qa_exit($reason = null)\n{\n\tqa_report_process_stage('shutdown', $reason);\n\n\t$code = $reason === 'error' ? 1 : 0;\n\texit($code);\n}", "function quit(...
[ "0.65651774", "0.6497669", "0.633139", "0.6301743", "0.6006667", "0.58728653", "0.58697045", "0.5834532", "0.5738182", "0.57315874", "0.57036835", "0.56967574", "0.5642124", "0.56279975", "0.5627411", "0.5622319", "0.5576298", "0.5556209", "0.5556209", "0.55514234", "0.547987...
0.49513763
87
Finds user by [[email]]
public function getUser() { if ($this->_user === false) { $this->_user = User::findByUsername($this->email); } return $this->_user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findUserByEmail($email);", "public function findUserByEmail($email);", "public function findUserByEmail($email);", "function get_user_by_email($email)\n {\n }", "public function getUserByEmail($email);", "public function fetchUserByEmail($email);", "public static function findUser...
[ "0.8166407", "0.8166407", "0.8166407", "0.8038051", "0.801395", "0.7942375", "0.7921375", "0.78417", "0.78288645", "0.7686924", "0.7680421", "0.7669739", "0.7669739", "0.7669739", "0.7669739", "0.76563156", "0.7625273", "0.7598056", "0.7595499", "0.75875545", "0.7578652", "...
0.0
-1
historial de usuario cargar data
function push_historial($usuario, $operacion){ $fecha = Carbon::now(); $so = getOS(); $host = gethostname(); $ip = \Request::ip(); \DB::table('historials') ->insert( array( 'ip' => $ip, 'so' => $host, 'operacion' => $operacion, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetAllHistorique() {\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n if (isset($_REQUEST['data'])) {\n $idSociete = $_REQUEST['data'][\"idSociete\"];\n // Input validations\n if (!empty($idSociete)) ...
[ "0.66647875", "0.65418196", "0.6495498", "0.6471591", "0.64632154", "0.6404893", "0.6361705", "0.6267722", "0.622755", "0.6178573", "0.6178238", "0.6151534", "0.61235976", "0.6083238", "0.60589266", "0.60574996", "0.6050549", "0.6044657", "0.60117614", "0.600575", "0.5998567"...
0.0
-1
Get the social link profile.
public function getSocialLink(GetRequest $request) { return response()->json([ 'link' => auth()->user()->profile[$request->platform], ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProfileLink()\n\t{\n\t\treturn site_url('profile/' . $this->hash);\n\t}", "public function getProfileUrl()\n\t\t{\n\t\t return $this->profileUrl;\n\t\t}", "public function getProfile()\n {\n return $this->request('me');\n }", "public function getUserProfile();", "public f...
[ "0.71583956", "0.7031077", "0.7030198", "0.70263696", "0.7023635", "0.6977801", "0.6977801", "0.6977801", "0.6966012", "0.69169104", "0.6867503", "0.68170285", "0.6813979", "0.67681503", "0.6758419", "0.67504925", "0.6696678", "0.6695514", "0.6650981", "0.663111", "0.65945697...
0.62255204
42
Saves a social link.
public function saveSocialLink(UpdateRequest $request) { $profile = auth()->user()->profile; $profile[$request->platform] = $request->link; try { $profile->save(); return response()->json([ 'link' => $request->link, ]); } catch (\E...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(SocialRequest $request)\n {\n\n $social = new Social();\n\n $social->icon = $request->icon;\n\n $social->href = $request->link;\n\n $social->save();\n\n return redirect('/socials');\n\n }", "function save()\n\t{\n\t\tJRequest::checkToken() or jexit( ...
[ "0.6902558", "0.6663171", "0.661495", "0.6479066", "0.642856", "0.6296211", "0.6106395", "0.61031204", "0.6099806", "0.608838", "0.60785156", "0.60551065", "0.6016186", "0.5989445", "0.59639096", "0.5891851", "0.5839289", "0.5836313", "0.583255", "0.5828308", "0.5827811", "...
0.6787638
1
Get the profile of a ministry.
public function getProfile() { ProfileResource::withoutWrapping(); MinistryResource::withoutWrapping(); if (request()->has('complete') && request()->complete) { return new ProfileResource(auth()->user()); } else { return new MinistryResource(auth()->user()); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProfile(){\n\t\treturn (new Profile($this->userName));\n\t}", "public function getProfile() {\n\t\treturn $this->profile;\n\t}", "public function GetProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "pu...
[ "0.7252904", "0.7218533", "0.72170365", "0.71874017", "0.71874017", "0.71874017", "0.7146581", "0.7062818", "0.70142835", "0.6878982", "0.68507767", "0.68255955", "0.65607464", "0.64877933", "0.64717084", "0.6462159", "0.644256", "0.64342093", "0.64283407", "0.6377093", "0.63...
0.7170489
6
Changes the profile pic.
public function updatePhoto(UpdateImageRequest $request, ImageManager $imageManager) { if (auth()->user()->image()->exists()) { $this->deleteFiles(auth()->user()); } $fileName = str_shuffle(auth()->user()->id.time().time()).'.png'; $ogSave = storage_path('app/public/prof...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function picture()\n\t\t{\n\t\t\tif(!Auth::check())\n\t\t\t\treturn 'fail';\n\n\t\t\t$user = Auth::user();\n\t\t\t$profile = Profile::find($user->id);\n\t\t\t$profile->picture = Input::get('picture');\n\n\t\t\tif ($profile->save())\n\t\t\t\treturn 'success';\n\t\t}", "public function changeuserpicture(){\...
[ "0.7237525", "0.722816", "0.7164345", "0.7089643", "0.7079475", "0.70403266", "0.6979016", "0.6962133", "0.6915768", "0.6878279", "0.687328", "0.6857128", "0.67138314", "0.66511095", "0.65908563", "0.6582444", "0.65433943", "0.6532345", "0.6530047", "0.6526524", "0.6507338", ...
0.0
-1
Saves the church services.
private function saveServices(Request $request, Ministry $ministry) { if ($request->has('services')) { DB::table('fg_daily_services') ->whereIn('id', $ministry->services()->pluck('id')->toArray()) ->delete(); $services = array_map(function ($service) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saving(Service $Service)\n {\n //code...\n }", "function save()\n {\n foreach ($this->plugins as $name => $obj) {\n $this->updateServicesVars($name);\n\n if ($this->plugins[$name]->is_account) {\n $this->plugins[$name]->save();\n } elseif ($this->plugins[$na...
[ "0.6443643", "0.63802385", "0.6373962", "0.63272166", "0.62915754", "0.6189432", "0.61595356", "0.612749", "0.6108377", "0.60716313", "0.60668254", "0.598378", "0.5923065", "0.58605856", "0.586035", "0.5802011", "0.5793819", "0.5715782", "0.56700677", "0.5659269", "0.5608324"...
0.56735826
18
Gets the account subscription level.
public function accountType() { return auth()->user()->account->level; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSubscriptionStatus() {\n return $this->subscription_status;\n\n }", "public function getSubscriptionStatus(): string\n {\n return $this->subscriptionStatus;\n }", "public function getSubscription()\n {\n return $this->subscription;\n }", "public function...
[ "0.65767837", "0.62155455", "0.61739105", "0.6132176", "0.61315733", "0.6128359", "0.5982635", "0.5865299", "0.5865299", "0.5865299", "0.5865299", "0.5865299", "0.5865299", "0.5801089", "0.57973486", "0.5785297", "0.57735467", "0.57185656", "0.5682405", "0.5655849", "0.565480...
0.7017779
0
Gets the users for a ministry.
public function users(IndexRequest $request) { $ministryUsers = auth()->user() ->ministryUsers() ->latest() //->with(['user.image']) ->where(fn ($ministryUser) => $ministryUser->whereHas('user', fn ($user) => $user->search(['name', 'email'], $r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getUsers()\n {\n $url = $this->base_uri.'user/assignable/multiProjectSearch?projectKeys='.$this->project;\n $users = $this->request($url);\n if (!$this->infos['errorBoolean']) {\n return json_decode($users);\n }\n }", "public function getUsers();", "public func...
[ "0.72677183", "0.72477263", "0.72477263", "0.72477263", "0.7223185", "0.7187486", "0.7153664", "0.7099485", "0.7098818", "0.7074578", "0.7069168", "0.7061608", "0.70478547", "0.70201886", "0.70101434", "0.6963096", "0.693369", "0.693369", "0.69154346", "0.68943554", "0.689039...
0.649722
67
Blocks or unblock a user.
public function toggleActivity(ToggleActivityRequest $request) { $ministryUser = auth()->user()->ministryUsers()->where('user_id', $request->user_id)->first(); if ($ministryUser) { $ministryUser->update($request->validated()); return $this->successResponse('This user`s acti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function blockUser($user)\r\n {\r\n return $this->exec('block_user ' . $this->escapePeer($user));\r\n }", "public function blockUser($id)\n {\n $this->db->set('status_id', '1');\n $this->db->where('id', $id);\n $this->db->update('inm_user');\n return true;\n }", "funct...
[ "0.73938525", "0.69746083", "0.69417113", "0.6921662", "0.68360096", "0.67261344", "0.671436", "0.66536045", "0.66360277", "0.658877", "0.6540746", "0.65081525", "0.6489167", "0.6475912", "0.639916", "0.63897747", "0.63687354", "0.63036203", "0.6260709", "0.6254625", "0.62294...
0.0
-1
Prepare ingredients for the Pizza.
abstract public function prepare(): self;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fillIngredients()\n {\n $ingredients_data = $this->_db()->select('select id_ingredient, base_quantity from product_ingredients where id_product=?d', $this->id);\n foreach ($ingredients_data as $ing)\n {\n $this->ingredients[$ing['id_ingredient']] = new Model_Produ...
[ "0.6603842", "0.6096413", "0.6059011", "0.57614875", "0.56514746", "0.56503844", "0.5648528", "0.5648528", "0.5648528", "0.56449336", "0.5598058", "0.55464023", "0.5541658", "0.5538923", "0.54876715", "0.54562014", "0.53697586", "0.5296862", "0.52912205", "0.5282122", "0.5280...
0.0
-1
Returns list of ingredients.
public function listIngredients(): string { $listIngredients = ''; if (null !== $this->name) { $listIngredients = sprintf('%s:', $this->name); } if (null !== $this->dough) { $listIngredients = sprintf('%s %s,', $listIngredients, $this->dough); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function list()\n {\n return Recipe::all()->load('ingredients');\n }", "public function getIngredients()\n {\n return $this->ingredients;\n }", "public function getIngredients()\r\n {\r\n return $this->_ingredients;\r\n }", "public function getIngredients():array...
[ "0.80285174", "0.80125594", "0.78574187", "0.76654524", "0.74776506", "0.73250365", "0.7182027", "0.7180169", "0.698155", "0.68252313", "0.6792017", "0.67337394", "0.66705185", "0.66510975", "0.6607595", "0.66018", "0.6584641", "0.65265226", "0.65189946", "0.6496899", "0.6438...
0.6059559
35
Returns the pizza name.
public function getName(): string { return $this->name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function name()\n {\n return 'pares';\n }", "public function getName() {\n\t\treturn Language::_(\"Alipay.name\", true);\n\t}", "public function get_name() : string\n {\n return $this->additional['name'] ?? '';\n }", "public function getName() {\n\t\t\treturn \"<p clas...
[ "0.7068787", "0.67725337", "0.6728824", "0.67263734", "0.6719578", "0.6693188", "0.66798496", "0.65574485", "0.6557075", "0.6548272", "0.6529344", "0.6524297", "0.6522655", "0.6522655", "0.6522655", "0.6522655", "0.6518164", "0.6518164", "0.6518164", "0.65102875", "0.6507997"...
0.0
-1
Sets the pizza dough.
public function setDough(Dough $dough): void { $this->dough = $dough; return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(Paesi $paese)\n {\n $this->paese = $paese;\n }", "public function setPizzaId($id){\n $intVal = filter_var($id, FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE);\n if(isset($intVal)){\n $this->pizza_id = $intVal;\n return true;\n } ...
[ "0.5482008", "0.5440977", "0.53999126", "0.52591", "0.52591", "0.5135431", "0.5074818", "0.5048097", "0.5012528", "0.50069964", "0.5006073", "0.49991414", "0.49497598", "0.4941194", "0.4931902", "0.49110115", "0.4902301", "0.48957062", "0.48688293", "0.48685005", "0.48663428"...
0.57144964
0
Sets the pizza sauce.
public function setSauce(Sauce $sauce): void { $this->sauce = $sauce; return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct(Paesi $paese)\n {\n $this->paese = $paese;\n }", "public function customizePizza() {\n\t\t$id = $this->uri->segment(3);\n\n\t\t//Get required details by pizza id and toppings list and pass to the view\n\t\t$this->load->model('MenuModel');\n\n\t\t$details = $this->MenuMode...
[ "0.56502026", "0.534343", "0.5098083", "0.5043481", "0.5039214", "0.5027306", "0.49757734", "0.49749497", "0.49749497", "0.49745837", "0.4971266", "0.49577004", "0.49357644", "0.49249613", "0.49195704", "0.49164546", "0.48995477", "0.48906335", "0.48616737", "0.48277554", "0....
0.6467909
0
Sets the pizza topping.
public function setTopping(Topping $topping): void { $this->topping = $topping; return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function customizePizza() {\n\t\t$id = $this->uri->segment(3);\n\n\t\t//Get required details by pizza id and toppings list and pass to the view\n\t\t$this->load->model('MenuModel');\n\n\t\t$details = $this->MenuModel->getPizzaById($id);\n\n\t\t$details = array('details' => $details, 'toppingsList' => $this ...
[ "0.56883943", "0.55608183", "0.5493001", "0.5347093", "0.5266497", "0.524801", "0.5240643", "0.5240643", "0.50541025", "0.5009053", "0.4992364", "0.49491477", "0.4928341", "0.49065608", "0.49000096", "0.48817062", "0.48088256", "0.48072287", "0.4782628", "0.4753409", "0.47514...
0.71408445
0
Instantiate a new Message with a single recipient
function send_push_notification($token, $msg) { $message = new ApnsPHP_Message($token); // Set a custom identifier. To get back this identifier use the getCustomIdentifier() method // over a ApnsPHP_Message object retrieved with the getErrors() message. //$message->setCustomIdentifier("Message-Badge-3"); //...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createMessage()\n {\n $message = new Message(new Swift_Message);\n\n\n // If a global from address has been specified we will set it on every message\n // instances so the developer does not have to repeat themselves every time\n // they create a new message. We wi...
[ "0.68792", "0.6859934", "0.6594861", "0.6570423", "0.63376594", "0.630552", "0.6239531", "0.623134", "0.6201808", "0.61968935", "0.6160824", "0.61131245", "0.60962445", "0.602253", "0.60148144", "0.5954294", "0.5927739", "0.58924216", "0.58911276", "0.584131", "0.58211166", ...
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
Remove the specified resource from storage.
public function destroy($id) { $tiket = Tiket::find($id); if ($tiket->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
Displays the creation form
public function newAction() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "...
[ "0.78857446", "0.7817919", "0.78172106", "0.77591723", "0.7750754", "0.77156997", "0.77073085", "0.76961833", "0.7693344", "0.7662305", "0.7655872", "0.76406026", "0.76406026", "0.75848895", "0.7582472", "0.75794667", "0.7558011", "0.75542694", "0.7540239", "0.7507046", "0.75...
0.0
-1
Creates a new tipocodigo
public function createAction() { if (!$this->request->isPost()) { $this->dispatcher->forward([ 'controller' => "tipocodigo", 'action' => 'index' ]); return; } $tipocodigo = new Tipocodigo(); $tipocodigo->Descripcio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function criarNovaConta($tipo){\n return new Conta($tipo);\n }", "public function create($type)\n {\n //\n }", "public function create()\n {\n //\n return view('especializacion_tipo.create');\n }", "public function actionCreate($tipo)\n {\n $model = new Finan...
[ "0.675842", "0.6720038", "0.6648065", "0.6618183", "0.64298964", "0.6349711", "0.63433063", "0.6314298", "0.62908506", "0.62894315", "0.6286094", "0.62650263", "0.6212332", "0.6148976", "0.6126903", "0.61113286", "0.61090475", "0.6106455", "0.6077487", "0.604345", "0.6025252"...
0.74170166
0
Saves a tipocodigo edited
public function saveAction() { if (!$this->request->isPost()) { $this->dispatcher->forward([ 'controller' => "tipocodigo", 'action' => 'index' ]); return; } $idTipoCodigo = $this->request->getPost("idTipoCodigo"); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Tipo_documento $tipo_documento)\n {\n //\n }", "function act_tipo_entrada(){\n\t\t$u= new Tipo_entrada();\n\t\t$related = $u->from_array($_POST);\n\n\t\t// save with the related objects\n\t\tif($u->save($related))\n\t\t{\n\t\t\techo \"<html> <script>alert(\\\"Se han actualizado ...
[ "0.7077196", "0.6812285", "0.6776362", "0.6758007", "0.67544836", "0.6713235", "0.6712935", "0.6706755", "0.666921", "0.66616106", "0.66503847", "0.6551328", "0.6528885", "0.65214205", "0.65082353", "0.6494227", "0.6463135", "0.6456645", "0.64333856", "0.6409923", "0.6402576"...
0.7610511
0
Display a listing of the resource.
public function index() { $stadia = Stadium::orderBy('name', 'asc')->paginate(15); return view('admin.stadium.index', compact('stadia')); }
{ "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.stadium.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) { $validatedData = $request->validate([ 'name' => 'required|max:255', 'city' => 'nullable|max:255' ]); $input = $request->all(); Stadium::create($input); return redirect(route('stadium.index')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.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) { $stadium = Stadium::findOrFail($id); return view ('admin/stadium/edit', compact('stadium')); }
{ "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) { $validatedData = $request->validate([ 'name' => 'required|max:255', 'city' => 'nullable|max:255' ]); $input = $request->all(); $stadium = Stadium::findOrFail($id); $stadium->update($input); re...
{ "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) { $stadium = Stadium::whereId($id); $stadium->delete(); return redirect(route('stadium.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
Display a listing of the resource.
public function index() { $screenOne = DamageScreen::where('order', 0)->first(); $screenTwo = DamageScreen::where('order', 1)->first(); $status = DamageStatus::get(); return view('dashboard.screens.index')->with('screenOne', $screenOne)->with('screenTwo', $screenTwo)->with('status',$...
{ "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