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
METHODS FOR LAYOUT Returns a light service container instance. If no container is set, a dummy container is created on the fly and returned on subsequent calls.
public function getContainer(): LightServiceContainerInterface { if (null === $this->container) { $this->container = new LightDummyServiceContainer(); } return $this->container; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContainer()\n {\n return $this->container = SMRESTBundle::getContainer();\n\n }", "public function get_container(): ServiceContainer {\n\t\treturn $this->service_container;\n\t}", "function container(): Container\n\t{\n\t\tstatic $container;\n\n\t\tif($container === null)\n\t\t{...
[ "0.65188587", "0.6499059", "0.6476403", "0.64306533", "0.6385601", "0.6375408", "0.62777156", "0.6276674", "0.6275658", "0.6275658", "0.6275658", "0.6275658", "0.6275658", "0.62527686", "0.6248985", "0.62382776", "0.61901045", "0.61899245", "0.6170215", "0.616803", "0.6154221...
0.7529291
0
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
public function index() { $uuid = $this->get_uuid(); $peers = $this->get_peers(); $next_msg = 0; if (isset($peers[site_url('lab5/receive_message')])) { $next_msg = $peers[site_url('lab5/receive_message')]["WeHave"] + 1; } $this->load->view("header"); $this->load->view("view_messages", array("m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome...
[ "0.7655508", "0.74145436", "0.7396173", "0.7317418", "0.72283363", "0.72283363", "0.71903646", "0.7166857", "0.7151917", "0.7145717", "0.7108151", "0.70780236", "0.70754886", "0.70406276", "0.70306057", "0.70306057", "0.70306057", "0.70306057", "0.70306057", "0.69742966", "0....
0.0
-1
Display a listing of Invoice.
public function index() { if (! Gate::allows('invoice_access')) { return abort(401); } if (request('show_deleted') == 1) { if (! Gate::allows('invoice_delete')) { return abort(401); } $invoices = Invoice::onlyTrashed()->get();...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function invoice_list()\n {\n if (!get_permission('invoice', 'is_view')) {\n access_denied();\n }\n\n $branchID = $this->application_model->get_branch_id();\n if ($this->input->post('search')) {\n $this->data['class_id'] = $this->input->post('class_id');\...
[ "0.796662", "0.79611987", "0.768277", "0.7675702", "0.75753236", "0.75753236", "0.75753236", "0.7568505", "0.75015444", "0.7501085", "0.74898994", "0.7484018", "0.7468989", "0.74678105", "0.7462065", "0.74219877", "0.7410549", "0.740538", "0.74039686", "0.73628396", "0.734147...
0.75533116
8
Show the form for creating new Invoice.
public function create() { if (! Gate::allows('invoice_create')) { return abort(401); } $users = \App\User::get()->pluck('name', 'id')->prepend(trans('global.app_please_select'), ''); $projects = \App\Project::get()->pluck('name', 'id')->prepend(trans('global.app...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = ...
[ "0.8165494", "0.78975517", "0.7853099", "0.78125614", "0.77934295", "0.7786572", "0.77713716", "0.7745887", "0.76940596", "0.76680434", "0.7588988", "0.7588815", "0.7548474", "0.75450647", "0.7509913", "0.7480226", "0.74457926", "0.7410227", "0.7383299", "0.73440427", "0.7305...
0.75119627
14
Store a newly created Invoice in storage.
public function store(StoreInvoicesRequest $request) { if (! Gate::allows('invoice_create')) { return abort(401); } $request = $this->saveFiles($request); $invoice = Invoice::create($request->all()); foreach ($request->input('files_id', []) as $index => $id) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store()\n {\n $allInputs = Input::all();\n\n $validator = Validator::make($allInputs, $this->invoicesModel->getRules('STORE'));\n\n if ($validator->fails()) {\n return Redirect::to('invoices/create')->with('message_danger', $validator->errors());\n } else {...
[ "0.7485594", "0.7411482", "0.7317804", "0.7246234", "0.70895976", "0.7025952", "0.6965492", "0.69299304", "0.6845012", "0.6835949", "0.6829867", "0.68153447", "0.67941684", "0.67539126", "0.67361355", "0.6731961", "0.67254275", "0.66990185", "0.6635984", "0.66303545", "0.6623...
0.69811624
6
Show the form for editing Invoice.
public function edit($id) { if (! Gate::allows('invoice_edit')) { return abort(401); } $users = \App\User::get()->pluck('name', 'id')->prepend(trans('global.app_please_select'), ''); $projects = \App\Project::get()->pluck('name', 'id')->prepend(trans('global.app_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Invoice $invoice) {\n\n\t\t// $return['invoices'] = \\App\\Invoice::all();\n\t\t// return view('/invoices/editform', $return);\n\t}", "public function edit(Invoice $invoice)\n {\n //\n }", "public function edit(Invoice $invoice)\n {\n //\n }", "public function e...
[ "0.8203381", "0.79665446", "0.79665446", "0.79665446", "0.79665446", "0.79665446", "0.79665446", "0.79665446", "0.79665446", "0.79665446", "0.79665446", "0.7914345", "0.7796685", "0.77634907", "0.77582556", "0.7740793", "0.77022177", "0.7609886", "0.7603594", "0.7560291", "0....
0.73934865
32
Update Invoice in storage.
public function update(UpdateInvoicesRequest $request, $id) { if (! Gate::allows('invoice_edit')) { return abort(401); } $request = $this->saveFiles($request); $invoice = Invoice::findOrFail($id); $invoice->update($request->all()); $media = []; f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($shoppingcartInvoice);", "public function update(Request $request, Invoice $invoice)\n {\n // return \"in update\";\n $previous_status = $invoice->invoicestatus->status;\n\n // updating the invoice\n $data = $request->only([\n 'customer_id', 'invoi...
[ "0.75351256", "0.71876425", "0.7075396", "0.7017034", "0.7010891", "0.7010891", "0.7010891", "0.7010891", "0.7010891", "0.7010891", "0.7010891", "0.7010891", "0.69407964", "0.6807994", "0.67528534", "0.6695256", "0.66895884", "0.6656223", "0.66317105", "0.6580968", "0.6524582...
0.61821693
50
Remove Invoice from storage.
public function destroy($id) { if (! Gate::allows('invoice_delete')) { return abort(401); } $invoice = Invoice::findOrFail($id); $invoice->deletePreservingMedia(); return redirect()->route('admin.invoices.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove(): int {\n $where = 'invoice_id = ?';\n $values = [$this->invoiceId];\n return $this->delete($where, $values);\n }", "public function destroy(Invoice $invoice)\n {\n\n }", "public function destroy(Invoice $invoice)\n {\n //\n }", "public funct...
[ "0.6941501", "0.68552244", "0.6712405", "0.6712405", "0.6712405", "0.6712405", "0.6712405", "0.6712405", "0.66052794", "0.638991", "0.63502985", "0.6314822", "0.62983763", "0.6252911", "0.6195027", "0.6125821", "0.60841346", "0.6077303", "0.60755837", "0.6046645", "0.6028544"...
0.5383735
93
Delete all selected Invoice at once.
public function massDestroy(Request $request) { if (! Gate::allows('invoice_delete')) { return abort(401); } if ($request->input('ids')) { $entries = Invoice::whereIn('id', $request->input('ids'))->get(); foreach ($entries as $entry) { $en...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function delete()\n {\n $this->getDi()->hook->call(Am_Event::INVOICE_BEFORE_DELETE, array('invoice' => $this));\n foreach ($this->getItems() as $item) {\n $item->delete();\n }\n // $this->deleteFromRelatedTable('?_invoice_log'); // not good idea to delete\n $this->d...
[ "0.6956097", "0.6812421", "0.66393185", "0.66393185", "0.66393185", "0.66112906", "0.6561352", "0.65342975", "0.6519772", "0.65147674", "0.64332634", "0.6377815", "0.6328237", "0.6280327", "0.6264", "0.621185", "0.6166149", "0.6161012", "0.6110425", "0.6109709", "0.60936314",...
0.6342645
12
Restore Invoice from storage.
public function restore($id) { if (! Gate::allows('invoice_delete')) { return abort(401); } $invoice = Invoice::onlyTrashed()->findOrFail($id); $invoice->restore(); return redirect()->route('admin.invoices.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restored(TipoInstrumento $tipoInstrumento)\n {\n //\n }", "public function restored(PurchaseReceipt $purchaseReceipt)\n {\n //\n }", "public function restore() {}", "public function restore($id);", "public function restore($id);", "public function restore($id);",...
[ "0.6627594", "0.66144055", "0.65855706", "0.6547149", "0.6547149", "0.6547149", "0.6547149", "0.6536155", "0.6507101", "0.646961", "0.6448661", "0.63973445", "0.6390343", "0.63881695", "0.6383682", "0.6375943", "0.6358784", "0.6343905", "0.6312236", "0.63025296", "0.62820035"...
0.6800103
0
Permanently delete Invoice from storage.
public function perma_del($id) { if (! Gate::allows('invoice_delete')) { return abort(401); } $invoice = Invoice::onlyTrashed()->findOrFail($id); $invoice->forceDelete(); return redirect()->route('admin.invoices.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(Invoice $invoice)\n {\n\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function destroy(Request $request)\n{\n$id = $request->id;\n$invoice = invoice::find($id)\n->get()\n->first();\n$i...
[ "0.6961559", "0.6838691", "0.6821104", "0.67633384", "0.67633384", "0.67633384", "0.67633384", "0.67633384", "0.67633384", "0.66715205", "0.6661312", "0.66326815", "0.6590575", "0.64941657", "0.6477786", "0.6467177", "0.64608335", "0.63892615", "0.63832897", "0.6380409", "0.6...
0.62228024
55
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
public function index() { $this->load->helper('url'); $this->load->model(LoginBar_model); $data['infoNav'] = $this->load->view('common\nav', '', TRUE); $data['infoFooter'] = $this->load->view('common\footer', '', TRUE); $this->load->view('index\welcome_message',$data); if($_SESSION[username]&&$_SE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }", "public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}", "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome...
[ "0.7654609", "0.7413426", "0.7394598", "0.731692", "0.7227223", "0.7227223", "0.71899563", "0.7165393", "0.7151099", "0.7144871", "0.71078676", "0.7078446", "0.7074241", "0.70401293", "0.7029486", "0.7029486", "0.7029486", "0.7029486", "0.7029486", "0.697335", "0.6968791", ...
0.0
-1
Performs a get curl petition
public static function get($uri,$params=[],$options=[]) { return self::request('GET',$uri,$params,$options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function curl_get($url, array $get = NULL, array $headers = NULL, array $options = array()) { \n $defaults = array( \n CURLOPT_URL => $url. (strpos($url, '?') === FALSE ? '?' : ''). http_build_query($get), \n CURLOPT_HEADER => 0, \n CURLOPT_HTTPHEADER => $headers,\n CURLOPT_RETURNTRANSFER => TRUE,...
[ "0.76008797", "0.74832124", "0.74599856", "0.7418802", "0.74155927", "0.7367013", "0.7320511", "0.7273761", "0.7271029", "0.72277445", "0.7226435", "0.7181997", "0.7179415", "0.7177625", "0.7136559", "0.706497", "0.7052922", "0.69374466", "0.6923341", "0.69129217", "0.6817565...
0.0
-1
Performs a post curl petition
public static function post($uri,$params=[],$options=[]) { return self::request('POST',$uri,$params,$options); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function doPost($url, $post = array() , $format = 'plain')\n{\n return curlExecute($url, 'post', $post, $format);\n}", "function curl_post($url, array $post = NULL, array $options = array()) {\n\t\t$this->curlError = 0;\n\t $defaults = array(\n\t CURLOPT_POST => 1,\n\t CURLOPT_HEADER => 0,\n\...
[ "0.7681076", "0.7465218", "0.7413253", "0.7320612", "0.72605574", "0.7228887", "0.72143614", "0.71956396", "0.717653", "0.71734023", "0.7134484", "0.7094239", "0.7035494", "0.6994715", "0.6960789", "0.6940033", "0.6933651", "0.6930861", "0.6869526", "0.68537706", "0.68529", ...
0.0
-1
Performs any kind of petition
public static function request($method='GET',$uri,$params,$options=[]) { $ch = curl_init(); if (!isset($options['no_return'])) { curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); } curl_setopt($ch, CURLOPT_USERAGEN...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function perform();", "public function act()\n\t{\n\t\n\t}", "public function paroleAction() {\n\t\t \t\t\t\t\n\t\t\n\t}", "function execute() {\n\t\tif (empty($this->args)) {\n\t\t\t$this->__interactive();\n\t\t}\n\n\t\tif (count($this->args) == 1) {\n\t\t\t$this->__interactive($this->args[0]);\n\t\t...
[ "0.5709959", "0.5619763", "0.5410543", "0.5404637", "0.53513885", "0.53367925", "0.5327804", "0.52616805", "0.5239991", "0.5211913", "0.51769465", "0.5174757", "0.5174757", "0.5174757", "0.5174757", "0.5174757", "0.5174757", "0.5174757", "0.5174757", "0.5145902", "0.513055", ...
0.0
-1
We want to pass in the query and an associative array of variables Bind the variables and then execute the query.
function ExecutePreparedQuery($sql, $vars) { if(empty($pdo)) { $connectDb = "mysql:host=" . $dbServer . ";dbname=" . $dbName; $pdo = new pdo($connectDb, $dbUser, $dbPass); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); } try { $query = $pdo->prepare($sql); } catch(Exception...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function execute($bind_array);", "public function bindAndExecute()\n\t{\n\n\t\t//$params = func_get_args();\n\n\t\t// The only way to get the parameters by reference is to use the debug_backtrace functions rather than\n\t\t// func_get_args. I'm not a fan of this but it works.\n\n $params = array();...
[ "0.7454217", "0.74251765", "0.73342067", "0.72405833", "0.70820475", "0.68908095", "0.68616784", "0.6833215", "0.6828532", "0.6772883", "0.6754823", "0.6754823", "0.6578754", "0.657093", "0.65627724", "0.6552881", "0.6523098", "0.6512345", "0.65066695", "0.6503162", "0.647001...
0.6533969
16
This accepts a string of space separated keywords
function getVideosFromKeywords($keywords) { // $keywords = explode(" ", $keywords); // $vars = // $sql = "SELECT distinct * FROM keywords k inner join videos v on v.videoId = k.videoId where "; // foreach($keywords as $keyword) // { // if(trim($keyword == "")) continue; // $sql .= "k.keyword li...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processString($keywords)\n{\n $pattern=\"/[\\s]+/\";\n $keywords=trim($keywords);\n if (!isset($keywords)||empty($keywords)) {\n return null;\n }\n $separateWords=preg_split($pattern, $keywords);\n foreach ($separateWords as $word) {\n echo $word.\"<br>\";\n }\n retur...
[ "0.6760217", "0.67298156", "0.66766256", "0.66588056", "0.66191334", "0.6601229", "0.658645", "0.65519875", "0.65166223", "0.649937", "0.6493257", "0.64515346", "0.6446157", "0.64094114", "0.6359649", "0.6325844", "0.6290572", "0.6279972", "0.62715644", "0.6240141", "0.623431...
0.0
-1
$default = 'lat=20&lon=90'; // somewhere reeeeeal hot
function detect_city($ip) { $lat = '11.825138'; //NYC: 40.8291 $lon = '42.590275'; $city = "Djibouti"; // Get location by IP $ip_json = file_get_contents("http://freegeoip.net/json/".$ip); $json_loc = json_decode($ip_json,true); if ($json_loc["latitude"]) return array($json_loc["latitud...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function either_param_string($name, $default = false)\n{\n $ret = __param(array_merge($_POST, $_GET), $name, $default);\n if ($ret === null) {\n return null;\n }\n\n if ($ret === $default) {\n if ($default === null) {\n return null;\n }\n\n return $ret;\n }\n\n...
[ "0.6160282", "0.5904833", "0.58765966", "0.58227557", "0.58046216", "0.569465", "0.5656685", "0.5643509", "0.56384593", "0.5630813", "0.5624525", "0.5581986", "0.55533946", "0.5542384", "0.55391586", "0.55310005", "0.5525151", "0.5525151", "0.55212426", "0.548466", "0.547569"...
0.0
-1
Sets the left node
public function setLeft(?RedBlackNode $left): void { $this->left = $left; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLeftChild(Node $leftChild)\n\t{\n\t\t$this->leftChild = $leftChild;\n\t}", "public function setLeftValue(BaseObject $node, $value)\n {\n $setter = self::forgeMethodName($node, 'set', 'left');\n return $node->$setter($value);\n }", "public function setLeft(HtmlElementInterface $left):...
[ "0.792083", "0.7857863", "0.70237917", "0.69374055", "0.6880169", "0.6596433", "0.65614295", "0.65537405", "0.65056884", "0.6505552", "0.6456021", "0.6450883", "0.64185774", "0.63871735", "0.63871735", "0.6241689", "0.60999227", "0.60672814", "0.6012823", "0.59597677", "0.594...
0.8174841
0
Retrieves the left node
public function left(): ?RedBlackNode { return $this->left; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLeft()\n {\n return $this->left;\n }", "public function getLeft()\n {\n return $this->left;\n }", "public function getLeftChild()\n\t{\n\t\treturn $this->leftChild;\n\t}", "public function getLeft()\n {\n if (array_key_exists(\"left\", $this->_propDict))...
[ "0.7965437", "0.7965437", "0.79207855", "0.77835387", "0.7692195", "0.76792395", "0.7455784", "0.73983145", "0.7365431", "0.73609746", "0.7347709", "0.72065175", "0.70461696", "0.7009871", "0.66163945", "0.66162634", "0.65295106", "0.6509684", "0.64628386", "0.6397572", "0.63...
0.80178005
0
Sets the right node
public function setRight(?RedBlackNode $right): void { $this->right = $right; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRightValue(BaseObject $node, $value)\n {\n $setter = self::forgeMethodName($node, 'set', 'right');\n return $node->$setter($value);\n }", "public static function setNode($node) {\r\n static::$node = $node;\r\n }", "public function setRight(?Node $right): self\n {\n ...
[ "0.70350003", "0.7027494", "0.6451218", "0.64220434", "0.63821733", "0.63602585", "0.61983514", "0.6108923", "0.6101263", "0.6090256", "0.60638726", "0.59860563", "0.5977954", "0.59293187", "0.5851045", "0.5843139", "0.5833144", "0.58175355", "0.57885563", "0.57716036", "0.57...
0.66398114
2
Retrieves the right node
public function right(): ?RedBlackNode { return $this->right; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function node()\n\t{\n\t\t$registry = Jquarry_Registry::instance();\n\t\t\n\t\treturn $registry->get_node($this->node_id());\n\t}", "public function getNode() {\r\n return $this->node;\r\n }", "public function getNode()\n {\n return $this->node;\n }", "public function getNode()\...
[ "0.7395713", "0.73788536", "0.73659545", "0.73659545", "0.73659545", "0.73659545", "0.73571557", "0.73240983", "0.68735266", "0.6861104", "0.67237824", "0.67096555", "0.6708513", "0.66379344", "0.65537745", "0.65403557", "0.6508747", "0.6506376", "0.64713424", "0.6359141", "0...
0.5812705
51
Sets the color flag
public function setColor(bool $color): void { $this->color = $color; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_color($color = false) {\n $this->color = (Validator::isa($color,\"boolean\") ? $color : false);\n }", "public function setColor($color) {}", "public function setColor($color, $stroking = true) {}", "function setColor( $c ) {\n $this->currentColor = $c;\n}", "function setColor($new...
[ "0.7831696", "0.7374792", "0.7199038", "0.7164826", "0.69722396", "0.6893564", "0.6778496", "0.67485625", "0.6737788", "0.6679934", "0.6592129", "0.6581988", "0.65562165", "0.65387225", "0.65308005", "0.6485427", "0.64390355", "0.64102715", "0.64073914", "0.64073914", "0.6362...
0.7362887
2
Retrieves the color flag
public function color(): bool { return $this->color; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getColor() { return $this->readColor(); }", "function getColor() {return $this->readColor();}", "public function get_color() {\n $query = $this->db->get('color');\n if ($query->num_rows() > 0) {\n return $query->result();\n } else {\n return false;...
[ "0.76484174", "0.76009244", "0.7589043", "0.7517475", "0.7272102", "0.7257419", "0.72454476", "0.72454476", "0.72454476", "0.72454476", "0.72174454", "0.7209188", "0.7192727", "0.7188588", "0.7188588", "0.7186112", "0.71858144", "0.7184031", "0.7174766", "0.7174766", "0.71747...
0.72314334
10
FORMULARIO SELECCIONAR MARCA A ELIMINAR
function formularioSeleccionarProveedor() { require_once "conexionsql.php"; require_once "formularios.php"; $conProveedor= "SELECT ID_PROVEEDOR,PROVEEDOR,CONTACTOS from proveedor WHERE STATUS_ACTIVO = '1' ORDER BY PROVEEDOR ASC"; //Campo Proveedor $proveedor= new campoSeleccion("selProveedor","formularioCampoSeleccio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_data_form(){\n\n $IdTrabajo= $_REQUEST['IdTrabajo']; //Variable para el id del trabajo\n $NombreTrabajo = $_REQUEST['NombreTrabajo']; //Variable para el nombre del trabajo\n $FechaIniTrabajo = $_REQUEST['FechaIniTrabajo']; //Variable para la fecha de inicio del trabajo\n $F...
[ "0.6847175", "0.66522115", "0.6583002", "0.6463123", "0.6446245", "0.6420134", "0.63700336", "0.6258296", "0.62351525", "0.6234134", "0.62241256", "0.6216848", "0.6201579", "0.61737704", "0.6170912", "0.60968566", "0.60808665", "0.60598326", "0.6035766", "0.60275936", "0.6013...
0.0
-1
Sets a new type
public function setType($type) { $this->type = $type; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setType($type) {\n\t\t$this->_type = $type;\n\t}", "function setType($type) {\n\t\t$this->_type = $type;\n\t}", "function setType($type) {\n $this->type = $type;\n }", "public function setType(string $type);", "public function setType($type) {}", "public function setType($type) {\n ...
[ "0.8299894", "0.8299894", "0.82862043", "0.827134", "0.8235015", "0.82216233", "0.82216233", "0.82216233", "0.81502503", "0.81502503", "0.81502503", "0.81502503", "0.81502503", "0.81502503", "0.81502503", "0.81502503", "0.8126534", "0.8123906", "0.810934", "0.80958074", "0.80...
0.0
-1
Sets a new id
public function setId($id) { $this->id = $id; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetId($value) { $this->id=$value; }", "public function setId($id)\n {\n $this->id = $id ? $id : uniqid();\n }", "function set_id($id) {\n\t\t$this->id = $id;\n\t}", "public function set_id($id) {\n $this->_newid = preg_replace(\"/[^a-zA-Z0-9]/\", '', $id);\n }", "function se...
[ "0.8646041", "0.80755603", "0.80646825", "0.800062", "0.79879695", "0.79614013", "0.7939621", "0.7934826", "0.78811395", "0.7843647", "0.7828297", "0.7822569", "0.7819105", "0.78075874", "0.7803787", "0.7772256", "0.77570367", "0.7736806", "0.7736631", "0.77295804", "0.772958...
0.0
-1
Sets a new email
public function setEmail($email) { $this->email = $email; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setEmail($newEmail){\n $this->email = $newEmail;\n }", "public function setEmail($value)\n {\n $this->_email = $value;\n }", "public function setEmail($newEmail){\n\t}", "public function setEmail($value) {\r\n $this->email = $value;\r\n }", "private function setEma...
[ "0.8266221", "0.7957997", "0.794356", "0.7842873", "0.78110254", "0.7717619", "0.7599877", "0.7599098", "0.75686604", "0.75314724", "0.7529364", "0.7523072", "0.7522753", "0.75043976", "0.7497794", "0.7468965", "0.74656284", "0.74478996", "0.7439865", "0.7372353", "0.7362247"...
0.0
-1
Sets a new driversLicense
public function setDriversLicense(\net\authorize\api\contract\v1\DriversLicenseType $driversLicense) { $this->driversLicense = $driversLicense; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDriversLicense($driversLicense)\n {\n $this->driversLicense = $driversLicense;\n return $this;\n }", "public function setLicense(SetAlbumLicenseRequest $request): void\n\t{\n\t\t$request->album()->license = $request->license();\n\t\t$request->album()->save();\n\t}", "publ...
[ "0.67197067", "0.64952075", "0.62663245", "0.6163147", "0.6150745", "0.609645", "0.609401", "0.6064311", "0.60474163", "0.60228443", "0.59956026", "0.59506667", "0.5914437", "0.5708021", "0.56223834", "0.55707276", "0.55000967", "0.5455305", "0.54331964", "0.5422291", "0.5422...
0.57874405
13
Sets a new taxId
public function setTaxId($taxId) { $this->taxId = $taxId; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setIdTax($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->id_tax !== $v) {\n $this->id_tax = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_ID_TAX] = true;\n }\n\n return $this;\n }", "public functio...
[ "0.7770286", "0.7225705", "0.7085616", "0.68768656", "0.6690859", "0.6395619", "0.6302", "0.6136931", "0.61057764", "0.6047288", "0.6025114", "0.6017851", "0.5953893", "0.59431165", "0.5864303", "0.583005", "0.5826851", "0.5820904", "0.5801631", "0.57827836", "0.5754902", "...
0.6751356
4
Run the database seeds.
public function run() { factory(Habitacion_Reserva::class,50)->create(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
Initialize method for model.
public function initialize() { $this->hasMany("id", "PostTags", "tags_id", NULL); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this ->model = $this ->makeModel($this ->model());\n }", "protected function _construct()\n {\n $this->_init(Model::class, ResourceModel::class);\n }", "public function initialize()\n {\n }", "public function initialize()\n {...
[ "0.77167964", "0.7618666", "0.75896466", "0.75896466", "0.75786567", "0.7461966", "0.7461966", "0.7461966", "0.7457713", "0.7457713", "0.74557793", "0.74555385", "0.7455282", "0.7455282", "0.7455282", "0.7455282", "0.7455282", "0.7455282", "0.7455282", "0.7455282", "0.7455282...
0.0
-1
Check if any user logged in else redirect to login
function delete_file() { $is_logged_in = $this->common_lib->is_logged_in(); if ($is_logged_in == FALSE) { $this->session->set_userdata('sess_post_login_redirect_url', current_url()); if($this->data['is_admin'] === TRUE){ redirect($this->router->directory.'admin/login'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _checkAndRedirect() {\n $auth = $this->_checkAuthentication();\n if(true === $auth) { // authentication required, redirects to login page\n $user = $this->getCurrentUser();\n if(null === $user) { // user doesn't appear do be logged in\n $this->flashMessenger()->a...
[ "0.7852915", "0.7727086", "0.7653099", "0.76388097", "0.7507154", "0.7487913", "0.74865544", "0.74865544", "0.74592704", "0.7452506", "0.744068", "0.7413906", "0.7401579", "0.73994124", "0.7383788", "0.73705965", "0.7352293", "0.7327579", "0.7318903", "0.7310263", "0.7292683"...
0.0
-1
/============================================= = MOSTRAR CLIENTE = =============================================
public static function ctrMostrarCliente($item, $valor){ $tabla = 'clientes'; $respuesta = ModeloCliente::mdlMostrarCliente($tabla, $item, $valor); return $respuesta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cl_moblevantamento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_moblevantamentoedi() { \n //classes dos rotulos dos campos\n $this->r...
[ "0.6217275", "0.61968905", "0.6115072", "0.60784817", "0.59940827", "0.593389", "0.5918744", "0.5912099", "0.5892285", "0.58295023", "0.58101463", "0.58031", "0.5712848", "0.571248", "0.5683574", "0.56813073", "0.5648917", "0.56279707", "0.5612496", "0.5608787", "0.5572135", ...
0.0
-1
/============================================= = REGISTRAR CLIENTE = =============================================
public static function ctrRegistrarCliente(){ if (isset($_POST['nuevoCliente'])) { $tabla = 'clientes'; $datos = array("cliente" => $_POST['nuevoCliente'], "id_area" => $_POST['nuevoAreaCliente'], "documentoID" => $_POST['nuevoDocumentoID'], "email" => $_POST['nuevoEmail'], "telefono" => $_POST['...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function register() {}", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public function register();", "public...
[ "0.6616778", "0.63212216", "0.63212216", "0.63212216", "0.63212216", "0.63212216", "0.63212216", "0.63212216", "0.63212216", "0.62596464", "0.6250786", "0.62283546", "0.6182939", "0.6182939", "0.6149566", "0.609572", "0.6074695", "0.60518175", "0.6046062", "0.6037637", "0.603...
0.0
-1
/============================================= = EDITAR CLIENTE = =============================================
public static function ctrEditarCliente(){ if (isset($_POST['editarCliente'])) { $tabla = 'clientes'; $datos = array("cliente" => $_POST['editarCliente'], "documentoID" => $_POST['editarDocumentoID'], "id_area" => $_POST['editarAreaCliente'], "email" => $_POST['editarEmail'], "tel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function editar()\n {\n }", "public function edit_toko(){\n\t}", "public function edit()\n\t{\n\t\t//\n\t}", "public function edit()\n\t{\n\t\t\n\t}", "public function editar()\n {\n }", "public function edit() {\n\t\t\t\n\t\t}", "public function edit( )\r\n {\r\n //\r\n...
[ "0.7165281", "0.7001769", "0.69912094", "0.68854815", "0.683604", "0.6829452", "0.6575726", "0.6539776", "0.6526707", "0.64838797", "0.64825904", "0.64290375", "0.64290375", "0.64290375", "0.6408154", "0.63911664", "0.63911664", "0.63911664", "0.63863814", "0.63863814", "0.63...
0.0
-1
/============================================= = ELIMINAR CLIENTE = =============================================
public static function ctrEliminarCliente(){ if (isset($_GET['idCliente'])) { $tabla = 'clientes'; $datos = $_GET['idCliente']; $respuesta = ModeloCliente::mdlEliminarCliente($tabla, $datos); if ($respuesta == 'ok') { ?> <script> swal({ type: "success", title: "¡El usuario se e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function elso()\n {\n }", "function cl_ensino() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ensino\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "function cl_empage() {\n //classes dos rotulos dos campos\n ...
[ "0.6851483", "0.6294796", "0.62506855", "0.6250365", "0.6247067", "0.61939925", "0.6190072", "0.6172581", "0.6160354", "0.612657", "0.61138225", "0.6085648", "0.6077602", "0.6051522", "0.6048051", "0.6044229", "0.6007345", "0.60061765", "0.5968796", "0.5966726", "0.5963557", ...
0.0
-1
/============================================= = MOSTRAR TOTAL CLIENTES = =============================================
public static function ctrMostrarTotalCliente(){ $tabla = 'clientes'; $respuesta = ModeloCliente::mdlMostrarTotalCliente($tabla); return $respuesta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function totaliza_pedido()\r\n {\r\n\r\n $valor_desconto = 0;\r\n $valor_pedido = 0;\r\n $valor_ipi = 0;\r\n $valor_total = 0;\r\n $desconto = $this->mgt_pedido_cliente_desconto->Text;\r\n $frete = $this->mgt_pedido_valor_frete->Text;\r\n\r\n if($desconto < 0)\r\n {...
[ "0.7237129", "0.6844079", "0.68162495", "0.6810038", "0.6810038", "0.6733043", "0.669547", "0.66930187", "0.6660051", "0.6660051", "0.6660051", "0.665203", "0.66315037", "0.6586916", "0.6582672", "0.65818095", "0.6549749", "0.65386623", "0.6528182", "0.6524126", "0.65187305",...
0.6254805
42
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(Request $request) { //return view('selector'); $id= Auth::user()->id; //$proyectos = DB::table('proyectos')->get(); $proyectos = DB::table('proyectos')->where('id_project_manager',$id)->get(); $user = Auth::user(); if(empty($GLOBALS['use...
{ "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
get the id of a board
public function getId() { return $this->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBoardId()\n {\n return $this->getCurrentBoard()->getId();\n }", "public function getBoardId()\n {\n return Mage::getStoreConfig('trello_api/order_status/board_id');\n }", "public function getBoardById($id);", "public function get_id();", "public function get_id(...
[ "0.83424115", "0.7072076", "0.6920309", "0.6317146", "0.6317146", "0.62977004", "0.620267", "0.61983883", "0.6194182", "0.6144536", "0.6144536", "0.6144536", "0.6144536", "0.61020434", "0.61020434", "0.61020434", "0.60957134", "0.60957134", "0.60764104", "0.6040431", "0.60205...
0.0
-1
Create a new authentication controller instance.
public function __construct() { $this->middleware('guest', ['except' => 'logout']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "public function newInst...
[ "0.6556913", "0.6495226", "0.64742136", "0.641273", "0.63362926", "0.62945676", "0.62719876", "0.61133873", "0.61019564", "0.60772926", "0.60576314", "0.6052179", "0.59850615", "0.59636015", "0.5937227", "0.588781", "0.5867256", "0.5822639", "0.57976234", "0.5786977", "0.5783...
0.0
-1
Pluck model entries according to provided language
public function pluck($language) { $name = 'name_'.$language; return CategoryAttribute::where('deleted_at', null) ->where('active', true)->whereIn('parent', [null, 0]) ->orderBy($name)->pluck($name, 'id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAllTranslationByLanguage();", "function get_localization($language_name)\n {\n return $this->db->get_where('localization',array('language_name'=>$language_name))->row_array();\n }", "public function languageWhere() {}", "public function languageWhere() {}", "public function ...
[ "0.650034", "0.63342494", "0.6277153", "0.6277153", "0.62669677", "0.6242231", "0.6234265", "0.6140414", "0.6085647", "0.6070588", "0.59871185", "0.58992743", "0.58528894", "0.58383846", "0.57883316", "0.5729336", "0.5720103", "0.56927866", "0.56904817", "0.56863374", "0.5686...
0.6091608
8
Retrieve all category attributes according to selected category
public function lists($category_id) { return @Category::where('deleted_at', null)->where('id', $category_id) ->first()->attributes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function all_attr_cat()\n\t{\n\t\t$rest_id=$this->session->userdata('user_rest_uns');\n\t\t//$all_cat=$this->db->query(\"SELECT *from `food_attribute` where `rest_id`='\".$rest_id.\"' AND `f_att_deleted`='0'\");\n\t\t$all_cat=$this->db->get_where('food_attribute' ,array(\"rest_id\"=>$rest_id ,\"f_att_delete...
[ "0.71346986", "0.699043", "0.6918693", "0.67526865", "0.6470678", "0.64666885", "0.64005846", "0.6396792", "0.63554776", "0.63530624", "0.6315008", "0.6315008", "0.6312252", "0.6310146", "0.63075423", "0.63075423", "0.62949276", "0.6289476", "0.62828106", "0.6280502", "0.6231...
0.67745936
3
This is the default 'index' action that is invoked when an action is not explicitly requested by users.
public function actionIndex() { $this->layout = 'main2'; $this->render('index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction() {\n\t\t$this->_notImplemented();\n\t}", "public function indexAction()\n\t{\n\t\t// do nothing\n }", "public function indexAction() {\n\t\t// TODO Auto-generated AdminController::indexAction() default action\n\t}", "public function indexAction()\n {\n // disable ren...
[ "0.8293943", "0.8168631", "0.8140713", "0.8090627", "0.80711716", "0.7987024", "0.79757357", "0.7974839", "0.79171884", "0.79171884", "0.7823485", "0.7822019", "0.7822019", "0.7822019", "0.7822019", "0.7822019", "0.7822019", "0.7822019", "0.7822019", "0.7822019", "0.782184", ...
0.0
-1
Uses faker to ensure that the values are never duplicated.
public static function createModule($numberOfOpen, $numberOfPending, $numberOfClosed) { $faker = Faker::create(); $module = new Module; $module->name = $faker->word() . "_TestModule"; $module->description = $faker->sentence($nbWords = 10, $variableNbWords = true); /...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGenerateMultipleNoDuplicateValues()\n {\n $registeredValues = [\n '1' => 1,\n '2' => 1,\n '3' => 1,\n ];\n $this->generator->registerValues($registeredValues);\n\n // Mock random number generator to return the first item twice, the...
[ "0.66459894", "0.6575948", "0.6337043", "0.625063", "0.62372965", "0.61977273", "0.6152319", "0.61330813", "0.6113082", "0.61096144", "0.61084604", "0.6108264", "0.61077005", "0.6034539", "0.60073674", "0.597235", "0.5948181", "0.5938741", "0.58922356", "0.5883463", "0.588277...
0.0
-1
Uses faker to ensure that the values are never duplicated.
private static function createCoursework($module) { $faker = Faker::create(); $coursework = new Coursework; $coursework->name = $faker->word() . "_TestCoursework"; $coursework->description = $faker->sentence($nbWords = 10, $variableNbWords = true); $coursework->maximum_score...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGenerateMultipleNoDuplicateValues()\n {\n $registeredValues = [\n '1' => 1,\n '2' => 1,\n '3' => 1,\n ];\n $this->generator->registerValues($registeredValues);\n\n // Mock random number generator to return the first item twice, the...
[ "0.66459894", "0.6575948", "0.6337043", "0.625063", "0.62372965", "0.61977273", "0.6152319", "0.61330813", "0.6113082", "0.61096144", "0.61084604", "0.6108264", "0.61077005", "0.6034539", "0.60073674", "0.597235", "0.5948181", "0.5938741", "0.58922356", "0.5883463", "0.588277...
0.0
-1
Get a listing Tags
public function index() { return response()->json(Tag::all(), 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTagList();", "public function getTags() {}", "public function getTags();", "public function getTags();", "public function getTags();", "public function getTags();", "public function getTags();", "public function listTags() {\n\t\t$request = $this->send(\"GET\", \"contacts/\" . $thi...
[ "0.8111728", "0.78161776", "0.77825797", "0.77825797", "0.77825797", "0.77825797", "0.77825797", "0.7730644", "0.7348696", "0.72673786", "0.7259643", "0.7199399", "0.719243", "0.71911633", "0.71701515", "0.71625155", "0.7132214", "0.71227115", "0.7119674", "0.70875484", "0.70...
0.0
-1
Display the specified Tag.
public function show(Tag $tag) { return response()->json($tag,200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Tag $tag)\n {\n //\n }", "public function show(Tag $tag)\n {\n //\n }", "public function show(Tag $tag)\n {\n //\n }", "public function show(tag $tag)\n {\n //\n }", "public function show(Tag $tag)\n {\n //return view('tags....
[ "0.836837", "0.836837", "0.836837", "0.8268635", "0.7426455", "0.7127946", "0.7076981", "0.7024163", "0.69794387", "0.69734037", "0.69734037", "0.6955047", "0.69215494", "0.68586385", "0.6736504", "0.6725912", "0.6686878", "0.6604286", "0.6534901", "0.64502835", "0.64086044",...
0.59596103
36
Store the new Tag
public function store(NewTagRequest $request) { Tag::create( $request->validated() ); return response([], 201); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function inserirTag(Tag $tag){\n $this->tag[] = $tag;\n }", "public function insert(Tag $tag);", "private function record_tag($tag)\n {\n if (isset($this->tags[$tag . 'count'])) { //check for the existence of this tag type\n $this->tags[$tag . 'count']++;\n $thi...
[ "0.6536719", "0.64691377", "0.6445549", "0.6424051", "0.6371954", "0.6352247", "0.6274821", "0.6248676", "0.6238151", "0.62273955", "0.6174724", "0.6147355", "0.6135944", "0.61241007", "0.60675424", "0.60675424", "0.60631615", "0.60629237", "0.6021956", "0.6019236", "0.601328...
0.6219691
10
Update the specified Tag
public function update(UpdateTagRequest $request, Tag $tag) { $tag->update( $request->validated() ); return response([],202); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update($tag)\n {\n getAuthentication()->requireAuthentication();\n $tag = $this->tag->sanitize($tag);\n $params = $this->tag->validateParams($_POST);\n $res = getDb()->postTag($tag, $params);\n if($res)\n {\n $tag = $this->api->invoke(\"/{$this->apiVersion}/tag/{$tag}/view.j...
[ "0.77511305", "0.7620855", "0.75723565", "0.75723565", "0.72530544", "0.7237114", "0.72336084", "0.7178492", "0.710663", "0.704974", "0.7008873", "0.69974655", "0.6940263", "0.6893135", "0.6880666", "0.6879727", "0.68344206", "0.6831263", "0.68119735", "0.6795744", "0.6790051...
0.6791428
20
Destroy the specified Tag
public function destroy(Tag $tag) { $tag->delete(); return response([], 202); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(Tag $tag)\n {\n //\n }", "public function destroy(Tag $tag)\n {\n //\n }", "public function destroy(\\App\\Models\\Tag $tag)\n {\n $tag->delete();\n }", "public function destroy(Tag $tag)\n {\n $tag->delete();\n return 'deleted';...
[ "0.8887295", "0.8887295", "0.8239383", "0.8110931", "0.80266446", "0.78624487", "0.76597756", "0.7598332", "0.7454579", "0.7441756", "0.7423579", "0.7414295", "0.7380227", "0.7353909", "0.73307544", "0.728734", "0.72639877", "0.72223806", "0.7213452", "0.7164124", "0.71296465...
0.747332
8
Returns the identifying property for Object
public abstract function getIdentity();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function propertyIdent()\n {\n return $this->propertyIdent;\n }", "public function propertyObject($propertyIdent);", "public function getObjectIdent();", "public function property($propertyIdent);", "public function getObjectIdent() {}", "public function getObjectIdent() {}", "publi...
[ "0.7466179", "0.723767", "0.6974977", "0.68926895", "0.68443424", "0.68443424", "0.6741142", "0.6723045", "0.6665752", "0.6637079", "0.6585086", "0.65558064", "0.64900017", "0.64492005", "0.64208126", "0.64095545", "0.63910663", "0.6362514", "0.6350998", "0.6293061", "0.62575...
0.0
-1
If the item is similar returns true. else returns false.
public function isEqual(Comparable $item) { return ($this->getIdentity() === $item->getIdentity()) ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function containsPure($item)\n {\n foreach ($this as $storedItem) {\n if ($storedItem === $item) {\n return true;\n }\n }\n\n return false;\n }", "function contains($item) {\n\t\t\t\n\t\t\tforeach($this->items as $_item) {\n\n\t\t\t\tif($_it...
[ "0.65168035", "0.6260854", "0.62260365", "0.61486435", "0.6136013", "0.607731", "0.6042177", "0.59677464", "0.59313595", "0.58191276", "0.5769222", "0.5769222", "0.5769222", "0.5734527", "0.56987834", "0.56321466", "0.5600375", "0.5549086", "0.5509815", "0.5499873", "0.549386...
0.6541216
0
Connect to the database. Returns a PDO object
function getDb() { // Local deployment $server = "localhost"; $username = "adcog_user"; $password = "secret"; $db = "adcog"; return new PDO("mysql:host=$server;dbname=$db;charset=utf8", "$username", "$password",array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function connect() {\n if ($this->db === null) {\n $this->db = new PDO($this->db_dsn, $this->db_user, $this->db_pass);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n\n if ($this->db_schema !== null && $this->db_schema !== '') {\n $this->db->exec('SET sear...
[ "0.8196476", "0.8072041", "0.8071153", "0.8012272", "0.80060107", "0.7993153", "0.79527164", "0.7938998", "0.79385185", "0.79378045", "0.79166263", "0.78928226", "0.7882845", "0.78824955", "0.7838562", "0.7831677", "0.7818302", "0.7793112", "0.77889204", "0.77851593", "0.7746...
0.0
-1
Check if a user is connected
function isUserConnected() { return isset($_SESSION['login']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isConnected() {\n return isset($_SESSION['userid']);\n }", "public function isConnected()\n {\n return !is_null($this->user);\n }", "public function isConnected()\n\t{\n\t\treturn $this->isUser() || $this->isOrga();\n\t}", "public function isConnected()\n\t{\n\t\t// TO...
[ "0.8402092", "0.80747235", "0.79580766", "0.78470385", "0.77818215", "0.76947135", "0.7659931", "0.761254", "0.75477266", "0.74747294", "0.74747294", "0.74747294", "0.74747294", "0.74747294", "0.74747294", "0.744486", "0.7444482", "0.7443368", "0.7443368", "0.7426949", "0.736...
0.775285
5
Check if a user is an administrator
function isUserAdmin() { if (isUserConnected()) { return ($_SESSION['role']=='administrateur'); } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isAdminUser() {}", "public function getIsAdministrator() {}", "function isUserAdmin() {\r\n $user = $_SESSION['user'];\r\n return checkAdminStatus($user);\r\n }", "public function isUserAdmin()\n\t{\n\t\treturn (Bn::getValue('user_type') == 'A');\n\t}", "protected func...
[ "0.8493227", "0.8391456", "0.82754", "0.82256925", "0.81921107", "0.8190856", "0.81723654", "0.8122886", "0.81215125", "0.81191343", "0.8094995", "0.8094995", "0.8088078", "0.8073127", "0.8070395", "0.8063564", "0.8050442", "0.8032958", "0.80081433", "0.80059457", "0.8001801"...
0.0
-1
Check if the offer was posted by the user
function isMyOffer($offerId){ if (isUserConnected()){ $result = getDb()->query("SELECT * FROM `personne` WHERE `login` = '".$_SESSION['login']."'"); $personne = $result->fetch(); $stmt = getDb()->prepare('SELECT * FROM `creer` WHERE `offre_id`= ? AND `personne_id`= ?'); $stmt->execut...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isPost();", "public function isPost(): bool {}", "function isSubmittedBy();", "public function isExistingReview(): bool\n {\n $review = ShopFeedbackEntity::findOne([\n 'created_by' => (!isset(Yii::$app->request->post()['created_by']))\n ? Yii::$app->user->i...
[ "0.69252205", "0.6847259", "0.6585115", "0.63233095", "0.6272368", "0.62649816", "0.6245945", "0.62396115", "0.6238399", "0.622684", "0.6203929", "0.61931455", "0.61927444", "0.6188922", "0.6180112", "0.61654085", "0.6153492", "0.61381835", "0.61364996", "0.6124123", "0.61088...
0.0
-1
Redirect to a URL
function redirect($url) { header("Location: $url"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function redirect(string $url, $status_code = 302);", "public function redirect();", "public function redirect();", "public function redirect();", "abstract protected function redirect();", "public function redirect() {\n\n\t\t// @todo. How to handle https?\n\t\t$domain = 'http://'.$_SERVER['HTTP_...
[ "0.81184", "0.7918707", "0.7918707", "0.7918707", "0.788759", "0.78153354", "0.7764407", "0.7746665", "0.77359587", "0.7730575", "0.7704786", "0.767105", "0.76628387", "0.76025075", "0.76025075", "0.76025075", "0.7590724", "0.7578532", "0.7571633", "0.75679284", "0.7555785", ...
0.7086926
90
Escape a value to prevent XSS attacks
function escape($value) { return htmlspecialchars($value, ENT_QUOTES, 'UTF-8', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function escape($value) {}", "public function escape($value);", "public function escape($value);", "public abstract function escapeString($value);", "function escape($value){//XSS attacks protection\n return htmlspecialchars($value , ENT_QUOTES,'UTF-8');\n }", "abstract public fun...
[ "0.8696886", "0.86790204", "0.86790204", "0.8261712", "0.8242735", "0.819282", "0.77832645", "0.7754844", "0.77430576", "0.7733802", "0.77167696", "0.770428", "0.76680803", "0.76357794", "0.7593449", "0.7491857", "0.74639463", "0.74598813", "0.7420454", "0.73621255", "0.73405...
0.79961747
6
Transform a timestamp into a date
function timestampToDate($t) { return date("d-m-Y",$t); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function variant_date_from_timestamp($timestamp) {}", "protected function get_timestamp_as_date($timestamp)\n {\n }", "function toDate ($timestamp)\n\t{\n\t\treturn date('Y-m-d', $timestamp);\n\t}", "function ts2dt($timestamp) {\n $pieces = explode(\"_\",$timestamp);\n $date = new DateTime();...
[ "0.74381036", "0.7322488", "0.72433805", "0.69473547", "0.6741611", "0.66450506", "0.66304356", "0.65097284", "0.650551", "0.6433931", "0.64317894", "0.6424325", "0.64019936", "0.63656056", "0.63537073", "0.63526845", "0.63486326", "0.6313071", "0.6284629", "0.6263229", "0.62...
0.68328345
4
Limit the number of characters
function truncate($text) { $max_char=500; // Text length is over the limit if (strlen($text)>$max_char){ // Define maximum char number $text = substr($text, 0, $max_char); // Get position of the last space $position_space = strrpos($text, " "); $text = substr($text, 0...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLengthLimit()\n {\n }", "function maxlength($text, $max, $shorten=true)\n{\nif(strlen($text) >= $max) {\nif($shorten) {\n$text = substr($text, 0, ($max-3)).\"...\";\n} else {\n$text = substr($text, 0, ($max));\n} }\nreturn $text;\n}", "function checkCharacterLimit( $x )\n\t{\n\t\tif( !...
[ "0.75226694", "0.72688514", "0.7054722", "0.7050949", "0.696622", "0.69590634", "0.69365585", "0.68856686", "0.6882658", "0.68823355", "0.68553746", "0.6852002", "0.6807688", "0.67952406", "0.6773566", "0.6744496", "0.6731139", "0.6722464", "0.67012435", "0.6669037", "0.66630...
0.67163205
18
Check if an offer is available
function isOfferAvailable($id) { $stmt = getDb()->prepare('SELECT `est_indispo_id` FROM `est_indispo` WHERE `offre_id`= ?'); $stmt->execute(array($id)); return($stmt->rowCount() == 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public function isAvailable() {}", "public func...
[ "0.746508", "0.746508", "0.746508", "0.7463234", "0.7463234", "0.7463234", "0.7463234", "0.7463234", "0.7463234", "0.7463234", "0.7463234", "0.7463234", "0.7463234", "0.7463234", "0.7463234", "0.7463234", "0.7463234", "0.72600925", "0.71868265", "0.7112208", "0.7112208", "0...
0.66977745
32
define the custom attributes
function init() { $this->defineAttribute('model', false, '', COMPONENT_TYPE_STRING); parent::init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAttributes();", "abstract protected function attributes();", "public function defineAttributes()\n\t{\n\t\treturn array();\n\t}", "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'nombre',\n 'es...
[ "0.7813552", "0.7428896", "0.7421378", "0.73928684", "0.7378997", "0.7280965", "0.7268208", "0.71569586", "0.70727974", "0.69744074", "0.6958143", "0.6958143", "0.6957677", "0.6957118", "0.6957118", "0.6957118", "0.6957118", "0.69567895", "0.69233084", "0.6909214", "0.6893759...
0.0
-1
This is where we pull out the different data sets for each chart
public function showIndex() { // Chart1 shows blabla $dataSet1 = Data::where('img_matched_online', 1)->get(); $dataSet1Count = $dataSet1->count(); $dataSet1NightCount = round(Data::where('img_matched_online', 1)->where('img_night', 1)->count() / $dataSet1Count * 100, 2); $dataSet1WeatherCount = round(Data::...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDataSets()\n {\n if ($this->getResource('wdrs:describedby')){\n $dataset = $this->getResource('wdrs:describedby')->all('void:inDataset');\n }else {\n $schemaUrls = $this->allResources('schema:url');\n $describedBy = array_filter($schemaUrls, function($s...
[ "0.6583141", "0.6382315", "0.6213798", "0.62028915", "0.61237514", "0.6050489", "0.60298604", "0.60298604", "0.594915", "0.59349006", "0.59054804", "0.59054804", "0.5855861", "0.58305234", "0.5792324", "0.5760454", "0.57527673", "0.5749921", "0.5749517", "0.5707264", "0.57039...
0.5730689
19
Display a listing of the resource.
public function index() { $categories = Category::with('post')->latest()->get(); // return $categories->post->count(); return response()->json($categories, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // return view('admin.post.category.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) { // dd($request->all()); $this->validate($request, [ 'name' => 'required', ]); $category = Category::create([ 'name' => $request->name, 'slug' => Str::slug($request->name), ]); if($re...
{ "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(Category $category) { // }
{ "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(Category $category) { if($category){ return response()->json($category, 200); }else { return response()->json('failed', 404); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Category $category) { $this->validate($request, [ 'name' => "required|unique:categories,name, $category->id" ]); $category->update([ 'name' => $request->name, 'slug' => Str::slug($request->name), ]); ...
{ "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(Category $category) { if($category){ $category->delete(); return response()->json('success', 200); }else { return response()->json('failed', 404); } }
{ "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
Parses an argument for this parameter to its value
public function parseArgument( ExtraParameter $parameter, array $config, array $parameterList, array $extraArguments ) { return $extraArguments; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function parseArgument( $token )\n\t{\n\t\t$description = null;\n\n\t\tif ( Str::contains( $token, ' : ' ) )\n\t\t{\n\t\t\tlist( $token, $description ) = explode( ' : ', $token, 2 );\n\n\t\t\t$token = trim( $token );\n\n\t\t\t$description = trim( $description );\n\t\t}\n\n\t\tswitch ( true )\n\t\t...
[ "0.6301748", "0.61587906", "0.614559", "0.6117186", "0.60960627", "0.6022314", "0.594936", "0.57881486", "0.5750537", "0.5749226", "0.5720557", "0.5698134", "0.56938004", "0.56660783", "0.55746335", "0.55615824", "0.55050695", "0.5498219", "0.54943395", "0.5478356", "0.544849...
0.0
-1
Validates an argument for this parameter
public function validateArgument(ExtraParameter $parameter, array $config) { // The extra arguments are untyped and optional, so they can never be invalid }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validateArguments() {}", "public function cli_validateArgs() {}", "public function validateParameters(&$parameters);", "public function validate()\n\t{\n\t\tif(strlen($this->value) <= $this->argument)\n\t\t\treturn true;\n\n\t\t$this->addError('Please enter no more than ' . $this->argument . ...
[ "0.80795807", "0.7305308", "0.7007295", "0.69318384", "0.6798065", "0.67289656", "0.66621035", "0.656703", "0.65183586", "0.6517524", "0.64429903", "0.64429903", "0.64022076", "0.6365602", "0.63142824", "0.63104916", "0.63006973", "0.6253156", "0.62403464", "0.6235457", "0.62...
0.69191647
4
For old style coders
function tnp_register_block($dir) { return TNP_Composer::register_block($dir); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _i() {\n }", "public function helper()\n\t{\n\t\n\t}", "private function j() {\n }", "function fix() ;", "public static function getCode()\n\t{\n\t\tthrow new NotImplementedException;\n\t}", "final private function __construct() {}", "final private function __construct() {}", "abst...
[ "0.60211337", "0.57148826", "0.5556933", "0.55100113", "0.550473", "0.54043543", "0.54043543", "0.5394324", "0.5340534", "0.53277814", "0.5319343", "0.5319343", "0.5319343", "0.5295705", "0.5277329", "0.5277011", "0.52709806", "0.52470094", "0.5234191", "0.5231016", "0.522272...
0.0
-1
Generates and HTML button for email using the values found on $options and prefixed by $prefix, with the standard syntax of NewsletterFields::button().
function tnpc_button($options, $prefix = 'button') { return TNP_Composer::button($options, $prefix); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function button(array $options = []) : string;", "protected function _toHtml()\n {\n \tif (!$this->getTemplate() || $this->getTemplate() == 'newsletter/subscribe.phtml') {\n\t\t\t$this->setTemplate('martinnguyen/newsletterpopup/button.phtml');\n }\n\t\t\n return parent::_toHtml(...
[ "0.6947378", "0.6258293", "0.617673", "0.60319847", "0.6016347", "0.59989834", "0.5926521", "0.59219736", "0.58793485", "0.58420503", "0.5832637", "0.58174175", "0.5801321", "0.5790575", "0.57841015", "0.5774189", "0.57741743", "0.5773416", "0.57730615", "0.5760268", "0.57087...
0.7651278
0
Remove , and unnecessary envelopes for editing with composer
static function unwrap_email($html_email) { if (self::_has_markers($html_email)) { $html_email = self::unwrap_html_element($html_email); } else { //KEEP FOR OLD EMAIL COMPATIBILITY // Extracts only the body part $x = strpos($html_email, '<body'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prop_clean() {\n\n remove_action('template_redirect', 'rest_output_link_header', 11);\n remove_filter('oembed_dataparse', 'wp_filter_oembed_result', 10);\n\n add_filter( 'use_default_gallery_style', '__return_false' );\n\n // Emoji related\n remove_action( 'admin_print_styles', 'print_emoji...
[ "0.5374431", "0.5211265", "0.5177234", "0.5147618", "0.5061221", "0.5061033", "0.5046138", "0.50120616", "0.49839824", "0.49648798", "0.49617448", "0.49410087", "0.4927653", "0.4914775", "0.4904754", "0.48957354", "0.48872977", "0.48815513", "0.48759353", "0.48601872", "0.485...
0.0
-1
Using the data collected inside $controls (and submitted by a form containing the composer fields), updates the email. The message body is completed with doctype, head, style and the main wrapper.
static function update_email($email, $controls) { if (isset($controls->data['subject'])) { $email->subject = $controls->data['subject']; } // They should be only composer options foreach ($controls->data as $name => $value) { if (strpos($name, 'options_') === 0) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function form()\n\t{\n\t\tglobal $L;\n\t\t$sentEmails = $this->getSentEmailsArray();\n\n\t\t$html = '<div class=\"alert alert-primary\" role=\"alert\">';\n\t\t$html .= $this->description();\n\t\t$html .= '</div>';\n\n\t\t$html .= '<div>';\n\t\t// API key\n\t\t$html .= '<label><strong>Buttondown API Key</st...
[ "0.6052312", "0.60283047", "0.5928493", "0.58293337", "0.58062065", "0.5803905", "0.5777098", "0.5752027", "0.57078296", "0.57052904", "0.5568365", "0.5546885", "0.5503471", "0.5498037", "0.5494546", "0.549446", "0.5491722", "0.54830974", "0.5482551", "0.54522985", "0.5430497...
0.7134969
0
Prepares a controls object injecting the relevant fields from an email which cannot be directly used by controls.
static function prepare_controls($controls, $email) { foreach ($email->options as $name => $value) { if (strpos($name, 'composer_') === 0) { $controls->data['options_' . $name] = $value; } } $controls->data['message'] = TNP_Composer::unwrap_email($email->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function prepare_controls()\n {\n }", "static function update_email($email, $controls) {\n if (isset($controls->data['subject'])) {\n $email->subject = $controls->data['subject'];\n }\n\n // They should be only composer options\n foreach ($controls->dat...
[ "0.6435319", "0.5890746", "0.57895124", "0.575633", "0.5721004", "0.56931305", "0.5650958", "0.56425107", "0.56009173", "0.5596319", "0.5580474", "0.5560698", "0.55598474", "0.55520916", "0.55364007", "0.55305016", "0.55261236", "0.55088216", "0.5484315", "0.5448508", "0.5443...
0.7891424
0
Extract inline edited post field from inline_edit_list[]
static function get_edited_inline_post_field($inline_edit_list, $field_type, $post_id) { foreach ($inline_edit_list as $edit) { if ($edit['type'] == $field_type && $edit['post_id'] == $post_id) { return $edit['content']; } } return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function is_post_field_edited_inline($inline_edit_list, $field_type, $post_id) {\n foreach ($inline_edit_list as $edit) {\n if ($edit['type'] == $field_type && $edit['post_id'] == $post_id) {\n return true;\n }\n }\n\n return false;\n }", "funct...
[ "0.70608294", "0.5977684", "0.59186184", "0.5879091", "0.57823694", "0.5780671", "0.56916124", "0.5690589", "0.5638213", "0.55081767", "0.54104", "0.53583044", "0.53208625", "0.530993", "0.52849996", "0.5247236", "0.5229231", "0.52051777", "0.5203668", "0.51988834", "0.517683...
0.8068537
0
Check if inline_edit_list[] have inline edit field for specific post
static function is_post_field_edited_inline($inline_edit_list, $field_type, $post_id) { foreach ($inline_edit_list as $edit) { if ($edit['type'] == $field_type && $edit['post_id'] == $post_id) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function get_edited_inline_post_field($inline_edit_list, $field_type, $post_id) {\n\n foreach ($inline_edit_list as $edit) {\n if ($edit['type'] == $field_type && $edit['post_id'] == $post_id) {\n return $edit['content'];\n }\n }\n\n return '';\n ...
[ "0.685388", "0.6232993", "0.6057414", "0.5977679", "0.59762985", "0.5965489", "0.59087825", "0.5879176", "0.58344877", "0.58215564", "0.5776176", "0.5743525", "0.5676874", "0.56654924", "0.56471366", "0.56471366", "0.56378657", "0.5586207", "0.5572153", "0.5572007", "0.553320...
0.8528106
0
Check whether the data is serializable or not
public function isSerializable($data = null) { if (is_object($data) || is_array($data)) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function isSerialized($data) {\n return (@unserialize($data) !== false);\n }", "function is_serialized($data, $strict = \\true)\n {\n }", "function is_serialized_string($data)\n {\n }", "public function isSerialized()\n {\n if (!isset($this->str[0])) {\n return fa...
[ "0.7251814", "0.6986257", "0.6944731", "0.6689575", "0.6643805", "0.6622851", "0.6622601", "0.6601618", "0.6488359", "0.64727515", "0.6439636", "0.64279", "0.6388403", "0.6353341", "0.6348609", "0.6313539", "0.62057614", "0.6202001", "0.616561", "0.6144393", "0.6041641", "0...
0.7611586
0
Auto generated seed file
public function run() { \DB::table('users')->delete(); \DB::table('users')->insert(array ( 0 => array ( 'id' => 1, 'name' => 'superuser', 'department_id' => 1, 'email' => 'admin@esl.com', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function main() {\n\n $fs = new Filesystem();\n\n $fs->touch($this->getTargetFile());\n\n $seedProperties = Yaml::parse(file_get_contents($this->getSeedFile()));\n $generatedProperties = [];\n\n $generatedProperties['label'] = $seedProperties['project_label'];\n $generatedProperties['machi...
[ "0.741271", "0.72163844", "0.71867263", "0.7150963", "0.7011614", "0.6992453", "0.6889081", "0.6877449", "0.68096465", "0.679051", "0.67819595", "0.6763185", "0.6725394", "0.67226577", "0.67199546", "0.67100257", "0.6709864", "0.67040205", "0.6703833", "0.66986066", "0.668487...
0.0
-1
Retrieves a list of models based on the current search/filter conditions. Typical usecase: Initialize the model fields with values from filter form. Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields. Pass data provider to CGridView, CListView or any simil...
public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $criteria=new CDbCriteria; $criteria->compare('id',$this->id,true); $criteria->compare('calendardata',$this->calendardata,true); $criteria->compare('uri',$this->uri,true); $criteria->com...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object...
[ "0.7213065", "0.7136468", "0.70935595", "0.709325", "0.69852537", "0.6960952", "0.69483596", "0.6941926", "0.69339824", "0.6924484", "0.6910969", "0.6903515", "0.689855", "0.6898346", "0.68928593", "0.68829066", "0.688", "0.6874386", "0.6849385", "0.68492174", "0.6835468", ...
0.0
-1
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLA...
[ "0.7574381", "0.7529001", "0.72717786", "0.7270387", "0.7262305", "0.7214525", "0.7213965", "0.71321", "0.7129096", "0.7129096", "0.710298", "0.710298", "0.71026886", "0.7074855", "0.70645005", "0.70645005", "0.70645005", "0.70645005", "0.70645005", "0.70645005", "0.70645005"...
0.0
-1
Create a new command instance.
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }", "pu...
[ "0.8010746", "0.7333379", "0.72606754", "0.7164165", "0.716004", "0.7137585", "0.6748632", "0.67234164", "0.67178184", "0.6697025", "0.6677973", "0.66454077", "0.65622073", "0.65437883", "0.64838654", "0.64696646", "0.64292693", "0.6382209", "0.6378306", "0.63773245", "0.6315...
0.0
-1
Execute the console command.
public function handle(Spreadsheet $spreadsheet) { $urls = $this->getURLs(); if ($urls->count() === 0) return; $filePath = storage_path(sprintf("app/not_found_links__%s.xlsx", now()->format('Y-m-d--H-i-s'))); $spreadsheet->setActiveSheetIndex(0) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() meth...
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.614841...
0.0
-1
creates a new controller based on the default route
public function connect(Application $app) { $controller = $app['controllers_factory']; // la ruta "/aptos/list" $controller->get('/list', function() use($app) { // obtiene el nombre de apartamento de la sesión $user = $app['session']->get('user'); $apartamen...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function defaultRoute() {\n $this->controllerClass = new IndexController();\n $this->controllerClass...
[ "0.7532251", "0.7308779", "0.72074556", "0.718768", "0.70499915", "0.6821785", "0.6719813", "0.6698703", "0.66509897", "0.6611736", "0.6593473", "0.6575393", "0.6574831", "0.65747076", "0.65632564", "0.6556623", "0.65434456", "0.6516485", "0.6485568", "0.6443361", "0.64056623...
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { //instantiate a new object from class Category $category = new Category; //set the property values of the newly instantiated object accordingly $category->name = $request->name ; //save the newly instantiated oject, doing so will sto...
{ "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(Category $category) { //no need to use find($id), as resource already does it for us and is put in $category $products = $category->products; //to get the items related to the category, we use the products property of the category, this only works if there is an estab...
{ "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(Category $category) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, Category $category) { // }
{ "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(Category $category) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Display a listing of the resource.
public function index() { return PostShort::collection( BlogPost::orderByRaw('(CASE WHEN publication = 0 THEN id END) DESC') ->orderBy('publication_date', 'desc') ->paginate(20) ); }
{ "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) { $validator = Validator::make($request->all(), [ 'title' => 'sometimes|required|min:3|max:150', 'content' => 'sometimes|required|min:3' ]); if($validator->fails()) { return [ "status" => "error", ...
{ "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
Update the specified resource in storage.
public function update(Request $request, $id) { $BlogPost = BlogPost::find($id); $validator = Validator::make($request->all(), [ 'title' => 'sometimes|required|min:3|max:150', 'content' => 'sometimes|required|min:3', 'publication' => 'sometimes|required|numeric', ...
{ "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) { BlogPost::find($id)->remove(); return [ "status" => "ok" ]; }
{ "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
Define the model's default state.
public function definition() { return [ 'kingdom_id' => null, 'game_unit_id' => null, 'amount' => 1000, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDefaultState()\r\n\t{\r\n\t}", "static function get_default_state();", "public function getDefaultUserState();", "private function setDefaultStates(): void\n {\n foreach ($this->arr_attributes as $strParamName) {\n $this->states[$strParamName] = $this->params->get($strParamNa...
[ "0.77757794", "0.72255844", "0.6857964", "0.67950636", "0.67661", "0.6433752", "0.64074224", "0.63712305", "0.61876214", "0.61864567", "0.6159088", "0.61543477", "0.6153316", "0.61428887", "0.6116904", "0.61084956", "0.6106097", "0.60391295", "0.60389197", "0.6019848", "0.598...
0.0
-1