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
Change Method. Write your reversible migrations using this method. More information on writing migrations is available here: The following commands can be used in this method and Phinx will automatically reverse them when rolling back: createTable renameTable addColumn renameColumn addIndex addForeignKey Remember to ca...
public function change() { $this->execute( 'CREATE TABLE `user_login_providers` ( `user_id` int(11) NOT NULL, `login_provider` enum(\'facebook\',\'twitter\') NOT NULL, `login_provider_user_id` varchar(255) NOT NULL, `updated_ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function change()\n {\n // Migration for table entry\n $table = $this->table('entry');\n $table\n ->addColumn('domain', 'string', array('limit' => 25))\n ->addColumn('url', 'string', array('limit' => 255))\n ->addColumn('title', 'string', array('limit...
[ "0.79288644", "0.78923404", "0.7750449", "0.77250934", "0.77156365", "0.7713236", "0.7709932", "0.76808083", "0.76730156", "0.7629402", "0.7613927", "0.76099193", "0.75702465", "0.7551506", "0.7521027", "0.7447909", "0.74381685", "0.7435705", "0.7403743", "0.73842245", "0.737...
0.64362323
76
/ 2. get DB Connection
function getConnection() { // 1. create connection obj $con = new mysqli($this->host, $this->id, $this->pw, $this->dbName); // 2. check if($con->connect_errno) { return false; } return $con; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getConnection(){\n return static::$db;\n }", "public static function conn()\n {\n return (static::inst())::$_db;\n }", "public function getDbConnection()\n {\n $this->conn = Registry::get('db');\n }", "protected static function getDatabaseCon...
[ "0.86307126", "0.86262375", "0.85332894", "0.8458182", "0.8456325", "0.8456325", "0.84319764", "0.84319764", "0.84319764", "0.843153", "0.843153", "0.843153", "0.843153", "0.843153", "0.843153", "0.843153", "0.843153", "0.843153", "0.843153", "0.843153", "0.843153", "0.8431...
0.0
-1
Render facebook comment viewhelper
public function render() { $appId = $this->arguments['appId']; $locale = $this->arguments['locale']; $code = '<div id="fb-root"></div>'; $scriptFile = 'http://connect.facebook.net/' . $locale . '/all.js#appId=' . htmlspecialchars($appId) . '&amp;xfbml=1'; $scriptTag = $this->documentHead->wrap(NULL, $scriptFi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render($model)\n {\n return view('comments::public._comments_facebook', ['model' => $model]);\n }", "function doCommentDiv($p_commentTarget){\n\t\techo '<div class=\"fb-comments\" data-href=\"'. $p_commentTarget .'\" data-width=\"350\" data-numposts=\"3\" data-colorscheme=\"light\"><...
[ "0.70649433", "0.68574065", "0.67960554", "0.6755998", "0.65535295", "0.6515211", "0.6441692", "0.63309836", "0.6329245", "0.6325385", "0.6308685", "0.6261741", "0.6259713", "0.6245376", "0.62325114", "0.6231672", "0.6223177", "0.6186089", "0.6164162", "0.6137066", "0.6092897...
0.7577332
0
Enable (or disable) the SQL LIKE syntax (_ for any chars, % for any strings) If enabled, the search term is automatically escaped
public function useLikeSyntax(bool $useLikeSyntax = true): Wildcard { $this->useLikeSyntax = $useLikeSyntax; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function safe_sql_like($string){\n global $wpdb;\n\n // safe\n $string = $wpdb->prepare(\"%s\", $string);\n // trim '\n $tmp = explode(\"'\", $string);\n array_shift($tmp);\n array_pop($tmp);\n $string = implode(\"'\", $tmp);\n\n // Safe ...
[ "0.6524427", "0.64367485", "0.6341752", "0.6142244", "0.6113179", "0.61086196", "0.60685605", "0.5942321", "0.59394175", "0.5920239", "0.5889103", "0.5838482", "0.5745852", "0.57135224", "0.570253", "0.5677892", "0.56476593", "0.56382793", "0.56084836", "0.5605581", "0.560529...
0.50771004
77
Do not ends with wildcard, or wildcard is escaped
private function isPrefixSearch(string $value): bool { if ($value[-1] !== '*' || $value[-2] === '\\') { return false; } // Filter has "?" metacharacter if (substr_count($value, '?') > substr_count($value, '\?')) { return false; } // Filter ha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function preg_wildcard($pat) {\n return str_replace(array('*', '?', '/'),array('.*', '.', '\\/'), $pat);\n}", "public function globalStringConditionMatchesWildcardExpression() {}", "public function globalStringConditionMatchesWildcardExpression() {}", "public function lastTokenShouldUseWildcard(): bool\n ...
[ "0.7027334", "0.6213926", "0.6213602", "0.6180239", "0.6141113", "0.597084", "0.59657454", "0.59299636", "0.5901923", "0.58339405", "0.58012354", "0.5770793", "0.57431763", "0.57200086", "0.56906044", "0.56273824", "0.5586577", "0.55767465", "0.55575657", "0.55412656", "0.552...
0.0
-1
mentors cannot choose another mentor
public function index() { if($this->user['menteer_type']==37) redirect('/dashboard','refresh'); if($this->user['match_status']=='active') redirect('/dashboard','refresh'); $matches = $this->session->userdata('matches'); // make sure we have matches ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function select($mentor_id=0) {\n\n $mentor_id = $this->input->get('id');\n\n // mentors cannot choose another mentor\n if($this->user['menteer_type']==37)\n redirect('/dashboard','refresh');\n\n // if already have a selection can't go back\n if($this->user['is_...
[ "0.5846575", "0.57822627", "0.5388795", "0.5173131", "0.51635134", "0.51605517", "0.5138847", "0.51092035", "0.50513875", "0.5048762", "0.4990361", "0.49639013", "0.49631122", "0.49460816", "0.49441427", "0.49330527", "0.49155772", "0.49139014", "0.48955014", "0.48932654", "0...
0.0
-1
mentor accepts or declines
public function profile() { // lets check if we can access this method if($this->user['menteer_type']==37 && $this->user['is_matched'] > 0 && $this->user['match_status']=='pending') { // get mentee $mentee_id = $this->user['is_matched']; $mentee['profile']['use...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function checkIfMentor($user){\n\t\tif ($user->is_mentor == 1){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function manage($verb, $args) {\n\t\treturn false;\n\t}", "function mOR(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$...
[ "0.5110424", "0.5050101", "0.50403863", "0.5001049", "0.49633408", "0.491917", "0.48724106", "0.4865056", "0.4854512", "0.48530373", "0.48507464", "0.48219568", "0.4802577", "0.4790842", "0.478329", "0.47725713", "0.47666234", "0.4752614", "0.4752614", "0.4752614", "0.4752614...
0.0
-1
accept match (mentor function)
public function accept() { if($this->user['menteer_type']==37 && $this->user['is_matched'] > 0 && $this->user['match_status']=='pending') { // mentor update $update_user = array( 'id' => $this->session->userdata('user_id'), 'data' => array('match_sta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function match( $data );", "public function matching(Closure $match);", "public function runMatch()\n {\n }", "public function match(mixed $value);", "public function matches( Match_Target $target );", "public function match($value);", "public function GetMatch ();", "public function mat...
[ "0.71907055", "0.6471715", "0.638197", "0.62994796", "0.6288225", "0.6278325", "0.6274124", "0.6178292", "0.59931046", "0.59511244", "0.59471726", "0.59334964", "0.58739156", "0.5837967", "0.5827963", "0.576698", "0.57628757", "0.5684752", "0.56835234", "0.5678467", "0.567242...
0.0
-1
decline match (mentor function)
public function decline() { if($this->user['menteer_type']==37 && $this->user['is_matched'] > 0 && $this->user['match_status']=='pending') { // mentor update $update_user = array( 'id' => $this->session->userdata('user_id'), 'data' => array('is_match...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function finish_match($buy_did, $sell_did)\n {\n }", "public function match() {\r\n\t\treturn false;\r\n\t}", "public function deleteMatch(){\n\t\t$this->getDbTable()->delete(\"\");\n\t}", "public function resetMatches() {\n //right now: set all current matches on status = 33 before the new results\n ...
[ "0.60703385", "0.58049226", "0.5779047", "0.5549239", "0.55415714", "0.5415933", "0.53828436", "0.534883", "0.533149", "0.5278182", "0.526752", "0.52652186", "0.52623636", "0.5149607", "0.5136257", "0.513613", "0.5134354", "0.5118896", "0.5093481", "0.50552243", "0.4998438", ...
0.0
-1
select mentor and send email notification
public function select($mentor_id=0) { $mentor_id = $this->input->get('id'); // mentors cannot choose another mentor if($this->user['menteer_type']==37) redirect('/dashboard','refresh'); // if already have a selection can't go back if($this->user['is_matched'] > 0)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function accept()\n {\n\n if($this->user['menteer_type']==37 && $this->user['is_matched'] > 0 && $this->user['match_status']=='pending') {\n\n // mentor update\n $update_user = array(\n 'id' => $this->session->userdata('user_id'),\n 'data' => arr...
[ "0.6525229", "0.6318558", "0.615327", "0.61442953", "0.61298907", "0.6129569", "0.60923856", "0.6052561", "0.59964365", "0.59848976", "0.59797215", "0.59721243", "0.59204525", "0.5909001", "0.59074974", "0.5882181", "0.587132", "0.5868392", "0.5851699", "0.58496636", "0.58426...
0.6864152
0
/brief Converte uma string UTF8 para WindowsCP1252
public static function convert_to_windowscp1252($string) { $chars = array( 'Ç', 'Ä', '£', 'Ä', 'Å', 'Ç', 'É', 'Ñ', 'Ö', 'Ü', 'á', 'à', 'â', 'ä', 'ã', 'å', 'ç', 'é', 'è', 'ê', 'ë', 'í', 'ì', 'î', 'ï', 'ñ', 'ó', 'ò', 'ô', 'ö', 'õ', 'ú', 'ù', 'û', 'ü', '†', '°', '¢', '£', '§', '•', '¶', 'ß', '®', '©', '™', '´', '¨', '≠'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function win1252_to_utf8($data){\r\n\treturn iconv(\"Windows-1252\", \"UTF-8\", $data);\r\n}", "function utf8_to_win1252($data){\r\n\treturn iconv(\"UTF-8\", \"Windows-1252\", $data);\r\n}", "public static function windows_1252_to_utf8($string)\n {\n }", "function encoding_8859_to_win1250($stri...
[ "0.8501904", "0.84314567", "0.8156755", "0.7631775", "0.7471811", "0.74398994", "0.73572135", "0.73270977", "0.7305906", "0.7262093", "0.7118586", "0.7116611", "0.70313555", "0.69877005", "0.6956401", "0.69540775", "0.6744725", "0.6587761", "0.6574092", "0.65122455", "0.64969...
0.7489374
4
Display a listing of the resource.
public function index() { $data = array(); $data['records'] = BeTagModel::getTags(); $data['actives'] = array('xhbd-contents', 'list-tag'); $data['action_controller'] = 'list_tag'; return view('backend.tags.be_tags_view', compact('data')); }
{ "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
Display a listing of the resource.
public function createTag() { $data = array(); $data['actives'] = array('xhbd-contents'); $data['action_controller'] = 'create_tag'; return view('backend.tags.be_create_tag_view', compact('data')); }
{ "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
Display a listing of the resource.
public function saveTag(BeTagValidationRequest $request) { $data = array(); $inserts = array( 'name' => $request->get('name'), 'name_alias' => SimpleClass::trans_word($request->get('name')), 'status' => 1, 'created_by' => 'Hungsama', 'updated_by' => '', 'created_at' => time...
{ "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
Display a listing of the resource.
public function detailTag($id) { $data = array(); $data['actives'] = array('xhbd-contents'); $data['record'] = BeTagModel::find($id); $data['action_controller'] = 'update_tag'; return view('backend.tags.be_detail_tag_view', compact('data')); }
{ "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
Display a listing of the resource.
public function updateTag($id, BeTagValidationRequest $request) { $updates = array( 'name' => $request->get('name'), 'name_alias' => SimpleClass::trans_word($request->get('name')), 'status' => $request->get('name'), 'created_by' => 'Hungsama', 'updated_by' => '', 'created_at' =...
{ "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
Display a listing of the resource.
public function deleteTag($id) { BeTagModel::find($id)->delete(); DB::table('tag_and_article')->where('tag_id', $id)->delete(); Session::flash('success', SimpleClass::success_notice('Delete a tag is successfully')); return redirect()->route('be-tag.show'); }
{ "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
API Function to generate a url path for use by other modules/themes. Example Usage: $path = getdirections_location_user_path('to', $uid); $url = l(t('Get directions'), $path);
function getdirections_location_user_path($direction, $uid) { if (module_exists('location') && is_numeric($uid) && ($direction == 'to' || $direction == 'from')) { return "getdirections/location_user/$direction/$uid"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getdirections_locations_user_path($fromuid, $touid) {\n if (module_exists('location') && is_numeric($fromuid) && is_numeric($touid)) {\n return \"getdirections/locations_user/$fromuid/$touid\";\n }\n}", "function getdirections_locations_user_via_path($uids) {\n if (module_exists('location')) {\n ...
[ "0.73062706", "0.7116283", "0.70682544", "0.6755426", "0.65667075", "0.6556506", "0.6378996", "0.63314223", "0.628879", "0.6072747", "0.606733", "0.60082936", "0.59843796", "0.59759027", "0.5945031", "0.589713", "0.58799547", "0.5866492", "0.5853738", "0.57988876", "0.5767172...
0.7380207
0
API Function to generate a url path for use by other modules/themes. Example Usage: $path = getdirections_locations_path($fromnid, $tonid); $url = l(t('Get directions'), $path);
function getdirections_locations_path($fromnid, $tonid) { if (module_exists('location') && is_numeric($fromnid) && is_numeric($tonid)) { return "getdirections/locations/$fromnid/$tonid"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getdirections_locations_via_path($nids) {\n if (module_exists('location')) {\n return \"getdirections/locations_via/$nids\";\n }\n}", "function getdirections_location_u2n_path($fromuid, $tonid) {\n if (module_exists('location') && is_numeric($fromuid) && is_numeric($tonid)) {\n return \"getdire...
[ "0.7986049", "0.75850767", "0.74275815", "0.72004217", "0.7007548", "0.6723315", "0.67168885", "0.6415161", "0.640555", "0.6370351", "0.62349224", "0.59919417", "0.59185445", "0.5873872", "0.58326685", "0.5742827", "0.5681742", "0.5680316", "0.5660155", "0.56338495", "0.55797...
0.83869505
0
API Function to generate a url path for use by other modules/themes. Example Usage: $path = getdirections_locations_user_path($fromuid, $touid); $url = l(t('Get directions'), $path);
function getdirections_locations_user_path($fromuid, $touid) { if (module_exists('location') && is_numeric($fromuid) && is_numeric($touid)) { return "getdirections/locations_user/$fromuid/$touid"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getdirections_location_user_path($direction, $uid) {\n if (module_exists('location') && is_numeric($uid) && ($direction == 'to' || $direction == 'from')) {\n return \"getdirections/location_user/$direction/$uid\";\n }\n}", "function getdirections_locations_user_via_path($uids) {\n if (module_exist...
[ "0.7770814", "0.7583894", "0.74374145", "0.74259233", "0.6624678", "0.6588264", "0.65198416", "0.64954454", "0.6440162", "0.59836113", "0.59371746", "0.5868871", "0.5832908", "0.5772907", "0.5767991", "0.57045245", "0.57042265", "0.5669415", "0.5646346", "0.56393105", "0.5580...
0.81974965
0
API Function to generate a url path for use by other modules/themes. Example Usage: $uids = "1,2,3,4"; where '1' is the uid of the starting point '4' is the uid of the end point and the numbers in between are the uids of the waypoints $path = getdirections_locations_user_via_path($uids); $url = l(t('Get directions'), $...
function getdirections_locations_user_via_path($uids) { if (module_exists('location')) { return "getdirections/locations_user_via/$uids"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getdirections_locations_user_path($fromuid, $touid) {\n if (module_exists('location') && is_numeric($fromuid) && is_numeric($touid)) {\n return \"getdirections/locations_user/$fromuid/$touid\";\n }\n}", "function getdirections_location_user_path($direction, $uid) {\n if (module_exists('location') ...
[ "0.73111373", "0.688177", "0.6846103", "0.6696979", "0.63262826", "0.60690075", "0.6022626", "0.6009777", "0.57877827", "0.57311195", "0.5601593", "0.55471545", "0.55305636", "0.54062057", "0.5396578", "0.52734786", "0.5237174", "0.5209232", "0.5159071", "0.51410407", "0.5085...
0.8433878
0
API Function to generate a url path for use by other modules/themes. Example Usage: $nids = "1,2,3,4"; where '1' is the nid of the starting point '4' is the nid of the end point and the numbers in between are the nids of the waypoints $path = getdirections_locations_via_path($nids); $url = l(t('Get directions'), $path)...
function getdirections_locations_via_path($nids) { if (module_exists('location')) { return "getdirections/locations_via/$nids"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getdirections_locations_path($fromnid, $tonid) {\n if (module_exists('location') && is_numeric($fromnid) && is_numeric($tonid)) {\n return \"getdirections/locations/$fromnid/$tonid\";\n }\n}", "function getdirections_location_n2u_path($fromnid, $touid) {\n if (module_exists('location') && is_numer...
[ "0.7175524", "0.68015826", "0.661541", "0.6377787", "0.6320532", "0.61718243", "0.6004077", "0.5822857", "0.5624021", "0.55894077", "0.5580945", "0.5544744", "0.54988974", "0.54529357", "0.5404151", "0.5344036", "0.51976854", "0.51917684", "0.51637906", "0.5160891", "0.510145...
0.7854525
0
API Function to generate a url path for use by other modules/themes. Example Usage: $path = getdirections_location_u2n_path($fromuid, $tonid); $url = l(t('Get directions'), $path);
function getdirections_location_u2n_path($fromuid, $tonid) { if (module_exists('location') && is_numeric($fromuid) && is_numeric($tonid)) { return "getdirections/location_u2n/$fromuid/$tonid"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getdirections_location_n2u_path($fromnid, $touid) {\n if (module_exists('location') && is_numeric($fromnid) && is_numeric($touid)) {\n return \"getdirections/location_u2n/$fromnid/$touid\";\n }\n}", "function getdirections_locations_path($fromnid, $tonid) {\n if (module_exists('location') && is_nu...
[ "0.827039", "0.73324925", "0.7306781", "0.7127578", "0.7120952", "0.6827245", "0.6713223", "0.6169454", "0.57783556", "0.5768576", "0.5477448", "0.5447109", "0.5434358", "0.5426796", "0.53442603", "0.5274352", "0.5254341", "0.521777", "0.52060145", "0.5204246", "0.5191419", ...
0.8674704
0
API Function to generate a url path for use by other modules/themes. Example Usage: $path = getdirections_location_n2u_path($fromnid, $touid); $url = l(t('Get directions'), $path);
function getdirections_location_n2u_path($fromnid, $touid) { if (module_exists('location') && is_numeric($fromnid) && is_numeric($touid)) { return "getdirections/location_u2n/$fromnid/$touid"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getdirections_location_u2n_path($fromuid, $tonid) {\n if (module_exists('location') && is_numeric($fromuid) && is_numeric($tonid)) {\n return \"getdirections/location_u2n/$fromuid/$tonid\";\n }\n}", "function getdirections_locations_user_path($fromuid, $touid) {\n if (module_exists('location') && ...
[ "0.8035006", "0.7386157", "0.7182983", "0.6996523", "0.6926344", "0.6739206", "0.6527484", "0.6143385", "0.58234125", "0.5726031", "0.5716199", "0.57079077", "0.5628011", "0.5590719", "0.5566664", "0.5502422", "0.5493402", "0.54780644", "0.5466773", "0.5428348", "0.5419628", ...
0.85261977
0
API Function to generate a url path for use by other modules/themes. Example Usage: $path = getdirections_location_latlon_path('to', '1.1234,1.234', 'my place'); $url = l(t('Get directions'), $path);
function getdirections_location_latlon_path($direction, $latlon, $locs='') { if (($direction == 'to' || $direction == 'from') && preg_match("/[0-9.\-],[0-9.\-]/", $latlon)) { $out = "getdirections/latlon/$direction/$latlon"; if ($locs) { $out .= "/$locs"; } return $out; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_directions( $location ) {\n\treturn directions_base_url . urlencode( str_replace( \"\\n\", ', ', $location->address ) ) // change newlines into comma+space so google maps can process it properly\n\t . '/@' . $location->latitude . ',' . $location->longitude . ',17z/';\n\t// https://www.google.co...
[ "0.72381365", "0.6965551", "0.6951273", "0.66551095", "0.6584612", "0.6357827", "0.63563216", "0.6332807", "0.63172734", "0.60717595", "0.59265697", "0.59203523", "0.5918222", "0.5891961", "0.58176684", "0.5808852", "0.5773072", "0.56945354", "0.56778425", "0.5596748", "0.559...
0.774524
0
API Function to generate a url path for use by other modules/themes. Example Usage: $path = getdirections_location_id_path('to', $lid); $url = l(t('Get directions'), $path);
function getdirections_location_id_path($direction, $lid) { if (module_exists('location') && is_numeric($lid) && ($direction == 'to' || $direction == 'from')) { return "getdirections/location_id/$direction/$lid"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getdirections_locations_path($fromnid, $tonid) {\n if (module_exists('location') && is_numeric($fromnid) && is_numeric($tonid)) {\n return \"getdirections/locations/$fromnid/$tonid\";\n }\n}", "function getdirections_location_u2n_path($fromuid, $tonid) {\n if (module_exists('location') && is_numer...
[ "0.7236587", "0.69467646", "0.6846566", "0.66312003", "0.65743107", "0.6504569", "0.63473", "0.6314242", "0.6307196", "0.6271322", "0.62691057", "0.62445956", "0.6150931", "0.6120914", "0.60790056", "0.5985809", "0.58399475", "0.5808222", "0.5808192", "0.57738644", "0.5770922...
0.8041021
0
API Function to setup a map with two points
function getdirections_locations_bylatlon($fromlocs, $fromlatlon, $tolocs, $tolatlon, $width='', $height='') { return getdirections_locations($fromlocs, $fromlatlon, $tolocs, $tolatlon, $width, $height); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init($x1, $y1, $x2, $y2) {}", "function map(string $docuri) {\n $map = [\n 'title'=> 'carte '.$this->title,\n 'view'=> ['latlon'=> [47, 3], 'zoom'=> 6],\n ];\n $map['bases'] = [\n 'cartes'=> [\n 'title'=> \"Cartes IGN\",\n 'type'=> 'TileLayer',\n 'url'...
[ "0.6178358", "0.59508914", "0.5788489", "0.56822544", "0.554278", "0.5519679", "0.5507731", "0.5440751", "0.5418437", "0.53905624", "0.5362328", "0.5344105", "0.52645737", "0.52640826", "0.52540594", "0.5242742", "0.52311367", "0.5222009", "0.5221249", "0.5212175", "0.5195487...
0.0
-1
Display a listing of the resource.
public function index() { $units=Unit::select()->orderBy('id')->paginate(); return view('pages.admin.unit.index',compact('units')); }
{ "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('pages.admin.unit.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) { $this->validate($request,[ 'unit'=> 'required|unique:units' ]); Unit::create($request->all()); Brian2694Toastr::success('Unit Created Successfully', 'Success'); return redirect()->route('admin.unit.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(Unit $unit) { return view('pages.admin.unit.edit',compact('unit')); }
{ "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, Unit $unit) { $this->validate($request,[ 'unit'=> 'required' ]); $unit->update($request->all()); Brian2694Toastr::success('Unit Updated Successfully', 'Success'); return redirect()->route('admin.unit.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "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
Reset quantity to all of departments of supplier what were not given to the method
public function resetQuantityNotIn(array $departments, Supplier $supplier, Shop $shop): int { $qb = $this->createQueryBuilder('d'); $IdsNotInExpr = $qb->expr()->notIn('d.id', ':departmentIds'); return (int) $qb->update() ->set('d.quantity', 0) ->where($IdsNotInExpr) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reset()\n {\n $this->values[self::EQUIPMENTING_ITEM] = array();\n $this->values[self::HAVING_ITEM] = array();\n }", "public function recalc(){\n\t\tforeach($_SESSION['panier'] as $product_id => $quantity){\n\t\t\tif(isset($_POST['panier']['quantity'][$product_id])){\t\t\t\n\t\...
[ "0.62331516", "0.58163726", "0.5627147", "0.55655825", "0.55271214", "0.5480329", "0.5449461", "0.5436912", "0.54091483", "0.53984547", "0.53947747", "0.5388323", "0.5374788", "0.53488964", "0.53362155", "0.5335734", "0.5328582", "0.53280795", "0.5323695", "0.53133184", "0.52...
0.6489516
0
Find Product Variants by priority within variant in departments
public function findVariantStockByVariantPriority(ProductVariant $productVariant): array { try { $maxPriority = (int) $this->queryMaxPriorityWithinVariant($productVariant)->getSingleScalarResult(); } catch (NoResultException $exception) { $maxPriority = 0; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_variant_options_selected($id_product, $variant_options=array())\n{\n\tglobal $mysqli, $id_cart_discount;\n\t\t\n\t$output='';\n\t\t\n\t$groups=get_variant_groups($id_product);\n\t\n\t// build sql \n\t// get all groups for this product\n\tif (sizeof($groups)) {\t\n\t\t$id_product_variant_group = key($g...
[ "0.560906", "0.5606102", "0.5233823", "0.51275605", "0.50741976", "0.5020709", "0.4924442", "0.48794526", "0.4874101", "0.4851769", "0.4827808", "0.47635135", "0.4763184", "0.47443753", "0.47353664", "0.4714415", "0.47102633", "0.47086537", "0.4682811", "0.46719468", "0.46655...
0.48555088
9
Find Product Variants by priority within product in departments
public function findVariantStockByProductPriority(ProductVariant $productVariant): array { try { $maxPriority = (int) $this ->queryMaxPriorityWithinProduct($productVariant->getProduct()) ->getSingleScalarResult(); } catch (NoResultException $exception) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_variant_options($id_product, $variant_options=array())\n{\n\tglobal $mysqli, $id_cart_discount;\n\t\n\t$output='';\n\t\n\t$groups=get_variant_groups($id_product);\n\t\n\t// build sql \n\t// get all groups for this product\n\tif (sizeof($groups)) {\t\t\n\t\tend($groups); \n\t\t$id_product_variant_group...
[ "0.5606432", "0.5581592", "0.5373764", "0.5250884", "0.52380586", "0.5196821", "0.51117235", "0.5053214", "0.50324804", "0.50180066", "0.5006739", "0.49829084", "0.4967952", "0.493087", "0.49162418", "0.49032164", "0.48989975", "0.4893921", "0.489023", "0.48861215", "0.488164...
0.4819661
27
Query to find max value of priority in Departments within ProductVariant Use to update stocks by priority within ProductVariant
public function queryMaxPriorityWithinVariant(ProductVariant $productVariant): Query { $qb = $this->createQueryBuilder('d'); return $qb ->select($qb->expr()->max('d.priority')) ->where('d.productVariant = :productVariant') ->setParameter('productVariant', $produc...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function queryMaxPriorityWithinProduct(Product $product): Query\n {\n $qb = $this->createQueryBuilder('d');\n\n return $qb\n ->select($qb->expr()->max('d.priority'))\n ->innerJoin('d.productVariant', 'pv')\n ->where('pv.product = :product')\n ->se...
[ "0.5611845", "0.55634594", "0.55188906", "0.54221916", "0.52013373", "0.51861286", "0.51384854", "0.5124619", "0.5112244", "0.5099469", "0.5098224", "0.5093825", "0.50820506", "0.5073577", "0.5049986", "0.5008345", "0.4957796", "0.49454227", "0.49358344", "0.49246818", "0.491...
0.60450184
0
Query to find max value of priority in Departments within Product Use to update stocks by priority within Product
public function queryMaxPriorityWithinProduct(Product $product): Query { $qb = $this->createQueryBuilder('d'); return $qb ->select($qb->expr()->max('d.priority')) ->innerJoin('d.productVariant', 'pv') ->where('pv.product = :product') ->setParameter('p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_max_product_price()\n\t{\n\t\t$this->db->select('MAX(product_selling_price) AS price')->from('product')->where(\"product_status = 1\");\n\t\t$query = $this->db->get();\n\t\t$result = $query->row();\n\t\t\n\t\treturn $result->price;\n\t}", "function getPriceMax($game_id, $round_number, $produc...
[ "0.5953132", "0.5499873", "0.54741406", "0.54511863", "0.53981304", "0.5387981", "0.5378861", "0.5378861", "0.53587294", "0.53362715", "0.52937794", "0.5286684", "0.5251708", "0.52501214", "0.52501214", "0.52501214", "0.52501214", "0.52501214", "0.5249447", "0.5249447", "0.52...
0.57400274
1
Run the database seeds.
public function run() { $user = new User(); $user->name = 'Amelie'; $user->last_name = 'LaJocande'; $user->email = 'Amelie.LaJocande@example.com'; $user->password = 'password'; $user->gender = 'female'; $user->phone = '1122334455'; $user->save(); ...
{ "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
/ Auto Update Major on New Installs and default for all other with a setting section to customize.
function mm_auto_update_make_bool( $value, $default = true ) { if ( 'false' === $value ) { $value = false; } if ( 'true' === $value ) { $value = true; } if ( true !== $value && false !== $value ) { $value = $default; } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function core_auto_updates_settings()\n {\n }", "public function autoupdate() {\n\t\t$options = $this->get_option();\n\t\t$update_successful = true;\n\n\t\tif (version_compare($options['version'], '2.0', '<')) {\n\t\t\tglobal $wpdb;\n\n\t\t\t$sql = \"\n\t\t\t\tUPDATE $wpdb->postmeta\n\t\t\t\tSET meta_key='...
[ "0.6609055", "0.63501275", "0.6070087", "0.60391474", "0.59907746", "0.5892149", "0.580209", "0.57587403", "0.57587403", "0.5744665", "0.5701212", "0.56874806", "0.5643235", "0.5626332", "0.5625544", "0.5619536", "0.5616154", "0.5601051", "0.55810654", "0.557101", "0.5567582"...
0.0
-1
Required. A list of requirements for the `AccessLevel` to be granted. Generated from protobuf field repeated .google.identity.accesscontextmanager.v1.Condition conditions = 1;
public function getConditions() { return $this->conditions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setConditions($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Identity\\AccessContextManager\\V1\\Condition::class);\n $this->conditions = $arr;\n\n return $this;\n }", "public function getConditions()\n ...
[ "0.71522456", "0.57535446", "0.56325233", "0.54550606", "0.538453", "0.5242028", "0.51978713", "0.51710004", "0.51710004", "0.5136562", "0.51305324", "0.5112856", "0.5081591", "0.4996603", "0.4996603", "0.4996603", "0.49954885", "0.49875125", "0.49646667", "0.49311426", "0.49...
0.5157987
12
Required. A list of requirements for the `AccessLevel` to be granted. Generated from protobuf field repeated .google.identity.accesscontextmanager.v1.Condition conditions = 1;
public function setConditions($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Identity\AccessContextManager\V1\Condition::class); $this->conditions = $arr; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConditions()\n {\n if (array_key_exists(\"conditions\", $this->_propDict)) {\n if (is_a($this->_propDict[\"conditions\"], \"\\Microsoft\\Graph\\Model\\ConditionalAccessConditionSet\") || is_null($this->_propDict[\"conditions\"])) {\n return $this->_propDict[\"...
[ "0.5751854", "0.56286883", "0.5454148", "0.5385327", "0.52432436", "0.5196044", "0.5168579", "0.5168579", "0.515552", "0.515552", "0.515552", "0.515552", "0.5132552", "0.5130318", "0.511078", "0.50810605", "0.49957433", "0.49949503", "0.49949503", "0.49949503", "0.49879435", ...
0.71494347
0
How the `conditions` list should be combined to determine if a request is granted this `AccessLevel`. If AND is used, each `Condition` in `conditions` must be satisfied for the `AccessLevel` to be applied. If OR is used, at least one `Condition` in `conditions` must be satisfied for the `AccessLevel` to be applied. Def...
public function getCombiningFunction() { return $this->combining_function; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCombiningFunction($var)\n {\n GPBUtil::checkEnum($var, \\Google\\Identity\\AccessContextManager\\V1\\BasicLevel\\ConditionCombiningFunction::class);\n $this->combining_function = $var;\n\n return $this;\n }", "public function setConditions($var)\n {\n $arr ...
[ "0.66343427", "0.5844398", "0.5750732", "0.5552922", "0.5443589", "0.5408362", "0.53123116", "0.5230698", "0.520804", "0.5097882", "0.50930136", "0.5060989", "0.49871585", "0.49624908", "0.49483702", "0.4875082", "0.48714745", "0.48488906", "0.4842293", "0.4817427", "0.477097...
0.0
-1
How the `conditions` list should be combined to determine if a request is granted this `AccessLevel`. If AND is used, each `Condition` in `conditions` must be satisfied for the `AccessLevel` to be applied. If OR is used, at least one `Condition` in `conditions` must be satisfied for the `AccessLevel` to be applied. Def...
public function setCombiningFunction($var) { GPBUtil::checkEnum($var, \Google\Identity\AccessContextManager\V1\BasicLevel\ConditionCombiningFunction::class); $this->combining_function = $var; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setConditions($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Identity\\AccessContextManager\\V1\\Condition::class);\n $this->conditions = $arr;\n\n return $this;\n }", "protected function buildFilter($condi...
[ "0.58474684", "0.5752438", "0.5550455", "0.5443324", "0.54081345", "0.53155273", "0.5229609", "0.52095854", "0.5100465", "0.5095311", "0.5061682", "0.49858", "0.49638584", "0.49496084", "0.48771054", "0.48731056", "0.48482183", "0.4838695", "0.48177764", "0.47720337", "0.4748...
0.66342574
0
Determine if the user is authorized to make this request.
public function authorize() { 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 [ "cinema" => "required", "name" => "required", "seat" => "required", "couts" => "required", "type" => "required" ]; }
{ "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
Display a listing of the resource.
public function index(ShippingsDatatable $shippings) { return $shippings->render('admin.shippings.index', ['title' => trans('admin.shippings')]); }
{ "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.shippings.create', ['title' => trans('admin.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() { $data = $this->validate(request(), [ 'name' => 'required', 'user_id' => 'required|numeric', 'lat' => 'sometimes|nullable|numeric', 'lng' => 'sometimes|nullable|numeric', 'logo' =...
{ "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) { $shipping = Shipping::find($id); return view('admin.shippings.edit', ['title' => trans('admin.edit'), 'shipping' => $shipping]); }
{ "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) { $data = $this->validate(request(), [ 'name' => 'required', 'user_id' => 'required|numeric', 'lat' => 'sometimes|nullable|numeric', 'lng' => 'sometimes|nullable|numeric', 'logo' ...
{ "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) { $shipping = Shipping::find($id); Storage::delete($shipping->logo); $shipping->delete(); session()->flash('success', trans('admin.record_deleted')); return redirect(aurl('shippings')); }
{ "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
Creates a new Patient model.
public function actionCreate() { $model = new PatientDetails(); if ($model->load(Yii::$app->request->post()) && $model->validate()) { $model->image = UploadedFile::getInstance($model,'image'); if($model->image) { $ext = $model->image->getExtensio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n\t{\n\t\t$model=new Patient;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Patient']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Patient'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(a...
[ "0.73976547", "0.70742434", "0.6810431", "0.67133874", "0.6711339", "0.6660379", "0.66204035", "0.6578873", "0.65609676", "0.65271187", "0.65271187", "0.65271187", "0.65271187", "0.65271187", "0.6523478", "0.6455385", "0.64486754", "0.6416719", "0.6406007", "0.6406007", "0.64...
0.6514638
15
Create a MundiPagg order
public function create( $orderData, $cart, $paymentMethod, $cardToken = null, $cardId = null, $multiBuyer = null ) { $items = $this->prepareItems($cart->getProducts()); $createAddressRequest = $this->createAddressRequest($orderData); $createCu...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createCustomOrder()\n {\n AutoEvent::select('custom_order')->increment('custom_order', 1);\n $this->custom_order = 0;\n }", "public function generateOrder();", "public static function createOrder ()\n\t{\n $user=Auth::user();// here to get the user info and store ...
[ "0.6733645", "0.66067356", "0.65446466", "0.64934385", "0.6463566", "0.63408864", "0.61966187", "0.6158629", "0.61159575", "0.60384256", "0.6036333", "0.59611416", "0.5951484", "0.59329516", "0.589721", "0.58471054", "0.58091503", "0.5799849", "0.5798137", "0.5794575", "0.577...
0.0
-1
Prepare items to API's format
private function prepareItems($products) { $items = array(); foreach ($products as $product) { $items[] = array( 'amount' => number_format($product['price'], 2, '', ''), 'description' => $product['name'], 'quantity' => $product['qua...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function convertSaleItemsData();", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n {\n }", "public function prepare_items()\n ...
[ "0.62497866", "0.620974", "0.6208165", "0.6207067", "0.6207067", "0.6207067", "0.6178721", "0.60258514", "0.60104376", "0.59956044", "0.5959608", "0.59489644", "0.58541507", "0.58541507", "0.58541507", "0.58541507", "0.58541507", "0.58541507", "0.58541507", "0.58541507", "0.5...
0.0
-1
Get global setting of module and return true if is AuthAndCapture and false if is AuthOnly
private function isCapture() { return $this->openCart->config->get('payment_mundipagg_credit_card_operation') != 'Auth'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAuthMode() {}", "public function getAuthMode();", "public function isAuth();", "public function is_auth()\r\n\t{\r\n\t\tstatic $authorized = null;\r\n\r\n\t\tif(isset($authorized))\r\n\t\t\treturn $authorized;\r\n\r\n\t\t$authorized = false;\r\n\t\t$token = Options::get('picasa_token_' . U...
[ "0.6842313", "0.68203586", "0.67022276", "0.6636502", "0.66309005", "0.6626436", "0.66032875", "0.65499914", "0.65335315", "0.6481898", "0.6417503", "0.64080495", "0.640692", "0.6392273", "0.63815", "0.63654596", "0.62618107", "0.62182194", "0.6210427", "0.621025", "0.6207828...
0.5756531
77
Update opencart order status with the mundipagg translated status
public function updateOrderStatus($orderStatus, $comment = '') { $this->openCart->load->model('extension/payment/mundipagg_order_processing'); $model = $this->openCart->model_extension_payment_mundipagg_order_processing; $model->addOrderHistory( $this->openCart->session->data['o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateStatus()\n {\n $this->status = Cart::CART_STATUS_ORDERED;\n $this->save();\n }", "public function changeOrderStatus(){\r\n $cookies = new CookieModel();\r\n $cookie_id = $cookies -> read();\r\n $Form = M('userinfo');\r\n $condition_in['stu...
[ "0.71445847", "0.7066309", "0.68726814", "0.6851445", "0.68438596", "0.6800024", "0.6783931", "0.67612064", "0.67566115", "0.673354", "0.6707243", "0.66439176", "0.6621868", "0.6572211", "0.6546183", "0.6512743", "0.650429", "0.64897215", "0.6483934", "0.642679", "0.6409346",...
0.6136183
54
It maps the statuses from mundipagg and those used in opencart
public function translateStatusFromMP($response) { $statusFromMP = strtolower($response->status); $this->openCart->load->model('localisation/order_status'); $statusModel = $this->openCart->model_localisation_order_status; switch ($statusFromMP) { case 'paid': ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getStatusesInfos();", "abstract public static function getStatuses();", "public static function arrayStatuses() {\n\n /*\n $statuses = array(\n 'all' => array(\n 'label' => __( 'All', WPXSMARTSHOP_TEXTDOMAIN ),\n ...
[ "0.698775", "0.6764238", "0.66286397", "0.6617838", "0.66032803", "0.6558886", "0.64360774", "0.64227605", "0.6349276", "0.6337118", "0.6336672", "0.62732714", "0.6257526", "0.6221689", "0.61838704", "0.61663955", "0.6160691", "0.6157259", "0.61527234", "0.61262316", "0.61154...
0.58970225
44
Check if anti fraud is enabled and order amount is bigger than minimum value.
private function shouldSendAntiFraud($paymentMethod, $orderAmount) { $antiFraudSettings = new AntiFraudSettings($this->openCart); $minOrderAmount = $antiFraudSettings->getOrderMinVal(); $antiFraudStatus = $antiFraudSettings->isEnabled(); if ($antiFraudStatus && $payment...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateMinimumAmount()\n {\n return !(Mage::getStoreConfigFlag('sales/minimum_order/active')\n && Mage::getStoreConfigFlag('sales/minimum_order/multi_address')\n && !$this->getQuote()->validateMinimumAmount());\n }", "private function validate_minimum_amount() ...
[ "0.7543435", "0.6765798", "0.66069865", "0.65109134", "0.6331786", "0.6317292", "0.62049395", "0.6173517", "0.6102382", "0.59934705", "0.59390235", "0.5937438", "0.59161323", "0.58639956", "0.57997465", "0.577919", "0.57677925", "0.5721409", "0.5711012", "0.57107806", "0.5682...
0.6081097
9
Save MundiPagg customer in Opencart DB
private function saveCustomer($opencartCustomerId, $mundipaggCustomerId) { $this->mundipaggCustomerModel->create( $opencartCustomerId, $mundipaggCustomerId ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"controller\" => \"data_customer\",\n \"action\" => \"index\"\n ));\n }\n\n $_id = $this->request->getPost(\"kode_pemesan\"...
[ "0.7040579", "0.6991692", "0.6852419", "0.68315184", "0.67530775", "0.6638784", "0.65225196", "0.6490736", "0.64538664", "0.6429568", "0.64077353", "0.6389106", "0.63755393", "0.63709015", "0.63221854", "0.6312059", "0.62832594", "0.62805885", "0.62693125", "0.6250433", "0.62...
0.63002676
16
Save credit card data when it's enabled
private function saveCreditCardIfNotExists($order) { $savedCreditCard = new Creditcard($this->openCart); if (!empty($order->charges)) { foreach ($order->charges as $charge) { if ( !$savedCreditCard->creditCardExists( $charge->l...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _storeCaptureMode()\n {\n $captureMode = Mage::getStoreConfig('afterpay/afterpay_capture/capture_mode', $this->_order->getStoreId());\n \n $this->_order->setAfterpayCaptureMode($captureMode)->save();\n }", "public function save() {\n $existedCard = db_query('S...
[ "0.63744587", "0.6348948", "0.63044083", "0.6280559", "0.60270274", "0.6003482", "0.591666", "0.58753544", "0.58644736", "0.58349264", "0.58169883", "0.5816479", "0.57720065", "0.5757424", "0.57448083", "0.57421046", "0.57066685", "0.5698418", "0.5697213", "0.5693416", "0.566...
0.0
-1
Get MundiPagg crtedit card id by primary key from cards table(opencart).
private function getMundipaggCardId($cardId) { if($cardId && $cardId != "") { $savedCreditcard = new Creditcard($this->openCart); $mundiPaggCreditcardId = $savedCreditcard->getCreditcardById($cardId); return $mundiPaggCreditcardId['mundipagg_creditcard_id']; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdCard()\n {\n return $this->id_card;\n }", "public function get_postcard_id() {\n return (int) $this->get_field( 'postcard' );\n }", "function obtenerClienteID($cedula){\n\n $query = $this->db->get('cliente');\n if($query-> num_rows() > 0){\n\t \t\n $r...
[ "0.64616126", "0.6323532", "0.60815126", "0.5865622", "0.58436286", "0.5807469", "0.58003604", "0.58003604", "0.58003604", "0.5768771", "0.5760196", "0.57195956", "0.56963295", "0.56926936", "0.56640303", "0.56560004", "0.56560004", "0.56560004", "0.5654724", "0.5654724", "0....
0.60516536
3
constructor de la clase por defecto, recibe el nombre de la tabla a cargar
public function __construct($table_name = null) { if ($table_name != null) { $this->table_name = $table_name; } $this->table_label = $table_name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($className) {\n global $GLOBAL_DATATABLES;\n $this->className = $className;\n $this->tableName = $GLOBAL_DATATABLES[$className];\n $this->table = DBTable::getTable($this->tableName);\n }", "function __construct($id=\"\") {\n //echo \"ciao\";\n \n $thi...
[ "0.6960687", "0.691926", "0.67601556", "0.6751052", "0.66883874", "0.66883874", "0.6685999", "0.6647708", "0.66285956", "0.6601468", "0.6575608", "0.65689534", "0.65120876", "0.64795357", "0.64762187", "0.64638305", "0.64610624", "0.6459202", "0.6417747", "0.64028054", "0.640...
0.0
-1
/ metodos para agregar una columna
public function add_column($column) { $this->table_fields[] = $column; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addColumn()\n {\n if ($this->name || $this->timestamps) {\n $this->columns[] = [\n 'column' => $this->name,\n 'length' => $this->length,\n 'dataType' => $this->dataType,\n 'nullable' => $this->nullable,\n ...
[ "0.77943724", "0.74413925", "0.7428604", "0.7308537", "0.72828245", "0.72494245", "0.7243173", "0.7198894", "0.711113", "0.69824773", "0.6950911", "0.69479716", "0.6922472", "0.68875945", "0.68565726", "0.68267554", "0.6820497", "0.67937934", "0.6770872", "0.67610896", "0.676...
0.6688426
24
/ metodos para agregar muchas columnas
public function add_columns($columns) { foreach ($columns as $column) { $this->add_column($column); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function columns();", "public function makeColumns(){\n $hijosDetalle=$this->\n getReportedetalle()->\n where(['and', \"esdetalle='1'\", \"visiblecampo='1'\"])->\n orderBy('orden')->all();\n //echo count( $hijosDetalle);die();\n ...
[ "0.75826025", "0.73465526", "0.72714293", "0.7252098", "0.71733785", "0.71286374", "0.7112028", "0.70371646", "0.7001314", "0.6952682", "0.6946171", "0.6920126", "0.6919209", "0.6918795", "0.69088537", "0.68793255", "0.68662596", "0.6864674", "0.6848045", "0.68463355", "0.684...
0.0
-1
/ metodo para inicializar el modelo a partir de la definicion de los campos de la tabla debe llamarse al final del construct de cada model
public function init() { if (count($this->table_fields) < 1) return false; foreach ($this->table_fields as $table_field) { if ($table_field->get_primary_key()) { $this->id_field = $table_field->get_name(); } if ($table_field->get_name_key()) { $this->name_fields[] = $table_field->get_n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct () {\n $this->model = 'App\\\\' . $this->model;\n $this->model = new $this->model();\n\n // Get the column listing for a given table\n $this->table_columns = Schema::getColumnListing( $this->table );\n }", "protected function _initialize()\r\n {\r\n ...
[ "0.74383473", "0.72316474", "0.71611565", "0.7156213", "0.7104005", "0.7101568", "0.7045844", "0.7035348", "0.69759476", "0.69601285", "0.6932128", "0.69018364", "0.68946016", "0.6885808", "0.6851494", "0.684225", "0.6818042", "0.67382395", "0.67047316", "0.6701567", "0.67015...
0.0
-1
metodo para buscar registros segun algun atributo(array (column_name => value, ...))
public function findByPoperty($properties, $all=false) { if (empty($properties)) { return null; } $sql = "Select * From " . $this->table_name . " Where "; $keys = array_keys($properties); $first = true; foreach ($keys as $key) { $sql .= ($first == false ? " and " : "") . $key . " = '" . $p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function carregarPorValorAtributo($atributo, $valor) {\n $sid = \"\\\"$valor\\\"\";// else $sid = $id;\n $query = \"SELECT * FROM \" . get_class($this) . \" WHERE $atributo=$sid\";\n $this->ATRIBUTO= bd::executeSqlParaArrayTitulada($query);\n $this->id=$this->ATRIBUTO['id'];\n ...
[ "0.59805393", "0.59226686", "0.58754814", "0.58547086", "0.5851312", "0.5844592", "0.5757951", "0.5668404", "0.5660462", "0.5648322", "0.5643876", "0.5631906", "0.56150526", "0.5613322", "0.5606053", "0.56042403", "0.5601972", "0.5579324", "0.55775195", "0.5564905", "0.555705...
0.0
-1
metodo para buscar registros segun algun atributo(array (column_name => value, ...))
public function find_by_subquery($properties, $all=false) { if (empty($properties)) { return null; } $sql = "Select * From " . $this->table_name . " Where "; $keys = array_keys($properties); $first = true; foreach ($keys as $key) { $sql .= ($first == false ? " and " : "") . $key ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function carregarPorValorAtributo($atributo, $valor) {\n $sid = \"\\\"$valor\\\"\";// else $sid = $id;\n $query = \"SELECT * FROM \" . get_class($this) . \" WHERE $atributo=$sid\";\n $this->ATRIBUTO= bd::executeSqlParaArrayTitulada($query);\n $this->id=$this->ATRIBUTO['id'];\n ...
[ "0.5981594", "0.5923314", "0.58767617", "0.58547264", "0.5851516", "0.5846309", "0.5757453", "0.5669157", "0.5659465", "0.5649308", "0.5642477", "0.5631122", "0.5614361", "0.5612767", "0.56052536", "0.5604574", "0.56019974", "0.55798805", "0.55770946", "0.55651724", "0.555659...
0.0
-1
metodo adaptados para obtener un registro de la entidad por id
public function get_by_id($id) { return $this->findByPoperty(array($this->id_field => $id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getById() {}", "public function retrieveById($id);", "public function getById()\n {\n }", "public function findEntity($id);", "public function byId($id);", "public function byId($id);", "public function byId($id);", "public function byId($id);", "public function returnDetailFi...
[ "0.7399436", "0.6989384", "0.6943432", "0.6850025", "0.6849383", "0.6849383", "0.6849383", "0.6849383", "0.6843163", "0.6830796", "0.6820465", "0.6780983", "0.6776521", "0.6776521", "0.6776521", "0.6776521", "0.6776521", "0.6776521", "0.6776521", "0.6776521", "0.6776521", "...
0.0
-1
metodo para obtener un registro de una segunda tabla relacionada a la primera
public function get_fk_by_id($id, $fk_obj) { $m = $this->get_by_id($id); return $fk_obj->get_by_id($m[$fk_obj->id_field]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readTabla() {\r\n $query = 'SELECT * FROM ' . $this->tabla;\r\n\r\n\r\n \r\n\r\n $sentencia = $this->con->prepare($query);\r\n\r\n $sentencia->execute();\r\n\r\n return $sentencia;\r\n }", "public function getRecordatorio() {\n $recordatorio = $this->_...
[ "0.6351329", "0.6298846", "0.6234603", "0.6094703", "0.60683644", "0.59385264", "0.5936694", "0.58912", "0.5887032", "0.58478475", "0.5793416", "0.5790956", "0.57790524", "0.57774556", "0.57325494", "0.57306266", "0.57261825", "0.57243603", "0.57160854", "0.5706484", "0.56974...
0.0
-1
metodo para obtener un registro de una tercera tabla relacionda a la segunda
public function get_fk2_by_id($id, $fk1_obj, $fk2_obj) { $m = $this->get_fk_by_id($id, $fk1_obj); return $fk2_obj->get_by_id($m[$fk2_obj->id_field]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readTabla() {\r\n $query = 'SELECT * FROM ' . $this->tabla;\r\n\r\n\r\n \r\n\r\n $sentencia = $this->con->prepare($query);\r\n\r\n $sentencia->execute();\r\n\r\n return $sentencia;\r\n }", "function getTablaInformeAjuntament($desde,$hasta){\n \n ...
[ "0.6817334", "0.6560372", "0.645293", "0.62356794", "0.62109816", "0.6193065", "0.61564785", "0.6138139", "0.61186314", "0.61076236", "0.60823613", "0.60741234", "0.6034", "0.6020093", "0.5979574", "0.5974415", "0.59654564", "0.59486383", "0.59342897", "0.59336674", "0.592238...
0.0
-1
metodo para mostrar todos los registros retorna un array(filas) de arrays(columnas)
public function showAllRecords($properties = null) { $sql = "SELECT * FROM " . $this->table_name . ""; if($properties != null ){ $sql .=" Where "; $keys = array_keys($properties); $first = true; foreach ($keys as $key) { $sql .= ($first == false ? " and " : "") . $key . " = '" . $properti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_all() {\n $this->db->select('id, regimen, descripcion, tipo');\n $this->db->from('regimenes_fiscales');\n $this->db->where('status', 1);\n $result = $this->db->get();\n return $result->result_array();\n }", "public function getRegistros(){\n $query = $...
[ "0.6818038", "0.6660854", "0.6501254", "0.64801115", "0.6469036", "0.6458958", "0.6433052", "0.6423134", "0.6363242", "0.636321", "0.6346247", "0.6321122", "0.627119", "0.62668467", "0.62418115", "0.62343717", "0.62209296", "0.62042135", "0.62026334", "0.62018996", "0.6185375...
0.0
-1
metodo para eliminar un registro segun id
public function delete($id) { $sql = "DELETE FROM " . $this->table_name . " WHERE " . $this->id_field . " = ?"; $req = Database::getBdd()->prepare($sql); return $req->execute(array($id)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function eliminar($id)\n {\n }", "public function eliminar($id)\n {\n //\n }", "public function eliminar($id)\n {\n //\n }", "public function eliminar($id)\n {\n }", "public function eliminar($id)\n {\n }", "public function eliminar($id)\n {\n }...
[ "0.8189677", "0.81148803", "0.81148803", "0.8089877", "0.8089877", "0.8089877", "0.80125785", "0.79552406", "0.77661276", "0.76358646", "0.75659734", "0.74722636", "0.7457872", "0.7457872", "0.74415386", "0.7438009", "0.7415246", "0.7395694", "0.73925334", "0.7381098", "0.737...
0.0
-1
metodo para obtener array de registros segun id opcional
public function get_array_data($id = null) { $result = array(); if (!empty($id)) { $result[] = $this->get_by_id($id); } else { $result = $this->showAllRecords(); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Get_all_medico_by_especialidad($id){\n\t\t\tif($id == \"01\"){\n\t\t\t\t$array[] = array(\"id\"=>1222,\"name\"=>\"carlos enrique\");\n\t\t\t\t$array[] = array(\"id\"=>22,\"name\"=>\"juan enrique\");\n\t\t\t\treturn $array;\n\t\t\t}\n\t\t}", "function listar(int $id = null): array{\r\n global $...
[ "0.71446806", "0.6994586", "0.68067735", "0.67956966", "0.67197156", "0.6671239", "0.6641337", "0.66131455", "0.65775675", "0.6549662", "0.64707536", "0.64539427", "0.6382654", "0.6373225", "0.63491017", "0.63274133", "0.6318788", "0.6307229", "0.6302797", "0.62684643", "0.62...
0.5984714
59
metodo para obtener registros y mapearlos para combo generico
public function get_select_data($id = null) { $data = $this->get_array_data($id); $result = array(); foreach ($data as $row) $result[] = array( "id" => $row[$this->id_field], "name" => $this->map_name_value($row) ); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function combos()\n {\n $this->view->ambito = array('F' => 'Federal','E'=> 'Estadual','M'=>'Municipal','J'=>'Judicial');\n $this->view->estado = $this->getService('Estado')->comboEstado();\n $this->view->tipoPessoa = $this->getService('TipoPessoa')->getComboDefault(array());\n ...
[ "0.6821022", "0.67640257", "0.64696324", "0.6347687", "0.63211346", "0.6321105", "0.62873536", "0.6285097", "0.6276564", "0.6273722", "0.6258331", "0.62392735", "0.62049294", "0.6190794", "0.6178752", "0.6160541", "0.6155715", "0.61424005", "0.60990995", "0.608396", "0.606299...
0.0
-1
metodo para obtener registros y mapearlos para combo generico
public function get_select_data_with_params(array $params = null) { $data = $this->find_by_subquery($params, true); $result = array(); foreach ($data as $row) $result[] = array( "id" => $row[$this->id_field], "name" => $this->map_name_value($row) ); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function combos()\n {\n $this->view->ambito = array('F' => 'Federal','E'=> 'Estadual','M'=>'Municipal','J'=>'Judicial');\n $this->view->estado = $this->getService('Estado')->comboEstado();\n $this->view->tipoPessoa = $this->getService('TipoPessoa')->getComboDefault(array());\n ...
[ "0.6821022", "0.67640257", "0.64696324", "0.6347687", "0.63211346", "0.6321105", "0.62873536", "0.6285097", "0.6276564", "0.6273722", "0.6258331", "0.62392735", "0.62049294", "0.6190794", "0.6178752", "0.6160541", "0.6155715", "0.61424005", "0.60990995", "0.608396", "0.606299...
0.0
-1
/ metodo par obtener los valores del registro a mostrar en los select
public function map_name_value($row) { $result = ''; $first = true; foreach ($this->name_fields as $name_field) { $result .= (($first == false ? ' - ' : '') . (isset($row[$name_field]) ? $row[$name_field] : '')); $first = false; } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSelectDataFields();", "public function getSelect();", "public function getSelect();", "public function ctlBuscaProveedores(){\n\n\t\t$respuesta = Datos::mdlProveedores();\n\n\t\tforeach ($respuesta as $row => $item){\n\t\t\techo '<option value=\"'.$item[\"nombre\"].'\">'.$item[\"nombre\"]...
[ "0.7236767", "0.7076651", "0.7076651", "0.7011775", "0.68127275", "0.6728356", "0.67021346", "0.6678155", "0.66694057", "0.6589499", "0.6588299", "0.6566758", "0.65647435", "0.6543528", "0.6466704", "0.6465666", "0.6457703", "0.6449723", "0.6443946", "0.6426942", "0.6420644",...
0.0
-1
metodo para verificar si ya existe un registro con los valores unicos especificados
public function exist_unike_keys($params) { if (count($this->unike_keys) < 1) { return false; } $db_params = array(); if(isset($this->unike_keys)){ foreach ($this->unike_keys as $key) { $db_params[$key] = $params[$key]; } } $result = $this->findByPoperty($db_params); if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exists() {\r\n\t\t$sql_inicio \t= \" select * from \".$this->table.\" where \";\r\n\t\t$sql_fim \t\t= \" \".($this->get($this->pk) ? \" and \".$this->pk.\" <> \".$this->get($this->pk) : \"\").\" limit 1 \";\r\n\t\t\r\n\t\t$sql \t= \"con_id = \".$this->get(\"con_id\").\" and exa_id = \".$this->get(\"exa_id...
[ "0.74758196", "0.72179645", "0.6892471", "0.6887838", "0.68767864", "0.6837509", "0.65865266", "0.6490537", "0.6486497", "0.6468785", "0.6457591", "0.64566183", "0.6442757", "0.64008415", "0.6395177", "0.6394163", "0.6357661", "0.63537365", "0.6338563", "0.63333964", "0.63222...
0.60156137
60
metodo para insertar un nuevo registro
public function create($params) { if ($this->exist_unike_keys($params)) { echo '<script>console.log("modelo: ya existe la clave unica")</script>'; return false; } $sqlInsert = "INSERT INTO " . $this->table_name . " ("; $sqlValues = "VALUES ("; $db_params = array(); $first = true; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert() {\n $conexion = StorianDB::connectDB();\n $insercion = \"INSERT INTO cuento (titulo, contenido, autor) VALUES (\\\"\".$this->titulo.\"\\\", \\\"\".$this->contenido.\"\\\", \\\"\".$this->autor.\"\\\")\";\n $conexion->exec($insercion);\n }", "public function insert(...
[ "0.72017616", "0.7171451", "0.713746", "0.7117144", "0.71017116", "0.709926", "0.7037036", "0.7014178", "0.69679594", "0.6945634", "0.6933623", "0.69198895", "0.69031733", "0.689887", "0.689158", "0.68845016", "0.6857782", "0.68350047", "0.68240404", "0.68221956", "0.68083215...
0.0
-1
metodo para actualizar un registro existente
public function edit($id, $params) { $sqlUpdate = "UPDATE " . $this->table_name . " SET "; $sqlWhere = " WHERE " . $this->id_field . " = :" . $this->id_field . ""; $db_params = array(); $first = true; foreach ($this->table_fields as $table_field) { $name = $table_field->get_name(); if($tabl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save() {\n $query = \"\";\n\n // Se for um novo registro, cria uma query INSERT INTO\n if($this->new_register) {\n $columns = array();\n $values = array();\n\n foreach($this->get_columns_information() as $column) {\n if(('id' == $...
[ "0.68381315", "0.6801467", "0.6786066", "0.67085236", "0.6639228", "0.6625855", "0.6625457", "0.6585398", "0.65832925", "0.6548125", "0.65468717", "0.6538302", "0.652333", "0.652066", "0.651595", "0.6514149", "0.6494982", "0.64699113", "0.6460714", "0.64600945", "0.6451425", ...
0.0
-1
metodo generico deberia ser estatic y esta en model
public static function save_record($model, $data){ if (isset($data[$model->id_field])) { $result = $model->get_by_id($data[$model->id_field]); if ($result) { return $model->edit($data[$model->id_field], $data); } } return $model->create($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function model();", "abstract protected function model();", "protected abstract function model();", "abstract public function model();", "abstract public function model();", "abstract public function model();", "abstract public function model();", "abstract function model();", "a...
[ "0.70007455", "0.70007455", "0.69752574", "0.6864667", "0.6864667", "0.6864667", "0.6864667", "0.68109703", "0.68109703", "0.68109703", "0.68109703", "0.67364806", "0.67364806", "0.67159545", "0.66421425", "0.6553812", "0.65452355", "0.65085846", "0.64884007", "0.6386873", "0...
0.0
-1
list($old_x, $old_y) = getimagesize($image);
function createThumbnail($image, $newMaxWidth, $newMaxHeight) { $width_orig = imagesx($image); $height_orig = imagesy($image); $ratio_orig = $width_orig/$height_orig; if ($newMaxWidth/$newMaxHeight > $ratio_orig) { $newMaxWidth = $newMaxHeight * $ratio_orig; } else { $newMaxHeight ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getImageSize() \n { \n return array($this->_width,$this->_height); \n }", "function image_dimensions ( $image_path ) {\r\n\t\t$image = image_read($image_path,false);\r\n\t\tif ( !$image ) return $image;\r\n\t\t$width = imagesx($image);\r\n\t\t$height = imagesy($image);\r\n\t\t$dimensions = ...
[ "0.7161923", "0.7086543", "0.6848211", "0.68407345", "0.6707271", "0.66617864", "0.66223747", "0.6582213", "0.65810794", "0.6573882", "0.6573882", "0.6570667", "0.6567925", "0.65288734", "0.6412141", "0.63904864", "0.6365184", "0.63576597", "0.63509244", "0.633908", "0.633293...
0.0
-1
NTP class constructor, sets the timeserver and port number
public function __construct($timeserver, $port = 123) { $this->_timeserver = 'udp://' . $timeserver; if ($port !== null) { $this->_port = $port; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n \t// $this->host = $host;\n \t// $this->port = $port;\n \t// $this->timeout = $timeout;\n parent::__construct(\"192.168.163.30\", \"22\", \"1\");\n }", "function __construct($server = '', $timeout = '')\n {\n }", "function doNTP($text = null)\n...
[ "0.6770856", "0.65881467", "0.62849605", "0.5934404", "0.5917346", "0.5841154", "0.5840386", "0.5809032", "0.5796364", "0.5775719", "0.57638663", "0.5752381", "0.57111704", "0.5686482", "0.56618094", "0.5626183", "0.56156063", "0.56073076", "0.5588258", "0.5564918", "0.556350...
0.7328202
0
Prepare local timestamp for transmission in our request packet NTP timestamps are represented as a 64bit fixedpoint number, in seconds relative to 0000 UT on 1 January 1900. The integer part is in the first 32 bits and the fraction part in the last 32 bits
protected function _prepare() { $frac = microtime(); $fracba = ($frac & 0xff000000) >> 24; $fracbb = ($frac & 0x00ff0000) >> 16; $fracbc = ($frac & 0x0000ff00) >> 8; $fracbd = ($frac & 0x000000ff); $sec = (time() + 2208988800); $secba = ($sec & 0xff000000...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function utc2local($timestamp = null) {\n\t\tif(!$timestamp) {\n\t\t\t$timestamp = time();\n\t\t}\n\n\t\t$f3 = \\Base::instance();\n\n\t\tif($f3->exists(\"site.timeoffset\")) {\n\t\t\t$offset = $f3->get(\"site.timeoffset\");\n\t\t} else {\n\t\t\t$tz = $f3->get(\"site.timezone\");\n\t\t\t$dtzLocal = new \\DateTimeZ...
[ "0.6085125", "0.58772945", "0.58100253", "0.57911015", "0.5787428", "0.57371783", "0.57327425", "0.569923", "0.5645306", "0.5623086", "0.56119394", "0.5470717", "0.54625267", "0.54515576", "0.5448611", "0.54142153", "0.5405396", "0.53397876", "0.5324069", "0.53013325", "0.528...
0.55583954
11
Calculates a 32bit integer
protected function _getInteger($input) { $f1 = str_pad(ord($input[0]), 2, '0', STR_PAD_LEFT); $f1 .= str_pad(ord($input[1]), 2, '0', STR_PAD_LEFT); $f1 .= str_pad(ord($input[2]), 2, '0', STR_PAD_LEFT); $f1 .= str_pad(ord($input[3]), 2, '0', STR_PAD_LEFT); return (int) $f1; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readInt32();", "public function readInt32BE();", "public static function ensure32BitInteger($value) {}", "public function readInt32LE();", "public function readint32()\n {\n }", "public static function leftShift32($x, $y) {\n $n = $x << $y;\n if (PHP_INT_MAX != 0x80000...
[ "0.7110657", "0.7068352", "0.7035827", "0.69848", "0.6762521", "0.6598079", "0.64923847", "0.6272463", "0.6222314", "0.62197214", "0.6207232", "0.61996377", "0.61845964", "0.6182601", "0.61582", "0.6127828", "0.60968435", "0.60704803", "0.60428655", "0.60336745", "0.6026072",...
0.52622384
95
Calculates a 32bit signed fixed point number
protected function _getFloat($input) { $f1 = str_pad(ord($input[0]), 2, '0', STR_PAD_LEFT); $f1 .= str_pad(ord($input[1]), 2, '0', STR_PAD_LEFT); $f1 .= str_pad(ord($input[2]), 2, '0', STR_PAD_LEFT); $f1 .= str_pad(ord($input[3]), 2, '0', STR_PAD_LEFT); $f2 = $f1 >> 17; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFixed32Field()\n {\n $value = $this->get(self::FIXED32_FIELD);\n return $value === null ? (integer)$value : $value;\n }", "public function getSfixed32Field()\n {\n $value = $this->get(self::SFIXED32_FIELD);\n return $value === null ? (integer)$value : $valu...
[ "0.5862351", "0.58380926", "0.5762914", "0.57184124", "0.56847805", "0.56682354", "0.5578331", "0.55669415", "0.553726", "0.550898", "0.5468825", "0.5458553", "0.5454455", "0.5434811", "0.5433831", "0.5426981", "0.5426315", "0.53972185", "0.5385776", "0.5364039", "0.5360102",...
0.0
-1
Calculates a 64bit timestamp
protected function _getTimestamp($input) { $f1 = (ord($input[0]) * pow(256, 3)); $f1 += (ord($input[1]) * pow(256, 2)); $f1 += (ord($input[2]) * pow(256, 1)); $f1 += (ord($input[3])); $f1 -= 2208988800; $f2 = (ord($input[4]) * pow(256, 3)); $f2 += (ord($inp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_timestamp() {\n\t\treturn floor(microtime(true)/self::keyRegeneration);\n\t}", "public function to64() {\n return sprintf(\"%010d%09d\", $this->sec, $this->nsec); }", "public function getTimestamp()\n {\n return (int) floor(microtime(true) / $this->keyRegeneration);\...
[ "0.6679362", "0.6639763", "0.6548307", "0.6511807", "0.63670963", "0.61830145", "0.6163288", "0.61585927", "0.60013014", "0.59293145", "0.585325", "0.5848706", "0.5835494", "0.5819363", "0.57622296", "0.57356197", "0.57221824", "0.57064867", "0.5705501", "0.56942016", "0.5684...
0.58670133
10
Reads the data returned from the timeserver This will return an array with binary data listing:
protected function _read() { $flags = ord(fread($this->_socket, 1)); $info = stream_get_meta_data($this->_socket); if ($info['timed_out'] === true) { fclose($this->_socket); throw new Zend_TimeSync_Exception('could not connect to ' . "'$this->_timese...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRawData()\n\t{\n\n\t\treturn @file_get_contents($this->tmpFileName);\n\n\t}", "public function getRawData() {}", "public function getRawData();", "public function getRawData();", "protected function _getData()\n {\n $data = Transform::toUInt8($this->_format);\n foreach ($this->_ev...
[ "0.6561881", "0.63029784", "0.6301868", "0.6301868", "0.62097585", "0.6203651", "0.6197023", "0.606423", "0.59713906", "0.58960503", "0.58960503", "0.5822625", "0.580784", "0.57937336", "0.5791163", "0.5791163", "0.5791163", "0.5791163", "0.5791163", "0.5791163", "0.5791163",...
0.6907544
0
Sends the NTP packet to the server
protected function _write($data) { $this->_connect(); fwrite($this->_socket, $data); stream_set_timeout($this->_socket, Zend_TimeSync::$options['timeout']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doNTP($text = null)\n {\n if (strtolower($this->input) != \"ntp\") {\n $this->ntp_message = $this->ntp_response;\n $this->response = $this->ntp_response;\n return;\n }\n\n // \"None\" agent command received.\n if ($this->agent_input == null) ...
[ "0.6736051", "0.55961853", "0.5368975", "0.5242785", "0.5108164", "0.51027995", "0.50046957", "0.5004252", "0.4991481", "0.49666563", "0.49432507", "0.49432507", "0.49432507", "0.49432507", "0.49432507", "0.49432507", "0.49432507", "0.49432507", "0.49432507", "0.49432507", "0...
0.52805346
3
Extracts the binary data returned from the timeserver
protected function _extract($binary) { /* * Leap Indicator bit 1100 0000 * * Code warning of impending leap-second to be inserted at the end of * the last day of the current month. */ $leap = ($binary['flags'] & 0xc0) >> 6; switch($leap) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrieveServerTime(){\n //http://www.thetvdb.com/api/Updates.php?type=none\n\t \n\t if(!$this->t_mirrors){\n\t\t$this->retrieveMirrors;\n\t }\n\t \n $url = $this->t_mirrors[0].'/api/Updates.php?type=none';\n \n //$xmlStr=$this->curl_get_file_c...
[ "0.5992594", "0.5865425", "0.5844265", "0.58187187", "0.5744559", "0.5706707", "0.5646844", "0.5562865", "0.5562865", "0.55373675", "0.55373675", "0.5463857", "0.54500353", "0.54160243", "0.539914", "0.53990984", "0.533271", "0.5324283", "0.53229785", "0.5291716", "0.5199365"...
0.5723566
5
Register the listeners for the subscriber.
public function subscribe($events) { $events->listen( \App\Events\Backend\PricingHistory\GeneralPricingHistoryCreated::class, 'App\Listeners\Backend\PricingHistory\GeneralPricingHistoryEventListener@onCreated' ); $events->listen( \App\Events\Backend\Prici...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function registerListeners()\n {\n // Login event listener\n #Event::listen('auth.login', function($user) {\n //\n #});\n\n // Logout event subscriber\n #Event::subscribe('Mrcore\\Parser\\Listeners\\MyEventSubscription');\n }", "protected function reg...
[ "0.76423573", "0.7576691", "0.7523886", "0.7480838", "0.71998376", "0.71273154", "0.70560163", "0.6981671", "0.6912011", "0.67695504", "0.66503614", "0.65324897", "0.6521632", "0.6521632", "0.6494098", "0.64904916", "0.6473717", "0.64685476", "0.64645183", "0.6458164", "0.643...
0.0
-1
Create a new GetType instance.
public function __construct($identifier) { $this->identifier = $identifier; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createType()\n {\n $o = new TypeSelector();\n $this->appendSelector($o);\n\n return $o;\n }", "public static function get_type($type = \"Posts\") {\r\n\t\t$_type = \"\\\\ESWP\\\\MyTypes\\\\\".\"$type\";\r\n\t\treturn new $_type();\r\n\t}", "public function make($type)...
[ "0.6533889", "0.63835716", "0.63794893", "0.62725174", "0.61889523", "0.6161869", "0.6119887", "0.6113469", "0.5849417", "0.5848795", "0.5848753", "0.5848753", "0.5848353", "0.5846802", "0.58216804", "0.58216804", "0.58216804", "0.58216804", "0.58216804", "0.5806482", "0.5800...
0.0
-1
Create a new event instance.
public function __construct($sensor) { // this->sensor = $sensor ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createEvent()\n {\n return new Event();\n }", "public function __create()\n {\n $this->eventPath = $this->data('event_path');\n $this->eventName = $this->data('event_name');\n $this->eventInstance = $this->data('event_instance');\n $this->eventFilter = ...
[ "0.8178475", "0.73455495", "0.67515916", "0.6665345", "0.66544545", "0.66479546", "0.6640835", "0.6556383", "0.6556383", "0.6556383", "0.6556383", "0.6556383", "0.6543442", "0.64682955", "0.645909", "0.64520663", "0.6441302", "0.6438299", "0.63917476", "0.6371641", "0.6371641...
0.0
-1
Get the channels the event should broadcast on.
public function broadcastOn() { return new PrivateChannel('rt-sensor'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getChannels()\n {\n return $this->channels;\n }", "public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }", "public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }", "public function get...
[ "0.73623616", "0.73168063", "0.73168063", "0.7286338", "0.7161186", "0.7129996", "0.708389", "0.70263547", "0.6981603", "0.6978362", "0.696272", "0.69525206", "0.69270295", "0.6868352", "0.67495483", "0.67344266", "0.67241955", "0.6689566", "0.66575515", "0.66133535", "0.6539...
0.0
-1
Show the profile for the given user.
public function infos() { $pages = Page::where('tags', '=', 'informationen')->get(); return view('pages_index', ['pages'=>$pages]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show($user = \"empty\") {\n $user = User::findOrFail($user);\n return view('profiles.index', [\n \"user\" => $user\n ]\n );\n }", "public function profile()\n\t{\n\t\t$user = $this->userRepo->get(Auth::user()->id);\n\n\t\treturn View::make('user.p...
[ "0.81846577", "0.80868584", "0.80781794", "0.8035127", "0.80341536", "0.79904115", "0.79903656", "0.7973829", "0.7963159", "0.79504293", "0.7946976", "0.79417646", "0.79182535", "0.79121447", "0.7883146", "0.78647107", "0.7855951", "0.7795711", "0.7786525", "0.7784185", "0.77...
0.0
-1
THIS FUNCTION IS USED FOR CREATING AN OBJECT OF "HierarchyManager" CLASS Author :Dipanjan Bhattacharjee Created on : (12.06.2008) Copyright 20082009 syenergy Technologies Pvt. Ltd.
private function __construct() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createHierarchy(){\n\t\tmysqli_query($this->db, \"TRUNCATE TABLE hierarchy\");\n\t\t\n\t\t$insert_sql = \"INSERT INTO hierarchy VALUES\";\n\t\tforeach ($this->structure as $key => $value) {\n\t\t\t$position = $value['number'] + 1;\n\t\t\t$rows[] = \"('', '{$key}', '{$position}')\";\n\t\t}\n\t\t$ins...
[ "0.63933265", "0.63549364", "0.6183493", "0.60573685", "0.60062575", "0.59575266", "0.5888324", "0.58317816", "0.57298005", "0.5643618", "0.56196046", "0.56155986", "0.5575186", "0.5573206", "0.5568949", "0.55650836", "0.5552218", "0.55504423", "0.55443716", "0.5537099", "0.5...
0.0
-1
THIS FUNCTION IS USED FOR GETTING AN INSTANCE OF "HierarchyManager" CLASS Author :Dipanjan Bhattacharjee Created on : (12.06.2008) Copyright 20082009 syenergy Technologies Pvt. Ltd.
public static function getInstance() { if (self::$instance === null) { $class = __CLASS__; return self::$instance = new $class; } return self::$instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getInstance()\n {\n return Tree::getInstance();\n }", "abstract protected function getMenuTree();", "function getDirectorHierarchy($director_id = TOP_DIRECTOR_ID)\t// March 17, 2008: 151 (Mike Woodard)\t\n {\n\t $sql = 'select distinct ';\n\t \n\t // Initialize...
[ "0.5987762", "0.5858239", "0.5848185", "0.5822279", "0.576154", "0.57414484", "0.5734753", "0.56941944", "0.56870604", "0.56745815", "0.5634644", "0.55975085", "0.55143577", "0.5502064", "0.55016196", "0.54998577", "0.5491262", "0.5491093", "0.54770553", "0.5454133", "0.54505...
0.0
-1
get instance of Business_BlockManagement_Views
public static function getInstance() { if(self::$_instance == null) { self::$_instance = new Business_BlockManagement_Views(); } return self::$_instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _View() {\n\t \n // $this->_View;\n\t\t\t//$View = ClassRegistry::getObject('');\n\t\treturn $this->_View;\n\t}", "public function getView()\n\t{\n\t\tif(NULL === $this->_view) {\n\t\t\t$this->_view = agoractu_view::getInstance();\n\t\t}\n\t\treturn $this->_view;\n\t}", "public functio...
[ "0.6717801", "0.6321794", "0.6285422", "0.6285422", "0.62710625", "0.62295914", "0.61626476", "0.61606693", "0.6154317", "0.61445415", "0.613397", "0.60649645", "0.6061178", "0.6048873", "0.60129565", "0.59932095", "0.5967328", "0.5965591", "0.5962832", "0.5962832", "0.596283...
0.8155426
0