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
Resolves the type of the response based on the configuration and the header values
public function resolveAcceptType(Request $request) { $this->initialize(); if($this->_acceptType !== null) { return $this->_acceptType; } if($this->negotiationEnabled) { $this->_acceptType = $this->resolveNegotiatedValue( $this->negotiation->negotiateType( is_array($this->priorities['type']) ? $this->priorities['type'] : [], $request->headers->get($this->getHeader('accept-type')) ), 'type' ); if($this->_acceptType !== null) { return $this->_acceptType; } } return $this->defaults['type']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function responseType ();", "public function negotiateResponseContent(string $type, IRequest $request): ContentNegotiationResult;", "public function get_response_type()\n\t{\n\t\treturn $this->response_type;\n\t}", "public function get_response_type()\n\t{\n\t\treturn $this->response_type;\n\t}", "p...
[ "0.704756", "0.6316459", "0.606873", "0.606873", "0.5960313", "0.59567666", "0.5876195", "0.5864386", "0.5847432", "0.5818243", "0.58006495", "0.57420975", "0.5741854", "0.57380897", "0.5660884", "0.56316394", "0.5629571", "0.5593208", "0.54710364", "0.54277825", "0.5395083",...
0.0
-1
Returns the NegotiationResult the corresponds to the type key (eg 'json')
public function getTypeFromKey($key, $priority=0) { $this->initialize(); if(isset($this->parsed['type'][$key])) { return new NegotiationResult($key,$this->parsed['type'][$key][$priority]); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function negotiateResponseContent(string $type, IRequest $request): ContentNegotiationResult;", "public function responseType ();", "public function acceptType() {\n\t\treturn $this->getDecoder()->acceptType();\n\t}", "public function getResponseType() {\n return NoNull($this->settings['type'],...
[ "0.6182286", "0.61710143", "0.5686739", "0.5672875", "0.5639556", "0.5634315", "0.54201734", "0.54101515", "0.5388164", "0.53305286", "0.5269161", "0.5269161", "0.52382606", "0.52201027", "0.5192151", "0.51653737", "0.5123578", "0.51147014", "0.5111085", "0.51026255", "0.5070...
0.594794
2
Returns the serializerenabled config option
public function isSerializerEnabled() { $this->initialize(); return $this->serializerEnabled; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSerializerOptions()\n {\n return $this->serializerOptions;\n }", "public function getEnabled()\n {\n return Mage::getStoreConfig('splitprice/split_price_config/enabled');\n }", "public function getConfigToString() {\n return serialize($this->_options);\n }", "...
[ "0.67596775", "0.6099463", "0.6087472", "0.6060522", "0.60290277", "0.60290277", "0.60290277", "0.6019271", "0.6005907", "0.5986724", "0.59724724", "0.59395903", "0.5935854", "0.59177375", "0.5900283", "0.58769685", "0.58379585", "0.58076984", "0.5799532", "0.57948804", "0.57...
0.695329
0
Returns the normalizerenabled config option
public function isNormalizerEnabled() { $this->initialize(); return $this->normalizerEnabled; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEnabled()\n {\n return Mage::getStoreConfig('splitprice/split_price_config/enabled');\n }", "public function getOptionsFlag() {\n return 'false';\n }", "public function get() {\n\t\treturn (bool) $this->user_options->get( static::OPTION );\n\t}", "public function get...
[ "0.60544145", "0.5957486", "0.59372145", "0.59096533", "0.58029336", "0.5756863", "0.57092273", "0.5690606", "0.5678284", "0.56735367", "0.56711084", "0.5665472", "0.5621291", "0.5603161", "0.55934733", "0.55934733", "0.55934733", "0.55867016", "0.55810153", "0.55666023", "0....
0.6537807
0
Returns the validatorenabled config option
public function isValidatorEnabled() { $this->initialize(); return $this->validatorEnabled; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get() {\n\t\treturn (bool) $this->user_options->get( static::OPTION );\n\t}", "private function _validate_settings()\n\t{\n\n\t\treturn TRUE;\n\t}", "function chkconfig($value, $default = false)\n{\n if (is_bool($value)) {\n return $value;\n }\n\n if ($value == '') {\n re...
[ "0.6548955", "0.6393817", "0.6269282", "0.6220637", "0.6220637", "0.6220637", "0.62146837", "0.6181091", "0.61783975", "0.6150366", "0.6048771", "0.6043334", "0.60178876", "0.6009763", "0.6006469", "0.5974527", "0.5974346", "0.59410065", "0.5934152", "0.59187114", "0.59051925...
0.0
-1
Constructor. Overridden to merge passed args with URL options.
public function __construct(View $view, array $config = []) { parent::__construct($view, $config + [ 'templates' => [ 'nextActive' => '<li class="page-item"><a class="page-link" rel="next" href="{{url}}">' . __('次へ >>') . '</a></li>', 'nextDisabled' => '<li class="page-item disabled"><span class="page-link">' . __('次へ >>') . '</span></li>', 'prevActive' => '<li class="page-item"><a class="page-link" rel="prev" href="{{url}}">' . __('<< 前へ') . '</a></li>', 'prevDisabled' => '<li class="page-item disabled"><span class="page-link">' . __('<< 前へ') . '</span></li>', 'counterPages' => '<li class="page-item disabled"><span class="page-link">' . __('検索結果: {{count}}件') . '</span></li>', 'first' => '<li class="page-item"><a class="page-link" href="{{url}}">' . ('<<') . '</a></li>', 'last' => '<li class="page-item"><a class="page-link" href="{{url}}">' . ('>>') . '</a></li>', 'number' => '<li class="page-item"><a class="page-link" href="{{url}}">{{text}}</a></li>', 'current' => '<li class="page-item active"><a class="page-link" href="">{{text}}</a></li>', 'checkboxAll' => '<div class="custom-control custom-checkbox"><input type="checkbox" id="checkAll{{table}}" class="custom-control-input"><label class="custom-control-label" for="checkAll{{table}}"></label></div>', 'checkbox' => '<div class="custom-control custom-checkbox"><input type="checkbox" id="checkRow{{table}}{{id}}" name="checkRow{{table}}{{id}}" value="{{id}}" data-lock="{{lock}}" class="custom-control-input checkRow{{table}}"><label class="custom-control-label" for="checkRow{{table}}{{id}}"></label></div>', 'radio' => '<div class="custom-control custom-radio"><input type="radio" id="checkRow{{table}}{{id}}" name="checkRow{{table}}{{id}}" value="{{id}}" data-lock="{{lock}}" class="custom-control-input checkRow{{table}}"><label class="custom-control-label" for="checkRow{{table}}{{id}}"></label></div>', ], ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($url = null, $request_method = null, ?array $options = null) {}", "public function __construct()\n {\n if (5 == func_num_args()) {\n $this->url = func_get_arg(0);\n $this->method = func_get_arg(1);\n $this->encoding = func_get_arg(2);\...
[ "0.7057112", "0.680561", "0.6723167", "0.6713274", "0.6652417", "0.6651015", "0.6623134", "0.6603383", "0.6601108", "0.6561724", "0.6548114", "0.6471065", "0.64606804", "0.6441344", "0.64388895", "0.64340186", "0.64155823", "0.6401188", "0.6395779", "0.6383094", "0.63679326",...
0.0
-1
Creates form or adds contact to the list
public function formCreateContact($name = "", $phone = "", $email = "", $note = "", $filename = "./contacts.json") { if ($name != "" && ($phone != "" || $email != "")) { $this->add($name, $phone, $email, $note, $filename); } $form = "<form action=\"index.php\" method=\"post\" id=\"form\">"; $form .= "<h3>Přidat kontakt</h3>\n"; $form .= "<table>"; $form .= "<tr><th> Jméno </th>"; $form .= "<td><input type=\"text\" name=\"name\" id=\"name\" required></td></tr>\n"; $form .= "<tr><th> Tel. číslo</th>"; $form .= "<td><input type=\"tel\" name=\"phone\" id=\"phone\"></td><tr>\n"; $form .= "<tr><th> email</th>"; $form .= "<td><input type=\"email\" name=\"email\" id=\"email\"></td><tr>\n"; $form .= "<tr><th> Poznámka</th>"; $form .= "<td><textarea rows=\"1\" name=\"note\" id=\"note\" form=\"form\"></textarea></td></tr>\n"; $form .= "<tr><td><p>Povinné:<br>jméno + telefon <br>nebo<br>jméno + email</p></td>"; $form .= "<td><input type=\"submit\"></td></tr>"; $form .= "</table></form>"; echo $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add() {\r\n $this->api->loadView('contact-form',\r\n array(\r\n 'row' => $this->model\r\n ));\r\n }", "public function create()\n {\n return view(\"add_contact\", compact(\"\"));\n }", "public function add(){\n Auth::checkAd...
[ "0.7476897", "0.73700696", "0.7302485", "0.72900724", "0.7283151", "0.71591973", "0.704771", "0.6970629", "0.69217575", "0.69137704", "0.68872607", "0.68740094", "0.68350613", "0.68292505", "0.6824083", "0.67849493", "0.6783993", "0.677644", "0.6772592", "0.6725101", "0.67251...
0.0
-1
Prints list of contacts
public function contactList($filename = "./contacts.json") { if (file_exists($filename)) { // reads content of the file (saved contacts) $content = file_get_contents($filename); // add new contact to list $contacts = json_decode($content, true); // print contact list echo "\t\t<table>\n"; echo "\t\t\t<tr>\n"; echo "\t\t\t\t<th>Jméno</th><th>Telefon</th><th>Email</th><th>Poznámka</th>\n"; echo "\t\t\t</tr>\n"; foreach ($contacts["contacts"] as $key => $value) { echo "\t\t\t<tr>\n"; echo "\t\t\t\t<td>" . htmlspecialchars($contacts["contacts"][$key]["name"], ENT_IGNORE) . "</td>\n"; echo "\t\t\t\t<td>" . htmlspecialchars($contacts["contacts"][$key]["phone"], ENT_IGNORE) . "</td>\n"; echo "\t\t\t\t<td>" . htmlspecialchars($contacts["contacts"][$key]["email"], ENT_IGNORE) . "</td>\n"; echo "\t\t\t\t<td>" . htmlspecialchars($contacts["contacts"][$key]["note"], ENT_IGNORE) . "</td>\n"; echo "\t\t\t\t<td><a href='edit.php?id=" . htmlspecialchars($contacts["contacts"][$key]["id"], ENT_IGNORE) . "'>Detail / Úprava</a></td>\n"; echo "\t\t\t</tr>\n"; } echo "\t\t</table>\n"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function contactsAction()\n {\n $this->view->pageTitle = 'Member Contact List';\n\t$service = new App_Service_Member();\n $users = $service->getActiveUsers();\n\n $this->view->users = array();\n $lastRowLetter = null;\n\t\n\t// remove inactive memebers\n\t$users = array_...
[ "0.71078193", "0.69565874", "0.6955237", "0.66451764", "0.65419173", "0.6511698", "0.6486052", "0.64479095", "0.64458394", "0.6424842", "0.6380275", "0.63754654", "0.6371858", "0.6329131", "0.6307258", "0.621947", "0.621871", "0.6204169", "0.6195113", "0.6112316", "0.6098085"...
0.6326328
14
delete contact from file
public function delete($id, $filename = "./contacts.json") { if (file_exists($filename)) { // reads content of the file (saved contacts) $f = fopen($filename, "r"); $content = fread($f, filesize($filename)); fclose($f); // add new contact to list $contacts = json_decode($content, true); } foreach ($contacts["contacts"] as $key => $value) { if ($contacts["contacts"][$key]["id"] == $id) $deletekey = $key; } if (isset($deletekey)) array_splice($contacts["contacts"], $deletekey, 1); $content_new = json_encode($contacts, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); // rewrites or creates the file with updated contact list $f = fopen($filename, "w"); fwrite($f, $content_new); fclose($f); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete() {\n try {\n $delete = \"Name: \" . $_POST[\"username\"] . \" , Email: \" . $_POST[\"email\"] . \" , Phone: \" . $_POST[\"phone\"];\n $data = file($this->directory);\n $out = array();\n \n foreach ($data as $line) {\n if (trim($l...
[ "0.67917", "0.66974854", "0.665353", "0.66057193", "0.6475752", "0.64709896", "0.64629996", "0.64495605", "0.6369761", "0.63682324", "0.6355792", "0.6283604", "0.6263404", "0.6244565", "0.6221972", "0.61881995", "0.6185063", "0.61409086", "0.6128009", "0.612419", "0.612419", ...
0.641121
8
A basic feature test example.
public function a_user_can_send_message_with_ticket_email() { $this->withoutExceptionHandling(); $this->actingAs(factory(User::class)->create()); $param = [ "content" => "a_user_can_send_message_with_ticket_email", "ticket_id" => "3" ]; $response = $this->post('/ticketMessage', $param); $this->assertDatabaseHas('ticket_messages', [ 'content' => 'a_user_can_send_message_with_ticket_email', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testBasicFeatures()\n {\n return $this->doTheRealTest(false);\n }", "public function testExample()\n {\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('TROLOLOLO');\n }", "function test_sample() {\n\n\t\t$this->assertTrue( t...
[ "0.75703996", "0.7326855", "0.7060016", "0.70380056", "0.69854325", "0.69819707", "0.6968778", "0.69384074", "0.6893094", "0.6865566", "0.6839218", "0.6836121", "0.68062127", "0.6803488", "0.68033314", "0.67734396", "0.6747173", "0.67426485", "0.67172587", "0.67116183", "0.67...
0.0
-1
A basic feature test example.
public function a_user_can_send_message_without_ticket_email() { $this->withoutExceptionHandling(); $this->actingAs(factory(User::class)->create()); $param = [ "content" => "a_user_can_send_message_without_ticket_email", "ticket_id" => "1", "email" => "test@wp.pl" ]; $response = $this->post('/ticketMessage', $param); $this->assertDatabaseHas('ticket_messages', [ 'content' => 'a_user_can_send_message_without_ticket_email', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testBasicFeatures()\n {\n return $this->doTheRealTest(false);\n }", "public function testExample()\n {\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('TROLOLOLO');\n }", "function test_sample() {\n\n\t\t$this->assertTrue( t...
[ "0.75703996", "0.7326855", "0.7060016", "0.70380056", "0.69854325", "0.69819707", "0.6968778", "0.69384074", "0.6893094", "0.6865566", "0.6839218", "0.6836121", "0.68062127", "0.6803488", "0.68033314", "0.67734396", "0.6747173", "0.67426485", "0.67172587", "0.67116183", "0.67...
0.0
-1
END function person() FUNCTION: set()
function set($var, $value) { switch($var) { /* case('id'): if(!$this->var_is_int($value)) { throw new Exception('Person ID must be an integer'); } else $this->id = $value; break; */ case('firstname'): if(!preg_match('/^[a-z\d_]{1,30}$/i', $value)) { throw new Exception('Firstname must be 1 - 30 letters'); } else $this->firstname = $value; break; case('lastname'): if(!preg_match('/^[a-z\d_]{1,30}$/i', $value)) { throw new Exception('Lastname must be 1 - 30 letters'); } else $this->lastname = $value; break; case('gender'): if((strtolower($value) != 'male') && (strtolower($value) != 'female')) { throw new Exception('Gender must be either male or female'); } else $this->gender = strtolower($value); break; case('birthdate'): $dates = explode("/",$value); if(checkdate((int)$dates[0], (int)$dates[1], (int)$dates[2])) { $this->birthdate->setDate($dates[0],$dates[1],$dates[2]); } else throw new Exception('The birthdate entered is not a valid date'); break; case('remove_headshot'): $query = "UPDATE people SET headshot_filename = '".$_SESSION['missing_headshot_image']."' WHERE id = ".$this->id; $result = mydb::cxn()->query($query); if(mydb::cxn()->error != '') throw new Exception('There was a database error while removing a personal headshot photo'); break; } // End: switch($var) //If execution reaches this point, data has been checked and no exceptions have been thrown. Return with success state. return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function set();", "abstract protected function alter_set($name,$value);", "abstract public function set($in): void;", "public function set( $name, $value = NULL );", "function set($key, $value);", "function set($key, $value);", "function set($key, $value);", "public static function se...
[ "0.71141064", "0.64041257", "0.60619694", "0.60118085", "0.597812", "0.597812", "0.597812", "0.59077805", "0.58826846", "0.5855868", "0.580733", "0.57947606", "0.57778597", "0.57203496", "0.5720124", "0.5720124", "0.5628583", "0.5628583", "0.56275606", "0.56248295", "0.562482...
0.0
-1
End: function set() FUNCTION: get()
function get($var) { switch($var) { case 'address_home': $val = $this->address_home_street1."<br />\n" .$this->address_home_street2."<br />\n" .$this->address_home_city.", ".strtoupper($this->address_home_state)." ".$this->address_home_zip; break; case 'address_work': $val = $this->address_work_street1."<br />\n" .$this->address_work_street2."<br />\n" .$this->address_work_city.", ".strtoupper($this->address_work_state)." ".$this->address_work_zip; break; default: $val = $this->$var; break; } return $val; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function get() ;", "function get()\n {\n }", "abstract function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get();", "abstract public function get...
[ "0.75297517", "0.7523597", "0.73680073", "0.7319642", "0.7319642", "0.7319642", "0.7319642", "0.7319642", "0.7319642", "0.71901643", "0.7092993", "0.700645", "0.6819033", "0.6819033", "0.6819033", "0.6819033", "0.6819033", "0.6819033", "0.6819033", "0.6819033", "0.6819033", ...
0.0
-1
END function get() FUNCTION: save()
function save() { // Error-checking should already be complete if(person::exists($this->id)) { // UPDATE an existing database entry $query = "UPDATE people set " ."firstname = ".$this->firstname.", " ."lastname = ".$this->lastname.", " ."address_home_street_1 = ".$this->address_home_street_1.", " ."address_home_street_2 = ".$this->address_home_street_2.", " ."address_home_city = ".$this->address_home_city.", " ."address_home_state = ".$this->address_home_state.", " ."address_home_zip = ".$this->address_home_zip.", " ."address_work_street_1 = ".$this->address_work_street_1.", " ."address_work_street_2 = ".$this->address_work_street_2.", " ."address_work_city = ".$this->address_work_city.", " ."address_work_state = ".$this->address_work_state.", " ."address_work_zip = ".$this->address_work_zip.", " ."email = ".$this->email.", " ."phone_personal_cell = ".$this->phone_personal_cell.", " ."phone_work = ".$this->phone_work.", " ."phone_work_cell = ".$this->phone_work_cell.", " ."phone_home = ".$this->phone_home.", " ."fax = ".$this->fax.", " ."gender = ".$this->gender.", " ."birthdate = ".$this->birthdate.", " ."facebook_username = ".$this->facebook_username.", " ."username = ".$this->username.", " ."headshot_filename = ".$this->headshot_filename ." WHERE id = ".$this->id; $result = mydb::cxn()->query($query); if(mydb::cxn()->error != '') throw new Exception('There was a problem updating '.$this->firstname.' '.$this->lastname.'\'s database entry.'); } else { // INSERT a new database entry $query = "INSERT INTO people (" ."firstname, " ."lastname, " ."address_home_street_1, " ."address_home_street_2, " ."address_home_city, " ."address_home_state, " ."address_home_zip, " ."address_work_street_1, " ."address_work_street_2, " ."address_work_city, " ."address_work_state, " ."address_work_zip, " ."email, " ."phone_personal_cell, " ."phone_home, " ."phone_work, " ."phone_work_cell, " ."fax, " ."gender, " ."birthdate, " ."facebook_username, " ."username, " ."headshot_filename) " ."VALUES (" ."'".$this->firstname."', " ."'".$this->lastname."', " ."'".$this->address_home_."', " ."'".$this->address_home_."', " ."'".$this->address_home_."', " ."'".$this->address_home_."', " ."'".$this->address_home_."', " ."'".$this->address_work_."', " ."'".$this->address_work_."', " ."'".$this->address_work_."', " ."'".$this->address_work_."', " ."'".$this->address_work_."', " ."'".$this->email."', " ."'".$this->phone_personal_cell."', " ."'".$this->phone_home."', " ."'".$this->phone_work."', " ."'".$this->phone_work_cell."', " ."'".$this->fax."', " ."'".$this->gender."', " ."'".$this->birthdate->format('Y-m-d')."', " ."'".$this->facebook_username."', " ."'".$this->username."', " ."'".$this->headshot_filename."')"; $result = mydb::cxn()->query($query); if(mydb::cxn()->error != '') throw new Exception('There was a problem inserting '.$this->firstname.' '.$this->lastname.'\'s database entry.'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function save();", "function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public fun...
[ "0.83400065", "0.83400065", "0.80170214", "0.80170214", "0.80170214", "0.80170214", "0.80170214", "0.80170214", "0.80170214", "0.80170214", "0.80170214", "0.80170214", "0.80170214", "0.80170214", "0.80170214", "0.80170214", "0.80170214", "0.80170214", "0.80170214", "0.80170214"...
0.0
-1
END function save() FUNCTION: load()
function load($id) { if(!$this->exists($id)) throw new Exception("A non-existent Person ID attempted to load"); $query = "SELECT " ."firstname, " ."lastname, " ."address_home_street_1, " ."address_home_street_2, " ."address_home_city, " ."address_home_state, " ."address_home_zip, " ."address_work_street_1, " ."address_work_street_2, " ."address_work_city, " ."address_work_state, " ."address_work_zip, " ."email, " ."phone_personal_cell, " ."phone_home, " ."phone_work, " ."phone_work_cell, " ."fax, " ."gender, " ."DATE_FORMAT(birthdate,'%Y-%m-%d') as birthdate, " ."facebook_username, " ."username, " ."headshot_filename " ."FROM people WHERE id = ".$id; $result = mydb::cxn()->query($query); if(mydb::cxn()->error != '') throw new Exception('There was a problem loading Person #'.$id); $row = $result->fetch_assoc(); $this->firstname = $row['firstname']; $this->lastname = $row['lastname']; $this->address_home_street_1 = $row['address_home_street_1']; $this->address_home_street_2 = $row['address_home_street_2']; $this->address_home_city = $row['address_home_city']; $this->address_home_state = $row['address_home_state']; $this->address_home_zip = $row['address_home_zip']; $this->address_work_street_1 = $row['address_work_street_1']; $this->address_work_street_2 = $row['address_work_street_2']; $this->address_work_city = $row['address_work_city']; $this->address_work_state = $row['address_work_state']; $this->address_work_zip = $row['address_work_zip']; $this->email = $row['email']; $this->phone_personal_cell = $row['phone_personal_cell']; $this->phone_home = $row['phone_home']; $this->phone_work = $row['phone_work']; $this->phone_work_cell = $row['phone_work_cell']; $this->fax = $row['fax']; $this->gender = $row['gender']; $this->birthdate = DateTime::createFromFormat('Y-m-d',$row['birthdate']); $this->facebook_username = $row['facebook_username']; $this->username = $row['username']; $this->headshot_filename = $row['headshot_filename']; return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load();", "abstract public function load();", "abstract public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public functio...
[ "0.7860244", "0.77983636", "0.77983636", "0.7724003", "0.7724003", "0.7724003", "0.7724003", "0.7724003", "0.7724003", "0.7724003", "0.7724003", "0.7724003", "0.7724003", "0.7724003", "0.7724003", "0.7724003", "0.7643849", "0.7579232", "0.7579232", "0.7579232", "0.7579232", ...
0.0
-1
END function load() FUNCTION: var_is_int()
private function var_is_int($value) { // Returns TRUE if $value is an integer. // Returns FALSE otherwise. // This function will take any data type as input. return ((string) $value) === ((string)(int) $value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function my_is_int($var) {\n\treturn (is_numeric($var)&&(intval($var)==floatval($var)));\n}", "function df_is_int($v):bool {return is_numeric($v) && ($v == (int)$v);}", "function int_check($var) {\n\tif ( is_numeric($var) )\n\t\treturn $var;\n\treturn null;\n}", "function o_isInt($value) {\n\t\t\treturn Obj:...
[ "0.7424979", "0.73620176", "0.72833264", "0.72404426", "0.70803565", "0.7033291", "0.6913651", "0.68194425", "0.6781262", "0.6713603", "0.6697197", "0.66883296", "0.6679003", "0.66752994", "0.66226435", "0.661969", "0.6568804", "0.65596884", "0.6539455", "0.6516973", "0.64887...
0.7431175
0
End: function var_is_int() FUNCTION: exists()
public function exists($id = false) { // Returns TRUE if $id is found in the 'people' database table // Returns FALSE otherwise. // This function will take any data type as input. if(!$id || !is_numeric($id)) return false; $query = "SELECT id FROM people WHERE id = ".mydb::cxn()->real_escape_string($id); $result = mydb::cxn()->query($query); if(mydb::cxn()->affected_rows > 0) return TRUE; else return FALSE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasIntValue(){\n return $this->_has(2);\n }", "private function var_is_int($value) {\n\t\t// Returns TRUE if $value is an integer.\n\t\t// Returns FALSE otherwise.\n\t\t// This function will take any data type as input.\n \treturn ((string) $value) === ((string)(int) $value);\n\t}", ...
[ "0.71786934", "0.714686", "0.71351993", "0.703491", "0.7003651", "0.69942224", "0.6940137", "0.68531287", "0.67044723", "0.66955256", "0.6693427", "0.66784096", "0.66199744", "0.6600473", "0.6524403", "0.6509962", "0.6505443", "0.6492091", "0.64865804", "0.6471881", "0.643168...
0.0
-1
/ Get pejabat by idpejabat
function get_pejabat($idpejabat) { return $this->db->get_where('pejabat',array('idpejabat'=>$idpejabat))->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getClanek($id){\n $sth = $this->db->prepare(\"SELECT * FROM PRISPEVKY\n WHERE id_prispevku = :id\");\n $sth->bindParam(':id', $id);\n $sth->execute();\n $data = $sth->fetch();\n return $data;\n }", "public function selectById($id) {\n $co...
[ "0.7301212", "0.7216508", "0.7182426", "0.71363527", "0.7055486", "0.70145357", "0.7007298", "0.69727194", "0.6953885", "0.69471395", "0.6904584", "0.6896306", "0.68918747", "0.6874952", "0.68428946", "0.68396425", "0.682469", "0.67933637", "0.6779113", "0.6764388", "0.673918...
0.81246346
0
/ Get all pejabat
function get_all_pejabat() { $result = $this->db->query("SELECT `pejabat`.*, `struktural`.`nm_struktural`, `pegawai`.`Nama` FROM `pejabat` LEFT JOIN `pegawai` ON `pejabat`.`idpegawai` = `pegawai`.`idpegawai` LEFT JOIN `struktural` ON `struktural`.`idstruktural` = `pejabat`.`idstruktural`")->result_array(); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function all_pemesan(){\r\n\r\n $all = $this->db->get(\"pemesan\")->result();\r\n $response['status']=200;\r\n $response['error']=false;\r\n $response['person']=$all;\r\n return $response;\r\n\r\n }", "public function selectAll() {\n $conn = $this->conex->connectDatabase();\n ...
[ "0.720695", "0.7148643", "0.71315914", "0.7056797", "0.7040648", "0.7035885", "0.70065653", "0.6960054", "0.692627", "0.6913165", "0.6913136", "0.6896919", "0.68780184", "0.685709", "0.68477863", "0.68319815", "0.68293214", "0.6803032", "0.67976135", "0.67862356", "0.6776726"...
0.7749476
0
/ function to add new pejabat
function add_pejabat($params) { $this->db->trans_begin(); $this->db->where('idstruktural',$params['idstruktural']); $this->db->update('pejabat', ['status'=>false]); $this->db->insert('pejabat',$params); $id = $this->db->insert_id(); if($this->db->trans_status()){ $this->db->trans_commit(); $result = $this->db->query("SELECT `pejabat`.*, `struktural`.`nm_struktural`, `pegawai`.`Nama` FROM `pejabat` LEFT JOIN `pegawai` ON `pejabat`.`idpegawai` = `pegawai`.`idpegawai` LEFT JOIN `struktural` ON `struktural`.`idstruktural` = `pejabat`.`idstruktural` WHERE pejabat.idpejabat= '$id'")->row_array(); return $result; }else{ $this->db->trans_rollback(); return $this->db->trans_status(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_plazo()\n\t{\n\t\tif(!empty($this->data))\n\t\t{\n\t\t\techo var_dump($this->data);\n\t\t\t$etapa = mb_strtoupper($this->data['Plazo']['etapa']);\t\t\n\t\t\t$etapa = $etapa;\n\t\t\t$datos = array('etapa'=> $etapa,\n\t\t\t\t\t\t 'etapa_id'\t=> $this->data['Plazo']['etapa_id'],\n\t\t\t\t\t\t 'plazo...
[ "0.6878265", "0.63407266", "0.63336766", "0.63089603", "0.60865456", "0.6069134", "0.59604204", "0.5934492", "0.592478", "0.5908384", "0.5810086", "0.57515293", "0.57446", "0.573865", "0.5705946", "0.567204", "0.5670781", "0.5664993", "0.56545675", "0.5643241", "0.56429774", ...
0.6126722
4
/ function to update pejabat
function update_pejabat($idpejabat,$params) { $item = [ 'idstruktural'=>$params['idstruktural'], 'status'=>$params['status'], 'NoSK'=>$params['NoSK'], 'idpegawai'=>$params['idpegawai'] ]; $this->db->where('idpejabat',$idpejabat); $this->db->update('pejabat',$params); $result = $this->db->query("SELECT `pejabat`.*, `struktural`.`nm_struktural`, `pegawai`.`Nama` FROM `pejabat` LEFT JOIN `pegawai` ON `pejabat`.`idpegawai` = `pegawai`.`idpegawai` LEFT JOIN `struktural` ON `struktural`.`idstruktural` = `pejabat`.`idstruktural` WHERE pejabat.idpejabat= '$idpejabat'")->row_array(); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdatePayslip()\n {\n }", "function update_surat_keputusan_pemutih_penyalur() {\n//\t\tif (! $this->get_permission('fill_this')) return $this->intruder();\n\t\tglobal ${$GLOBALS['post_vars']};\n\t\t$record = array (\n\t\t\t'id_surat_keputusan_pemutih_penyalur' => ${$GLOBALS['post_vars']...
[ "0.6729855", "0.6411861", "0.6405064", "0.6380061", "0.6223578", "0.6223578", "0.6223578", "0.6223578", "0.6219284", "0.6219283", "0.618149", "0.6118104", "0.61076903", "0.61068445", "0.6082523", "0.6074526", "0.6057046", "0.60463125", "0.60463125", "0.60309374", "0.6022833",...
0.61620986
11
/ function to delete pejabat
function delete_pejabat($idpejabat) { return $this->db->delete('pejabat',array('idpejabat'=>$idpejabat)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete() ;", "function delete() ;", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function d...
[ "0.73884976", "0.73884976", "0.7257584", "0.7257584", "0.7257584", "0.7257584", "0.7257584", "0.7257584", "0.7257584", "0.7257584", "0.7257584", "0.7257584", "0.7257584", "0.7257584", "0.7257584", "0.7257584", "0.7257584", "0.6948544", "0.69392365", "0.6925347", "0.6925347", ...
0.7658528
0
Used to insert new banner
public function insert_banner($data) { $this->db->insert('banners', $data); if ($this->db->insert_id()) { return $this->db->insert_id(); } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert($banner);", "public function create()\n {\n echo 'create a banner juice';\n }", "public function newbanner()\n {\n if (get_option('is_on_banner_buy') == '0') {\n return new Tempcode();\n }\n\n $this->handle_has_banner_already();\n\n ...
[ "0.8265689", "0.66436976", "0.661809", "0.6550219", "0.6531746", "0.6465813", "0.6338574", "0.6296318", "0.61739117", "0.60783815", "0.60725194", "0.60564584", "0.5970942", "0.5964039", "0.5943536", "0.59086645", "0.5899667", "0.5888238", "0.578138", "0.57748246", "0.5757623"...
0.58645004
18
Used to update banner
public function update_banner($id, $data) { $this->db->where('banner_id', $id); $query = $this->db->update('banners', $data); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($banner);", "public function update($bannerclient);", "private function _recalcBanner() {\n // @TODO Here is no params for recalc...?\n }", "function updateAffiliateBannerFrontEnd($oAffiliate)\n\t\t{\n\t\t\t$query= \"update tbl_affiliate set banner ='\".$oAffiliate->organisa...
[ "0.8096814", "0.72055745", "0.6884995", "0.6753541", "0.6611288", "0.6479754", "0.6262093", "0.6227159", "0.62181026", "0.6181332", "0.6181332", "0.6015036", "0.59929276", "0.593556", "0.5930092", "0.59097785", "0.59002835", "0.58922946", "0.58797914", "0.58797914", "0.586892...
0.548853
74
Used to get details of banner
public function get_banner($id) { $this->db->where('banner_id', $id); $query = $this->db->get('banners'); return $query->row_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBanner()\n {\n return $this->banner;\n }", "function getBanner()\n {\n return $this->banner;\n }", "public function getBanner() {\n\t\t$ls = DBModel::getByFields('cernet_contest');\n\t\treturn $ls[0]['h_banner'];\n\t}", "function getbanners()\n\t\t{\n\t\t\t$banner...
[ "0.7556836", "0.75499254", "0.7523375", "0.72768754", "0.6853968", "0.6787856", "0.6777292", "0.64974135", "0.64505047", "0.6425248", "0.63630253", "0.6352077", "0.6265052", "0.62190825", "0.6199564", "0.6192918", "0.6192918", "0.6192918", "0.6192918", "0.6148274", "0.6145811...
0.6165804
19
Used to get list of banners
public function get_banners($offset = 0, $limit = LIST_LIMIT) { $this->db->limit($limit, $offset); $query = $this->db->get('banners'); return $query->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function GetBanners()\n\t{\n\t\t$output = '';\n\t\t\n\t\t$sql = 'SELECT\n\t\t\t\t\tb.id, b.image_file, b.link_url, b.priority_order,\n\t\t\t\t\tbd.image_text\n\t\t\t\tFROM '.TABLE_BANNERS.' b\n\t\t\t\t\tLEFT OUTER JOIN '.TABLE_BANNERS_DESCRIPTION.' bd ON b.id = bd.banner_id\n\t\t\t\tWHERE b.is_active...
[ "0.7547168", "0.73971987", "0.73853016", "0.7186181", "0.703898", "0.7037343", "0.6975248", "0.67234355", "0.6670511", "0.6599092", "0.65825635", "0.6561312", "0.6558011", "0.6525831", "0.643927", "0.6404892", "0.63949394", "0.62333065", "0.6232464", "0.6215714", "0.62108696"...
0.64701515
14
Used to get total count of banners
public function get_record_count() { $this->db->select('COUNT(banner_id) AS cnt'); $query = $this->db->get('banners')->row(); return $query->cnt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotalCount();", "public function getTotalCount();", "public function getTotalCount();", "public function totalCount();", "public function totalCount();", "public function getCount() {}", "public function getCount() {}", "public function getCount() {}", "static public function get...
[ "0.72719115", "0.72719115", "0.72719115", "0.71878475", "0.71878475", "0.693913", "0.693884", "0.693884", "0.6836778", "0.67991793", "0.6750495", "0.6750495", "0.6750495", "0.6750197", "0.6743189", "0.67197996", "0.66947955", "0.66857976", "0.6669202", "0.66503894", "0.664530...
0.6788933
10
Used to delete specified banner
public function delete_banner($id) { $this->db->where_in('banner_id', $id); $query = $this->db->delete('banners'); if ($this->db->affected_rows() > 0) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteBanner() {\n $_DELETE = $this->getDeleteData();\n if (isset($_DELETE['id'])) {\n $id = $_DELETE['id'];\n } else {\n throw new RestException(HttpStatusCodes::BAD_REQUEST, \"Missing required params\");\n }\n try {\n\n Banner::d...
[ "0.7713283", "0.76623505", "0.76245475", "0.7619496", "0.73277056", "0.7223354", "0.72026217", "0.7135091", "0.70301867", "0.69769067", "0.6954679", "0.6875654", "0.6856139", "0.684753", "0.6842756", "0.67841864", "0.67590237", "0.67473435", "0.6720397", "0.6687253", "0.66796...
0.676666
16
Display a listing of the resource.
public function index() { $users = User::where('deleted', '!=',1)->orderBy('id', 'ASC')->paginate(5); return view('admin.users.index')->with('users', $users); }
{ "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.7446377", "0.7361922", "0.72984487", "0.7248631", "0.7162871", "0.7148215", "0.7131838", "0.71028054", "0.7102395", "0.70988023", "0.7048243", "0.6993516", "0.6989079", "0.69341344", "0.69001913", "0.6899167", "0.68920904", "0.6887188", "0.68661547", "0.6849159", "0.683002...
0.0
-1
Show the form for creating a new resource.
public function create() { $roles = Role::pluck('name', 'name'); return view('admin.users.create')->with('roles', $roles); }
{ "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(UserRequest $request) { $user = new User($request->all()); $user->password = bcrypt($request->password); $user->deleted = 0; $user->save(); $user->roles()->attach(Role::where('name', $request->role)->first()); //Flash::success('Se ha registrado de manera exitosa!'); return redirect()->route('users.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) { $user = User::find($id); return view('admin.users.show') ->with('user', $user); }
{ "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) { $users = User::find($id); $roles = Role::pluck('name', 'id'); return view('admin.users.edit')->with('user', $users)->with('roles', $roles); }
{ "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.7855416", "0.769519", "0.72748375", "0.724256", "0.7173659", "0.7064689", "0.70549816", "0.6985127", "0.6949479", "0.69474626", "0.694228", "0.6929372", "0.6903047", "0.6899655", "0.6899655", "0.688039", "0.68649715", "0.68618995", "0.68586665", "0.68477386", "0.68366665",...
0.0
-1
Update the specified resource in storage.
public function update(UserEditRequest $request, $id) { $user = User::find($id); $user->fill($request->all()); $user->save(); //Flash::success('Se ha registrado de manera exitosa!'); return redirect()->route('users.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) { $user = User::find($id); $user->deleted = 1; $user->save(); return redirect()->route('users.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
luxcal.php by Alex Rosario calendar backend for Spotify Tech Fellowship application
function param($p, $def="") { //global $_SERVER, $_SESSION, $_COOKIE, $_REQUEST, $_POST, $_GET; if (!empty($_SESSION)&&isset($_SESSION[$p])) return $_SESSION[$p]; else if (isset($_COOKIE[$p])) return $_COOKIE[$p]; else if (isset($_REQUEST[$p])) return $_REQUEST[$p]; else if (isset($_POST[$p])) return $_POST[$p]; else if (isset($_GET[$p])) return $_GET[$p]; else return $def; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cal()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Start up\n\t\t// ---------------------...
[ "0.6648619", "0.6256831", "0.6181254", "0.6149313", "0.60304385", "0.59320915", "0.5872942", "0.5856304", "0.5853479", "0.58458984", "0.58344996", "0.5811935", "0.57830495", "0.57766193", "0.57719463", "0.57481104", "0.57471883", "0.57235605", "0.5685692", "0.56314224", "0.56...
0.0
-1
Run the database seeds.
public function run() { DB::table('users')->insert([ [ 'user_email'=>'dothuykieu@gmail.com', 'password'=>Hash::make('12345678'), 'user_fullname'=>'Đỗ Thúy Kiều', 'user_address'=>'hưng yên', 'user_phone'=>'0374970903', 'remember_token'=>'', 'user_level'=>'1' ], [ 'user_email'=>'quantrimang@gmail.com', 'password'=>Hash::make('12345678'), 'user_fullname'=>'quản trị xinh trai', 'user_address'=>'Hà nội', 'user_phone'=>'0374970904', 'uremember_token'=>'', 'user_level'=>'2' ] ]); }
{ "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.80130625", "0.79795986", "0.79764974", "0.79524934", "0.7950615", "0.79505694", "0.7944086", "0.7941758", "0.7938509", "0.79364634", "0.79335415", "0.7891555", "0.78802574", "0.78790486", "0.7878107", "0.7875447", "0.78703815", "0.7869534", "0.7851931", "0.7850407", "0.784...
0.0
-1
funcion a la que le paso un string de consulta y devuelve una variable con el array de los resultados
function conexion($consulta){ $servername = "localhost"; $username = "adminPlayas"; $password = "cjwSA2F2mEpZZrBc"; $dbname = "playasdb"; //Create connection $conn = new mysqli("localhost", "adminPlayas", "cjwSA2F2mEpZZrBc", "playasdb"); //Check connection if($conn->connect_error){ die("La conexión ha fallado: " .$conn->connect_error); } //Cambiamos la codificación if(!$conn->set_charset("utf8")){ printf("Error cargando el conjunto de caracteres utf8: %s\n"); }else{ } $resultado = mysqli_query($conn, $consulta); return($resultado); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function buscar($sql) {\n $aRe = array();\n if ($sql) {\n $res = Funciones::gEjecutarSQL($sql);\n while($aRow = $res->fetch(PDO::FETCH_ASSOC)) {\n //$aRe[] = array($aRow['FECHA'], html_entity_decode($aRow['CODPUN'],ENT_QUOTES,'UTF-8'), html_entity_decode($...
[ "0.7218432", "0.67874205", "0.6688558", "0.6676512", "0.66657555", "0.6642262", "0.6633438", "0.6607504", "0.65956414", "0.65522796", "0.6485325", "0.6475642", "0.6394916", "0.63869345", "0.6378649", "0.6378367", "0.6375234", "0.6374693", "0.6370347", "0.6363457", "0.6360659"...
0.0
-1
Funcion para llenar el dropdown
function conexionDropDown(){ $servername = "localhost"; $username = "adminPlayas"; $password = "cjwSA2F2mEpZZrBc"; $dbname = "playasdb"; //Create connection $conn = new mysqli("localhost", "adminPlayas", "cjwSA2F2mEpZZrBc", "playasdb"); //Check connection if($conn->connect_error){ die("La conexión ha fallado: " .$conn->connect_error); } //Cambiamos la codificación if(!$conn->set_charset("utf8")){ printf("Error cargando el conjunto de caracteres utf8: %s\n"); }else{ } $selectDropDownList = "SELECT idMunicipio, nombreMun FROM municipio"; $result = mysqli_query($conn, $selectDropDownList); echo "<div class='selectdiv'>"; echo "<form class='demo' action='inicio.php' method='POST'>"; echo "<select class='black' name='municipios' onchange='this.form.submit()'>"; echo "<option>Seleccione un municipio</option>"; while ($row = mysqli_fetch_array($result)){ echo "<option value=".$row['idMunicipio']." >".$row['nombreMun']."</option>"; } echo "</select>"; echo "</div>"; echo "</form>"; $conn->close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDropDown() ;", "public function getDropDown() {}", "public function getDropDown() {}", "function listadoSelect();", "function dropdown_tag ($xmlobjekt, $benutzer, $programmnr, $anweisungsnr, $tagtyp){\n\n #Liest den Wert des Tages aus\n $tagwert=$xmlobjekt->programm[$programmnr]->anweisun...
[ "0.8285919", "0.8020672", "0.8020672", "0.72595197", "0.7190579", "0.71253115", "0.7011962", "0.6956132", "0.69450486", "0.6924501", "0.69239986", "0.6881139", "0.68717885", "0.68335956", "0.68146074", "0.68100965", "0.6785602", "0.6779349", "0.6779193", "0.6770721", "0.67657...
0.6618021
37
FUNCION QUE RELLENA EL DROPDOWNLIST
function mostrarResultadosPlaya($idPlaya){ $servername = "localhost"; $username = "adminPlayas"; $password = "cjwSA2F2mEpZZrBc"; $dbname = "playasdb"; //Create connection $conn = new mysqli("localhost", "adminPlayas", "cjwSA2F2mEpZZrBc", "playasdb"); //Check connection if($conn->connect_error){ die("La conexión ha fallado: " .$conn->connect_error); } //Cambiamos la codificación if(!$conn->set_charset("utf8")){ printf("Error cargando el conjunto de caracteres utf8: %s\n"); }else{ } /////////////ESTAMOS CONECTADOS//////////////// $selectPlaya = "SELECT nombre, descripcion, idPlaya, direccion, idMun,playaSize, longitud, latitud, imagen, municipio.nombreMun FROM playas INNER JOIN municipio ON idMun = municipio.idMunicipio WHERE idPlaya = $idPlaya"; $result = mysqli_query($conn, $selectPlaya); while ($row = mysqli_fetch_array($result)){ //Vamos a mostrar los resultados construyendo un lenguaje de marcas adaptado al CSS echo "<h2>".$row["nombre"]."</h2><br>"; echo "<p class='beachind'>"; echo "<span class='label'>Dirección: </span>".$row["direccion"]."<br>"; echo "<span class='label'>Municipo: </span>" .$row["nombreMun"]."<br>"; echo "<span class='label'>Tamaño de la playa: </span>" .$row["playaSize"]."<br>"; echo "<span class='label'>Descripcion: </span><br>"; echo $row["descripcion"]."<br>"; //MAPA DE GOOGLE////////////////////////////////////// error_reporting(E_ALL ^ E_NOTICE); require_once("include/GoogleMap.php"); require_once("include/JSMin.php"); $gmap = new GoogleMapAPI(); $gmap->addMarkerByCoords($row["latitud"], $row["longitud"]); require_once('include/gmap_template.php'); } echo "</p>"; $selectMedia = "SELECT AVG(puntuacion) as media FROM valoraciones WHERE idPlaya = $idPlaya"; $result = mysqli_query($conn, $selectMedia); while ($row = mysqli_fetch_array($result)){ echo "<h2 class='media'>"; echo "Nota media: ".round($row["media"]); echo "</h2>"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listadoSelect();", "function getDropDown() ;", "public function getDropDown() {}", "public function getDropDown() {}", "function colores_drop_list(){\n\n$sql =\"SELECT * FROM colores ;\";\n$result = $this->database->query($sql);\n$result = $this->database->result;\nwhile($row = mysql_fetch_array($...
[ "0.7627477", "0.7489638", "0.7041399", "0.7041399", "0.70071983", "0.70061123", "0.68579394", "0.6827028", "0.6797338", "0.6737059", "0.67304045", "0.6707867", "0.67071545", "0.6640586", "0.6581851", "0.65314275", "0.6479757", "0.64714104", "0.6465412", "0.645812", "0.6419996...
0.0
-1
Table and connection instance definition
public function __construct($table = null) { $this->table = $table; $this->setConnection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getTable();", "abstract public function getTable();", "abstract public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTable();", "public function getTa...
[ "0.7420063", "0.7297893", "0.7297893", "0.7056061", "0.7056061", "0.7056061", "0.7056061", "0.7056061", "0.7056061", "0.7056061", "0.69631445", "0.69627786", "0.69616777", "0.6950442", "0.6926932", "0.6919077", "0.68629664", "0.68616956", "0.6780669", "0.6780108", "0.6780108"...
0.0
-1
Method responsible for make a database connection
private function setConnection(){ try { $this->connection = new PDO('mysql:host='.self::HOST.';dbname='.self::NAME.';', self::USER, self::PASS); $this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } catch (PDOException $e) { die('ERROR: '.$e->getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function connectToDB() {}", "private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConnection');\r\r\n\t\t$this->dbHandle->setDatabaseHost($this->dbHost);\r\r\n\t\t$this->dbHandle->setDatabaseU...
[ "0.81091505", "0.79777646", "0.7821873", "0.78074807", "0.7720322", "0.7686659", "0.7650986", "0.7619585", "0.76122123", "0.7601764", "0.7601366", "0.75677806", "0.75543904", "0.75504225", "0.75455356", "0.7542498", "0.75343937", "0.7516224", "0.74813086", "0.7479167", "0.747...
0.0
-1
Method responsible for execute database querys
public function execute($query, $params = []){ try { $statement = $this->connection->prepare($query); $statement->execute($params); return $statement; } catch(PDOException $e) { die('ERROR: '.$e->getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function execute () {\n if($this->_query->execute()) {\n\n // It has been succesful so add the output to $this->results and set it as an object\n $this->_results = $this->_query->fetchAll(PDO::FETCH_OBJ);\n\n // Set the affected row count to $this->_count\n ...
[ "0.73718125", "0.7356536", "0.7343414", "0.7266709", "0.726423", "0.7196487", "0.7139046", "0.7082573", "0.7077548", "0.70344007", "0.7033828", "0.70299387", "0.70241004", "0.7018411", "0.6985916", "0.69651514", "0.6958778", "0.6958354", "0.69479835", "0.693726", "0.693197", ...
0.0
-1
Method responsible for join statement
public function joinMaker($join) { $newJoin = []; for ($i = 0; $i < count($join); $i++) { $actualJoin = ''; $joinType = $join[$i]['joinType']; $joinTable = $join[$i]['joinTable']; $actualJoin = $joinType.' '.$joinTable.' '.substr($joinTable, 0, 1); $actualJoin .= ' On '; $actualJoin .= substr($this->table, 0, 1).'.'.$join[$i]['mainTableIdColumn']; $actualJoin .= ' = '; $actualJoin .= substr($joinTable, 0, 1).'.'.$join[$i]['joinTableIdColumn']; array_push($newJoin, $actualJoin); } return $newJoin; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function joinQuery()\n {\n }", "private function joins()\r\n {\r\n /* SELECT* FROM DOCUMENT WHERE DOCUMENT.\"id\" IN ( SELECT ID FROM scholar WHERE user_company_id = 40 )*/\r\n\r\n $query = EyufScholar::find()\r\n ->select('id')\r\n ->where([\r\n ...
[ "0.82681024", "0.68791795", "0.67837185", "0.6764695", "0.6745305", "0.6649138", "0.66145897", "0.657189", "0.6555199", "0.65324754", "0.6501697", "0.6439286", "0.6438006", "0.64248466", "0.6421217", "0.64148897", "0.63951904", "0.6387671", "0.63819814", "0.6378832", "0.63740...
0.58095783
69
Method responsible for database inserts
public function insert($values) { // QUERY DATA $fields = array_keys($values); $binds = array_pad([], count($fields), '?'); // QUERY MAKER $query = 'Insert Into '.$this->table.' ('.implode(', ', $fields).') Values ('.implode(', ', $binds).') '; // INSERT EXECUTE $this->execute($query, array_values(($values))); // RETURN LAST INSERTED ID return $this->connection->lastInsertId(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "protected function _insert()\n\t{\n\t}", "protected function saveInsert()\n {\n }", "protected function _postInsert()\n\t{\n\t}", "public function insertDatabase();", "protected functio...
[ "0.78754604", "0.78754604", "0.77684176", "0.77606094", "0.75443614", "0.7510332", "0.7497315", "0.74082905", "0.7407948", "0.7340127", "0.72734606", "0.71837527", "0.71837527", "0.7181415", "0.71792895", "0.7174612", "0.7145394", "0.7113742", "0.7098944", "0.70865643", "0.70...
0.0
-1
Method responsible for database selects
public function select($fields = [], $join = [], $where = [], $order = [], $group = [], $limit = null) { // QUERY DATA $fields = count($fields) > 0 ? implode(', ', $fields).' ' : '* '; $join = count($join) > 0 ? ' '.implode(', ', $this->joinMaker($join)).' ' : ''; $where = count($where) > 0 ? ' Where '.implode(', ', $where).' ' : ''; $order = count($order) > 0 ? ' Order by '.implode(', ', $order).' ' : ''; $group = count($group) > 0 ? ' Group By '.implode(', ', $group).' ' : ''; $limit = strlen($limit) ? ' Limit '.$limit : ''; // QUERY MAKER $query = 'Select '.$fields.'From '.$this->table.' '.substr($this->table, 0, 1).$join.$where.$order.$group.$limit; // RETURN return $this->execute($query); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function prepareSelect();", "protected function prepareSelectStatement() {}", "private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {...
[ "0.71177226", "0.69969845", "0.69400805", "0.684258", "0.68425256", "0.6793159", "0.6793159", "0.6793159", "0.6746754", "0.67349964", "0.67165786", "0.66673815", "0.6657439", "0.66234964", "0.65940285", "0.6584887", "0.6551613", "0.6510309", "0.65042573", "0.65039396", "0.650...
0.0
-1
Method responsible for database updates
public function update($where, $values) { // QUERY DATA $fields = array_keys($values); // QUERY MAKER $query = 'Update '.$this->table.' Set '.implode(' = ?, ', $fields).' = ? Where '.$where; // UPDATE EXECUTE $this->execute($query, array_values(($values))); // RETURN return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function db_update() {}", "public function updateDB()\n {\n\n }", "protected function update() {}", "protected function _update()\n\t{\n\t}", "protected function performUpdate() {}", "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_USERS, $this->getArray());\n ...
[ "0.82960653", "0.7640043", "0.7452151", "0.7251308", "0.7226608", "0.7210286", "0.7205591", "0.71636784", "0.71636784", "0.71341234", "0.7101857", "0.7073481", "0.6962092", "0.69456273", "0.69433403", "0.6919169", "0.68553525", "0.6830387", "0.6796664", "0.6795924", "0.679554...
0.0
-1
Sets the view field
public function setView(Zend_View_Interface $view) { $this->view = $view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setView($value) {\r\n $this->view = $value;\r\n }", "public function setViewAttribute($input)\n {\n $this->attributes['view'] = $input ? $input : null;\n }", "public function setView(View &$view) {\n\t\t$this->view = $view;\n\t}", "public function setView(FW_Mvc_View $view){\n\t...
[ "0.70969415", "0.6878869", "0.68779284", "0.67435896", "0.65906787", "0.64792794", "0.6468066", "0.645294", "0.63559693", "0.63503927", "0.63155305", "0.63115174", "0.62998134", "0.6122572", "0.6090669", "0.6088068", "0.60829204", "0.6077526", "0.6069231", "0.6051919", "0.603...
0.5818652
43
Validate error is thrown exception, otherwise is return `$data`
public function validate(array $data, array $params): array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getErrorData()\n {\n $error = [\n 'message' => $this->getErrorMessage(),\n ];\n\n if ($this->debug && \\is_object($this->error)) {\n $error['exception'] = \\get_class($this->error);\n $error['file'] = $this->error->getFile();\n ...
[ "0.6854564", "0.6606392", "0.6606392", "0.6606392", "0.65214", "0.65147525", "0.6494247", "0.6490958", "0.63614845", "0.63614845", "0.6327547", "0.6324119", "0.6324119", "0.6281488", "0.62763643", "0.6258498", "0.623963", "0.6222697", "0.62008876", "0.6168528", "0.61026686", ...
0.0
-1
maj dede la table article
function pouetradio_upgrade($nom_meta_base_version,$version_cible){ $maj = array(); $maj['create'] = array( array('sql_alter',"TABLE spip_syndic_articles ADD playable TINYINT DEFAULT 0 NOT NULL"), array('sql_updateq',"spip_syndic_articles", array('playable'=>-1), "playable=0"), array('pouetradio_make_playables'), ); $maj['1.0.0'] = array( array('sql_alter',"TABLE spip_syndic_articles ADD playable TINYINT DEFAULT 0 NOT NULL"), ); $maj['1.1.2'] = array( array('sql_updateq',"spip_syndic_articles", array('playable'=>-1), "playable=0"), array('pouetradio_make_playables'), ); $maj['1.1.5'] = array( array('sql_updateq',"spip_syndic_articles", array('playable'=>-1), "tags like '%soundcloud%'"), array('pouetradio_make_playables'), ); include_spip('base/upgrade'); maj_plugin($nom_meta_base_version, $version_cible, $maj); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function afficherArticles() \r\n {\r\n // TOUJOURS LA DATABASE blog\r\n // CREER UNE TABLE SQL article\r\n // COMME COLONNES\r\n // id INT INDEX=primary A_I (AUTO_INCREMENT)\r\n // titre VARCHAR(160)\r\n /...
[ "0.655903", "0.62961936", "0.6255199", "0.61858463", "0.61244065", "0.60583043", "0.6043175", "0.60352045", "0.59704745", "0.59133035", "0.58857065", "0.5882311", "0.58754945", "0.586449", "0.5860313", "0.58422494", "0.5827464", "0.5820871", "0.5812499", "0.57820934", "0.5748...
0.0
-1
Display a listing of the resource.
public function index(){ $url="https://api.thingspeak.com/channels/258624/feeds.json?timezone=Asia/Bangkok"; $json=file_get_contents($url); $data=json_decode($json); return view('result')->with('data', $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
Run the database seeds.
public function run() { DB::transaction(function() { $point_name = "Sekip Lama"; Path::query() ->where(function ($query) use($point_name) { $query ->orWhereHas("point_from", function ($query) use($point_name) { $query->where("name", "not like", "%{$point_name}%"); }) ->orWhereHas("point_to", function ($query) use($point_name) { $query->where("name", "not like", "%{$point_name}%"); }); }) ->delete(); Site::query() ->whereHas("point", function ($query) use($point_name) { $query->where("name", "not like", "%{$point_name}%"); }) ->delete(); Point::query() ->where("name", "not like", "%{$point_name}%") ->delete(); }); }
{ "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
/ Plugin Name: tagBeep Uptime Monitor Version: 1.1 Plugin URI: Description: Get an email when your blog is down! Up and running in 5 seconds. License: GPLv2 Author: Radu Oprea Author URI:
function tb_load_tagBeepAdmin() { require_once 'tagBeepAdmin.php'; //za admin }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tb_addTagBeepToWpAdmin() { \r\n //add in /settings manu\r\n add_options_page(\"tagBeep uptime\", \"tagBeep uptime\", 8, \"tagBeepUptimeMonitor\", \"tb_load_tagBeepAdmin\"); \r\n //add in the /plugins menu\r\n add_plugins_page(\"tagBeep uptime\", \"tagBeep uptime\", 8, \"tagBeepUptimeMonitorPl...
[ "0.69519365", "0.58565414", "0.5748068", "0.56761634", "0.5660449", "0.56329155", "0.5609625", "0.55483407", "0.552811", "0.548187", "0.5471502", "0.5394002", "0.5363754", "0.5357278", "0.53504765", "0.5342368", "0.5305241", "0.52102274", "0.52086943", "0.52019906", "0.519490...
0.47847843
82
Add tagBeep's panel to the wp admin panel admin_menu action
function tb_addTagBeepToWpAdmin() { //add in /settings manu add_options_page("tagBeep uptime", "tagBeep uptime", 8, "tagBeepUptimeMonitor", "tb_load_tagBeepAdmin"); //add in the /plugins menu add_plugins_page("tagBeep uptime", "tagBeep uptime", 8, "tagBeepUptimeMonitorPlugin", "tb_load_tagBeepAdmin"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function admin_actions() {\n\t\t$menutitle = '<img src=\"' . get_bloginfo('url') . '/wp-content/plugins/paywithafacebookpost/img/paywithfb.png\" alt=\"\" />' ;\n\t\tadd_options_page($menutitle . \" Pay With A Facebook Post\", $menutitle . \" Pay With A Facebook Post\", 8, basename(__FILE__), array(\"plgPay...
[ "0.7011635", "0.6940231", "0.68914056", "0.687653", "0.6766032", "0.67465866", "0.6713363", "0.6699646", "0.66678065", "0.6623464", "0.6600367", "0.6585066", "0.6566238", "0.6527503", "0.6513445", "0.6494724", "0.64945096", "0.64941704", "0.64812464", "0.6476937", "0.6474341"...
0.814
0
On activate event set the option tagBeep_redirect_to_plugin to redirect
function tb_onPluginActivate() { add_option('tagBeep_redirect_to_plugin', 'true'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tb_tagBeep_plugin_redirect() {\r\n if (get_option('tagBeep_redirect_to_plugin') == 'true') {\r\n //we have the key tagBeep_redirect_to_plugin, we have to redirect to the plugin page\r\n update_option('tagBeep_redirect_to_plugin', 'false'); //set the key to false to not redirect each time\...
[ "0.7170224", "0.71066463", "0.656983", "0.6524379", "0.65230954", "0.64989483", "0.6357853", "0.6248893", "0.6221345", "0.6124907", "0.60982805", "0.6097742", "0.60708517", "0.60234416", "0.60038537", "0.5995095", "0.5951577", "0.5896945", "0.58967584", "0.58636487", "0.58061...
0.8776905
0
First time activation redirect on admin_init check to see if the plugin was activated for the first time
function tb_tagBeep_plugin_redirect() { if (get_option('tagBeep_redirect_to_plugin') == 'true') { //we have the key tagBeep_redirect_to_plugin, we have to redirect to the plugin page update_option('tagBeep_redirect_to_plugin', 'false'); //set the key to false to not redirect each time wp_redirect('plugins.php?page=tagBeepUptimeMonitorPlugin'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hook_activate() {\r\n\r\n if (!current_user_can('activate_plugins'))\r\n return;\r\n $plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';\r\n check_admin_referer(\"activate-plugin_{$plugin}\");\r\n }", "function activation_redirect( $plugin ) {\n\t\t\n\t\t$...
[ "0.77352774", "0.7394344", "0.7301457", "0.7213736", "0.7210377", "0.7107501", "0.71054", "0.7062108", "0.7028962", "0.69926196", "0.6917017", "0.6905886", "0.6868749", "0.68630195", "0.6805133", "0.6798995", "0.6785223", "0.6737332", "0.6726308", "0.6709642", "0.66942954", ...
0.6264614
56
Display a listing of the resource.
public function index() { $todos = Todo::latest()->get(); return view('home')->with('todos', $todos); }
{ "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.7446377", "0.7361922", "0.72984487", "0.7248631", "0.7162871", "0.7148215", "0.7131838", "0.71028054", "0.7102395", "0.70988023", "0.7048243", "0.6993516", "0.6989079", "0.69341344", "0.69001913", "0.6899167", "0.68920904", "0.6887188", "0.68661547", "0.6849159", "0.683002...
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $validateData = $request->validate([ 'title' =>'required|max:255', ]); $todo = Todo::create([ 'title' =>$request->title, 'description' =>$request->description, 'completed' => 0, ]); return redirect('/'); }
{ "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(Todo $todo) { // }
{ "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(Todo $todo) { return view('todo.edit')->with('todo', $todo); }
{ "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.7855416", "0.769519", "0.72748375", "0.724256", "0.7173659", "0.7064689", "0.70549816", "0.6985127", "0.6949479", "0.69474626", "0.694228", "0.6929372", "0.6903047", "0.6899655", "0.6899655", "0.688039", "0.68649715", "0.68618995", "0.68586665", "0.68477386", "0.68366665",...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Todo $todo) { $todo->update($request->all()); return redirect('/'); }
{ "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 the storage
public function destroy(Todo $todo) { $todo->delete(); return redirect('/'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id'...
[ "0.691844", "0.6894853", "0.68434083", "0.6808667", "0.6776408", "0.67382014", "0.6699712", "0.655506", "0.64252657", "0.6395003", "0.63221955", "0.63221955", "0.63221955", "0.63221955", "0.6296029", "0.6295138", "0.62354594", "0.6208474", "0.6197897", "0.6183736", "0.6171975...
0.0
-1
Display a listing of the resource.
public function index(FilterStream $request) { $filters = $request->validated(); Log::debug($filters); $streams = Stream::orderBy('updated_at', 'desc') ->with('user:id,name') // ->streamingSince(60) ; if (isset($filters['excluded_ids']) && $filters['excluded_ids']) { $streams = $streams ->whereNotIn('id', $filters['excluded_ids']); } if (isset($filters['per_page'])) { $streams = $streams->paginate($filters['per_page']); } return StreamResource::collection($streams); }
{ "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
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "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.72855324", "0.71447515", "0.7132799", "0.6641042", "0.66208744", "0.6566955", "0.65249777", "0.6509032", "0.6447701", "0.63756555", "0.6373163", "0.63650846", "0.63650846", "0.63650846", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.6341676", "0.63416...
0.0
-1
Display the specified resource.
public function show(Stream $stream) { return $stream; }
{ "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
Update the specified resource in storage.
public function update(Request $request, Stream $stream) { // }
{ "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(Stream $stream) { // }
{ "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
La fonction getID retourne l'ID du post
public function getID(){ return $this->id_post; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_id() {\n\t\treturn $this->_post->ID;\n\t}", "public function id() { return $this->post->ID; }", "public function getIdPost()\n {\n return $this->id_post;\n }", "public function getIdPost()\n {\n return $this->idPost;\n }", "public function getIdPost(): int\n ...
[ "0.8281698", "0.79640985", "0.785352", "0.78039145", "0.76513124", "0.7552922", "0.75360054", "0.7522283", "0.7509603", "0.7485022", "0.7454128", "0.74435425", "0.74435425", "0.7416648", "0.7396076", "0.7393025", "0.73314124", "0.73260266", "0.72828233", "0.7266522", "0.72665...
0.84069896
0
La fonction afficherPost affiche le post sur la page en remplacant les valeurs dans template.post.html par celles de la classe
public function afficherPost(){ $gab = new Template("./"); $gab->set_filenames(array("body" => "template.post.html")); $gab->assign_vars(array("user" => $this->user)); $gab->assign_vars(array("title" => $this->title_post)); $gab->assign_vars(array("text" => $this->text_post)); $gab->assign_vars(array("date" => $this->date_post)); $gab->assign_vars(array("id_post" => $this->id_post)); $gab->assign_vars(array("count_like" => $this->count_like)); $gab->assign_vars(array("count_answer" => $this->count_answer)); $gab->assign_vars(array("like_button" => $this->like_button)); $gab->assign_vars(array("like_value" => $this->like_value)); $gab->pparse("body"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function postPage(){\n require_once \"controller/Post.php\";\n $post = new Post();\n require_once \"controller/Comment.php\";\n $comment = new Comment();\n //gets the post id in URL\n $idPost = $this->_url[1];\n //adds post info\n $html_post = $post->g...
[ "0.6882526", "0.6864509", "0.65965664", "0.6531523", "0.646463", "0.64543164", "0.6367002", "0.63137335", "0.63123596", "0.63002473", "0.6288412", "0.6261182", "0.6255973", "0.6255973", "0.62263983", "0.6142176", "0.61405116", "0.6139373", "0.6137133", "0.613517", "0.613013",...
0.85225886
0
Get the content count.
public function getData() { try { return $content; } catch (RuntimeException $e) { $content = ''; return $content; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContentCount() {\n return $this->count(self::CONTENT);\n }", "public function getContentsCount()\n {\n return $this->count(self::_CONTENTS);\n }", "public function getContentsCount()\n {\n return $this->count(self::_CONTENTS);\n }", "public function getC...
[ "0.8757544", "0.82937545", "0.82937545", "0.82937545", "0.82100934", "0.8127708", "0.80930626", "0.77501947", "0.7746475", "0.7430888", "0.7426106", "0.736785", "0.7366081", "0.73647606", "0.73441774", "0.73004925", "0.729413", "0.72758806", "0.7273878", "0.72651875", "0.7262...
0.0
-1
Initialize crowdtranslator plugin configuration Creates the database entries for the configuation if they don't already exist. Initial values will be taken from $_CROWDTRANSLATOR_DEFAULT.
function plugin_initconfig_crowdtranslator( ) { global $_CROWDTRANSLATOR_CONF, $_CROWDTRANSLATOR_DEFAULT; if ( is_array( $_CROWDTRANSLATOR_CONF ) && ( count( $_CROWDTRANSLATOR_CONF ) > 1 ) ) { $_CROWDTRANSLATOR_DEFAULT = array_merge( $_CROWDTRANSLATOR_DEFAULT, $_CROWDTRANSLATOR_CONF ); } $me = 'crowdtranslator'; $c = config::get_instance(); if ( !$c->group_exists( $me ) ) { $c->add( 'sg_main', NULL, 'subgroup', 0, 0, NULL, 0, true, $me, 0 ); $c->add( 'tab_main', NULL, 'tab', 0, 0, NULL, 0, true, $me, 0 ); $c->add( 'fs_main', NULL, 'fieldset', 0, 0, NULL, 0, true, $me, 0 ); // The below two lines add two settings to Geeklog's config UI $c->add( 'enabled', $_CROWDTRANSLATOR_DEFAULT[ 'enabled' ], 'select', 0, 0, 0, 10, true, $me, 0 ); // This adds a drop-down box } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init()\n {\n parent::init();\n //$this->_properties = $this->_privateConfig->properties->toArray();\n $this->_syncModelUri = $this->_privateConfig->syncModelUri;\n\n // Translation hack in order to enable the plugin to translate...\n $translate = OntoWiki::ge...
[ "0.6571638", "0.6550483", "0.63479686", "0.63428783", "0.63256496", "0.63084775", "0.62544197", "0.61851615", "0.61582184", "0.6125157", "0.6118933", "0.6104888", "0.6078163", "0.6075971", "0.60205436", "0.5983641", "0.5969798", "0.59378016", "0.5929856", "0.5904895", "0.5891...
0.69167745
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.8399528", "0.83755803", "0.83755803", "0.8342532", "0.8252005", "0.8246491", "0.82114965", "0.81451535", "0.81095713", "0.80819905", "0.799094", "0.79885143", "0.79823685", "0.7959513", "0.7950321", "0.7947592", "0.7925319", "0.7914417", "0.7899287", "0.7892423", "0.788904...
0.0
-1
Get the validation rules that apply to the request.
public function rules() { $request = [ 'name' => 'required', 'description' => 'required', 'tags' => 'required', 'price'=> 'required', // 'vat'=> 'required', // 'stock' => 'required', // 'stock_alert' => 'required', // 'safe_url' => 'required', // 'meta_title' => 'required', // 'meta_tags' => 'required', // 'is_featured' => 'required', // 'on_sale'=> 'required', 'sale_price' => 'required', // 'group_master' => 'required', // 'group_value' => 'required', // 'image_new' => 'required', // 'is_restricted' => 'required', // 'price_sale' => 'required', // 'colours'=> 'required', // 'sizes' => 'required', // 'image_url' => 'required', 'position' => 'required', 'meta_title' => 'required', 'gallery_img' => 'required|image|mimes:jpg,png,jpeg', 'position' => 'required', ]; // dd($request); return $request; }
{ "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
Returns the value of this object as a string.
public function __toString() { return $this->_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toString() : string\n {\n return $this->value;\n }", "public function __toString()\n\t{\n\t\treturn (string) $this->value;\n\t}", "final public function __toString()\n {\n return strval($this->value);\n }", "public function toString(): string\n {\n ...
[ "0.8840788", "0.879848", "0.87807935", "0.87536585", "0.87503517", "0.87464464", "0.873379", "0.873379", "0.873379", "0.8727374", "0.8727374", "0.8727374", "0.8727374", "0.8727374", "0.8727374", "0.8727374", "0.8727374", "0.8727374", "0.8727374", "0.8727374", "0.8727374", "...
0.0
-1
echo "Ajout d'un nouveau article";
public function add($id, $libelle, $anneeDebut, $anneeFin, $login) { // Préparation de la requête d'insertion. $q = $this->_db->query("INSERT INTO categorie (ID, LIBELLE, ANNEE_DEBUT, ANNEE_FIN, AUTEUR_MAJ, DERNIERE_MAJ) VALUES ('".$id."','".$libelle."','".$anneeDebut."','".$anneeFin."','".strtoupper($login)."',now())"); // Assignation des valeurs pour le nom du personnage. /*$q->bindValue(':login', $login); $q->bindValue(':password', $password); $q->bindValue(':email', $email); // Exécution de la requête. $q->execute();*/ // Hydratation du article passé en paramètre avec assignation de son identifiant et des dégâts initiaux (= 0). /*$article->hydrate(array( 'id' => $this->_db->lastInsertId(), 'degats' => 0, ));*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n echo \"Đây là trang Create\";\n }", "public function create()\n {\n echo 'Estoy en en create';\n }", "public function newAction()\n {\n\t\tTag::appendTitle('Create Article');\n }", "function create()\r\n\t{\r\n\r\n\t\t$this->form_validation->set...
[ "0.6840366", "0.65599674", "0.646996", "0.6398164", "0.63077974", "0.62761223", "0.62596637", "0.62334067", "0.6215765", "0.6107817", "0.6095761", "0.6095761", "0.6074774", "0.6074774", "0.60736644", "0.6050082", "0.60317695", "0.6003665", "0.59788513", "0.59686154", "0.59621...
0.0
-1
Retourne la liste des menus.
public function getList() { // Le résultat sera un tableau d'instances de Sponsor. $entrainements = array(); $q = $this->_db->query("SELECT id, jour, heure_debut as heureDebut, heure_fin as heureFin, lieu FROM entrainement"); //$q->execute(); while ($donnees = $q->fetch(PDO::FETCH_ASSOC)) { $entrainements[] = new BoEntrainement($donnees); } return $entrainements; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMenus() {}", "public static function menus()\n {\n return [];\n }", "public function getMenus()\n\t{\n\n\t}", "public static function getMenus()\n\t{\n\t\t$sql = \"SELECT * FROM mod_menu\";\n\t\t$query = \\SimplCMS::$app->getDbConnection()->query($sql);\n\t\treturn $query->fet...
[ "0.8360103", "0.83064437", "0.8069802", "0.80546623", "0.7817445", "0.77526", "0.76478016", "0.7571713", "0.7561606", "0.75573903", "0.7555322", "0.7518205", "0.74814713", "0.744742", "0.74449337", "0.7388688", "0.7375611", "0.7371718", "0.7364018", "0.7335816", "0.731261", ...
0.0
-1
Checks whether bearer tokens are on the request.
public static function hasToken(Request $request);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkToken() {\n if (!isset($this->requestToken)) {\n trigger_error(tr('Request token missing. Is the session module missing?'), E_USER_WARNING);\n return false;\n }\n if (!isset($this->data['access_token'])) {\n return false;\n }\n return $this->requestToken->getToken...
[ "0.7331445", "0.729631", "0.72924256", "0.7233418", "0.71102244", "0.70316577", "0.6990979", "0.6927608", "0.6922482", "0.6908954", "0.69031465", "0.6857996", "0.6853291", "0.6720724", "0.66817653", "0.66466415", "0.6636218", "0.6628477", "0.66263556", "0.6618325", "0.6597538...
0.6804085
13
Create a new controller instance.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this-...
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.687...
0.0
-1
Show the application dashboard.
public function index() { $kuota = DB::table('kuota')->sum('kuota'); $jumlah_pendaki = DB::table('pendaki')->count('id'); $jumlah_jadwal = DB::table('jadwal_pendakian')->count('kode_pendakian'); $total_tarif = DB::table('pendaki')->sum('biaya'); $galeri = Galeri::all(); return view('pages.admin.dashboard', [ 'galleries' => $galeri, 'kuota' => $kuota, 'jadwal' => $jumlah_jadwal, 'pendaki' => $jumlah_pendaki, 'tarif' => $total_tarif]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n ...
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", ...
0.0
-1
Login method. This method will display login form
public function login() { if ($this->getCurrentUser()->get('id')) { $this->redirect($this->Auth->redirectUrl()); } if ($user = $this->Auth->identify()) { $this->Auth->setUser($user); // set cookie if (!empty($this->getRequest()->getData('remember_me'))) { if ($CookieAuth = $this->Auth->getAuthenticate('Lil.Cookie')) { $CookieAuth->createCookie($this->getRequest()->getData()); } } } else { if ($this->getRequest()->is('post') || env('PHP_AUTH_USER')) { $this->Flash->error(__d('lil', 'Invalid username or password, try again')); } } if ($this->getCurrentUser()->get('id')) { $redirect = $this->Auth->redirectUrl(); $event = new Event('Lil.Auth.afterLogin', $this->Auth, [$redirect]); $this->getEventManager()->dispatch($event); return $this->redirect($redirect); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}", "public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO ...
[ "0.8513602", "0.8327507", "0.81799394", "0.8164721", "0.8058447", "0.8038301", "0.79856044", "0.7969505", "0.79523504", "0.7942815", "0.7942768", "0.7895529", "0.78806925", "0.7878909", "0.78744876", "0.78679824", "0.77981925", "0.77856207", "0.7761922", "0.77532107", "0.7751...
0.0
-1
/ Enabled aggressive block sorting
public function get_tlv_16b($list) { $n3 = 0; $total_len = 0; $num = 0; if ($list != null) { $num = count($list); $index = 0; do { if ($index >= $num) { break; } $total_len += 2; if ($list[$index] != null) { $total_len += strlen($list[$index]); } ++$index; } while (true); } $body = new Buffer($total_len + 2); $pos = 0; $body->writeInt16BE($num, $pos); $pos += 2; if ($list != null) { for ($i = 0; $i < $n3; ++$i) { if ($list[$i] != null) { $item = $list[$i]; $item_len = strlen($item); $body->writeInt16BE($item_len, $pos); $pos += 2; $body->write($item, $pos, $item_len); $pos += $item_len; continue; } $body->writeInt16BE(0, $pos); $pos += 2; } } $this->fill_head($this->_cmd); $this->fill_body($body, $pos); $this->set_length(); return $this->get_buf(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function externalSort() {\n\t\t$this->chunk();\n\n\t\t// To be confirmed/implemented\n\t\t// After file split put them back together in the right order\n\t\techo \"External sort TBC\\n\";\n\t}", "public final function manualSort(){\r\n\t\t$itemid=$this->itemid;\r\n\t\t$position=$this->sortarray;\r\n\t\...
[ "0.6474421", "0.6299367", "0.61533743", "0.6133151", "0.607296", "0.6024833", "0.60206443", "0.585181", "0.584174", "0.58139634", "0.58109224", "0.5793176", "0.5733092", "0.57278144", "0.5692025", "0.5684713", "0.5663452", "0.5655845", "0.5655845", "0.5649527", "0.5632174", ...
0.0
-1
Listens for a Paynow IPN requests and then sends to the processing function
function edd_listen_for_paynow_ipn() { global $edd_options; // Regular Paynow IPN if ( isset( $_GET['edd-paynow-listener'] ) && $_GET['edd-paynow-listener'] == 'IPN' ) { do_action( 'edd_verify_paynow_ipn' ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ipnAction() {\n $paymentService = $this->get('e2w_payment_service');\n $paymentService->ipnRequest($this->get('request')->request);\n die();\n }", "private function processIPN()\n\t{\n\t\t$log = e107::getLog();\n\t\t$db = e107::getDb();\n\t\t$tp = e107::getParser();\n\n\t\...
[ "0.68548805", "0.67803526", "0.66869235", "0.6686835", "0.66722584", "0.6596693", "0.64150566", "0.62891674", "0.6204293", "0.617671", "0.6143743", "0.6069307", "0.5930139", "0.59246874", "0.59234166", "0.59175444", "0.58607924", "0.5856941", "0.5854594", "0.5852827", "0.5826...
0.71464956
0
Set the Page Style for Paynow Purchase page
function edd_get_paynow_page_style() { global $edd_options; $page_style = 'Paynow'; if ( isset( $edd_options['paynow_page_style'] ) ) $page_style = trim( $edd_options['paynow_page_style'] ); return apply_filters( 'edd_paynow_page_style', $page_style ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_page_properties(&$page){\n $page->add_css($page->skin_dir.'/../allpages/style.css');\n $page->add_css($page->skin_dir.'/style.css');\n }", "function fiorello_mikado_page_custom_style() {\n\t\t$style = apply_filters( 'fiorello_mikado_filter_add_page_custom_style',...
[ "0.5810297", "0.5709264", "0.56602395", "0.548402", "0.5387613", "0.5381922", "0.53450555", "0.53450555", "0.53161293", "0.52960855", "0.52850634", "0.5261284", "0.52545434", "0.52000797", "0.5161405", "0.5146508", "0.5127157", "0.51163375", "0.5094041", "0.50908095", "0.5083...
0.67487097
0
Shows "Purchase Processing" message for Paynow payments are still pending on site return This helps address the Race Condition, as detailed in issue 1839
function edd_paynow_success_page_content( $content ) { if ( ! isset( $_GET['payment-id'] ) && ! edd_get_purchase_session() ) { return $content; } $payment_id = isset( $_GET['payment-id'] ) ? absint( $_GET['payment-id'] ) : false; if ( ! $payment_id ) { $session = edd_get_purchase_session(); $payment_id = edd_get_purchase_id_by_key( $session['purchase_key'] ); } $payment_id = get_post( $payment_id ); if ( $payment_id && 'pending' == $payment->post_status ) { // Payment is still pending so show processing indicator to fix the Race Condition, issue # ob_start(); edd_get_template_part( 'payment', 'processing' ); $content = ob_get_clean(); } return $content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dsf_protx_release_order($order_number){\n\nglobal $ReleaseURL, $Verify, $ProtocolVersion;\n\n\n// validate a protx direct item.\n $protx_query = dsf_db_query(\"select orders_id, vendortxcode, vpstxid, securitykey, txauthno from \" . DS_DB_SHOP . \".protx_direct_responses where orders_id='\" . (int)$order_...
[ "0.6453546", "0.62858564", "0.62605643", "0.6219712", "0.62007767", "0.61841303", "0.61720276", "0.61313844", "0.61264557", "0.61165595", "0.60936517", "0.60851777", "0.60846955", "0.60799176", "0.6063436", "0.60627943", "0.60525197", "0.60410714", "0.6038925", "0.60322726", ...
0.6445808
1
adds the settings to the Payment Gateways section
function pn_edd_add_settings( $settings ) { $paynow_gateway_settings = array( array( 'id' => 'paynow_gateway_settings', 'name' => '<strong>' . __( 'Paynow Gateway Settings', 'pw_edd' ) . '</strong>', 'desc' => __( 'Configure the gateway settings', 'pw_edd' ), 'type' => 'header' ), array( 'id' => 'paynow_live_api_id', 'name' => __( 'Merchant API ID', 'pw_edd' ), 'desc' => __( 'Enter your live API ID, found in your gateway Account Settings', 'pw_edd' ), 'type' => 'text', 'size' => 'regular' ), array( 'id' => 'paynow_live_api_secret_key', 'name' => __( 'Merchant API Key', 'pw_edd' ), 'desc' => __( 'Enter your live API key, found in your gateway Account Settings', 'pw_edd' ), 'type' => 'text', 'size' => 'regular' ) ); return array_merge( $settings, $paynow_gateway_settings ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function admin_update_payment_gateways()\n {\n $admin = true;\n include GEO_BASE_DIR . 'get_common_vars.php';\n //whether allowed to enable this type or not\n $can_enable = true;\n $is_enabled = (isset($_POST['enabled_gateways'][self::gateway_name]) && $_POST['enabled_g...
[ "0.6881864", "0.68433183", "0.6687855", "0.66803366", "0.6608726", "0.6338715", "0.6320049", "0.6305798", "0.62467486", "0.617476", "0.6163742", "0.61316097", "0.60536873", "0.60492176", "0.60489947", "0.6018525", "0.6011749", "0.5989323", "0.5943869", "0.59336823", "0.592298...
0.7122651
0
convert to array data
function ParseMsg($msg) { $parts = explode("&",$msg); $result = array(); foreach($parts as $i => $value) { $bits = explode("=", $value, 2); $result[$bits[0]] = urldecode($bits[1]); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function data2Array($data);", "abstract public function to_array();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "public function toArray();", "...
[ "0.8492263", "0.798357", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0.7782529", "0...
0.0
-1
urlify the data for the POST
function UrlIfy($fields) { $delim = ""; $fields_string = ""; foreach($fields as $key=>$value) { $fields_string .= $delim . $key . '=' . $value; $delim = "&"; } return $fields_string; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toPostdata()\n {\n return Utils::buildHttpQuery($this->parameters);\n }", "function post_to_url($url, $data) {\r\n\t\t$fields = '';\r\n\t\tforeach($data as $key => $value) {\r\n\t\t\t$fields .= $key . '=' . $value . '&';\r\n\t\t}\r\n \r\n\t\trtrim($fields, '&');\r\n\t\t$post = curl_i...
[ "0.66572005", "0.6624722", "0.6612647", "0.65964675", "0.64673257", "0.64647716", "0.6397053", "0.63752365", "0.62631285", "0.62072724", "0.61955535", "0.61759716", "0.6166402", "0.6111352", "0.6038146", "0.60041475", "0.5995692", "0.5923041", "0.59020585", "0.5901325", "0.58...
0.5223262
90
Enqueue scripts and styles.
function isha_scripts() { // Google font wp_enqueue_style( 'isha-google-font', 'https://fonts.googleapis.com/css?family='.get_theme_mod('google_fontfamily_setting','Open+Sans').':300,400,600,700,800', array(), '' ); wp_enqueue_style( 'isha-google-font-description', 'https://fonts.googleapis.com/css?family='.get_theme_mod('description_google_fontfamily_setting','Open+Sans').':300,400,600,700,800', array(), '' ); wp_enqueue_style( 'isha-google-font-body', 'https://fonts.googleapis.com/css?family='.get_theme_mod('body_google_fontfamily_setting','Open+Sans').':300,400,600,700,800', array(), '' ); wp_enqueue_style( 'isha-google-font-w', 'https://fonts.googleapis.com/css?family='.get_theme_mod('google_fontfamily_widget_setting','Open+Sans').':300,400,600,700,800', array(), '' ); wp_enqueue_style( 'isha-google-font-slider', 'https://fonts.googleapis.com/css?family='.get_theme_mod('google_fontfamily_slider_setting','Open+Sans').':300,400,600,700,800', array(), '' ); wp_enqueue_style( 'isha-google-font-plan', 'https://fonts.googleapis.com/css?family='.get_theme_mod('google_fontfamily_plan_setting','Open+Sans').':300,400,600,700,800', array(), '' ); // Bootstrap CSS wp_enqueue_style( 'bootstrap', get_template_directory_uri() .'/assets/css/bootstrap.css', array(), '4.0.0' ); // animate CSS wp_enqueue_style( 'animate', get_template_directory_uri() .'/assets/css/animate.css', array(), '1.0.0' ); // fontawesome CSS wp_enqueue_style( 'font-awesome', get_template_directory_uri() .'/assets/css/font-awesome.css', array(), '4.7.0' ); // jquery fancybox CSS wp_enqueue_style( 'jquery-fancybox', get_template_directory_uri() .'/assets/css/jquery.fancybox.css', array(), '1.0.0' ); // Magnific CSS wp_enqueue_style( 'magnific-popup', get_template_directory_uri() .'/assets/css/magnific-popup.css', array(), '1.0.0' ); // Slicknav CSS wp_enqueue_style( 'slicknav', get_template_directory_uri() .'/assets/css/slicknav.css', array(), '1.0.10' ); // Owl Carausel CSS wp_enqueue_style( 'slick-slider', get_template_directory_uri() .'/assets/css/slick-slider.css', array(), '2.2.1' ); // Style CSS wp_enqueue_style( 'isha-style', get_stylesheet_uri() ); // Responsive CSS wp_enqueue_style( 'isha-responsive', get_template_directory_uri() .'/assets/css/responsive.css', array(), '1.0.0' ); // Popper JS wp_enqueue_script( 'popper', get_template_directory_uri() . '/assets/js/popper.js', array('jquery'), '3.3.1', true ); // Bootstrap JS wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.js', array('jquery'), '4.4.1', true ); // modernizr JS wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/assets/js/modernizr.js', array('jquery'), '2.8.3', true ); // Magnific Popup JS wp_enqueue_script( 'magnific-popup', get_template_directory_uri() . '/assets/js/magnific-popup.js', array('jquery'), '1.1.0', true ); // FacnyBox JS wp_enqueue_script( 'jquery-fancybox', get_template_directory_uri() . '/assets/js/jquery-fancybox.js', array('jquery'), '3.1.20', true ); // easing JS wp_enqueue_script( 'easing', get_template_directory_uri() . '/assets/js/easing.js', array('jquery'), '1.4.1', true ); // Wow JS wp_enqueue_script( 'wow', get_template_directory_uri() . '/assets/js/wow.js', array('jquery'), '3.1.20', true ); // Steller JS wp_enqueue_script( 'steller', get_template_directory_uri() . '/assets/js/steller.js', array('jquery'), '', true ); // Counterup JS wp_enqueue_script( 'jquery-counterup', get_template_directory_uri() . '/assets/js/jquery.counterup.js', array('jquery'), '', true ); // Waypoints JS wp_enqueue_script( 'waypoints', get_template_directory_uri() . '/assets/js/waypoints.js', array('jquery'), '', true ); // Slick Nav JS wp_enqueue_script( 'jquery-slicknav', get_template_directory_uri() . '/assets/js/jquery.slicknav.js', array('jquery'), '1.0.10', true ); // Isotope JS wp_enqueue_script( 'isotope', get_template_directory_uri() . '/assets/js/isotope.pkgd.js', array('jquery'), '2.2.1', true ); // matchHeight JS wp_enqueue_script( 'jquery-match-height', get_template_directory_uri() . '/assets/js/jquery.matchHeight.js', array('jquery'), '1.0.0', true ); // SLick JS wp_enqueue_script( 'slick', get_template_directory_uri() . '/assets/js/slick.js', array('jquery'), '1.1.0', true ); // Jquery Scrollup JS wp_enqueue_script( 'jquery-scrollup', get_template_directory_uri() . '/assets/js/jquery.scrollUp.js', array('jquery'), '1.1.0', true ); // Active JS wp_enqueue_script( 'isha-active', get_template_directory_uri() . '/assets/js/active.js', array('jquery'), '1.1.0', true ); wp_enqueue_script( 'isha-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20151215', true ); wp_enqueue_script( 'isha-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20151215', true ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function enqueue_scripts() {\n\t\t$this->styles();\n\t\t$this->scripts();\n\t}", "public function enqueueScripts(){}", "public function enqueueScripts() {\n\t\t\twp_enqueue_script('jquery');\n//\t\t\twp_enqueue_script('owl', self::asset(\"node_modules/owl.carousel/dist/owl.carousel.min.js\"), ['jquery']...
[ "0.8443552", "0.8378435", "0.8277951", "0.81709605", "0.8113745", "0.81120527", "0.80828714", "0.80621725", "0.80607367", "0.80219525", "0.80047303", "0.7994199", "0.79929894", "0.7957328", "0.7956979", "0.795663", "0.78945416", "0.78906983", "0.788791", "0.7862661", "0.78475...
0.0
-1
Changes PHP's current directory to directory.
function chdir(string $directory): void { error_clear_last(); $safeResult = \chdir($directory); if ($safeResult === false) { throw DirException::createFromPhpError(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function changeCurrentDirectory(Directory $newCurrentDirectory);", "function setDir()\n{\n\t// This script is sometimes called from the other directories - for auto sending, so we need to change the directory\n\t$pos = strrpos(__FILE__, '/');\n\tif ($pos === false)\n\t{\n\t\t$pos = strrpos(__FILE__, '\\\\...
[ "0.7787777", "0.76574355", "0.739829", "0.71292466", "0.70945483", "0.66438484", "0.6568115", "0.6520543", "0.6401773", "0.63892096", "0.63542485", "0.6261568", "0.6222356", "0.6222356", "0.6153974", "0.61478484", "0.6096785", "0.6096785", "0.60966146", "0.60966146", "0.60961...
0.57843906
27
Changes the root directory of the current process to directory, and changes the current working directory to "/". This function is only available to GNU and BSD systems, and only when using the CLI, CGI or Embed SAPI. Also, this function requires root privileges. Calling this function does not change the values of the __DIR__ and __FILE__ magic constants.
function chroot(string $directory): void { error_clear_last(); $safeResult = \chroot($directory); if ($safeResult === false) { throw DirException::createFromPhpError(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setDir()\n{\n\t// This script is sometimes called from the other directories - for auto sending, so we need to change the directory\n\t$pos = strrpos(__FILE__, '/');\n\tif ($pos === false)\n\t{\n\t\t$pos = strrpos(__FILE__, '\\\\');\n\t\tif ($pos === false)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}\n\t$dir = subs...
[ "0.7301399", "0.68716234", "0.67225134", "0.6669766", "0.6222706", "0.60956246", "0.60686344", "0.6012088", "0.59654325", "0.5944025", "0.57576984", "0.5710126", "0.5690152", "0.567978", "0.56661457", "0.5619841", "0.55821806", "0.5568335", "0.5564647", "0.55455136", "0.55353...
0.5788863
10
Gets the current working directory.
function getcwd(): string { error_clear_last(); $safeResult = \getcwd(); if ($safeResult === false) { throw DirException::createFromPhpError(); } return $safeResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function currentWorkingDirectory()\n {\n return getcwd();\n }", "public function getCurrentDirectory()\n {\n return $this->currentDirectory;\n }", "public function getWorkingDirectory(): string\n {\n if ($this->cwd === \"\") {\n return \\getcwd() ?: \"\";\n...
[ "0.8616513", "0.82267314", "0.8158862", "0.7951805", "0.78199375", "0.7815303", "0.7815303", "0.7792002", "0.7733228", "0.76867586", "0.7498542", "0.74585474", "0.72318906", "0.7205629", "0.71763194", "0.7169816", "0.7148169", "0.7054579", "0.70484394", "0.70450443", "0.70084...
0.6852745
23
Opens up a directory handle to be used in subsequent closedir, readdir, and rewinddir calls.
function opendir(string $directory, $context = null) { error_clear_last(); if ($context !== null) { $safeResult = \opendir($directory, $context); } else { $safeResult = \opendir($directory); } if ($safeResult === false) { throw DirException::createFromPhpError(); } return $safeResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function open() {\n $this->setPointer(opendir($this->directory->getPath()));\n return parent::open();\n }", "public function test_opendir_family() {\n $uri = 'test://opendir_test/dir1/dir2/dir3/dir4/dir5';\n\n mkdir($uri, 0777, true);\n // $this->assertTru...
[ "0.6588751", "0.64178926", "0.6296397", "0.6232029", "0.6189276", "0.5973493", "0.5918654", "0.5767356", "0.56934524", "0.5535896", "0.5446926", "0.5340607", "0.52894855", "0.5261072", "0.5229033", "0.5205237", "0.5199592", "0.5177099", "0.5131683", "0.5101084", "0.50993997",...
0.6482354
1
Returns an array of files and directories from the directory.
function scandir(string $directory, int $sorting_order = SCANDIR_SORT_ASCENDING, $context = null): array { error_clear_last(); if ($context !== null) { $safeResult = \scandir($directory, $sorting_order, $context); } else { $safeResult = \scandir($directory, $sorting_order); } if ($safeResult === false) { throw DirException::createFromPhpError(); } return $safeResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFiles(DirectoryInterface $directory): array;", "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n ...
[ "0.7615825", "0.7555462", "0.75545895", "0.7463547", "0.7352632", "0.7347003", "0.73339677", "0.72796464", "0.7266393", "0.7258136", "0.72071916", "0.71967214", "0.7167935", "0.7161267", "0.71465516", "0.71434945", "0.7124376", "0.71227497", "0.7079137", "0.7074244", "0.70633...
0.0
-1
Create a notice object
public function createNotice( $id, $type = 'success' ) { switch( $type ) { case 'success': return new \Toolset_Admin_Notice_Success( $id ); case 'error': return new \Toolset_Admin_Notice_Error( $id ); case 'warning': return new \Toolset_Admin_Notice_Warning( $id ); case 'dismissible': return new \Toolset_Admin_Notice_Dismissible( $id ); case 'undismissible': return new \Toolset_Admin_Notice_Undismissible( $id ); case 'required-action': return new \Toolset_Admin_Notice_Dismissible( $id ); case 'layouts-help': return new \Toolset_Admin_Notice_Layouts_Help( $id ); default: return new \Toolset_Admin_Notice_Error( $id ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function notice()\n {\n }", "public static function notice() {\n\t\t# Get arguments to this function:\n\t\t$args = func_get_args();\n\n\t\t# Add message to log:\n\t\treturn self::add(LOG_NOTICE, $args);\n\t}", "function notice($message, array $context = array());", "public function notice(string...
[ "0.7200584", "0.7151664", "0.698004", "0.66427565", "0.6586725", "0.64667743", "0.6410571", "0.62860024", "0.6180819", "0.61397886", "0.6136113", "0.6121527", "0.6121367", "0.61031055", "0.60881424", "0.6053504", "0.59714687", "0.59030676", "0.59019244", "0.5892885", "0.58677...
0.6414952
6
Internal function to create a button
private function tplCreateButton( $tpl_class, $title, $attributes ) { $btnClasses = esc_attr( $tpl_class ); $title = esc_attr( $title ); if( ! is_array( $attributes ) ) { throw new \InvalidArgumentException( 'OTGS\Toolset\Common\Utility\Admin\Notices\Builder::tplButtonPrimary()' . ' - Second parameter must be an array.' ); } // define html element based on href $html_element = isset( $attributes['href'] ) ? 'a' : 'span'; // attribute class $attributes['class'] = isset( $attributes['class'] ) ? $btnClasses . ' ' . esc_attr( $attributes['class'] ) : $btnClasses; // stringify all attributes $attributes_string = ''; foreach( $attributes as $key => $value ) { $attributes_string .= ' ' . esc_attr( $key ). '="' . esc_attr( $value ) . '"'; } // html link return '<' . $html_element . $attributes_string . '>' . $title . '</' . $html_element . '>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function generateButtons() {}", "private function createButton() {\n $fv = new filterVars;\n $phpSelf = $fv->phpSelf();\n\t$addButton = \"<A HREF='$phpSelf?action=crf'><button title='Create Row'>Create Row</button></A>\"; \n return $addButton; \n }", "public function makeInput...
[ "0.77502847", "0.7603982", "0.75943893", "0.7482998", "0.7421335", "0.7205115", "0.71997225", "0.7162375", "0.71613085", "0.71396303", "0.68855006", "0.6832635", "0.6815434", "0.67320585", "0.67144936", "0.66913337", "0.6683974", "0.6658256", "0.66568494", "0.6635912", "0.661...
0.0
-1
Transform the resource into an array.
public function toArray($request) { return [ "id" => $this->id, "bien_so" => $this->bien_so, "ten" => $this->ten, "loai_phuong_tien_pccc_id" => $this->loai_phuong_tien_pccc_id, "so_dien_thoai" => $this->so_dien_thoai, "don_vi_pccc_id" => $this->don_vi_pccc_id, "so_hieu" => $this->so_hieu, "lat" => $this->lat, "long" => $this->long, "tinh_thanh_id" => $this->tinh_thanh_id, "loai_phuong_tien_pccc" => !empty($this->loaiPhuongTienPccc->ten) ? $this->loaiPhuongTienPccc->ten : null, "don_vi_pccc" => !empty($this->donViPccc->ten) ? $this->donViPccc->ten : null, "imei" => $this->imei, "trang_thai_hoat_dong" => $this->trang_thai_hoat_dong, "quan_huyen_id" => $this->quan_huyen_id ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }", "public function toArray(): array\n {\n if (is_null($this->r...
[ "0.77507776", "0.77507776", "0.77164215", "0.7590423", "0.7310633", "0.7139174", "0.7135279", "0.7095534", "0.7095534", "0.70955116", "0.70955116", "0.70955116", "0.70955116", "0.7094208", "0.7094208", "0.7094208", "0.7094208", "0.7094208", "0.7094208", "0.7094208", "0.709420...
0.0
-1
Cases Custom Post Type
function cases_init() { // set up cases labels $labels = array( 'name' => '施工事例', 'singular_name' => 'Cases', 'parent_item_colon' => '', 'menu_name' => '施工事例', ); // register post type $args = array( 'labels' => $labels, 'public' => true, 'has_archive' => true, 'show_ui' => true, 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => array('slug' => 'cases'), 'query_var' => true, 'menu_icon' => 'dashicons-randomize', 'publicly_queryable' => true, 'supports' => array( 'title', 'thumbnail', ), 'yarpp_support' => true ); register_post_type( 'cases', $args ); register_taxonomy( 'tag', 'cases', array( 'hierarchical' => false, 'rewrite' => true, 'query_var' => true ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function post_type(){}", "abstract protected function post_type();", "public function type() { return $this->post->post_type; }", "public function registerCustomPostTypes() {\n\n\n }", "public function createPostTypes()\n {\n }", "public function customPostType()\n {\n\n if...
[ "0.835906", "0.8015681", "0.7394348", "0.7196047", "0.71933454", "0.7175274", "0.71675897", "0.70775497", "0.70614547", "0.7020137", "0.69771963", "0.6975658", "0.6975012", "0.6937206", "0.69361687", "0.6933116", "0.6925147", "0.6901572", "0.6894171", "0.68630606", "0.6809318...
0.0
-1
Adds a meta box to the post editing screen
function add_cases_meta_box() { add_meta_box( 'cases_meta_box', // $id '事例', // $title 'show_your_fields_meta_box', // $callback 'cases', // $screen 'normal', // $context 'high' // $priority ); remove_meta_box( 'slugdiv', 'cases', 'normal' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addMetaBox(WP_Post $post): void\n {\n $slug = $post->post_type;\n add_meta_box(\n $slug . '_editor',\n __('Informationen', 'wp-plugin-core'),\n array( $this, 'editorByPost' ),\n $slug,\n 'advanced',\n 'high'\n ...
[ "0.81095207", "0.81062996", "0.7940685", "0.7936153", "0.78744596", "0.7807827", "0.780537", "0.7800594", "0.77834374", "0.7777178", "0.77671164", "0.7762208", "0.77614707", "0.7756999", "0.7734161", "0.7729982", "0.77160555", "0.76893204", "0.76776534", "0.7663765", "0.76372...
0.0
-1
Sets up up the RuntimeStepTester. The specified container should have a self::CONFIG_TIMEOUT and a self::CONFIG_RETRY_INTERVAL parameter.
private function loadRuntimeStepTester(ContainerBuilder $container) { RuntimeStepTester::$timeout = $container->getParameter(self::CONFIG_TIMEOUT); RuntimeStepTester::$interval = $container->getParameter(self::CONFIG_RETRY_INTERVAL); RuntimeStepTester::$strictKeywords = $container->getParameter(self::CONFIG_STRICT_KEYWORDS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setUpFromConfig()\n\t{\n\t\t$timeLimit = 4 * 60 * 60;\n\n\t\t$parameters = $this->container->getParameters();\n\t\tif (is_array($parameters) and array_key_exists(\"taskManager\", $parameters)) {\n\t\t\t/// ***** TIMELIMIT ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"timeLimit\"])) {...
[ "0.5324337", "0.5171487", "0.5152415", "0.50935286", "0.50864893", "0.5072108", "0.5022258", "0.49559757", "0.49261847", "0.49105906", "0.49076244", "0.48853153", "0.48548472", "0.48278746", "0.48096687", "0.47865194", "0.47707707", "0.47438115", "0.4732802", "0.47180116", "0...
0.73059136
0