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
Redirects as the request response. If the URL does not include a protocol, it will be converted into a complete URL. $request>redirect($url); [!!] No further processing can be done after this method is called! [update] $url = URL::site($url, TRUE, ! empty(Kohana::$index_file));
public function redirect($url = '', $code = 302) { $referrer = $this->uri(); if (strpos($referrer, '://') === FALSE) { $referrer = URL::site($referrer, TRUE, ! empty(Kohana::$index_file)); } if (strpos($url, '://') === FALSE) { // Make the URI into a URL $url = URL::site($url, TRUE, ! empty(Kohana::$index_file)); } if (($response = $this->response()) === NULL) { $response = $this->create_response(); } echo $response->status($code) ->headers('Location', $url) ->headers('Referer', $referrer) ->send_headers() ->body(); // Stop execution exit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function redirect() {\n\n\t\t// @todo. How to handle https?\n\t\t$domain = 'http://'.$_SERVER['HTTP_HOST'];\n\t\t$data = $this->EE->shortee->get_url($domain,$this->EE->input->get('url',true));\n\n\t\tif(!$data) {\n\t\t\t$loc = $this->EE->config->item('site_url');\n\t\t} else {\n\t\t\t$loc = $data['url'];\n\...
[ "0.74402606", "0.7185414", "0.7152131", "0.7152131", "0.7152131", "0.7072317", "0.7044566", "0.6950612", "0.69283485", "0.6918125", "0.6911351", "0.67593473", "0.6732821", "0.66978455", "0.66676384", "0.6643857", "0.66306186", "0.6622568", "0.6597113", "0.6577779", "0.6572729...
0.68295795
11
presmerovani na pozadovanou stranku
public static function redirect_initial($url = '', $code = 302) { self::initial()->redirect($url, $code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function AggiornaPrezzi(){\n\t}", "public function podrskaPotvrdjeno(){\n $this->prikaz('podrskaPotvrdjeno' , []);\n }", "public function valorpasaje();", "public function uputstvo()\n {\n $this->prikaz(\"uputstvo\", []);\n }", "function _JsemNaRade($posta_id, $prac = 0) {\r\n if ...
[ "0.7067543", "0.63922167", "0.63855314", "0.63663954", "0.62606496", "0.62198734", "0.6179883", "0.6058799", "0.60428405", "0.6042743", "0.5998228", "0.59869146", "0.595545", "0.5951641", "0.59348875", "0.59333086", "0.5915387", "0.5893048", "0.5859638", "0.5855344", "0.58483...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, User $user) { $user->first_name = request('first_name'); $user->last_name = request('last_name'); $user->job_title = request('job_title'); $user->auth_level = request('auth_level'); $user->last_user = request('user_email'); $user->address = request('address'); $user->city = request('city'); $user->state = request('state'); $user->zip = request('zip'); $user->save(); return redirect('home'); }
{ "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.7424578", "0.7062392", "0.7056844", "0.6897447", "0.65815884", "0.6451359", "0.634689", "0.62107086", "0.6145251", "0.6121901", "0.6115076", "0.61009926", "0.60885817", "0.6053816", "0.6018965", "0.6007763", "0.5973282", "0.59455335", "0.593951", "0.59388787", "0.5892445",...
0.0
-1
Remove the specified resource from storage.
public function destroy(User $user) { // $user->delete(); return redirect('/users'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
This is the action to handle external exceptions.
public function actionError() { if($error=Yii::app()->errorHandler->error) { if(Yii::app()->request->isAjaxRequest) echo $error['message']; else $this->render('error', $error); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function executeActionWithErrorHandling() {\n \n }", "function exception_handler($ex) {\n // now let the plugin send the exception to client\n $this->send_error($ex);\n // not much else we can do now, add some logging later\n exit(1);\n }", "protected functio...
[ "0.7287599", "0.6912219", "0.68299127", "0.6764336", "0.67318916", "0.65816224", "0.652491", "0.64027196", "0.63419074", "0.6254394", "0.6252444", "0.62215143", "0.6202076", "0.6200523", "0.61928016", "0.61920303", "0.6190992", "0.61815006", "0.61570185", "0.6144311", "0.6123...
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 similar widget.
public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $criteria=new CDbCriteria; if(!empty($this->start_balance) || !empty($this->end_balance)){ $start_val=floatval($this->start_balance); $end_val = floatval($this->end_balance); $criteria->addBetweenCondition('ali_balance',$start_val,$end_val); }else { $criteria->compare('user_id',$this->user_id,true); $criteria->compare('user_name',$this->user_name,true); //$criteria->compare('user_passwd',$this->user_passwd,true); $criteria->compare('user_phone',$this->user_phone,true); $criteria->compare('ali_email',$this->ali_email,true); $criteria->compare('ali_type',$this->ali_type); $criteria->compare('ali_balance',$this->ali_balance,true); $criteria->compare('ali_freeze',$this->ali_freeze,true); $criteria->compare('user_sex',$this->user_sex); //$criteria->compare('user_ico',$this->user_ico,true); $criteria->compare('user_birth',$this->user_birth,true); $criteria->compare('user_country',$this->user_country,true); $criteria->compare('user_address',$this->user_address,true); //$criteria->compare('user_lastlogin',$this->user_lastlogin,true); //$criteria->compare('user_lastip',$this->user_lastip,true); $criteria->compare('user_addtime',$this->user_addtime,true); } return new CActiveDataProvider($this, array( 'criteria'=>$criteria, 'pagination'=>array( 'pageSize'=>7, ), )); }
{ "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.72131824", "0.7136133", "0.7093762", "0.7092962", "0.69853705", "0.69606364", "0.69477797", "0.6942041", "0.69339", "0.6923732", "0.69106185", "0.69030225", "0.6898345", "0.689756", "0.6892536", "0.6882575", "0.6879712", "0.6873826", "0.6849293", "0.6848419", "0.68348354",...
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.7572934", "0.75279754", "0.72702134", "0.72696835", "0.72606635", "0.72133243", "0.72126555", "0.71307015", "0.71276915", "0.71276915", "0.71013916", "0.71013916", "0.7101271", "0.707343", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.7063163", "0.706...
0.0
-1
Get the File's create date
public function getCreateDate() { return $this->createDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFileCreationTime($filename) {\r\n if (function_exists(\"filemtime\")) {\r\n $FT = filemtime($filename);\r\n } else {\r\n $FT = false;\r\n }\r\n return $FT;\r\n }", "function getCreationTime() ;", "public function getModifiedDate()\n {\n ...
[ "0.72932124", "0.72480094", "0.720321", "0.71408266", "0.7059552", "0.70586413", "0.70328885", "0.70069546", "0.6985486", "0.6976184", "0.69675", "0.6966067", "0.69477665", "0.69477665", "0.6936046", "0.69286114", "0.6927667", "0.68929595", "0.68872654", "0.68763566", "0.6851...
0.6927195
17
Sets this File's create date
public function setCreateDate($createDate) { $this->createDate = $createDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDate()\n\t{\n\t\tif ($this->getIsNewRecord())\n\t\t\t$this->create_time = time();\n\t}", "public function setCreationDate($date) {}", "public function setCreateDates(){\n $t = date_create(date('Y-m-d H:i:s'));\n $this->created = $t;\n $this->modified = $t;\n }", "public function ...
[ "0.7488274", "0.717621", "0.7100362", "0.7076811", "0.70765835", "0.70547324", "0.7024293", "0.69406366", "0.69406366", "0.6851883", "0.6695069", "0.64633423", "0.64532626", "0.6452525", "0.6436888", "0.6428422", "0.6418315", "0.63860583", "0.6351244", "0.63465595", "0.633302...
0.6532661
11
Get the File's updated date
public function getUpdatedDate() { return $this->updatedDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModifiedDate()\n {\n $this->modified_date = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $this->modified_date =\n $this-...
[ "0.79737306", "0.7540886", "0.7470075", "0.7413219", "0.7413219", "0.74103886", "0.74055135", "0.737792", "0.7353785", "0.73500276", "0.7248622", "0.72121924", "0.71836025", "0.7162533", "0.71474606", "0.71230936", "0.7099108", "0.70861804", "0.7065775", "0.706119", "0.706119...
0.74424446
3
Sets this File's updated date
public function setUpdatedDate($updatedDate) { $this->updatedDate = $updatedDate; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUpdated($date)\n {\n $this->updated = $date;\n }", "public function setUpdated($date) \n\t{\n\t\t$this->updated = $this->parseDate($date);\n\t}", "public function updateTopicModifiedDate()\n {\n $this->setAttribute( 'modified', time() );\n $this->store();\n }...
[ "0.74046516", "0.72501945", "0.6960901", "0.6888795", "0.6730107", "0.6699216", "0.6681694", "0.6663711", "0.6663711", "0.6657403", "0.6646336", "0.66407657", "0.66312075", "0.65520436", "0.654402", "0.65135026", "0.6505039", "0.6450629", "0.6433379", "0.64283615", "0.642747"...
0.68910587
3
Get the File's title
public function getTitle() { return $this->title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getTitle() {\n\t\t$result = $this->getFile()->getProperty('title');\n\t\tif (empty($result)) {\n\t\t\t$result = $this->getFile()->getName();\n\t\t}\n\t\treturn htmlspecialchars($result);\n\t}", "protected function getTitle() {\n\t\t$result = $this->overlayFile->getProperty('title');\n\t\tif (e...
[ "0.84242594", "0.7946734", "0.75137234", "0.74333835", "0.737744", "0.731556", "0.7256094", "0.7244767", "0.7210806", "0.7189557", "0.71842426", "0.71043015", "0.70991385", "0.70330787", "0.7028023", "0.7017188", "0.70151955", "0.70100355", "0.70055497", "0.69913846", "0.6960...
0.0
-1
Sets this File's title
public function setTitle($title) { $this->title = $title; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTitle($title) {\r\n $this->_title = $title;\r\n }", "function setTitle($title) {\r\n $this->_title = $title;\r\n }", "public function setTitle($title) {\n $this->_title = $title;\n }", "public function setTitle($title) {\r\n $this->_title = $title;\r\n }", "functio...
[ "0.7674066", "0.7674066", "0.76688296", "0.7656986", "0.764267", "0.7617649", "0.7606191", "0.7595769", "0.7585626", "0.75767344", "0.7568053", "0.75666803", "0.75615", "0.75615", "0.75508237", "0.7541058", "0.7538982", "0.7538589", "0.75334555", "0.75137985", "0.7505814", ...
0.7559063
16
Get the File's description
public function getDescription() { return $this->description; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_file_description($file)\n {\n }", "public function get_description() {\n\t\t\t$path = $this->git_directory_path();\n\t\t\treturn file_get_contents($path.\"/description\");\n\t\t}", "public function getDescriptionAction()\n {\n $content = null;\n try {\n $content =...
[ "0.8713992", "0.7651977", "0.75235856", "0.736979", "0.706772", "0.68714", "0.68405735", "0.6834574", "0.68128705", "0.6788961", "0.6770136", "0.675297", "0.6742858", "0.6736958", "0.673504", "0.6730535", "0.67258155", "0.6723226", "0.671352", "0.671352", "0.671352", "0.671...
0.65969515
98
Sets this File's description
public function setDescription($description) { $this->description = $description; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_description($new) {\n\t\t\t$path = $this->git_directory_path();\n\t\t\tfile_put_contents($path.\"/description\", $new);\n\t\t}", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "function setDescription( $value )\r\n {\r\n $this->Descr...
[ "0.74998707", "0.7360755", "0.7360755", "0.7274152", "0.72487634", "0.71985716", "0.71978563", "0.7124631", "0.7115616", "0.71056825", "0.7102226", "0.7064539", "0.7059225", "0.70320034", "0.7001273", "0.6997573", "0.69902146", "0.6964792", "0.6956323", "0.6915812", "0.689553...
0.7022174
14
Get the File's original resource
public function getOriginalFileResource() { return $this->originalFileResource; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOriginalResource()\n {\n return isset($this->original_resource) ? $this->original_resource : null;\n }", "public function getOriginalResource() {\n\t\treturn $this->originalResource;\n\t}", "public function getOriginalResource()\n {\n return $this->resource;\n }", ...
[ "0.7779481", "0.77074766", "0.7693794", "0.7437302", "0.7437302", "0.7009194", "0.69877654", "0.6978498", "0.6731973", "0.6676021", "0.6612523", "0.66032326", "0.66032326", "0.66032326", "0.6600738", "0.6600738", "0.6600738", "0.6600738", "0.6600738", "0.6600738", "0.65468335...
0.8437936
0
Sets this File's original resource
public function setOriginalFileResource($originalFileResource) { $this->originalFileResource = $originalFileResource; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setOriginalResource($originalResource) {\n\t\t$this->originalResource = $originalResource;\n\t}", "public function updateOriginal()\n {\n // @todo Bug#1101: shouldn't just serialise this object\n // because some things change for the original\n // loaded_width\n /...
[ "0.71453226", "0.6865306", "0.66661096", "0.6439208", "0.6436352", "0.641165", "0.62328446", "0.62123764", "0.61517024", "0.60588366", "0.5894209", "0.5777561", "0.57602704", "0.57152414", "0.5713898", "0.5616245", "0.5580611", "0.5564613", "0.55543405", "0.5535997", "0.55168...
0.71582353
0
Get the File's hidden
public function getHidden() { return $this->hidden; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getShowHiddenFilesAndFolders() {}", "public static function hidden($path)\n {\n // Pass to self::contents();\n return array_values(self::contents($path, 'only'));\n }", "public function getHiddenFlag() {}", "protected function getHidden()\n {\n return $thi...
[ "0.7618114", "0.67773896", "0.67528665", "0.65093064", "0.64604264", "0.64481837", "0.6350912", "0.6350912", "0.6350912", "0.6350912", "0.63223475", "0.62975055", "0.6045381", "0.59984857", "0.5972593", "0.5957512", "0.5938506", "0.58700824", "0.58669376", "0.58669376", "0.58...
0.64198226
6
Sets this File's hidden
public function setHidden($hidden) { $this->hidden = $hidden; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setHidden(){\n $this->_hidden = true;\n }", "public function setHiddenFlag($hidden = true) {}", "public function setHidden($value = TRUE);", "function setTypeAsHidden() {\n\t\t$this->type = \"hidden\";\n\t}", "function hide()\n {\n $this->_hidden = true;\n }", "public fun...
[ "0.7812048", "0.7225677", "0.720871", "0.71842355", "0.6717956", "0.64650303", "0.63854593", "0.6354249", "0.6135822", "0.61213386", "0.608953", "0.60510415", "0.60421336", "0.60405254", "0.601817", "0.601817", "0.59904134", "0.5989666", "0.5989666", "0.5989666", "0.5987318",...
0.71712315
4
Returns uuid of this object
public function getUuid() { return $this->Persistence_Object_Identifier; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUuid()\n {\n return $this->uuid;\n }", "public function getUuid()\n {\n return $this->uuid;\n }", "public function getUuid()\n {\n return $this->uuid;\n }", "public function getUuid() {\n return $this->uuid;\n }", "public function get_uuid() \n ...
[ "0.86325145", "0.86325145", "0.86325145", "0.8588566", "0.84742033", "0.8454373", "0.8387439", "0.8266323", "0.8207266", "0.8207266", "0.8207266", "0.81043184", "0.8017663", "0.7782897", "0.7677365", "0.7677365", "0.7628186", "0.75425655", "0.75283384", "0.7516442", "0.750279...
0.8347621
7
Prepare what is necessary to use in these tests. setUp() is run automatically by the testing framework before each test method.
protected function setUp(): void { global $txt; require_once(SUBSDIR . '/Emailpost.subs.php'); $lang = new Loader('english', $txt, database()); $lang->load('Maillist'); User::$info = new UserInfo(['name' => 'name']); $this->_email = 'Return-Path: <noreply@elkarte.net> Delivered-To: <drwho@tardis.com> Received: from galileo.tardis.com by galileo.tardis.com (Dovecot) with LMTP id znQ3AvalOVi/SgAAhPm7pg for <drwho@tardis.com>; Sat, 26 Nov 2016 09:10:46 -0600 Received: by galileo.tardis.com (Postfix, from userid 1005) id 0671C1C8; Sat, 26 Nov 2016 09:10:46 -0600 (CST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on galileo.tardis.com X-Spam-Flag: YES X-Spam-Level: ****** X-Spam-Status: Yes, score=5.0 required=5.0 tests=HTML_IMAGE_ONLY_16, HTML_MESSAGE,HTML_SHORT_LINK_IMG_2,MIME_HTML_ONLY,MIME_HTML_ONLY_MULTI, MPART_ALT_DIFF,RCVD_IN_BRBL_LASTEXT,T_DKIM_INVALID,URIBL_BLACK autolearn=no autolearn_force=no version=3.4.0 Received: from mail.elkarte.net (s2.eurich.de [85.214.104.5]) by galileo.tardis.com (Postfix) with ESMTP id 1872579 for <drwho@tardis.com>; Sat, 26 Nov 2016 09:10:40 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by mail.elkarte.net (Postfix) with ESMTP id 9DE3C4CE1535 for <drwho@tardis.com>; Sat, 26 Nov 2016 16:10:39 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at s2.eurich.de Received: from mail.elkarte.net ([127.0.0.1]) by localhost (h2294877.stratoserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zQep5x32jrqA for <drwho@tardis.com>; Sat, 26 Nov 2016 16:10:03 +0100 (CET) Received: from mail.elkarte.net (h2294877.stratoserver.net [85.214.104.5]) by mail.elkarte.net (Postfix) with ESMTPA id 990694CE0CFA for <drwho@tardis.com>; Sat, 26 Nov 2016 16:10:03 +0100 (CET) Subject: [ElkArte Community] Test Message To: <drwho@tardis.com> From: "Administrator via ElkArte Community" <noreply@elkarte.net> Reply-To: "ElkArte Community" <elkarteforum@gmail.com> References: <4124@elkarte.net> Date: Sat, 26 Nov 2016 15:09:15 -0000 X-Mailer: ELK X-Auto-Response-Suppress: All Auto-Submitted: auto-generated List-Id: <elkarteforum@gmail.com> List-Unsubscribe: <http://www.elkarte.net/community/index.php?action=profile;area=notification> List-Owner: <mailto:help@elkarte.net> (ElkArte Community) Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="ELK-66593aefa4beed000470cbd4cc3238d9" Content-Transfer-Encoding: 7bit Message-ID: <cd8c399768891330804a1d2fc613ccf3-t4124@elkarte.net> Testing Regards, The ElkArte Community [cd8c399768891330804a1d2fc613ccf3-t4124] --ELK-66593aefa4beed000470cbd4cc3238d9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Testing Regards, The ElkArte Community [cd8c399768891330804a1d2fc613ccf3-t4124] --ELK-66593aefa4beed000470cbd4cc3238d9-- --ELK-66593aefa4beed000470cbd4cc3238d9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit <strong>Testing</strong> Regards, The ElkArte Community [cd8c399768891330804a1d2fc613ccf3-t4124] --ELK-66593aefa4beed000470cbd4cc3238d9--'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUp()\n {\n parent::setUp();\n $this->prepareForTests();\n }", "protected function setUp(): void\n {\n $this->dbSetUp();\n $this->prepareObjects();\n $this->createDummyData();\n }", "public function setUp()\n {\n // 'This test has not b...
[ "0.82054555", "0.8016314", "0.7844287", "0.7839633", "0.78211635", "0.78211635", "0.78211635", "0.78211635", "0.78211635", "0.7784194", "0.77815634", "0.77815634", "0.77815634", "0.77815634", "0.77815634", "0.77815634", "0.77815634", "0.77815634", "0.77815634", "0.77815634", ...
0.0
-1
Cleanup data we no longer need at the end of the tests in this class. tearDown() is run automatically by the testing framework after each test method.
protected function tearDown(): void { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function tearDown()\n {\n $this->testData = null;\n parent::tearDown();\n }", "protected function tearDown()\n {\n $this->dataCollector = null;\n parent::tearDown();\n }", "protected function tearDown() {\r\n\t\t$this->dbh = null;\r\n\t\t$this->storage = null;\...
[ "0.8423133", "0.8394887", "0.8384393", "0.8304614", "0.8276454", "0.82593775", "0.8247462", "0.81923795", "0.8150083", "0.8149888", "0.81334037", "0.8112908", "0.809768", "0.8075358", "0.80512834", "0.80462366", "0.80462366", "0.80462366", "0.80461323", "0.80461323", "0.80461...
0.7874346
79
Test that we can read and parse the email
public function testMailParse() { // Parse a simple email $email_message = new EmailParse(); $email_message->read_email(true, $this->_email); // Basics $this->assertEquals('"ElkArte Community" <elkarteforum@gmail.com>', $email_message->headers['reply-to']); $this->assertEquals('[ElkArte Community] Test Message', $email_message->subject); // Its marked as spam $email_message->load_spam(); $this->assertTrue($email_message->spam_found); // A few more details $email_message->load_address(); $this->assertEquals('noreply@elkarte.net', $email_message->email['from']); $this->assertEquals('drwho@tardis.com', $email_message->email['to'][0]); // The key $email_message->load_key(); $this->assertEquals('cd8c399768891330804a1d2fc613ccf3-t4124', $email_message->message_key_id); $this->assertEquals('cd8c399768891330804a1d2fc613ccf3', $email_message->message_key); // The plain and HTML messages $this->assertStringContainsString('<strong>Testing</strong>', $email_message->body); $this->assertRegExp('/Testing\n/', $email_message->plain_body); // The IP $this->assertEquals('85.214.104.5', $email_message->load_ip()); // And some MD as well $markdown = pbe_load_text($email_message->html_found, $email_message, array()); $this->assertStringContainsString('[b]Testing[/b]', $markdown); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testMailParse()\n {\n $raw = \"UmV0dXJuLVBhdGg6IDxzdXBwb3J0QGNvbW9kby5jb20+ClgtT3JpZ2luYWwtVG86IHNzbEB0ZXN0LmRlCkRlbGl2ZXJlZC1UbzogY2Rzc2xAaG9zdDJjMS50ZXN0LmRlClJlY2VpdmVkOiBmcm9tIG14cDAubmljZ2F0ZS5jb20gKG14cDAubmljZ2F0ZS5jb20gWzE4OC40MC42OS43Nl0pCiAgICBieSBob3MudGVzdC5kZSAoUG9zdGZpeCkgd2...
[ "0.73370063", "0.67949635", "0.66037804", "0.64252317", "0.6395159", "0.6377212", "0.62867296", "0.6222555", "0.6187763", "0.6138994", "0.607519", "0.604774", "0.6037602", "0.6035867", "0.5942482", "0.5934118", "0.59335464", "0.59266746", "0.58585733", "0.58531094", "0.584512...
0.78743756
0
This is a helpping method to call CURL PUT request with the username and key
private function curl_put($url, $data) { $json_str = file_get_contents($this->cil_config_file); $json = json_decode($json_str); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($doc))); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT'); curl_setopt($ch, CURLOPT_POSTFIELDS,$data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, $json->readonly_unit_tester); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $response = curl_exec($ch); curl_close($ch); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function put($url, $fields, $headers)\n{\n $ch = curl_init($url); //initialize and set url\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"PUT\"); //set as put request\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $fields); //set fields, ensure they are properly encoded\...
[ "0.72033864", "0.65037984", "0.6477619", "0.6439031", "0.6424803", "0.64064497", "0.6395999", "0.6388594", "0.6384424", "0.6311735", "0.61685264", "0.61212295", "0.6117455", "0.609955", "0.60273874", "0.5992573", "0.5985227", "0.5980311", "0.5975014", "0.5953659", "0.5922608"...
0.69541943
1
This is a helpping method to calll CURL Delete request with username and password
private function curl_delete($url) { $json_str = file_get_contents($this->cil_config_file); $json = json_decode($json_str); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, $json->readonly_unit_tester); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $response = curl_exec($ch); curl_close($ch); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function call_api_delete(){\n$ch = curl_init('http://localhost:8001/api/users/....');\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLINFO_HEADER_OUT, true);\ncurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\n// Submit the DELETE request\n$result = curl_exec($ch);\n\n//Close cUR...
[ "0.76457405", "0.7013172", "0.6974841", "0.6775493", "0.67704713", "0.67443913", "0.65435946", "0.65435946", "0.64849", "0.64789796", "0.64669096", "0.64368284", "0.6370967", "0.6355791", "0.63540024", "0.63539404", "0.62862056", "0.6246455", "0.6229506", "0.62198025", "0.621...
0.7174635
1
This is a helpping method to call CURL POST request with the user name and password.
private function curl_post($url, $data) { $json_str = file_get_contents($this->cil_config_file); $json = json_decode($json_str); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($doc))); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); curl_setopt($ch, CURLOPT_POSTFIELDS,$data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, $json->readonly_unit_tester); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $response = curl_exec($ch); curl_close($ch); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function curl_post($url, $postfields=array(), $headers=array(), $auth=array()) {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_...
[ "0.6935809", "0.65286905", "0.6373342", "0.6103658", "0.59414285", "0.587953", "0.5792687", "0.57070893", "0.569892", "0.5682557", "0.5681375", "0.5637551", "0.56273496", "0.5627273", "0.56193733", "0.56129336", "0.56035554", "0.55753124", "0.5574021", "0.5571241", "0.556158"...
0.60856056
4
This is a helpping method to call CURL GET request with the user name and key
private function curl_get($url) { $json_str = file_get_contents($this->cil_config_file); $json = json_decode($json_str); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($doc))); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, $json->readonly_unit_tester); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $response = curl_exec($ch); curl_close($ch); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get($url, $headers=array(), $userPW=0, $params=array())\n{\n $paramLength = count($params);\n // only set params if there are some else url is fine\n if ($paramLength > 0)\n {\n $url = $url.'?'.http_build_query($params,'','&');\n }\n echo $url . \"<br/>\";\n $ch = curl_init();\n // set the url\...
[ "0.6602886", "0.6015179", "0.59789693", "0.58957547", "0.5778181", "0.5730556", "0.5724307", "0.57089615", "0.57039416", "0.57019913", "0.5691763", "0.56494004", "0.5615287", "0.55970925", "0.5588781", "0.5579901", "0.5578215", "0.5551597", "0.55246246", "0.5513604", "0.55054...
0.593411
3
This is the helping function
private function just_curl_get_data($url,$data) { $json_str = file_get_contents($this->cil_config_file); $json = json_decode($json_str); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json','Content-Length: ' . strlen($doc))); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($ch, CURLOPT_POSTFIELDS,$data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, $json->readonly_unit_tester); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); $response = curl_exec($ch); curl_close($ch); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function help();", "public function printHelp();", "abstract public function displayHelp();", "protected function isHelp() {}", "protected function renderHelp() {}", "public function helpAction() {}", "public function get_help()\n\t{\n\t\treturn '';\n\t}", "public function cli_help() {}", "p...
[ "0.8167466", "0.7971505", "0.78824115", "0.7727608", "0.75076115", "0.7451693", "0.73065853", "0.7279187", "0.7261713", "0.71022564", "0.70810723", "0.69941163", "0.69587433", "0.6956322", "0.6940296", "0.6880349", "0.6876221", "0.6858191", "0.68483716", "0.683708", "0.683074...
0.0
-1
/ This is a helpping method to get a Project in String type.
private function getProject($id) { ///$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/projects/".$id; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context. "/projects/".$id; echo "\ngetProject URL:".$url; $response = $this->curl_get($url); //echo "\n-------getProject Response:".$response; //$result = json_decode($response); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function GetProject($value)\n\t{\n\t\tif ($value instanceof GitPHP_Project) {\n\t\t\treturn $value->GetProject();\n\t\t} else if (is_string($value)) {\n\t\t\treturn $value;\n\t\t}\n\t}", "private function getProject()\n {\n $url = $this->base_uri.\"project/\".$this->project;\n $projec...
[ "0.7010423", "0.6870846", "0.6860733", "0.6857506", "0.673397", "0.6570787", "0.6566922", "0.65294653", "0.6517313", "0.64668554", "0.64501697", "0.64351815", "0.6419528", "0.63669646", "0.6351298", "0.63411367", "0.6317779", "0.6264729", "0.6253921", "0.6231453", "0.621582",...
0.56867343
88
/ This is a helpping method to get a Project in String type.
private function getExperiment($id) { //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/experiments/".$id; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context. "/experiments/".$id; $response = $this->curl_get($url); //echo "\n-------getProject Response:".$response; //$result = json_decode($response); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function GetProject($value)\n\t{\n\t\tif ($value instanceof GitPHP_Project) {\n\t\t\treturn $value->GetProject();\n\t\t} else if (is_string($value)) {\n\t\t\treturn $value;\n\t\t}\n\t}", "private function getProject()\n {\n $url = $this->base_uri.\"project/\".$this->project;\n $projec...
[ "0.7010423", "0.6870846", "0.6860733", "0.6857506", "0.673397", "0.6570787", "0.6566922", "0.65294653", "0.6517313", "0.64668554", "0.64501697", "0.64351815", "0.6419528", "0.63669646", "0.6351298", "0.63411367", "0.6317779", "0.6264729", "0.6253921", "0.6231453", "0.621582",...
0.0
-1
/ This is a helpping method to get a Project in String type.
private function getUser($id) { //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/users/".$id; $url = TestServiceAsReadOnly::$elasticsearchHost.$this->context."/users/".$id; $response = $this->curl_get($url); //echo "\n-------getProject Response:".$response; //$result = json_decode($response); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function GetProject($value)\n\t{\n\t\tif ($value instanceof GitPHP_Project) {\n\t\t\treturn $value->GetProject();\n\t\t} else if (is_string($value)) {\n\t\t\treturn $value;\n\t\t}\n\t}", "private function getProject()\n {\n $url = $this->base_uri.\"project/\".$this->project;\n $projec...
[ "0.70093536", "0.68687844", "0.6858338", "0.68562514", "0.67321527", "0.65691257", "0.65685254", "0.65274704", "0.65155596", "0.6470176", "0.6449057", "0.64338446", "0.64196324", "0.6364692", "0.6349267", "0.63388395", "0.63150513", "0.62619674", "0.6251214", "0.6231605", "0....
0.0
-1
/ This is a helpping method to get a subject in String type.
private function getSubject($id) { //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/subjects/".$id; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/subjects/".$id; $response = $this->curl_get($url); //echo "\n-------getProject Response:".$response; //$result = json_decode($response); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSubject(): string;", "public function getSubject(): string\n {\n return $this->subject;\n }", "abstract public function get_subject();", "abstract function getSubject() : string;", "public function getSubject() : string {\n return $this->_subject;\n }", "public f...
[ "0.80003315", "0.77959657", "0.7767337", "0.7751092", "0.76167196", "0.7550399", "0.75480884", "0.75480884", "0.75480884", "0.75480884", "0.75480884", "0.75480884", "0.75480884", "0.7522569", "0.7522569", "0.7417192", "0.7344277", "0.7275357", "0.7273615", "0.72641826", "0.72...
0.63175166
82
/ This is a helpping method to get a document in String type.
private function getDocument($id) { //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/documents/".$id; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/documents/".$id; $response = $this->curl_get($url); //echo "\n-------getProject Response:".$response; //$result = json_decode($response); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocument();", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public functi...
[ "0.7038305", "0.6897357", "0.6897357", "0.6897357", "0.6897357", "0.6897357", "0.6897357", "0.6897357", "0.6897357", "0.6897357", "0.6897357", "0.6896831", "0.6896831", "0.6896831", "0.6896831", "0.6603759", "0.63798285", "0.6251721", "0.6240621", "0.6206133", "0.60387385", ...
0.57232404
39
/ This is a helpping method to get a document in String type.
private function listDocumentsFromTo($from,$size) { //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/documents"; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context. "/documents"; $url = $url."?from=".$from."&size=".$size; echo "\n".$url; $response = $this->curl_get($url); //echo "\n-------getProject Response:".$response; //$result = json_decode($response); return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocument();", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public function getDocument() {}", "public functi...
[ "0.7038305", "0.6897357", "0.6897357", "0.6897357", "0.6897357", "0.6897357", "0.6897357", "0.6897357", "0.6897357", "0.6897357", "0.6897357", "0.6896831", "0.6896831", "0.6896831", "0.6896831", "0.6603759", "0.63798285", "0.6251721", "0.6240621", "0.6206133", "0.60387385", ...
0.0
-1
This is a helpping method to create a project using the local prj.json file.
private function createProject() { $input = file_get_contents('prj.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/projects?owner=wawong"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/projects?owner=wawong"; $params = json_decode($input); $data = json_encode($params); $response = $this->curl_post($url,$data); //echo "\nCreate project:".$response."\n"; $result = json_decode($response); $id = $result->_id; return $id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateProject()\n {\n echo \"\\nTesting project creation...\";\n $input = file_get_contents('prj.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/projects?owner=wawong\";\n $url = TestServiceAsReadOnly...
[ "0.7480772", "0.69335276", "0.6720666", "0.6686327", "0.6674912", "0.66042274", "0.6395912", "0.62972945", "0.62956166", "0.62850964", "0.6210036", "0.6200268", "0.61972654", "0.61848426", "0.6155389", "0.61428875", "0.6134689", "0.6129079", "0.6114572", "0.6112827", "0.60919...
0.7445076
1
This is a helpping method to create a project using the local prj.json file.
private function createExperiment() { $input = file_get_contents('exp.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/experiments?owner=wawong"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/experiments?owner=wawong"; $params = json_decode($input); $data = json_encode($params); $response = $this->curl_post($url,$data); $result = json_decode($response); $id = $result->_id; return $id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateProject()\n {\n echo \"\\nTesting project creation...\";\n $input = file_get_contents('prj.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/projects?owner=wawong\";\n $url = TestServiceAsReadOnly...
[ "0.7480136", "0.7444799", "0.69330525", "0.6719678", "0.66860795", "0.6674323", "0.6603005", "0.6393632", "0.6296381", "0.62950104", "0.62842274", "0.62075984", "0.61977965", "0.61971235", "0.6184474", "0.6154632", "0.6142426", "0.6134152", "0.61284244", "0.6112629", "0.61120...
0.0
-1
This is a helpping method to create a project using the local prj.json file.
private function createSubject() { $input = file_get_contents('subject.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/subjects?owner=wawong"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/subjects?owner=wawong"; $params = json_decode($input); $data = json_encode($params); $response = $this->curl_post($url,$data); $result = json_decode($response); $id = $result->_id; return $id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateProject()\n {\n echo \"\\nTesting project creation...\";\n $input = file_get_contents('prj.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/projects?owner=wawong\";\n $url = TestServiceAsReadOnly...
[ "0.7480818", "0.7445576", "0.6934724", "0.67210686", "0.6687263", "0.66763437", "0.6605326", "0.63961655", "0.6297125", "0.62966764", "0.62862456", "0.62097937", "0.61995834", "0.61984736", "0.61832297", "0.6156746", "0.61425966", "0.61358184", "0.61296934", "0.6113899", "0.6...
0.0
-1
This is a helpping method to create a document using the local prj.json file.
private function createDocument() { $input = file_get_contents('doc.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/documents?owner=wawong"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/documents?owner=wawong"; $params = json_decode($input); $data = json_encode($params); $response = $this->curl_post($url,$data); $result = json_decode($response); $id = $result->_id; return $id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateDocument()\n {\n echo \"\\nTesting document creation...\";\n $input = file_get_contents('doc.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/documents?owner=wawong\";\n $url = TestServiceAsReadO...
[ "0.6670128", "0.65845555", "0.600319", "0.5912523", "0.5838329", "0.57433844", "0.57227635", "0.5698281", "0.56542516", "0.55884737", "0.5577931", "0.5573082", "0.5545931", "0.5498816", "0.5434232", "0.53983194", "0.5397232", "0.5355831", "0.534623", "0.534458", "0.5335667", ...
0.6630924
1
Testing the project creation with the prj.json file
public function testCreateProject() { echo "\nTesting project creation..."; $input = file_get_contents('prj.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/projects?owner=wawong"; $url = TestServiceAsReadOnly::$elasticsearchHost.$this->context."/projects?owner=wawong"; $params = json_decode($input); $data = json_encode($params); $response = $this->curl_post($url,$data); //echo "\nType:".$response."-----Create Response:".$response; $result = json_decode($response); if(!$result->success) { $this->assertTrue(true); } else { $this->assertTrue(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProjectCreation()\n {\n $user = factory(User::class)->create();\n $project = factory(Project::class)->make();\n $response = $this->actingAs($user)\n ->post(route('projects.store'), [\n 'owner_id' => $user->id,\n 'name' => $project->name,\n ...
[ "0.7153427", "0.7153302", "0.71247894", "0.6972111", "0.6698196", "0.66626316", "0.6662225", "0.6629134", "0.64922935", "0.6370959", "0.63647586", "0.6334146", "0.6322571", "0.6286674", "0.6244069", "0.61830956", "0.61817753", "0.61736554", "0.615833", "0.61153346", "0.610094...
0.82499796
0
Testing the project listing method
public function testListProjects() { echo "\nTesting project listing..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/projects"; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/projects"; $response = $this->curl_get($url); //echo "\n-------testListProjects Response:".$response."\n"; $result = json_decode($response); $total = $result->total; $this->assertTrue(($total > 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProjectListCanBeGenerated()\n {\n $title = \"Test Name\";\n $description = \"A Test Project\";\n $image = \"TestImage.png\";\n $this->createTestProject($title, $description, $image);\n\n $title2 = \"Test Name2\";\n $description2 = \"A Test Project2\"...
[ "0.7675274", "0.7533679", "0.73240674", "0.6958769", "0.6825947", "0.67746216", "0.6722368", "0.6618595", "0.6608486", "0.65395015", "0.6535697", "0.65319735", "0.6521899", "0.6504106", "0.64853233", "0.6474815", "0.64417684", "0.6433512", "0.63543683", "0.634552", "0.6320420...
0.7509086
2
Testing the project retreival by ID
public function testGetProjectByID() { echo "\nTesting the project retrieval by ID..."; $response = $this->getProject("P1"); //echo "\ntestGetProjectByID------".$response; $result = json_decode($response); $prj = $result->Project; $this->assertTrue((!is_null($prj))); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProject($id)\n {\n }", "private function getProject($id)\n {\n ///$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/projects/\".$id;\n $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context. \"/projects/\".$id;\n \n echo...
[ "0.7300688", "0.7160052", "0.71215653", "0.69065416", "0.6845172", "0.6835409", "0.6801986", "0.67409396", "0.6733202", "0.66962236", "0.6671775", "0.6654084", "0.66138893", "0.65994096", "0.65855336", "0.6583683", "0.6583683", "0.65786403", "0.65296894", "0.6519466", "0.6519...
0.83770955
0
Testing the project search
public function testSearchProject() { echo "\nTesting project search..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/projects?search=test"; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/projects?search=test"; $response = $this->curl_get($url); //echo "\n-------project search Response:".$response; $result = json_decode($response); $total = $result->hits->total; $this->assertTrue(($total > 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProjects()\n {\n $response = $this->get('/projects'); \t\t\t\n }", "public function test_search()\n {\n Task::create([\n 'user_id' => 1,\n 'task' => 'Test Search',\n 'done' => true,\n ]);\n\n Livewire::test(Search::clas...
[ "0.6858462", "0.6852012", "0.6753273", "0.66946334", "0.6673342", "0.6618049", "0.6564328", "0.6496258", "0.64323014", "0.6419851", "0.6401977", "0.639658", "0.63620675", "0.63539433", "0.63435453", "0.6327412", "0.6318944", "0.63020056", "0.6277252", "0.6253027", "0.6215104"...
0.81959957
0
Testing the project update.
public function testUpdateProject() { echo "\nTesting project update..."; $id = "P5334183"; //echo "\n-----Is string:".gettype ($id); $input = file_get_contents('prj_update.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/projects/".$id."?owner=wawong"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/projects/".$id."?owner=wawong"; //echo "\nURL:".$url; $params = json_decode($input); $data = json_encode($params); $response = $this->curl_put($url,$data); $json = json_decode($response); $this->assertTrue(!$json->success); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function a_project_can_update()\n {\n $project = factory(Project::class)->create();\n\n $newData = [\n 'name' => $this->faker->sentence,\n 'description' => 'Changed',\n ];\n\n $this->put('/api/projects/' . $project->id, $newData)->assertStatus(201);\n ...
[ "0.7288457", "0.7124536", "0.70928377", "0.70306", "0.67961925", "0.67551124", "0.6728597", "0.6569805", "0.65312564", "0.65162337", "0.64706093", "0.6440127", "0.6440127", "0.6425131", "0.6410093", "0.6383995", "0.6380321", "0.63390696", "0.6330524", "0.6328308", "0.6320901"...
0.7020412
4
Testing the experiment creation.
public function testCreateExperiment() { echo "\nTesting Experiment creation..."; $input = file_get_contents('exp.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/experiments?owner=wawong"; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/experiments?owner=wawong"; //echo "\n-------------------------"; //echo "\nURL:".$url; //echo "\n-------------------------"; $params = json_decode($input); $data = json_encode($params); $response = $this->curl_post($url,$data); //echo "\n-----Create Experiment Response:".$response; $result = json_decode($response); $this->assertTrue(!$result->success); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInstrumentCreate()\n {\n $this->browse(function (Browser $browser) {\n $user = User::find(1);\n $browser->loginAs($user)\n ->visit(new instrumentManagementPage())\n ->assertSee('Instruments')\n ->press('@actions-button...
[ "0.65538555", "0.65322083", "0.632858", "0.6290923", "0.62865835", "0.62109554", "0.62014955", "0.6199749", "0.6188527", "0.6176559", "0.61609805", "0.6158647", "0.6152849", "0.61229026", "0.6113385", "0.611306", "0.611306", "0.60945725", "0.6086307", "0.60797703", "0.6079134...
0.8075641
0
Testing the experiment listing
public function testListExperiments() { echo "\nTesting experiment listing..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/experiments"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/experiments"; $response = $this->curl_get($url); //echo "-------Response:".$response; $result = json_decode($response); $total = $result->total; $this->assertTrue(($total > 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListExperts()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function testIndex()\n {\n // full list\n $response = $this->get(url('api/genre?api_token=' . $this->api_token));\n $response->assertStatus(200);\n $response->assert...
[ "0.68568736", "0.66832024", "0.66007644", "0.65801185", "0.64103985", "0.6407482", "0.638836", "0.6362429", "0.6359445", "0.63123435", "0.6307033", "0.6217772", "0.61934084", "0.6183226", "0.6171969", "0.61591905", "0.61553687", "0.61552304", "0.6153641", "0.6147386", "0.6132...
0.7766579
0
Testing the experiment retreival by ID
public function testGetExperimentByID() { echo "\nTesting the experiment retrieval by ID..."; $response = $this->getExperiment("1"); $result = json_decode($response); $exp = $result->Experiment; $this->assertTrue((!is_null($exp))); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getExperiment($id)\n {\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/experiments/\".$id;\n $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context. \"/experiments/\".$id;\n \n $response = $this->curl_get($url);\n //e...
[ "0.70720243", "0.66221786", "0.6372758", "0.6348471", "0.6327254", "0.6164168", "0.61540025", "0.6119591", "0.6040424", "0.59662414", "0.59080625", "0.58955175", "0.58827364", "0.5867978", "0.5862803", "0.5862368", "0.5860236", "0.5822475", "0.5786058", "0.57855254", "0.57839...
0.8079397
0
Testing the project search
public function testSearchExperiment() { echo "\nTesting experiment search..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/experiments?search=test"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/experiments?search=test"; $response = $this->curl_get($url); //echo "\n-------Response:".$response; $result = json_decode($response); $total = $result->hits->total; $this->assertTrue(($total > 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSearchProject()\n {\n echo \"\\nTesting project search...\";\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/projects?search=test\";\n $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context.\"/projects?search=test\";\n \n...
[ "0.81959957", "0.6858462", "0.6852012", "0.6753273", "0.66946334", "0.6673342", "0.6618049", "0.6564328", "0.6496258", "0.64323014", "0.6419851", "0.6401977", "0.639658", "0.63620675", "0.63539433", "0.63435453", "0.6327412", "0.6318944", "0.63020056", "0.6277252", "0.6253027...
0.6032634
33
Testing the experiment update.
public function testUpdateExperiment() { echo "\nTesting experiment update..."; $id = "0"; //echo "\n-----Is string:".gettype ($id); $input = file_get_contents('exp_update.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/experiments/".$id."?owner=wawong"; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/experiments/".$id."?owner=wawong"; //echo "\nURL:".$url; $params = json_decode($input); $data = json_encode($params); $response = $this->curl_put($url,$data); $json = json_decode($response); $this->assertTrue(!$json->success); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');...
[ "0.67539436", "0.6726989", "0.6693528", "0.6693528", "0.6681331", "0.6661945", "0.66463745", "0.6578476", "0.6578056", "0.657795", "0.6551882", "0.6551256", "0.6530346", "0.6482285", "0.64588344", "0.6385265", "0.63442075", "0.6335847", "0.6331066", "0.632276", "0.6302533", ...
0.78741
0
Testing the prject deletion. Note that this is logical deletion. The document will remain in the Elasticsearch
public function testDeleteExperiment() { echo "\nTesting experiment deletion..."; $id = "0"; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/experiments/".$id; echo "\ntestDeleteExperiment:".$url; $response = $this->curl_delete($url); //echo $response; $json = json_decode($response); $this->assertTrue(!$json->success); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDeleteDocument()\n {\n echo \"\\nTesting subject deletion...\";\n $id = \"0\";\n \n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/documents/\".$id;\n $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context.\"/docum...
[ "0.7721979", "0.72195476", "0.71160734", "0.6860015", "0.6648042", "0.66346395", "0.6630051", "0.66213447", "0.65666604", "0.65341294", "0.6483629", "0.648147", "0.6480438", "0.64733475", "0.6467028", "0.646439", "0.64584017", "0.64555895", "0.64398015", "0.6432262", "0.63987...
0.62347394
33
Testing the experiment creation.
public function testCreateSubject() { echo "\nTesting Subject creation..."; $input = file_get_contents('subject.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/subjects?owner=wawong"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/subjects?owner=wawong"; $params = json_decode($input); $data = json_encode($params); $response = $this->curl_post($url,$data); //echo "-----Create Response:".$response; $result = json_decode($response); $this->assertTrue(!$result->success); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateExperiment()\n {\n echo \"\\nTesting Experiment creation...\";\n $input = file_get_contents('exp.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/experiments?owner=wawong\";\n $url = TestServiceA...
[ "0.80771506", "0.65540594", "0.6533857", "0.63267875", "0.6290049", "0.62855506", "0.62106407", "0.6200179", "0.6197811", "0.6186913", "0.6175659", "0.6159984", "0.6157745", "0.61525404", "0.6121399", "0.61126214", "0.6111783", "0.6111783", "0.6093513", "0.608522", "0.6078238...
0.0
-1
Testing the subject listing
public function testListSubjects() { echo "\nTesting subject listing..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/subjects"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/subjects"; $response = $this->curl_get($url); //echo "-------Response:".$response; $result = json_decode($response); $total = $result->total; $this->assertTrue(($total > 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSearchSubject()\n {\n echo \"\\nTesting subject search...\";\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/subjects?search=mouse\";\n $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context.\"/subjects?search=mouse\";\n ...
[ "0.7150568", "0.6835536", "0.6827731", "0.6740685", "0.6314994", "0.630082", "0.62982154", "0.61793965", "0.6175428", "0.6151272", "0.6118109", "0.6099513", "0.60254", "0.6021194", "0.6016612", "0.59747297", "0.59371346", "0.5911985", "0.59065306", "0.58826673", "0.5865573", ...
0.79010934
0
Testing the experiment retreival by ID
public function testGetSubjectByID() { echo "\nTesting the subject retrieval by ID..."; $response = $this->getSubject("20"); //echo $response; $result = json_decode($response); $sub = $result->Subject; $this->assertTrue((!is_null($sub))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetExperimentByID()\n {\n echo \"\\nTesting the experiment retrieval by ID...\";\n $response = $this->getExperiment(\"1\");\n $result = json_decode($response);\n $exp = $result->Experiment;\n $this->assertTrue((!is_null($exp)));\n return $result;\n ...
[ "0.80787545", "0.7070373", "0.6621763", "0.6369168", "0.6349985", "0.6325129", "0.61617726", "0.6152334", "0.61204946", "0.6038902", "0.5967052", "0.5904932", "0.5893938", "0.5883273", "0.58651966", "0.5863077", "0.5862608", "0.5860091", "0.578838", "0.57871497", "0.5786301",...
0.5823668
18
Testing the subject update.
public function testUpdateSubject() { echo "\nTesting subject update..."; $id = "0"; //echo "\n-----Is string:".gettype ($id); $input = file_get_contents('subject_update.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/subjects/".$id."?owner=wawong"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/subjects/".$id."?owner=wawong"; //echo "\nURL:".$url; $params = json_decode($input); $data = json_encode($params); $response = $this->curl_put($url,$data); $json = json_decode($response); $this->assertTrue(!$json->success); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(\\SplSubject $subject) {}", "public function update(SplSubject $subject)\n {\n echo 1;\n }", "public function update(SplSubject $subject)\n {\n echo 2;\n }", "public function update(SplSubject $subject)\n {\n // TODO: Implement update() method.\n ...
[ "0.7487688", "0.7255924", "0.7250931", "0.72051895", "0.70829284", "0.70773464", "0.70773464", "0.70773464", "0.70773464", "0.70759016", "0.70759016", "0.68281275", "0.6787441", "0.67633486", "0.6650405", "0.6597262", "0.6563807", "0.6552678", "0.6539471", "0.6524724", "0.647...
0.78042865
0
Testing the project search
public function testSearchSubject() { echo "\nTesting subject search..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/subjects?search=mouse"; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/subjects?search=mouse"; $response = $this->curl_get($url); //echo "\n-------Response:".$response; $result = json_decode($response); $total = $result->hits->total; $this->assertTrue(($total > 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSearchProject()\n {\n echo \"\\nTesting project search...\";\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/projects?search=test\";\n $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context.\"/projects?search=test\";\n \n...
[ "0.81959957", "0.6858462", "0.6852012", "0.6753273", "0.66946334", "0.6673342", "0.6618049", "0.6564328", "0.6496258", "0.64323014", "0.6419851", "0.6401977", "0.639658", "0.63620675", "0.63539433", "0.63435453", "0.6327412", "0.6318944", "0.63020056", "0.6277252", "0.6253027...
0.0
-1
Testing the subject deletion. Note that this is logical deletion. The subject will remain in the Elasticsearch
public function testDeleteSubject() { echo "\nTesting subject deletion..."; $id = "0"; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/subjects/".$id; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/subjects/".$id; $response = $this->curl_delete($url); // echo $response; $json = json_decode($response); $this->assertTrue(!$json->success); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDeleteDocument()\n {\n echo \"\\nTesting subject deletion...\";\n $id = \"0\";\n \n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/documents/\".$id;\n $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context.\"/docum...
[ "0.777233", "0.69906515", "0.6699793", "0.6470792", "0.64638245", "0.6381767", "0.6278607", "0.6157048", "0.61286646", "0.6072591", "0.6058868", "0.60418016", "0.6032439", "0.60274434", "0.60081273", "0.60062474", "0.60042393", "0.59941715", "0.5994005", "0.59828883", "0.5974...
0.8416284
0
Testing the experiment creation.
public function testCreateDocument() { echo "\nTesting document creation..."; $input = file_get_contents('doc.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/documents?owner=wawong"; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/documents?owner=wawong"; $params = json_decode($input); $data = json_encode($params); $response = $this->curl_post($url,$data); //echo "-----Create Response:".$response; $result = json_decode($response); $this->assertTrue(!$result->success); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateExperiment()\n {\n echo \"\\nTesting Experiment creation...\";\n $input = file_get_contents('exp.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/experiments?owner=wawong\";\n $url = TestServiceA...
[ "0.8075641", "0.65538555", "0.65322083", "0.632858", "0.6290923", "0.62865835", "0.62109554", "0.62014955", "0.6199749", "0.6188527", "0.6176559", "0.61609805", "0.6158647", "0.6152849", "0.61229026", "0.6113385", "0.611306", "0.611306", "0.60945725", "0.6086307", "0.60797703...
0.0
-1
Testing the experiment listing
public function testListDocuments() { echo "\nTesting document listing..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/documents"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/documents"; $response = $this->curl_get($url); //echo "-------Response:".$response; $result = json_decode($response); $total = $result->total; $this->assertTrue(($total > 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListExperiments()\n {\n echo \"\\nTesting experiment listing...\";\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/experiments\";\n $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context.\"/experiments\";\n \n $resp...
[ "0.7766579", "0.68568736", "0.66832024", "0.66007644", "0.65801185", "0.64103985", "0.6407482", "0.638836", "0.6362429", "0.6359445", "0.63123435", "0.6307033", "0.6217772", "0.61934084", "0.6183226", "0.6171969", "0.61591905", "0.61553687", "0.61552304", "0.6153641", "0.6147...
0.0
-1
Testing the experiment retreival by ID
public function testGetDocumentByID() { echo "\nTesting the document retrieval by ID..."; $response = $this->getDocument("CCDB_2"); //echo $response; $result = json_decode($response); $exp = $result->CIL_CCDB; $this->assertTrue((!is_null($exp))); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetExperimentByID()\n {\n echo \"\\nTesting the experiment retrieval by ID...\";\n $response = $this->getExperiment(\"1\");\n $result = json_decode($response);\n $exp = $result->Experiment;\n $this->assertTrue((!is_null($exp)));\n return $result;\n ...
[ "0.8079397", "0.70720243", "0.66221786", "0.6372758", "0.6348471", "0.6327254", "0.6164168", "0.61540025", "0.6119591", "0.6040424", "0.59662414", "0.59080625", "0.58955175", "0.58827364", "0.5867978", "0.5862803", "0.5862368", "0.5860236", "0.5822475", "0.5786058", "0.578398...
0.57855254
20
Testing the document search
public function testSearchDocument() { echo "\nTesting document search..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/documents?search=mouse"; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/documents?search=mouse"; $response = $this->curl_get($url); //echo "\n-------Response:".$response; $result = json_decode($response); $total = $result->hits->total; $this->assertTrue(($total > 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInboundDocumentSearch()\n {\n }", "function testFindSearchcontentSco() {\n\t}", "public function testSearch()\n\t{\n\t\t$this->call('GET', '/api/posts/search');\n\t}", "public function search(){}", "public function search();", "public function search();", "function testPartial...
[ "0.7785687", "0.75202906", "0.72430456", "0.6984289", "0.69202304", "0.69202304", "0.6891472", "0.686389", "0.6850928", "0.6846033", "0.68441135", "0.6820873", "0.68099535", "0.6800658", "0.67511064", "0.67509943", "0.67172694", "0.6615381", "0.65921086", "0.6586356", "0.6583...
0.8208773
0
Testing the document update.
public function testUpdateDocument() { echo "\nTesting dcoument update..."; $id = "0"; //echo "\n-----Is string:".gettype ($id); $input = file_get_contents('doc_update.json'); //echo $input; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/documents/".$id."?owner=wawong"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/documents/".$id."?owner=wawong"; //echo "\nURL:".$url; $params = json_decode($input); $data = json_encode($params); $response = $this->curl_put($url,$data); $json = json_decode($response); $this->assertTrue(!$json->success); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPutDocument()\n {\n }", "public function test_update_item() {}", "public function test_update_item() {}", "public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ...
[ "0.7445582", "0.7350307", "0.7350307", "0.7308162", "0.73037523", "0.7143603", "0.710914", "0.7107103", "0.7079882", "0.7067057", "0.70222914", "0.7011263", "0.6999789", "0.6995497", "0.6980029", "0.69385535", "0.6929259", "0.69202584", "0.68766135", "0.68698466", "0.6856206"...
0.8108038
0
Testing the document deletion. Note that this is logical deletion. The document will remain in the Elasticsearch
public function testDeleteDocument() { echo "\nTesting subject deletion..."; $id = "0"; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/documents/".$id; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/documents/".$id; $response = $this->curl_delete($url); // echo $response; $json = json_decode($response); $this->assertTrue(!$json->success); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDelete()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n $db = $this->_setupDb();\n \n $db->create(array('a' => 1), 'mydoc');\n \n // Make sure document exists in DB\n $...
[ "0.7819554", "0.7742444", "0.7180947", "0.7146807", "0.7044822", "0.6999556", "0.6970119", "0.69247323", "0.68608874", "0.6719958", "0.6718927", "0.67063123", "0.6704686", "0.6703076", "0.6648219", "0.6647937", "0.6635172", "0.66290015", "0.6604365", "0.66010773", "0.65809053...
0.8316177
0
Testing document listing with the parameters, "from" and "size"
public function testListDocumentsFromTo() { echo "\nTesting the document retrieval by ID..."; $response = $this->listDocumentsFromTo(0,26); //echo $response; $result = json_decode($response); $hits = $result->hits; //echo "\nCOUNT:".count($hits); $this->assertTrue(count($hits)==26); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function listDocumentsFromTo($from,$size)\n {\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/documents\";\n $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context. \"/documents\";\n \n $url = $url.\"?from=\".$from.\"&size=\".$size;\...
[ "0.71769536", "0.68642807", "0.66656786", "0.6481461", "0.6258789", "0.5947674", "0.5771128", "0.57704264", "0.56990504", "0.5689262", "0.5676513", "0.56605285", "0.56581664", "0.5576548", "0.5574252", "0.55462795", "0.54961747", "0.5494453", "0.5439168", "0.5438068", "0.5430...
0.69214356
1
Testing the user listing
public function testListUsers() { echo "\nTesting user listing..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/users"; $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context."/users"; $response = $this->curl_get($url); //echo "-------Response:".$response; $result = json_decode($response); $total = $result->total; $this->assertTrue(($total > 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetUserList() {\n $i = new Instagram();\n $result = $i->userList('retrovertigo');\n $this->assertNotEmpty($result->posts);\n $this->assertNotEmpty($result->posts[0]->images);\n $this->assertEquals('retrovertigo', $result->posts[0]->userName);\n $this->assertEquals([], $i->getE...
[ "0.76121455", "0.75014013", "0.72613174", "0.72612315", "0.72544307", "0.71739626", "0.7171931", "0.7126668", "0.69741875", "0.6951945", "0.68670785", "0.68536353", "0.6793329", "0.6778149", "0.6769308", "0.67619836", "0.6721301", "0.6710591", "0.6680318", "0.6651438", "0.663...
0.7250959
5
Testing the user retreival by ID
public function testGetUsertByID() { echo "\nTesting the user retrieval by ID..."; $response = $this->getUser("44225"); //echo $response; $result = json_decode($response); $user = $result->User; $this->assertTrue((!is_null($user))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testItReturnsAUserByUserId()\n {\n $user1 = factory(User::class)->create([\n \"tenant_id\" => $this->user->tenant->id,\n ]);\n \n $this->actingAs($this->user)\n ->getJson(\"api/v1/users/{$user1->id}\")\n ->assertStatus(200)\n ->assertJson([\n \"id\" => $user1...
[ "0.7597465", "0.74565214", "0.72704464", "0.71516305", "0.7119315", "0.706494", "0.69770855", "0.69286966", "0.6892476", "0.6888279", "0.6878383", "0.6874488", "0.6857269", "0.6808128", "0.6787887", "0.6736203", "0.66571504", "0.65870255", "0.658698", "0.65866864", "0.6580385...
0.80939585
0
Testing the user search
public function testSearchUser() { echo "\nTesting user search..."; //$url = TestServiceAsReadOnly::$elasticsearchHost . "/CIL_RS/index.php/rest/users?search=Vicky"; $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context."/users?search=Vicky"; $response = $this->curl_get($url); //echo "\n-------Response:".$response; $result = json_decode($response); $total = $result->hits->total; $this->assertTrue(($total > 0)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchUsers()\n {\n # Set tables to search to a variable.\n $tables = $this->getTables();\n # Set fields to search to a variable.\n $fields = $this->getFields();\n # Set search terms to a variable.\n $search_terms = $this->getSearchTerms();\n # Pe...
[ "0.7333204", "0.71606", "0.7125123", "0.70354354", "0.70354354", "0.7013432", "0.70099324", "0.6999198", "0.69534355", "0.69092953", "0.68699336", "0.6855304", "0.68482375", "0.68351287", "0.683056", "0.6814859", "0.67792314", "0.6772843", "0.6724883", "0.6720761", "0.6674130...
0.7699641
0
/////////End testing ontology expansion/////////////////// ////////Testing the category name sorting////////////////
public function testCategoryNameSorting() { echo "\n testCategoryNameSorting..."; $url = TestServiceAsReadOnly::$elasticsearchHost.$this->context."/category/cell_process/Name/asc/0/10000"; $response = $this->curl_get($url); //echo $response; $result = json_decode($response); if(isset($result->error)) { echo "\nError in testCategoryNameSorting"; $this->assertTrue(false); } if(isset($result->hits->total) && $result->hits->total > 0) $this->assertTrue(true); else { $this->assertTrue(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCategoryMap()\n {\n $this->assertEquals(Record::mapCategory('Labor'), 'labor');\n $this->assertEquals(Record::mapCategory('工具器具備品'), 'tools_equipment');\n $this->assertEquals(Record::mapCategory('広告宣伝費'), 'promotion');\n $this->assertEquals(Record::mapCategory('販売...
[ "0.65544987", "0.6477886", "0.6400164", "0.6170126", "0.60505277", "0.6037744", "0.5952182", "0.591921", "0.58667964", "0.58416694", "0.57932484", "0.57478005", "0.5731951", "0.57305545", "0.5715328", "0.5697726", "0.56946456", "0.56941956", "0.56895113", "0.56313586", "0.562...
0.7210004
0
///////End testing the category name sorting//////////////// ///////Testing the category search//////////////////////////
public function testCategorySearchByName() { echo "\n testCategorySearchByName..."; $url = TestServiceAsReadOnly::$elasticsearchHost.$this->context."/category_search"; $query = "{\"query\": { ". "\"term\" : { \"Name\" : \"Cell Death\" } ". "}}"; $response = $this->just_curl_get_data($url, $query); $response = $this->handleResponse($response); //echo "\n testCategorySearchByName response:".$response."---"; if(is_null($response)) { echo "\n testCategorySearchByName response is empty"; $this->assertTrue(false); } $result = json_decode($response); if(is_null($result)) { echo "\n testCategorySearchByName json is invalid"; $this->assertTrue(false); } if(isset($result->hits->total) && $result->hits->total > 0) $this->assertTrue(true); else $this->assertTrue(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCategoryNameSorting()\n {\n echo \"\\n testCategoryNameSorting...\";\n $url = TestServiceAsReadOnly::$elasticsearchHost.$this->context.\"/category/cell_process/Name/asc/0/10000\";\n $response = $this->curl_get($url);\n //echo $response;\n $result = json_dec...
[ "0.7837572", "0.67320997", "0.6671251", "0.664897", "0.6454262", "0.63216525", "0.63210285", "0.6294507", "0.6244495", "0.6167877", "0.61539227", "0.61234945", "0.60509074", "0.600865", "0.60016245", "0.5999827", "0.5997029", "0.5987787", "0.5983255", "0.59633327", "0.5931430...
0.69372815
1
///////End testing the category search//////////////////////////
public function testTrackDownloads() { echo "\ntestTrackDownloads"; $json_str = "{\"Ip_address\":\"::1\",\"ID\":\"13007\",\"URL\":\"https://cildata.crbs.ucsd.edu/media/images/13007/13007.tif\",\"Size\":\"4400000\"}"; $url = TestServiceAsReadOnly::$elasticsearchHost."/rest/download_statistics"; $response = $this->curl_post($url, $json_str); //echo "\n-------testTrackDownloads Response:".trim($response)."------"; $json = json_decode($response); $this->assertTrue(!$json->success); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListCategories()\n {\n }", "public function testCategorySearchByName()\n {\n echo \"\\n testCategorySearchByName...\";\n $url = TestServiceAsReadOnly::$elasticsearchHost.$this->context.\"/category_search\";\n $query = \"{\\\"query\\\": { \".\n \"\\...
[ "0.7567752", "0.73989975", "0.7242503", "0.71562", "0.7139698", "0.7115986", "0.70067894", "0.6880919", "0.6847107", "0.67653394", "0.6761281", "0.6755253", "0.6744826", "0.67350686", "0.67222136", "0.65815806", "0.6573648", "0.6540283", "0.6520912", "0.6503756", "0.64849675"...
0.0
-1
///////Testing download statistics//////////////////////////// ///////End testing download statistics//////////////////////////// //////Helper functions/////////////////////////////////////
private function handleResponse($response) { if(is_null($response)) return null; $response = trim($response); if(strlen($response) == 0) return null; return $response; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTrackDownloads()\n {\n echo \"\\ntestTrackDownloads\";\n $json_str = \"{\\\"Ip_address\\\":\\\"::1\\\",\\\"ID\\\":\\\"13007\\\",\\\"URL\\\":\\\"https://cildata.crbs.ucsd.edu/media/images/13007/13007.tif\\\",\\\"Size\\\":\\\"4400000\\\"}\";\n $url = TestServiceAsReadOnly:...
[ "0.68925345", "0.65333015", "0.64043474", "0.6208448", "0.6128119", "0.60995406", "0.6094395", "0.60865885", "0.59261143", "0.5919282", "0.5905546", "0.59014887", "0.5856576", "0.58380985", "0.58300525", "0.5750855", "0.57133067", "0.5689354", "0.5654278", "0.56460893", "0.56...
0.0
-1
hammerOID_debug("ss_hammerOID.pollers.php Getting list of indexes");
function ss_hammerOID_pollers_indexes() { $return_arr = array(); $rows = db_fetch_assoc("SELECT id FROM poller"); for ($i=0;($i<sizeof($rows));$i++) { $return_arr[$i] = $rows[$i]['id']; } return $return_arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_index()\r\n\t{\r\n\r\n\t}", "function admin_index()\n\t{\n\t \n\t}", "public function _INDEX()\n\t{\n\t\t\n\t}", "public function _index(){\n\t $this->_list();\n\t}", "function getElasticSearchIndexes() {\n\n return 'pdb'.',' . 'geo'.',' . 'dbgap' .','. 'lincs' .','. 'arrayexpress'.',...
[ "0.6264189", "0.57497406", "0.572629", "0.57121843", "0.5634636", "0.55512", "0.5501181", "0.5459466", "0.544847", "0.544181", "0.541404", "0.5410366", "0.54073673", "0.5402675", "0.53820693", "0.5349936", "0.5331827", "0.53241795", "0.52990115", "0.5262652", "0.5258186", "...
0.66870064
0
Push a new job onto the queue.
public function push($job, $data = '', $queue = null) { $queue = $this->getQueue($queue); return $this->enqueueUsing( $job, $this->createPayload($job, $queue, $data), $queue, null, function ($payload, $queue) { return $this->pushRaw($payload, $queue); } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function execute() {\n $this->getQueue()->push($this->getJob(), $this->getJobOptions());\n }", "public function pushOn($queue, $job, $data = '');", "abstract public function push($job, $queue = null);", "public function push($job, $data = '', $queue = null);", "public function queue() {\n\...
[ "0.74417937", "0.71824455", "0.69923055", "0.6967664", "0.6833489", "0.6540442", "0.6458968", "0.6291997", "0.6267786", "0.6215984", "0.6165691", "0.6165691", "0.6165691", "0.6165691", "0.6165691", "0.6165691", "0.61603326", "0.61603326", "0.60888577", "0.6076971", "0.6051935...
0.602317
22
/ $this>connection>channel()>exchange_declare( $this>config['exchange'], $this>config['exchange_type'], $this>config['exchange_passive'], $this>config['exchange_durable'], $this>config['exchange_auto_delete'], $this>config['exchange_internal'], $this>config['exchange_nowait'] );
private function declareQueue($name) { $this->connection->channel()->queue_declare( $this->config['exchange'], $this->config['passive'] ?? false, $this->config['durable'] ?? false, $this->config['exclusive'] ?? false, $this->config['nowait'] ?? false ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function declareExchange($exchange, $type, $passive = null, $durable = null, $auto_delete = null, $internal = null, $nowait = null, $arguments = null, $ticket = null) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('declareExchange', func_get_args()));\n }", "public func...
[ "0.7575692", "0.7575692", "0.74529195", "0.7123474", "0.6875922", "0.68557775", "0.6830728", "0.6128487", "0.6049985", "0.59988195", "0.59988195", "0.5895419", "0.57978666", "0.5792032", "0.57797843", "0.5723695", "0.5673405", "0.5615131", "0.55901915", "0.55552036", "0.55029...
0.6433663
7
Removes html tags from the text and slices it if its longer that the specified length
public function stripAndSlice($text, $maxLength, $addEllipsis = true) { if (empty($text)) { return ''; } // add a space when there are two adjacent tags $text = preg_replace('/(<\/[^>]+?>)(<[^>\/][^>]*?>)/', '$1 $2', $text); $text = trim(strip_tags($text)); if (strlen($text) > $maxLength) { $text = $addEllipsis ? substr($text, 0, $maxLength-3) . '...' : substr($text, 0, $maxLength); } return $text; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function truncate($text, $length = 200)\n {\n $ending = '...';\n if(mb_strlen(preg_replace('/<.*?>/', '', $text)) <= $length)\n {\n return $text;\n }\n $totalLength = mb_strlen(strip_tags($ending));\n $openTags = array();\n $truncate = '';\n\n ...
[ "0.7953029", "0.7794227", "0.7794227", "0.7518003", "0.7404345", "0.73502", "0.7293797", "0.72623754", "0.72491944", "0.7178054", "0.7103808", "0.70197064", "0.69657576", "0.6945398", "0.68912536", "0.68815887", "0.68509144", "0.67961067", "0.6779655", "0.67399347", "0.670957...
0.6598923
27
/ FUNCTIONS Generates the url for the specified entity | routing string | page id
public function generateUrl($entity, $params = null) { if (gettype($entity) === 'string') { $entity = "AllegroSites_$entity"; } return $this->routingHelper->generateUrl($entity, $params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function returnUrlForEntity(Entity $entity) {\n\t\treturn Router::url(\n\t\t\t[\n\t\t\t\t'plugin' => null,\n\t\t\t\t'prefix' => null,\n\t\t\t\t'controller' => $this->_table->alias(),\n\t\t\t\t'action' => 'view',\n\t\t\t\t$entity->{$this->_table->primaryKey()},\n\t\t\t],\n\t\t\ttrue\n\t\t);\n\t}", "functio...
[ "0.69575846", "0.67800105", "0.651899", "0.6492901", "0.6464377", "0.64279646", "0.63752335", "0.6347413", "0.6296337", "0.62721276", "0.62549084", "0.624497", "0.62296355", "0.6176377", "0.61689", "0.61653763", "0.61525023", "0.6147345", "0.6120563", "0.6070356", "0.60581106...
0.7027142
0
Finds the template corresponding checking first if there is a custom template for it. Custom templates are placed in same location as the default one and with the site slug prepended, e.g. startupdigital_layout.html.twig when overriding layout.html.twig
public function getTemplate($template) { $bundle = 'AllegroSitesBundle'; $baseDir = 'base'; $overrideDir = 'tpl_' . $this->session->get('site'); $ext = '.twig'; $templateName = (false === strpos($template, ':') ? ':' : '/') . $template; $template = "{$bundle}:{$overrideDir}{$templateName}{$ext}"; if (!$this->templating->exists($template)) { $template = "{$bundle}:{$baseDir}{$templateName}{$ext}"; } return $template; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findTemplate(){\n if($this->hasErrors()) return false;\n $located = false;\n if(!$this->hasErrors()){\n $module_file = trailingslashit($this->location).$this->type.'.php';\n $file = trailingslashit($this->module).trailingslashit($this->location).$this->type.'.php';\n switch(...
[ "0.7524237", "0.6998959", "0.69469935", "0.6796758", "0.6778033", "0.6681815", "0.6668551", "0.6659393", "0.6644254", "0.65430677", "0.65393734", "0.65352833", "0.65066487", "0.64853287", "0.6476905", "0.6471629", "0.6467829", "0.6466507", "0.64636856", "0.64028096", "0.63964...
0.5823947
93
Load from the database.
public function find_by_id($id, $limit=null, $offset=0){ $query = $this->db->get_where($this::$table_name, array( $this::$table_pk => $id),$limit, $offset); return $query->row(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadFromDB()\n {\n }", "public function load()\n {\n $pdo = $this->getDbConnection();\n $query = \"SELECT * FROM {$this->dbTable}\";\n $data = $pdo->query($query)->fetchAll(\\PDO::FETCH_ASSOC);\n\n foreach ($data as ['key' => $key, 'value' => $value]) {\n ...
[ "0.7872855", "0.7772401", "0.7587108", "0.75665337", "0.7366457", "0.7264917", "0.7229564", "0.7217015", "0.7176778", "0.7109859", "0.7058646", "0.69265807", "0.6909785", "0.68407786", "0.6814382", "0.6749799", "0.6676008", "0.6675192", "0.6674759", "0.6674759", "0.6674759", ...
0.0
-1
finds names of table columns
private function table_columns(){ $column = array(); $query = $this->db->select('column_name') ->from('information_schema.columns') ->where('table_name', $this::$table_name) ->get($this::$table_name)->result_array(); //return individual table column foreach($query as $column_array){ foreach($column_array as $column_name){ $column[] = $column_name; } } return $column; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function getColNames();", "public function getColumnNames();", "function getColumns($table){\n $sql = 'SHOW COLUMNS FROM ' . $table;\n $names = array();\n $db = $this->prepare($sql);\n\n try {\n if($db->execute()){\n $raw_column_data = $db->...
[ "0.8175776", "0.7956473", "0.7796653", "0.77554727", "0.7710515", "0.7678261", "0.7657542", "0.76451606", "0.7641939", "0.763568", "0.76214606", "0.7616284", "0.76003844", "0.7589586", "0.75733", "0.75619537", "0.7558532", "0.7549586", "0.75292593", "0.7513033", "0.75065845",...
0.7805967
2
select items from database with indexes
public function find_by_index($indexed_id){ return $this->db->get_where($this::$table_name, array( $this::$table_index => $indexed_id,)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function index_all(){\n\t\t$this->_clear_tmp(0);\n\t\t$this->del_results();\n\t\treturn $this->index(0,true);\n\t}", "public function getbyindex2($index){\n $condition['index'] = $index;\n $result = $this->where($condition) ->select();\n return $result;\n \n }", "public fu...
[ "0.61994404", "0.61494905", "0.6054029", "0.6027736", "0.59952474", "0.5953651", "0.5892444", "0.5892444", "0.5892444", "0.5854872", "0.5841658", "0.5833369", "0.58298343", "0.58118033", "0.58089465", "0.5782999", "0.5778935", "0.576429", "0.5750929", "0.57421386", "0.5727321...
0.5499849
45
for hashing a password data
public function hash($password){ return password_hash($password, PASSWORD_DEFAULT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hashPassword($data) { \r\n if (!$this->id && !isset($this->data[$this->name]['id'])) {\r\n if (!isset($this->data[$this->name]['FilterChar'])) {\r\n $this->data[$this->name]['FilterChar'] = self::createFilterChar();\r\n }\r\n if (isset($this->da...
[ "0.83769125", "0.79260457", "0.7710804", "0.76851696", "0.7679719", "0.76446855", "0.7565288", "0.75630325", "0.7457576", "0.73932815", "0.7385873", "0.7364531", "0.7353031", "0.73056436", "0.73033196", "0.73014325", "0.7294092", "0.7288407", "0.7273401", "0.7269547", "0.7248...
0.67083
80
for hashing a code sent to email
public function verification_hash($code){ return hash('sha512', $code . config_item('encryption_key')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function hashing() {\n\t\t$data = md5($this->name.$this->date);\n\t\t$data = md5($data);\n\t\t$data = strrev($data);\n\t\t//$data = md5($data);\n\t\t$data = strtoupper($data);\n\t\t//$data = strrev($data);\n\n\t\t$datatemp = NULL;\n\t\tfor($i=0; $i<=strlen($data); $i++) {\n\t\t\t$arr = substr($data, $i, 1)...
[ "0.735452", "0.7132213", "0.68649954", "0.6802998", "0.66499317", "0.6533919", "0.64821035", "0.6438898", "0.643793", "0.638476", "0.6375428", "0.6375428", "0.6375428", "0.6375428", "0.6339105", "0.63275915", "0.63200986", "0.6263297", "0.6253808", "0.6242658", "0.6240387", ...
0.6897291
2
if an item is not provided it selects the table primary key and returns number of rows else it returns the item selected
public function data_count($where_id=null, $item=null){ if($item!=null){ $this->db->select($item); }else{ $this->db->select($this::$table_pk); } $this->db->from($this::$table_name); if($where_id!=null){ $this->db->where($where_id); } $query = $this->db->get(); if($item==null){ return $query->num_rows(); }else{ return $query; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_item_id(){\n $this->db->select('itemID')->from('item')->where('itemID', );\n $query = $this->db->get();\n \n if($query->num_rows() == 1)\n {\n $row = $query->row(0);\n return $row->itemID;\n }\n }", "function getNumItems($d...
[ "0.66218126", "0.6581721", "0.6491302", "0.6453247", "0.64065826", "0.6366521", "0.6364417", "0.6330881", "0.63084316", "0.6238034", "0.61580825", "0.6111172", "0.61093473", "0.60998243", "0.60863197", "0.60805136", "0.60751444", "0.60621405", "0.60535985", "0.6028714", "0.59...
0.6239255
9
Get the primary keys for inserting and updating data in question table
protected function question_where(){ return $array = array('exam_id'=>trim($this->input->post('exam_id')), 'category_id'=>trim($this->input->post('category_id')), 'body_id'=>trim($this->input->post('body_id')), 'subject_id'=>trim($this->input->post('subject_id')), 'period_id'=>trim($this->input->post('period_id')), 'question_number'=>trim($this->input->post('question_number')), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getPrimaryKeys()\n {\n return array('bookId', 'languageId');\n }", "function getPrimaryKeys() {\n \treturn $this->db->getPrimaryKeys($this->table);\n }", "public function schemaPK() {\n return $this->primaryKeyArray;\n }", "public function schemaPK() {\n ...
[ "0.7347381", "0.7268588", "0.71443194", "0.71443194", "0.7141243", "0.7138833", "0.70871645", "0.70129", "0.70129", "0.69788516", "0.6932864", "0.69272524", "0.68959665", "0.6890431", "0.68387425", "0.68387425", "0.68387425", "0.6803143", "0.6798513", "0.673616", "0.6735893",...
0.0
-1
Contains the consumer's TypoScript This method is used to pass a TypoScript configuration (in array form) to the Data Consumer
public function setTypoScript(array $conf) { $this->conf = $conf; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function loadTypoScriptConfig()\n {\n $sysPageObj = GeneralUtility::makeInstance('t3lib_pageSelect');\n if (!$GLOBALS['TSFE']->sys_page) {\n $GLOBALS['TSFE']->sys_page = $sysPageObj;\n }\n $rootLine = $sysPageObj->getRootLine($GLOBALS['TSFE']->id);\n $TSObj ...
[ "0.6005266", "0.56558764", "0.56019324", "0.5595013", "0.55682594", "0.5503135", "0.5503135", "0.5489876", "0.54339945", "0.543047", "0.54245806", "0.53848755", "0.53629076", "0.5325733", "0.5304363", "0.52970237", "0.52502114", "0.5184774", "0.51484656", "0.51317567", "0.512...
0.5150982
18
This method returns the TypoScript key of the extension. This may be the extension key. NOTE: if you use this method as is, don't forget to define the member variable $tsKey. NOTE: don't append a . (dot) to you ts key, it is done automatically by this method.
public function getTypoScriptKey() { return $this->tsKey.'.'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExtensionKey() {}", "public function getExtensionKey() {}", "public function getTypoScriptKey()\n {\n return $this->tsKey . '.';\n }", "public function getExtensionKey()\n {\n return $this->request->getControllerExtensionKey();\n }", "public function getExtkey()...
[ "0.8188166", "0.8188166", "0.8170301", "0.7456678", "0.74533546", "0.68749714", "0.6842327", "0.6835575", "0.6700021", "0.6700021", "0.6537408", "0.6494527", "0.64739764", "0.64570177", "0.6453329", "0.6405362", "0.63738656", "0.63738656", "0.63738656", "0.63738656", "0.63738...
0.8033054
3
Creates data provider instance with search query applied
public function search($params) { $query = IntegralOrder::find()->where([self::tableName().'.is_del' => self::DELETE_FALSE]); // add conditions that should always apply here $dataProvider = new ActiveDataProvider([ 'query' => $query, ]); $dataProvider->setSort([ 'attributes' => [ 'id' => [ 'asc' => ['id' => SORT_ASC], 'desc' => ['id' => SORT_DESC], ], 'igoods.name' => [ 'asc' => ['{{%integral_goods}}.name' => SORT_ASC], 'desc' => ['{{%integral_goods}}.name' => SORT_DESC], ], 'person.name' => [ 'asc' => ['{{%person}}.name' => SORT_ASC], 'desc' => ['{{%person}}.name' => SORT_DESC], ], 'user.mobile' => [ 'asc' => ['{{%user}}.name' => SORT_ASC], 'desc' => ['{{%user}}.name' => SORT_DESC], ], 'integral' => [ 'asc' => ['integral' => SORT_ASC], 'desc' => ['integral' => SORT_DESC], ], 'created_at' => [ 'asc' => ['created_at' => SORT_ASC], 'desc' => ['created_at' => SORT_DESC], ] ], 'defaultOrder' => [ 'id' => SORT_ASC ], ]); $this->load($params); if (!$this->validate()) { // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); return $dataProvider; } $query->joinWith('user'); $query->joinWith('igoods'); $query->joinWith('person'); $query->andFilterWhere(['like', '{{%person}}.name', $this->uname]) ->andFilterWhere(['like', '{{%integral_goods}}.name', $this->goodsname]); return $dataProvider; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchQueryDataProvider() {}", "public function search()\n {\n $q = $this->getQuery();\n $dataProvider = new ActiveDataProvider([\n 'query' => $q,\n ]);\n\n return $dataProvider;\n }", "public function getQueryDataProvider() {}", "public function s...
[ "0.7773856", "0.674291", "0.65721744", "0.6503215", "0.6472826", "0.6389071", "0.63745373", "0.6287255", "0.62671757", "0.62457365", "0.62425256", "0.62123144", "0.61969537", "0.6172912", "0.61250603", "0.6123412", "0.6116283", "0.61031115", "0.6101092", "0.608637", "0.608177...
0.0
-1
Metodo encargado de la redireccion a Facebook
public function redirectToProvider($provider) { return Socialite::driver($provider)->redirect(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function familyFacebook () {\n }", "public function getFacebook(): ?string;", "public static function facebook()\n {\n return 'facebook';\n }", "public function server_social_wall(){\n echo $this->facebookTijdlijn();\n return 'Gelukt';\n }", "public function fb()\n\t...
[ "0.6272068", "0.6057281", "0.5994639", "0.58413726", "0.57782507", "0.57387215", "0.57362986", "0.56651866", "0.5612867", "0.5602759", "0.55977565", "0.55886036", "0.55794114", "0.5567021", "0.5566461", "0.55271214", "0.552194", "0.5511131", "0.55100465", "0.54940414", "0.548...
0.0
-1
Generate Seller Verification Vacation HTMl
function wcfmu_seller_verification_html() { global $WCFM, $WCFMu; if( isset( $_POST['messageid'] ) && isset($_POST['vendorid']) ) { $message_id = absint( $_POST['messageid'] ); $vendor_id = absint( $_POST['vendorid'] ); if( $vendor_id && $message_id ) { $vendor_verification_data = (array) get_user_meta( $vendor_id, 'wcfm_vendor_verification_data', true ); $identity_types = $this->get_identity_types(); $address = isset( $vendor_verification_data['address']['street_1'] ) ? $vendor_verification_data['address']['street_1'] : ''; $address .= isset( $vendor_verification_data['address']['street_2'] ) ? ' ' . $vendor_verification_data['address']['street_2'] : ''; $address .= isset( $vendor_verification_data['address']['city'] ) ? '<br />' . $vendor_verification_data['address']['city'] : ''; $address .= isset( $vendor_verification_data['address']['zip'] ) ? ' ' . $vendor_verification_data['address']['zip'] : ''; $address .= isset( $vendor_verification_data['address']['country'] ) ? '<br />' . $vendor_verification_data['address']['country'] : ''; $address .= isset( $vendor_verification_data['address']['state'] ) ? ', ' . $vendor_verification_data['address']['state'] : ''; $verification_note = isset( $vendor_verification_data['verification_note'] ) ? $vendor_verification_data['verification_note'] : ''; ?> <form id="wcfm_verification_response_form"> <table> <tbody> <?php if( !empty( $identity_types ) ) { foreach( $identity_types as $identity_type => $identity_type_label ) { $identity_type_value = ''; if( !empty( $vendor_verification_data ) && isset( $vendor_verification_data['identity'] ) && isset( $vendor_verification_data['identity'][$identity_type] ) ) $identity_type_value = $vendor_verification_data['identity'][$identity_type]; if( $identity_type_value ) { ?> <tr> <td class="wcfm_verification_response_form_label"><?php echo $identity_type_label; ?></td> <td><a class="wcfm-wp-fields-uploader" target="_blank" style="width: 32px; height: 32px;" href="<?php echo $identity_type_value; ?>"><span style="width: 32px; height: 32px; display: inline-block;" class="placeHolderDocs"></span></a></td> </tr> <?php } } } ?> <tr> <td class="wcfm_verification_response_form_label"><?php _e( 'Address', 'wc-frontend-manager-ultimate' ); ?></td> <td><?php echo $address; ?></td> </tr> <tr> <td class="wcfm_verification_response_form_label"><?php _e( 'Note to Vendor', 'wc-frontend-manager-ultimate' ); ?></td> <td><textarea class="wcfm-textarea" name="wcfm_verification_response_note"></textarea></td> </tr> <tr> <td class="wcfm_verification_response_form_label"><?php _e( 'Status Update', 'wc-frontend-manager-ultimate' ); ?></td> <td> <label for="wcfm_verification_response_status_approve"><input type="radio" id="wcfm_verification_response_status_approve" name="wcfm_verification_response_status" value="approve" checked /><?php _e( 'Approve', 'wc-frontend-manager-ultimate' ); ?></label> <label for="wcfm_verification_response_status_reject"><input type="radio" id="wcfm_verification_response_status_reject" name="wcfm_verification_response_status" value="reject" /><?php _e( 'Reject', 'wc-frontend-manager-ultimate' ); ?></label> </td> </tr> </tbody> </table> <input type="hidden" name="wcfm_verification_vendor_id" value="<?php echo $vendor_id; ?>" /> <input type="hidden" name="wcfm_verification_message_id" value="<?php echo $message_id; ?>" /> <div class="wcfm-message" tabindex="-1"></div> <input type="button" class="wcfm_verification_response_button wcfm_submit_button" id="wcfm_verification_response_button" value="<?php _e( 'Update', 'wc-frontend-manager-ultimate' ); ?>" /> </form> <?php } } die; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display_site_verification() {\n\t\t$google_verification = get_option( 'wsuwp_google_verify', false );\n\t\t$bing_verification = get_option( 'wsuwp_bing_verify', false );\n\t\t$facebook_verification = get_option( 'wsuwp_facebook_verify', false );\n\n\t\tif ( $google_verification ) {\n\t\t\techo '<me...
[ "0.6333927", "0.6237801", "0.5957102", "0.5798831", "0.5782843", "0.57435066", "0.57111543", "0.56600523", "0.5656151", "0.55967087", "0.5590035", "0.55783516", "0.5529423", "0.5524626", "0.54911387", "0.5489552", "0.546047", "0.542538", "0.5414767", "0.5403754", "0.5389062",...
0.66289955
0
Takes a workflow event and triggers all workflows that are active and have a workflow event that matches the event that was triggered
public function triggerEvent(AbstractWorkflowEvent $workflowEvent): Collection { // track the workflow runs that we are going to be dispatching $workflowProcessCollection = collect(); /** * Find all workflows that are active and have a workflow event that matches the event that was triggered */ Workflow::query() ->active() ->forEvent($workflowEvent) ->each(function (Workflow $workflow) use (&$workflowProcessCollection, $workflowEvent) { // Create the run $workflowProcess = $this->createWorkflowProcess($workflow, $workflowEvent); // Dispatch the run so that it can be processed $this->dispatchProcess($workflowProcess, $workflowEvent->getQueue()); // Identify that the workflow run was spawned by the triggering of the event $workflowProcessCollection->push($workflowProcess); }); // Return all the workflow runs that were spawned by the triggering of the event return $workflowProcessCollection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function triggerEvent(Webhook $webhook, $event);", "public function triggerWorkflow()\n {\n $this->request->setParam('wfTrigger', 'true');\n return $this;\n }", "protected function triggerEvent(Event $event)\n {\n $this->log(\"Triggered Event [{$event->id}]\");\n\n /...
[ "0.556452", "0.547991", "0.5455189", "0.5425043", "0.5303623", "0.5302955", "0.5236242", "0.51574934", "0.51452345", "0.51111066", "0.50872713", "0.5067242", "0.5061188", "0.5026808", "0.4988637", "0.49787617", "0.495421", "0.49462357", "0.49322578", "0.4872903", "0.4860662",...
0.6256667
0
Creates a workflow process for the given workflow and workflow event
public function createWorkflowProcess(Workflow $workflow, AbstractWorkflowEvent $workflowEvent): WorkflowProcess { $isValid = $workflowEvent->hasValidTokens(); if (! $isValid) { throw WorkflowEventException::invalidWorkflowEventParameters(); } // Create the workflow run and identify it as having been created $workflowProcess = new WorkflowProcess(); $workflowProcess->workflow()->associate($workflow); $workflowProcess->workflowProcessStatus()->associate(WorkflowProcessStatusEnum::CREATED); $workflowProcess->save(); // Create the workflow run parameters foreach ($workflowEvent->getTokens() as $key => $value) { $this->createInputToken($workflowProcess, $key, $value); } // Alert the system of the creation of a workflow run being created WorkflowProcessCreated::dispatch($workflowProcess); return $workflowProcess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createWorkflow($datas);", "function execute($process, $event)\n {\n $returnStatus = eZWorkflowType::STATUS_ACCEPTED;\n\n $parameters = $process->attribute('parameter_list');\n $object = eZContentObject::fetch($parameters['object_id']);\n\n if (!$object) {\n ...
[ "0.58642316", "0.568541", "0.5602228", "0.5544195", "0.55028105", "0.54834634", "0.5331092", "0.5264262", "0.5229887", "0.5201359", "0.5194857", "0.51594996", "0.51308477", "0.5127265", "0.5110349", "0.5097143", "0.50173897", "0.5000769", "0.49907723", "0.49805492", "0.497931...
0.77619076
0
Dispatches a workflow process so that it can be picked up by the workflow process runner
public function dispatchProcess(WorkflowProcess $workflowProcess, string $queue = 'default'): WorkflowProcess { // Identify the workflow run as being dispatched $workflowProcess->workflow_process_status_id = WorkflowProcessStatusEnum::DISPATCHED; $workflowProcess->save(); // Dispatch the workflow run WorkflowProcessRunnerJob::dispatch($workflowProcess)->onQueue($queue); WorkflowProcessDispatched::dispatch($workflowProcess); return $workflowProcess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function flow() {\n\t\tif ($this->runtimeContext)\n\t\t\t$this->workflowActivity->onFlow($this->runtimeContext);\n\t}", "public static function workflowActions();", "protected abstract function executeProcess();", "protected function initializeProcessAction() {}", "protected function _process() {}",...
[ "0.6358178", "0.6141235", "0.6011078", "0.57677424", "0.56934416", "0.56934416", "0.56934416", "0.56934416", "0.5683946", "0.5669635", "0.56675583", "0.5667122", "0.5667122", "0.5667122", "0.5603712", "0.55648357", "0.55511266", "0.552396", "0.55200857", "0.55185574", "0.5502...
0.5146817
74
Pauses a workflow process so that it won't be picked up by the workflow process runner
public function pauseRun(WorkflowProcess $workflowProcess): WorkflowProcess { if ($workflowProcess->workflow_process_status_id != WorkflowProcessStatusEnum::PENDING) { throw new \Exception('Workflow run is not pending'); } $workflowProcess->workflow_process_status_id = WorkflowProcessStatusEnum::PAUSED; $workflowProcess->save(); WorkflowProcessPaused::dispatch($workflowProcess); return $workflowProcess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function pauseProcessing()\n\t{\n\t\t$this->logger->log(LogLevel::NOTICE, 'USR2 received; pausing job processing');\n\t\t$this->paused = true;\n\t}", "public function pauseWorking(){\r\n\r\n }", "public function pause();", "public function pause()\n\t{\n\t\t$this->data->directSet(\"state\", self::STA...
[ "0.6602639", "0.64801884", "0.64335316", "0.6223136", "0.6181979", "0.6058795", "0.5940641", "0.5733628", "0.5661389", "0.56370306", "0.5621988", "0.5551616", "0.54525095", "0.54357296", "0.5428415", "0.54209805", "0.5347551", "0.52239305", "0.5220349", "0.5193789", "0.51699"...
0.6257278
3
Resumes a workflow process so that it can be picked up by the workflow process runner
public function resumeRun(WorkflowProcess $workflowProcess): WorkflowProcess { if ($workflowProcess->workflow_process_status_id != WorkflowProcessStatusEnum::PAUSED) { throw new \Exception('Workflow run is not paused'); } $workflowProcess->workflow_process_status_id = WorkflowProcessStatusEnum::PENDING; $workflowProcess->save(); WorkflowProcessResumed::dispatch($workflowProcess); return $workflowProcess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function doResume();", "public function resume();", "abstract protected function doResumeContext();", "public function resume () {\n if ($this->started) {\n $this->run = true;\n $this->lapTmstmp = now();\n\n } else {\n $this->restart();\n ...
[ "0.7294092", "0.71703446", "0.67249364", "0.65776336", "0.62607086", "0.6070024", "0.6049309", "0.5850657", "0.56924415", "0.5651377", "0.5646792", "0.55871785", "0.5425904", "0.5406954", "0.53714234", "0.5370568", "0.5357559", "0.525744", "0.5181318", "0.51735085", "0.516362...
0.6674562
3
Cancels a workflow process so that it won't be picked up by the workflow process runner
public function cancelRun(WorkflowProcess $workflowProcess): WorkflowProcess { if ($workflowProcess->workflow_process_status_id != WorkflowProcessStatusEnum::PENDING) { throw new \Exception('Workflow run is not pending'); } $workflowProcess->workflow_process_status_id = WorkflowProcessStatusEnum::CANCELLED; $workflowProcess->save(); WorkflowProcessCancelled::dispatch($workflowProcess); return $workflowProcess; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cancel() {\n\t\t$this->workflowActivitySpecification->setState(WorkflowActivityStateEnum::CANCELLED);\n\n\t\tif ($this->runtimeContext)\n\t\t\t$this->workflowActivity->onCancel($this->runtimeContext);\n\t}", "public function cancelAction()\n\t{\n\t\t$this->processToken = null;\n\t\t$this->isNewPr...
[ "0.6984104", "0.6961449", "0.6172852", "0.6153964", "0.59690785", "0.59292114", "0.58900267", "0.58591056", "0.58591056", "0.58590376", "0.5851501", "0.58325887", "0.5798796", "0.5712857", "0.57083464", "0.5648475", "0.562798", "0.56178784", "0.56142676", "0.5536931", "0.5516...
0.65682745
2
Creates an input parameter for the workflow process
public function createInputToken(WorkflowProcess $workflowProcess, string $key, mixed $value): WorkflowProcessToken { /** @var WorkflowProcessToken $workflowProcessToken */ $workflowProcessToken = $workflowProcess->workflowProcessTokens()->create([ 'workflow_activity_id' => null, 'key' => $key, 'value' => $value, ]); return $workflowProcessToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function input(){\n $this->params['controller_name'] = $this->ask('Controller name');\n $this->params['crud_url'] = $this->ask('CRUD url');\n $this->params['model_name'] = $this->ask('Model name');\n $this->params['table_name'] = $this->ask('Table name');\n $this->params[...
[ "0.6093886", "0.5933045", "0.5871783", "0.57305837", "0.5612051", "0.55933046", "0.5582808", "0.5582326", "0.5578685", "0.55653155", "0.5554245", "0.55213326", "0.54995", "0.5466562", "0.5439213", "0.5435097", "0.5423461", "0.5368658", "0.5353774", "0.5289554", "0.52796257", ...
0.55830663
6
Creates an output token for the workflow process and identifies the activity that created it
public function createOutputToken(WorkflowProcess $workflowRun, WorkflowActivity $workflowActivity, string $key, mixed $value): WorkflowProcessToken { /** @var WorkflowProcessToken $workflowRunToken */ $workflowRunToken = $workflowRun->workflowProcessTokens()->create([ 'workflow_activity_id' => $workflowActivity->id, 'key' => $key, 'value' => $value, ]); return $workflowRunToken; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createTokenInput(){\n $this->generateToken();\n return '<input type=\"hidden\" name=\"_once\" value=\"' . $_SESSION['token'] . '\">';\n }", "public function createInputToken(WorkflowProcess $workflowProcess, string $key, mixed $value): WorkflowProcessToken\n {\n /** @va...
[ "0.542975", "0.5419562", "0.5270009", "0.52655", "0.5235124", "0.51977557", "0.51264775", "0.5118552", "0.5103477", "0.5085816", "0.50402534", "0.5003512", "0.4981819", "0.49771118", "0.49572334", "0.49068543", "0.48853388", "0.48708984", "0.48608392", "0.48572114", "0.485679...
0.7040817
0
CONSTRUCTOR DE LA CLASE
function __construct() { $this->load->database(); parent::__construct(); // if ($nPerId != null) { // $this->get_Persona($nPerId); // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private fun...
[ "0.8507677", "0.8507677", "0.8507677", "0.8507677", "0.8507677", "0.8507677", "0.8507677", "0.8507677", "0.8507677", "0.8507677", "0.8507677", "0.8507677", "0.8507677", "0.8507677", "0.8507677", "0.8507677", "0.8507677", "0.8492725", "0.84750974", "0.8442043", "0.84290546", ...
0.0
-1
Feedback Form Work Start
function create_extension_feedback_form($data) { if(isset($data['cid']) && !empty($data['cid'])) { $companyId = $data['cid']; } else { $company_data = get_company_data(); $companyId = $company_data['cid']; } $approval_data = array(); if(isset($data['approval_id']) && !empty($data['approval_id'])) { $approval_id = $data['approval_id']; $approval_data['id'] = $approval_id; unset($data['approval_id']); } if(isset($data['action_ts'])) { $approval_data['action_ts'] = $data['action_ts']; } if(isset($data['action_by'])) { $approval_data['update_by'] = $data['action_by']; } if(isset($data['action_comment'])) { $approval_data['comment'] = $data['action_comment']; } if(isset($data['action_ts'])) { $approval_data['action_ts'] = $data['action_ts']; } if(isset($data['action_by'])) { $approval_data['update_by'] = $data['action_by']; } if(isset($data['action'])) { $fa_action = $data['action']; // unset($data['action']); } $data['approval_data'] = $approval_data; $result_job = curl_post('/create_form_job',$data); if(($result_job['success']=='true') && count($result_job['data']['data'])) { $result_job = $result_job['data']['data']; return array("data"=>$result_job,"success"=>"true","error_code"=>"50311"); } else { return array("data"=>$result_job,"success"=>"false","error_code"=>"50311"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function request_feedback(){\n\t\t$response = $this->InteractModal->get_task();\n\t\tif(!empty($response)){\n\t\t\tforeach($response as $response_data){\n\t\t\t\t$task_id = $response_data['task_id'];\t\t\t\t\t\n\t\t\t\t$schedule_date = $response_data['schedule_date'];\n\t\t\t\t$listingdate = date_create($schedule_...
[ "0.6966915", "0.66410184", "0.6488144", "0.64774185", "0.6403396", "0.63338906", "0.6317475", "0.6301179", "0.6276843", "0.6265665", "0.62308264", "0.61838347", "0.6146841", "0.61089504", "0.60480404", "0.6044904", "0.60438067", "0.60324895", "0.6013715", "0.600308", "0.59471...
0.56038666
74
This method is used by Table Controller For getting the table data to show in the grid
public function getForDataTable() { //dd(config('module.questions.table')); return $this->query() ->leftjoin('question_type', 'question_type.id', '=', config('module.questions.table').'.type_id') ->select([ config('module.questions.table').'.id', 'question_type'.'.question_type as questionName', config('module.questions.table').'.question', config('module.questions.table').'.type_id', config('module.questions.table').'.status', config('module.questions.table').'.created_at', config('module.questions.table').'.updated_at', ]); // ->orderBy(config('module.questions.table').'.id', 'DESC'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTableData()\n\t{\n\t}", "private function getData(){\n\t\tdb::getAdapter();\n\t\t\n\t\t$counter=0;\n\t\t$arrayFieldQuery=array();\n\t\tforeach($this->fields as $field){\n\t\t\t$arrayFieldQuery[$field]=$this->types[$counter];\n\t\t\t$counter++;\n\t\t}\n\t\t\n\t\t$counter=0;\n\t\t$arrayFilters=a...
[ "0.7330705", "0.6983899", "0.6796706", "0.67576116", "0.67345977", "0.66976845", "0.66896564", "0.66741365", "0.6661632", "0.6618892", "0.65982866", "0.656992", "0.65472263", "0.6541248", "0.6530908", "0.65291995", "0.64944625", "0.6490355", "0.64822584", "0.64793426", "0.647...
0.6250035
49
For Creating the respective model in storage
public function create(array $input) { $questionbank = self::MODEL; $questionbank = new $questionbank(); $questionbank['type_id'] = $input['type_id']; $questionbank['question'] = $input['question']; $questionbank['status'] = isset($input['status']) ? 1 : 0; if(isset($input['choose_behaviour'])) { $questionbank['behaviour_id'] = $input['choose_behaviour']; } else { $questionbank['behaviour_id'] = NULL; } if ($questionbank->save()) { foreach($input['score'] as $key => $score) { // $score_array[] = $score; $score_array[] = [ 'question_id' => $questionbank->id, 'option' => $input['option'][$key], 'marks' => $score ]; } $addQuestionOption = DB::table('question_option')->insert($score_array); return true; } throw new GeneralException(trans('exceptions.backend.questionbanks.create_error')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createModel()\n {\n }", "protected function createModel()\n {\n $model = $this->info['model'];\n\n $modelName = basename(str_replace('\\\\', '/', $model));\n\n // make it singular\n $modelName = Str::singular($modelName);\n\n $this->info['modelName'] = ...
[ "0.729715", "0.7173731", "0.68675995", "0.6837995", "0.6753725", "0.67064375", "0.6703101", "0.6688337", "0.6659139", "0.66585976", "0.65401626", "0.6515649", "0.6515649", "0.6515649", "0.6515649", "0.6503444", "0.64827347", "0.6460578", "0.64599204", "0.6454711", "0.6446072"...
0.0
-1
For updating the respective Model in storage
public function update(Questionbank $questionbank, array $input) { //dd($input); $questionbank['type_id'] = $input['type_id']; $questionbank['question'] = $input['question']; $questionbank['status'] = isset($input['status']) ? 1 : 0; if(isset($input['choose_behaviour'])) { $questionbank['behaviour_id'] = $input['choose_behaviour']; } else if(empty($input['choose_behaviour'])) { $questionbank['behaviour_id'] = NULL; } if ($questionbank->update()) { if(isset($input['score_new'])) { foreach($input['score_new'] as $key => $score) { $score_array[] = [ 'question_id' => $questionbank->id, 'option' => $input['option_new'][$key], 'marks' => $score ]; } } //dd($score_array); $option_score_array = DB::table('question_option')->where('question_id',$questionbank['id'])->get()->ToArray(); if(isset($input['option_score_id'])) { foreach ($input['option_score_id'] as $key => $option_score_id) { $updateQuestionOption = DB::table('question_option')->where('id',$option_score_id)->update(array('option' => $input['option'][$key],'marks'=> $input['score'][$key])); } foreach ($option_score_array as $key => $value) { //dd($option_score_id); if(!in_array($value->id,$input['option_score_id'])) { $updateQuestionOption = QuestionOption::where('id',$value->id)->delete(); } } } /*$option_score_array = DB::table('question_option')->where('question_id',$questionbank['id'])->get()->ToArray(); foreach ($option_score_array as $key => $value) { foreach ($input['option_score_id'] as $key => $option_score_id) { if($option_score_id!= $value->id) { $updateQuestionOption = DB::table('question_option')->where('id',$option_score_id)->delete(); } } }*/ if(isset($score_array)) { $addQuestionOption = DB::table('question_option')->insert($score_array); } if(empty($input['option_score_id'])) { foreach ($option_score_array as $key => $value) { //dd($option_score_id); if(!in_array($value->id,$score_array)) { $updateQuestionOption = QuestionOption::where('id',$value->id)->delete(); } } } return true; } throw new GeneralException(trans('exceptions.backend.questionbanks.update_error')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function updateModel();", "function update(){\n\t\t$this->model->update();\n\t}", "public function testUpdate()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $newModel = $this->makeFactory();\n\n $this->json('PUT', static::ROUTE . '/' . $model->id,...
[ "0.7588688", "0.6954086", "0.6917589", "0.6863967", "0.6857025", "0.6789065", "0.67447174", "0.6724494", "0.670911", "0.66580915", "0.6423676", "0.6410221", "0.63919693", "0.63919693", "0.6386232", "0.6381652", "0.6376514", "0.63667554", "0.6351468", "0.6351468", "0.6341207",...
0.0
-1