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 |
|---|---|---|---|---|---|---|
1. split into sections based by '++' 2. trim whitespace 3. convert from markdown to html | function process_body($b)
{
$b = trim($b);
$b = Markdown::defaultTransform($b);
return $b;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function markdown_echappe_code($texte){\n\t$texte = echappe_retour($texte);\n\n\t// tous les paragraphes indentes par 4 espaces ou une tabulation\n\t// mais qui ne sont pas la suite d'une liste ou d'un blockquote\n\tpreg_match_all(\",(^( |\\t|\\* |\\+ |- |> |\\d+\\.)(.*)$(\\s*^(\\s+|\\t).*$)*?),Uims\",$texte,$m... | [
"0.64728683",
"0.63862425",
"0.63493717",
"0.63093585",
"0.62071997",
"0.6201429",
"0.61799085",
"0.6179032",
"0.61348057",
"0.6132788",
"0.612214",
"0.6068031",
"0.60059255",
"0.600144",
"0.590328",
"0.5895782",
"0.5816773",
"0.57817143",
"0.5768706",
"0.57620364",
"0.573048... | 0.0 | -1 |
perhaps not need read or write, just delete it | public function delete() {
if(!$this->shmId) {
$id = $this->shmopOpen($this->key, "w", $this->perm, $this->len);
if(!$id) {
return true;
}
return $this->shmopDelete($id);
}
$res = $this->shmopDelete($this->shmId);
$this->shmId = 0;
return $res;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function delete() ;",
"function delete() ;",
"function delete() {\t\t$nop = str_repeat(\" \", $this -> size);\n\t\t//10 caratteri per diecimila\n\t\tshmop_write($this -> id, $nop, 0);\n\n\t}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete... | [
"0.7332526",
"0.7332526",
"0.7018495",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.69408363",
"0.68721855",
"0.68672395",
... | 0.0 | -1 |
We must support class for now, as well for BC. | public function register(): array
{
return [
T_CLASS, T_INTERFACE,
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function getClass();",
"abstract public function getClass();",
"abstract public function getClass();",
"public function handledClass();",
"public function getClass() {}",
"public function getClass() {}",
"public function getClass() {}",
"function _class_check($str){\n }",
"abstr... | [
"0.67982733",
"0.6563958",
"0.6563958",
"0.63423765",
"0.62645596",
"0.6263832",
"0.6263832",
"0.619197",
"0.6139435",
"0.61368155",
"0.6133185",
"0.60739225",
"0.60680485",
"0.60680485",
"0.6009817",
"0.6009817",
"0.6009817",
"0.6001029",
"0.6001029",
"0.6001029",
"0.6001029... | 0.0 | -1 |
Sets a new recipient | public function setRecipient($recipient)
{
$this->recipient = $recipient;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setRecipient($recipient)\n {\n $this->recipient = (string) $recipient;\n }",
"public function set_recipient( $id ) {\n\t\t$this->recipient_id = $id;\n\t\tupdate_comment_meta( $this->id, APP_REPORTS_C_RECIPIENT_KEY, $id );\n\t}",
"public function set( $recipient ) {\n\t\tswitch ( ge... | [
"0.72820574",
"0.70719504",
"0.70146114",
"0.6980044",
"0.6980044",
"0.6901255",
"0.6819104",
"0.6755475",
"0.6706081",
"0.6652692",
"0.66099286",
"0.6608273",
"0.6607298",
"0.6542155",
"0.6510591",
"0.6496301",
"0.6476085",
"0.64749056",
"0.6413438",
"0.63399065",
"0.6330235... | 0.6212855 | 26 |
Sets a new referenceList | public function setReferenceList(\BankId\Merchant\Library\Schemas\xmlenc\ReferenceList $referenceList)
{
$this->referenceList = $referenceList;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setReference( &$ref ) {\n\t\t$this->items = $ref;\n\t\treturn $this;\n\t}",
"public function setReferences($val)\n {\n $this->_propDict[\"references\"] = $val;\n return $this;\n }",
"public function setRef($ref)\n {\n $this->_ref = $ref;\n }",
"public function setRef... | [
"0.7064151",
"0.648133",
"0.629079",
"0.6261805",
"0.6243607",
"0.6028462",
"0.60032797",
"0.59872985",
"0.5967157",
"0.59579647",
"0.5952996",
"0.5926461",
"0.58684665",
"0.58120185",
"0.5805464",
"0.578482",
"0.57765377",
"0.575696",
"0.5725198",
"0.5710388",
"0.5681185",
... | 0.6235894 | 5 |
Sets a new carriedKeyName | public function setCarriedKeyName($carriedKeyName)
{
$this->carriedKeyName = $carriedKeyName;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setKeyName($key);",
"public function setKeyName($name) {\n\t\t$this->_keyName = $name;\n\t\treturn $this;\n\t}",
"function setKey($value) {\r\n $this->key = $value;\r\n }",
"public function setKeyName($key)\n {\n $this->primaryKey = $key;\n }",
"public function setKey($k... | [
"0.734831",
"0.6852308",
"0.6691921",
"0.65402114",
"0.634829",
"0.6282515",
"0.6165894",
"0.61354953",
"0.61004263",
"0.60868824",
"0.6062092",
"0.6053365",
"0.60199213",
"0.60146976",
"0.5984959",
"0.5979147",
"0.5979147",
"0.5979147",
"0.59743774",
"0.59668815",
"0.5965148... | 0.6291089 | 5 |
Formats data into a single line to be written by the writer. | public function format($event)
{
$data = [];
$extra = [];
foreach ($event as $key => $val) {
if (isset($this->columns[$key])) {
$data[$this->columns[$key]] = $val;
} elseif ($key !== 'priority' && $key !== 'priorityName') {
$extra[$key] = $val;
}
}
if (!empty($event['extra'])) {
$data['extra'] = array_merge($event['extra'], $extra);
}
if (isset($data['extra'])) {
$data['extra'] = json_encode($data['extra']);
}
return $data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function WriteLine($data=null) \r\n{ \r\nreturn $this->Write($data . $this->NewLine); \r\n}",
"public function flush() {\n if (empty($this->_row) or empty($this->_row['line']['normal'])) {\n // Nothing to print - each line has to have at least number\n $this->_row = array();\n ... | [
"0.599774",
"0.55573726",
"0.5542278",
"0.54520386",
"0.5447151",
"0.5447151",
"0.5442433",
"0.53683704",
"0.53465074",
"0.5331797",
"0.52360344",
"0.5226155",
"0.52260035",
"0.5224999",
"0.5218989",
"0.517977",
"0.512787",
"0.5120833",
"0.51203376",
"0.51132894",
"0.51052654... | 0.0 | -1 |
protected $organization_id; protected $email_id; protected $password; protected $token; protected $token_auto_regenerate = TRUE; // You can disable auto generate invalid token. protected $guzzle; Constructor. $organization_id: Organisation ID. $email_id: Address mail. $password: Passe word. $token: token if you wont use a unique token. Manage Auth Tokens: | public function __construct($organization_id)
{
Parent::__construct();
// $this->guzzle = new \GuzzleHttp\Client();
// dd('$organization',$organization );
$this->organization_id = $organization_id;
// $this->email_id = Auth::user()->email;
// $this->password = Auth::user()->zoho_password;
// $this->token = (Auth::user()->zoho_token) ? Auth::user()->zoho_token : $this->GetToken($this->email_id, $this->password);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct()\n {\n $this->API_TOKEN = env('API_TOKEN');\n// $this->API_TOKEN = '9876543210'; //TODO REMOVE THIS LINE AND REMOVE ABOVE COMMENT\n }",
"private function setToken() {\n\n /* valid register */\n $request = $this->post('/v1/register', [\n '... | [
"0.6583158",
"0.6470143",
"0.641855",
"0.64160603",
"0.63310164",
"0.6313332",
"0.630198",
"0.6249095",
"0.61161524",
"0.61111426",
"0.6107594",
"0.61038476",
"0.6066762",
"0.60335946",
"0.6002458",
"0.60008997",
"0.59723395",
"0.5966116",
"0.59412235",
"0.5929867",
"0.590129... | 0.69774234 | 0 |
Gets lists of invoices. $filter_by: Filter invoices by any status or payment expected date. Allowed Values: Status.All, Status.Sent, Status.Draft, Status.OverDue, Status.Paid, Status.Void, Status.Unpaid, Status.PartiallyPaid, Status.Viewed and Date.PaymentExpectedDate. | public function index($filter_by=null)
{
// dd($filter_by);
$this->get(null, $filter_by);
// return ;
return ['data'=> $this->itemList];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDraftInvoicesList(InvoiceListingFilter $filter): Collection;",
"public function getUnpaidInvoicesList(InvoiceListingFilter $filter): Collection;",
"public function getOverdueInvoicesList(InvoiceListingFilter $filter): Collection;",
"public function invoices(Request $request)\n {\n ... | [
"0.64036673",
"0.6400779",
"0.63064176",
"0.595096",
"0.58964974",
"0.5864822",
"0.5854988",
"0.5846742",
"0.5817022",
"0.57967275",
"0.57755494",
"0.5739979",
"0.5720492",
"0.57097113",
"0.5693141",
"0.5691804",
"0.5669691",
"0.5610776",
"0.5608203",
"0.55502754",
"0.5529732... | 0.0 | -1 |
Get invoice by id. | public function get($item_id, $filter_by=null)
{
//dd('variable','variable' );
$result = "";
$endpoint = $this->ComposeFullUrl($item_id, $filter_by);
// echo 'URL: ' . $endpoint . '<br>';
try
{
$result = $this->guzzle->request('GET',$endpoint, ['verify' => false])->getBody();
if($this->isAuthtokenInvalidRegenerate($result))
{
$endpoint = $this->ComposeFullUrl($id, $filter_by);
// echo 'URL: ' . $endpoint . '<br>';
// Request using a new token
$result = $this->guzzle->request('GET',$endpoint, ['verify' => false])->getBody();
}
}
catch (Exception $e)
{
$result = 'Exception : ' . $e->getMessage() . "\n";
}
$response = json_decode($result);
if ($item_id) {
$this->item = $response->item;
return ['data'=> $response->item, 'code'=>$response->code, 'message'=>$response->message];
// return json_decode($result)->item;
}
// return json_decode($result);
$this->itemList = $response->items;
return ['data'=> $response->items, 'code'=>$response->code, 'message'=>$response->message];
// return ['data'=> $response->items, 'code'=>$response->code, 'message'=>$response->message];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getInvoice(string $id): Invoice;",
"public function get($id) {\n return Invoices::find($id);\n }",
"function get_invoice_by_id ( $id )\n {\n if (!is_int($id))\n {\n throw new TypeError('$id should be an integer');\n }\n\n $invoice = $this->dsQuery ('Invoice',1,0, arr... | [
"0.89482105",
"0.8581355",
"0.8532416",
"0.8440761",
"0.82369214",
"0.8125492",
"0.7909596",
"0.77483016",
"0.77054983",
"0.7678783",
"0.766735",
"0.7654497",
"0.7530551",
"0.75001997",
"0.749735",
"0.749517",
"0.74112636",
"0.7384472",
"0.7332559",
"0.7244136",
"0.72000736",... | 0.0 | -1 |
Compose URL to Post or PUT data. | private function ComposePostPutURL($id=null, $ignore_auto_number_generation=false, $send=false)
{
$url = $url = $this->URL_BOOKS_ZOHO_ENDPOINT . $this->entity;
if($id)
{
$url .= "/$id/";
}
return $url . '?organization_id=' . $this->organization_id . '&ignore_auto_number_generation=' . $ignore_auto_number_generation . '&send=' . $send .'&authtoken=' . $this->token ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testUpdateUrlUsingPOST()\n {\n }",
"function post_to_url($url, $data) {\r\n\t\t$fields = '';\r\n\t\tforeach($data as $key => $value) {\r\n\t\t\t$fields .= $key . '=' . $value . '&';\r\n\t\t}\r\n \r\n\t\trtrim($fields, '&');\r\n\t\t$post = curl_init();\r\n \r\n\t\t curl_setopt($post, CURLOPT... | [
"0.645744",
"0.6062682",
"0.60161537",
"0.5971292",
"0.59617406",
"0.59534997",
"0.59384656",
"0.58469176",
"0.5735287",
"0.5722455",
"0.57156706",
"0.5712839",
"0.56946176",
"0.567975",
"0.5665895",
"0.5622535",
"0.5616676",
"0.56105953",
"0.5590425",
"0.5574939",
"0.5561311... | 0.0 | -1 |
only call this if the upper limit has already been checked. | function getNumericalSession($sessionStart, $timenow, $number){
if($timenow >= $sessionStart){
return getNumericalSession($sessionStart,$timenow - INTERVAL_I, $number+1);
}else{
return $number;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _checkMaxLimt()\r\n {\r\n if ($this->data[$this->name]['max_limit'] >= $this->data[$this->name]['min_limit']) {\r\n return true;\r\n }\r\n return false;\r\n }",
"private function checkBounds()\n {\n $this->page = max($this->page, 0);\n $this->page =... | [
"0.68971336",
"0.679376",
"0.67570704",
"0.6505886",
"0.62577015",
"0.60317695",
"0.6012105",
"0.59300095",
"0.592599",
"0.5891677",
"0.5887585",
"0.5870095",
"0.5783856",
"0.5773334",
"0.56854725",
"0.56521535",
"0.5614473",
"0.56078064",
"0.55763406",
"0.55708796",
"0.55649... | 0.0 | -1 |
Populates Frontier with passed Resource. | public function populateFrontier(Resource $resource, $priority = FrontierInterface::PRIORITY_NORMAL, $force = false)
{
Assertion::inArray($priority, [FrontierInterface::PRIORITY_NORMAL, FrontierInterface::PRIORITY_HIGH]);
Assertion::boolean($force);
if ($this->isScheduled($resource) && !$force) {
$this->getLogger()->notice("Url {$resource->getUrl()} is already scheduled");
return;
}
if ($this->isVisited($resource) && !$force && !$this->canContainLinksToNewResources($resource)) {
$this->getLogger()->notice("Url {$resource->getUrl()} is already visited");
return;
}
$this->getFrontier()->populate($resource, $priority);
$this->markScheduled($resource);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract protected function initResource();",
"protected function _init_resource()\n\t{\n\t\t$resource_id = $this->request->param('id');\n\t\tif (!$resource_id)\n\t\t{\n\t\t\t$this->session->set('error', 'Invalid resource id');\n\t\t\t$this->request->redirect('/admin/resource');\n\t\t}\n\t\t\n\t\t// check if res... | [
"0.5990363",
"0.57560897",
"0.56593776",
"0.56284666",
"0.56011945",
"0.558179",
"0.55703336",
"0.5518375",
"0.5518375",
"0.5518375",
"0.54844224",
"0.5442545",
"0.54154545",
"0.5414371",
"0.5414371",
"0.5414371",
"0.5414371",
"0.5414371",
"0.5337583",
"0.5317926",
"0.5305327... | 0.50635964 | 36 |
Clear filter of visited Resources | public function clearVisited()
{
$this->getFilter()->clear($this->getProject() . 'visited');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function removeAllFilters();",
"public function resetFilters() {\n $this->filters = array();\n }",
"public function removeFilters();",
"public function reset()\n\t{\n\t\tupdate_option($this->filterName, array());\n\t}",
"public function reset() : void\n {\n\n // load the filters ... | [
"0.71913314",
"0.71107495",
"0.6940135",
"0.6519467",
"0.6508074",
"0.6449197",
"0.64328986",
"0.638552",
"0.63595414",
"0.6312196",
"0.62840015",
"0.62813926",
"0.6274459",
"0.6237364",
"0.62206644",
"0.6212543",
"0.616541",
"0.6156031",
"0.6141826",
"0.6118417",
"0.6109679"... | 0.77535236 | 0 |
Clear filter of scheduled Resources | public function clearScheduled()
{
$this->getFilter()->clear($this->getProject() . 'scheduled');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function removeFilters();",
"public function resetFilters()\n {\n unset($this->options['AmazonOrderId']);\n unset($this->options['FinancialEventGroupId']);\n $this->resetTimeLimits();\n }",
"public function removeAllFilters();",
"public function resetFilters() {\n $th... | [
"0.6856936",
"0.67182255",
"0.6621482",
"0.6518339",
"0.6444722",
"0.63463163",
"0.62133527",
"0.6200486",
"0.6138635",
"0.60996115",
"0.602172",
"0.59422934",
"0.59174",
"0.59133786",
"0.582702",
"0.5820791",
"0.57783026",
"0.5776156",
"0.57720166",
"0.57356787",
"0.57250774... | 0.80476165 | 0 |
Clear information about successfully scraped Resources | public function clearSuccessful()
{
$this->getFilter()->clear($this->getProject() . 'parsed');
$this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_SUCCESS);
$this->getLogger()->debug('Cleared "visited" and "scheduled" filters');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function clearResults() {\n\t\t$this->error = '';\n\t\t$this->status_org = false;\n\t\t$this->status_new = false;\n\t}",
"public function reset() {\n $this->customurlscount = 0;\n }",
"public function clear()\n {\n $this->links = [];\n }",
"protected function clear()\n {\n... | [
"0.6807971",
"0.67776424",
"0.6368299",
"0.63516873",
"0.6311707",
"0.62992465",
"0.61869085",
"0.61595553",
"0.61553645",
"0.6148001",
"0.61352545",
"0.60948133",
"0.60750455",
"0.6059821",
"0.6035029",
"0.602861",
"0.6008798",
"0.5999856",
"0.59837186",
"0.59738886",
"0.596... | 0.6072769 | 13 |
Clear information about failed Resources | public function clearFailed()
{
$this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_FETCH_FAILED);
$this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_PARSE_ERROR);
$this->getLogger()->debug('Cleared "failed" and "not-parsed" filters');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function clearResources()\n {\n AM_Tools::clearContent($this->_getIssueHelpPage()->getThumbnailPresetType(), $this->_getIssueHelpPage()->id_issue);\n AM_Tools::clearResizerCache($this->_getIssueHelpPage()->getThumbnailPresetType(), $this->_getIssueHelpPage()->id_issue);\n }",
"function... | [
"0.6565199",
"0.628577",
"0.62834895",
"0.6246545",
"0.6156242",
"0.6129662",
"0.60088646",
"0.6005085",
"0.5969712",
"0.5968586",
"0.59132165",
"0.5900586",
"0.58962953",
"0.58950144",
"0.58742803",
"0.5871748",
"0.58457834",
"0.58330554",
"0.5825198",
"0.5788923",
"0.574580... | 0.6658006 | 0 |
Instantiates a new instance of this class. This is a factory method that returns a new instance of this class. The factory should pass any needed dependencies into the constructor of this class, but not the container itself. Every call to this method must return a new instance of this class; that is, it may not implement a singleton. | public static function create(ContainerInterface $container)
{
return new static($container->get('some-value'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function factory()\n {\n return new self;\n }",
"public static function create() {\n\t\treturn new self();\n\t}",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public stat... | [
"0.776875",
"0.7491823",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0.7480925",
"0... | 0.0 | -1 |
May return the TSFE or not (e.g. in BE mode), thus the nullable return type. | private function getTypoScriptFrontendController(): ?TypoScriptFrontendController
{
return $GLOBALS['TSFE'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static function getTSFE() {}",
"public function getNullable()\n {\n return $this->_nullable;\n }",
"public function getStrictEnforcement(): ?bool {\n $val = $this->getBackingStore()->get('strictEnforcement');\n if (is_null($val) || is_bool($val)) {\n return $val;\n... | [
"0.66490185",
"0.6390941",
"0.6346903",
"0.6306117",
"0.61540735",
"0.6134865",
"0.61342126",
"0.6099988",
"0.60949653",
"0.6000258",
"0.5993642",
"0.5932725",
"0.59251785",
"0.5808151",
"0.58034396",
"0.574196",
"0.57234967",
"0.5714253",
"0.5698978",
"0.56805646",
"0.567778... | 0.0 | -1 |
Run the database seeds. | public function run()
{
$categories = [
['parent_id' => 0, 'c_group' => 0, 'name' => 'Gear', 'slug' => 'gear', 'sortorder' => 1, 'active' => 1],
['parent_id' => 0, 'c_group' => 0, 'name' => 'Parts', 'slug' => 'parts', 'sortorder' => 2, 'active' => 1],
['parent_id' => 0, 'c_group' => 0, 'name' => 'Casual', 'slug' => 'casual', 'sortorder' => 3, 'active' => 1],
['parent_id' => 0, 'c_group' => 0, 'name' => 'News', 'slug' => 'news', 'sortorder' => 4, 'active' => 1],
['parent_id' => 1, 'c_group' => 1, 'name' => 'Clothes', 'slug' => 'clothes', 'sortorder' => 1, 'active' => 1],
['parent_id' => 1, 'c_group' => 1, 'name' => 'Helmets', 'slug' => 'helmets', 'sortorder' => 2, 'active' => 1],
['parent_id' => 1, 'c_group' => 1, 'name' => 'Boots', 'slug' => 'boots', 'sortorder' => 3, 'active' => 1],
['parent_id' => 1, 'c_group' => 2, 'name' => 'Suspension', 'slug' => 'suspension', 'sortorder' => 1, 'active' => 1],
['parent_id' => 1, 'c_group' => 2, 'name' => 'Maintenance', 'slug' => 'maintenance', 'sortorder' => 2, 'active' => 1],
['parent_id' => 1, 'c_group' => 2, 'name' => 'Oils', 'slug' => 'oils', 'sortorder' => 3, 'active' => 1],
['parent_id' => 1, 'c_group' => 3, 'name' => 'T-Sirts', 'slug' => 'tshirts', 'sortorder' => 1, 'active' => 1],
['parent_id' => 1, 'c_group' => 3, 'name' => 'Caps', 'slug' => 'caps', 'sortorder' => 2, 'active' => 1],
['parent_id' => 5, 'c_group' => 1, 'name' => 'Jerseys', 'slug' => 'jerseys', 'sortorder' => 1, 'active' => 1],
['parent_id' => 5, 'c_group' => 1, 'name' => 'Pants', 'slug' => 'pants', 'sortorder' => 2, 'active' => 1],
['parent_id' => 6, 'c_group' => 1, 'name' => 'Adults', 'slug' => 'adults-helmets', 'sortorder' => 1, 'active' => 1],
['parent_id' => 6, 'c_group' => 1, 'name' => 'Kids', 'slug' => 'kids-helmets', 'sortorder' => 2, 'active' => 1],
['parent_id' => 7, 'c_group' => 1, 'name' => 'Adults', 'slug' => 'adults-boots', 'sortorder' => 1, 'active' => 1],
['parent_id' => 7, 'c_group' => 1, 'name' => 'Kids', 'slug' => 'kids-boots', 'sortorder' => 2, 'active' => 1],
['parent_id' => 8, 'c_group' => 2, 'name' => 'Fork', 'slug' => 'fork-parts', 'sortorder' => 1, 'active' => 1],
['parent_id' => 8, 'c_group' => 2, 'name' => 'Shock', 'slug' => 'shock-parts', 'sortorder' => 2, 'active' => 1],
['parent_id' => 9, 'c_group' => 2, 'name' => 'Airfilter', 'slug' => 'airfilter', 'sortorder' => 1, 'active' => 1],
['parent_id' => 9, 'c_group' => 2, 'name' => 'Oilfilter', 'slug' => 'oilfilter', 'sortorder' => 2, 'active' => 1],
['parent_id' => 9, 'c_group' => 2, 'name' => 'Brakepads', 'slug' => 'brakepads', 'sortorder' => 3, 'active' => 1],
['parent_id' => 10, 'c_group' => 2, 'name' => 'Engine Oils', 'slug' => 'engine-oils', 'sortorder' => 1, 'active' => 1],
['parent_id' => 10, 'c_group' => 2, 'name' => 'Suspension Oils', 'slug' => 'suspension-oils', 'sortorder' => 2, 'active' => 1],
['parent_id' => 10, 'c_group' => 2, 'name' => 'Maintenance', 'slug' => 'bike-maintenance', 'sortorder' => 3, 'active' => 1],
];
DB::table('categories')->insert($categories);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact... | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.78414... | 0.0 | -1 |
Initialize and register all of the screens. | public static function init() {
static::$apis = [
'content' => new Content_API(),
'contributors' => new Contributors_API(),
'dashboards' => new Dashboards_API(),
'options' => new Options_API(),
'post_types' => new Post_Types_API(),
'quick_cards' => new Quick_Cards_API(),
];
add_action( 'rest_api_init', [__CLASS__, 'register_rest_routes'] );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function initScreens()\n\t{\n\t\tadd_action('admin_menu', array($this->Main, 'screensHandler'));\n\n\t\t// Set up handler for admin bar registration (100 = put menu item at the end of standard items)\n\t\tadd_action('admin_bar_menu', array($this->Main, 'adminBarRegister'), 100);\n\t}",
"public function... | [
"0.75785637",
"0.6443326",
"0.6224997",
"0.6098496",
"0.598416",
"0.5869184",
"0.5835527",
"0.5799894",
"0.57730573",
"0.57526785",
"0.5747028",
"0.57194054",
"0.5713494",
"0.57098883",
"0.56878674",
"0.5687003",
"0.56636167",
"0.5652091",
"0.56279916",
"0.5623306",
"0.561112... | 0.52837425 | 62 |
Register all rest API routes | public static function register_rest_routes() {
foreach (static::$apis as $api) {
$api->register_rest_route();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function register_routes() {\n $namespace = 'junglehunter/v1';\n register_rest_route(\n $namespace,\n '/all',\n array(\n 'methods' => 'GET',\n 'callback' => array($this, 'junglehunter_get_all')\n )\n );\n }",
... | [
"0.84524643",
"0.8186029",
"0.81378144",
"0.8137637",
"0.81153286",
"0.80908096",
"0.8053311",
"0.80347514",
"0.79807097",
"0.7979295",
"0.79330146",
"0.79285026",
"0.79153883",
"0.7875627",
"0.78228325",
"0.77830195",
"0.7780726",
"0.7765854",
"0.77462834",
"0.77395916",
"0.... | 0.9180096 | 0 |
/ Function: checkEmail Author: Emily Kring Purpose: Used to validate email addresses to ensure format and domain requirements are met. Validate an email address | function validate_email($email, $domainCheck = false)
{
if (!empty($email))
{
if (preg_match('/^[a-zA-Z0-9\._-]+\@(\[?)[a-zA-Z0-9\-\.]+'.
'\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/', $email)) {
if ($domainCheck && function_exists('checkdnsrr')) {
list (, $domain) = explode('@', $email);
if (checkdnsrr($domain, 'MX') || checkdnsrr($domain, 'A')) {
return true;
}
return false;
}
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function check_email_address($email) {\n # Check @ symbol and lengths\n if (!ereg(\"^[^@]{1,64}@[^@]{1,255}$\", $email)) {\n return false;\n }\n\n # Split Email Address into Sections\n $email_array = explode(\"@\", $email);\n $local_ar... | [
"0.8301479",
"0.8127754",
"0.80997723",
"0.808551",
"0.8056526",
"0.8020967",
"0.7948242",
"0.7946681",
"0.79420173",
"0.7937563",
"0.78888994",
"0.7815257",
"0.77782816",
"0.77118856",
"0.77063257",
"0.7654788",
"0.7647616",
"0.7596628",
"0.7588071",
"0.75873363",
"0.7587067... | 0.8085628 | 3 |
/ Function: validate_password Author: Paul Gerndt Purpose: Used to validate passwords to ensure minimum length and content requirements are met. Created: 20150216 | function validate_password($candidate)
{
if (!empty($candidate))
{
// Declare and Initialize Local Variables
$CritCount = 0; //Tabulator for keeping track of number of criteria matched
/*
Regular Expression Example $\S*(?=\S{8,})(?=\S*[a-z])(?=\S*[A-Z])(?=\S*[\d])(?=\S*[\W])\S*$
$ = beginning of string
\S* = any set of characters
(?=\S{8,}) = of at least length 8
(?=\S*[a-z]) = containing at least one lowercase letter
(?=\S*[A-Z]) = and at least one uppercase letter
(?=\S*[\d]) = and at least one number
(?=\S*[\W]) = and at least a special character (non-word characters)
$ = end of the string
*/
// Test for each requirement
if (strlen($candidate) >= 8) $CritCount = $CritCount + 10; // Value of 10 for minimum length
if (preg_match('/[a-z]/', $candidate)) $CritCount = $CritCount + 1; //Contains lower case a-z
if (preg_match('/[A-Z]/', $candidate)) $CritCount = $CritCount + 1; //Contains UPPER case A-Z
if (preg_match('/[\d]/', $candidate)) $CritCount = $CritCount + 1; //Contains at least one numeric digit
if (preg_match('/[^a-zA-Z\d]/', $candidate)) $CritCount = $CritCount + 1; //Contains at least one special Character (!@#$%^&*()-_, etc.)
if ($CritCount > 12) //Meets minimum length, plus 3 additional criteria
{
return TRUE;
}
else
{
return FALSE;
}
}
else
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function isValidPassword($password)\n{\n $len = strlen($password);\n if ($len < MIN_PASSWORD) {\n return false;\n }\n return true;\n}",
"function checkLength($password)\n{\n return strlen($password) >= MIN_PASSWORD;\n}",
"function validate_password($password)\n {\n $reg1='/[A-Z]... | [
"0.8269009",
"0.81870234",
"0.802889",
"0.7972113",
"0.79659915",
"0.7917638",
"0.7793911",
"0.777222",
"0.7694906",
"0.7689898",
"0.76659703",
"0.76316524",
"0.763059",
"0.7625741",
"0.75845385",
"0.756321",
"0.75374347",
"0.7505892",
"0.7492226",
"0.74788404",
"0.7439981",
... | 0.79988354 | 3 |
This method gets invoked after the test method is invoked and regard less of its outcome, after the tearDown() call has run. | public function afterTest(TestCase $t) {
// Empty
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected function tearDown() {}",
"protected f... | [
"0.84019583",
"0.84019583",
"0.84019583",
"0.8401803",
"0.8401803",
"0.8401803",
"0.8401803",
"0.8401361",
"0.8401361",
"0.8401361",
"0.8401361",
"0.8401361",
"0.8401361",
"0.8401361",
"0.8363948",
"0.82749844",
"0.8273428",
"0.8273428",
"0.8273428",
"0.82713103",
"0.82702863... | 0.0 | -1 |
Create the migration file. | private function create_migration(){
$file = $this->path('migrations') . date('Y_m_d_His') . '_create_slender_table.php';
$this->write_file($file, static::$migrationCode);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createMigrationFile()\n {\n $fieldObjects = $this->getFields();\n\n if (@$fieldObjects['id']) {\n unset($fieldObjects['id']);\n }\n\n if (@$fieldObjects['created_at'] && @$fieldObjects['updated_at']) {\n $this->addGenericCall((new Base())->tim... | [
"0.8154367",
"0.78457505",
"0.7308281",
"0.73058426",
"0.7291852",
"0.7275333",
"0.7198678",
"0.71922076",
"0.7006299",
"0.69888926",
"0.6978014",
"0.6830445",
"0.66938156",
"0.66419494",
"0.6626336",
"0.6571437",
"0.6570803",
"0.6546038",
"0.6533373",
"0.6480715",
"0.6476664... | 0.8150878 | 1 |
Console output header message. | private function _header($text){
echo '[*] ' . $text . PHP_EOL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Header()\n\t{\n\t\t$this->cabecera_esp();\n\t\t$this->Ln();\n\t}",
"function sendHeader() {\n\t\t$this->console_text('###############################################################################');\n\t\t$this->console_text(' Aseco v' . ASECO_VERSION . ' running on {1}:{2}', $this->server->ip, $this-... | [
"0.74785197",
"0.7464337",
"0.74478954",
"0.7406683",
"0.7382785",
"0.72371876",
"0.7205562",
"0.7204328",
"0.7184734",
"0.7147355",
"0.71398515",
"0.71267664",
"0.7080715",
"0.70668525",
"0.69408715",
"0.6938954",
"0.6893825",
"0.6870148",
"0.6866674",
"0.6866494",
"0.682976... | 0.7204728 | 7 |
Console output sub header message. | private function _subheader($text){
echo '[-] ' . $text . PHP_EOL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function subheader($title)\n\t{\n\t\tstatic::stdout\n\t\t\t(\n\t\t\t\t' === '.$title.' '.\\str_repeat('=', \n\t\t\t\tstatic::$screenwidth-6-\\strlen($title)).PHP_EOL.PHP_EOL\n\t\t\t);\n\t}",
"private function printHeader()\n {\n $this->printer->println('Test-Flight %s', Constants::VERSION... | [
"0.6983904",
"0.69063276",
"0.678193",
"0.67444533",
"0.6739505",
"0.67330635",
"0.66642505",
"0.6622341",
"0.6617553",
"0.6534072",
"0.64677656",
"0.64366525",
"0.6414801",
"0.63901216",
"0.6290614",
"0.6288626",
"0.62877136",
"0.6283677",
"0.627967",
"0.62146926",
"0.619945... | 0.7573624 | 0 |
Console output warning message. (You don't want to see these!) | private function _warning($text){
echo '[# WARNING] ' . $text . PHP_EOL;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function warning()\n {\n return $this->warn(\"You have no commands to run !\");\n }",
"public static function warning()\n {\n static::returnCode(static::CODE_WARNING);\n }",
"public function showWarnings(): void\n {\n $this->executeLog('show warnings');\n }",
"functio... | [
"0.7784434",
"0.77052283",
"0.7610558",
"0.7465206",
"0.7375183",
"0.732393",
"0.7212717",
"0.7126498",
"0.70685446",
"0.7015538",
"0.69874",
"0.6972942",
"0.6902763",
"0.6889078",
"0.6865816",
"0.6825296",
"0.6824176",
"0.67983",
"0.6726387",
"0.67246574",
"0.67184603",
"0... | 0.77359724 | 1 |
Return the Laravel path to the specified folder. | private function path($dir = ''){
return ($dir !== '') ? (path('app') . "$dir/") : path('app');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function folderPath(){\n\t\treturn DATA.static::$folderPrefix.'files/';\n\t}",
"public function getPath()\n {\n return $this->_folder . DIRECTORY_SEPARATOR . $this->_name;\n }",
"public function getPath($folder = '')\n {\n return $this->getConfig('paths.plugins') . $this->g... | [
"0.70826906",
"0.68311024",
"0.67655706",
"0.672554",
"0.66606694",
"0.66476625",
"0.6616487",
"0.65929943",
"0.6575494",
"0.6532611",
"0.65156287",
"0.65153545",
"0.6505148",
"0.6502707",
"0.6459132",
"0.6458075",
"0.6437229",
"0.6437229",
"0.64347744",
"0.6373335",
"0.63722... | 0.63559127 | 22 |
Write a file to disk. | private function write_file($filePath, $contents, $overwrite = false){
if($overwrite === false && File::exists($filePath)){
_warning('' . $filePath . ' already exists!');
return;
}
File::mkdir(dirname($filePath));
if(File::put($filePath, $contents) === false){
_warning('Something went wrong writing the file ' . $filePath);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function write($filename);",
"public function write($filename);",
"public function writeFile($path, $data);",
"public function write(string $file, string $content): void;",
"public static function write($content, $file)\n {\n file_put_contents($file, $content);\n }",
"abstract public ... | [
"0.71153945",
"0.71153945",
"0.69484586",
"0.66692567",
"0.6654563",
"0.66483176",
"0.6641021",
"0.65406966",
"0.6497568",
"0.6494745",
"0.64713347",
"0.6443511",
"0.6376101",
"0.63478756",
"0.63253325",
"0.6251404",
"0.61443347",
"0.6133612",
"0.6080398",
"0.6070722",
"0.604... | 0.6332469 | 14 |
Make a grid builder. | protected function grid()
{
$grid = new Grid(new Community);
$grid->column('id', __('Id'));
$grid->column('permalink', __('Permalink'));
$grid->column('eyecatch_path', __('Eyecatch path'));
$grid->column('name', __('Name'));
$grid->column('pref', __('Pref'));
$grid->column('information', __('Information'));
$grid->column('image1_path', __('Image1 path'));
$grid->column('image2_path', __('Image2 path'));
$grid->column('image3_path', __('Image3 path'));
$grid->column('video1_link', __('Video1 link'));
$grid->column('video2_link', __('Video2 link'));
$grid->column('video3_link', __('Video3 link'));
$grid->column('calendar', __('calendar'));
$grid->column('message_image_path', __('Message image path'));
$grid->column('message', __('Message'));
$grid->column('contact', __('Contact'));
$grid->column('facebook_link', __('Facebook link'));
$grid->column('instagram_link', __('Instagram link'));
$grid->column('website_link', __('Website link'));
$grid->column('created_at', __('Created at'));
$grid->column('updated_at', __('Updated at'));
return $grid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function grid()\n {\n $grid = new Grid(new Formulario());\n\n $grid->disableExport();\n\n $grid->column('name', __('Nombre'));\n $grid->column('description', __('Descripción'));\n $grid->column('go_to_formulario', 'Continuar a formulario')->display(function ($formId)... | [
"0.72541326",
"0.7218252",
"0.7064843",
"0.70040804",
"0.6995721",
"0.69847125",
"0.695367",
"0.6928443",
"0.6927314",
"0.69256824",
"0.6923453",
"0.69233567",
"0.6922796",
"0.6907988",
"0.6889554",
"0.6888196",
"0.6878719",
"0.6845261",
"0.68254143",
"0.6818076",
"0.6810526"... | 0.0 | -1 |
Make a show builder. | protected function detail($id)
{
$show = new Show(Community::findOrFail($id));
$show->field('id', __('Id'));
$show->field('permalink', __('Permalink'));
$show->field('eyecatch_path', __('Eyecatch path'));
$show->field('name', __('Name'));
$show->field('pref', __('Pref'));
$show->field('information', __('Information'));
$show->field('image1_path', __('Image1 path'));
$show->field('image2_path', __('Image2 path'));
$show->field('image3_path', __('Image3 path'));
$show->field('video1_link', __('Video1 link'));
$show->field('video2_link', __('Video2 link'));
$show->field('video3_link', __('Video3 link'));
$show->field('calendar', __('calendar'));
$show->field('message_image_path', __('Message image path'));
$show->field('message', __('Message'));
$show->field('contact', __('Contact'));
$show->field('facebook_link', __('Facebook link'));
$show->field('instagram_link', __('Instagram link'));
$show->field('website_link', __('Website link'));
$show->field('created_at', __('Created at'));
$show->field('updated_at', __('Updated at'));
return $show;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract function buildShowLayout(): void;",
"public function buildShowLayout()\n {\n $this->addSection('Section', function(ShowLayoutSection $section) {\n $section->addColumn(6, function(ShowLayoutColumn $column) {\n $column->withSingleField('id');\n $column->w... | [
"0.65263224",
"0.6506714",
"0.6487851",
"0.64461046",
"0.6348537",
"0.6289141",
"0.6258667",
"0.6258667",
"0.6258667",
"0.6258667",
"0.6252768",
"0.6236633",
"0.6236633",
"0.6236633",
"0.6230517",
"0.62238616",
"0.6219512",
"0.6176135",
"0.6117357",
"0.6117357",
"0.6117357",
... | 0.0 | -1 |
Make a form builder. | protected function form()
{
$form = new Form(new Community);
$form->text('permalink', __('Permalink'));
$form->text('eyecatch_path', __('Eyecatch path'));
$form->text('name', __('Name'));
$form->text('pref', __('Pref'));
$form->text('information', __('Information'));
$form->text('image1_path', __('Image1 path'));
$form->text('image2_path', __('Image2 path'));
$form->text('image3_path', __('Image3 path'));
$form->text('video1_link', __('Video1 link'));
$form->text('video2_link', __('Video2 link'));
$form->text('video3_link', __('Video3 link'));
$form->text('calendar', __('calendar'));
$form->text('message_image_path', __('Message image path'));
$form->text('message', __('Message'));
$form->text('contact', __('Contact'));
$form->text('facebook_link', __('Facebook link'));
$form->text('instagram_link', __('Instagram link'));
$form->text('website_link', __('Website link'));
return $form;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function form_builder()\n {\n // ToDo run checks when form is being created, please.\n// if(!empty($this->check())):\n// throw new ValidationError(checks_html_output($this->check()));\n//\n// endif;\n\n return new form\\ModelForm($this, $this->_field_values());\n ... | [
"0.7876884",
"0.7563207",
"0.7518167",
"0.7356229",
"0.7287756",
"0.7230112",
"0.71921307",
"0.7176219",
"0.71556574",
"0.71318495",
"0.7072142",
"0.70605636",
"0.70538306",
"0.70511967",
"0.70281005",
"0.70109546",
"0.700963",
"0.7000893",
"0.699135",
"0.6986861",
"0.6979974... | 0.0 | -1 |
Display a listing of the resource. GET /chats | public function index()
{
$pusher = $this->pusher;
$this->pusher->trigger('demoChannel', 'userNewMessage', ['message'=>'hello world']);
if(Input::has('get')) {
if(Input::get('get')=='channels') {
return json_decode($this->pusher->get('/channels/demoChannel/users'));
}
}
return View::make('chats.index', compact('pusher'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getChats()\n {\n return $this->doRequest('GET', 'chats', []);\n }",
"public function index()\n {\n $services = $this->client->chat->v2->services->read();\n $channels = array();\n $userChannels = array();\n if ($services) {\n $channels = $this... | [
"0.8202715",
"0.74284804",
"0.7355493",
"0.7325189",
"0.72068435",
"0.705108",
"0.6978977",
"0.694375",
"0.66639435",
"0.6651567",
"0.6535031",
"0.6505062",
"0.6502711",
"0.64691824",
"0.6392978",
"0.6379457",
"0.63554376",
"0.62587124",
"0.6220791",
"0.61849946",
"0.6174374"... | 0.6524159 | 11 |
Show the form for creating a new resource. GET /chats/create | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function newAction()\n {\n $entity = new Achats();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AEDashBundle:Achats:index.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public func... | [
"0.7042078",
"0.6956043",
"0.68015903",
"0.67729974",
"0.6741159",
"0.6576497",
"0.6568198",
"0.65311056",
"0.6437974",
"0.64369047",
"0.6397384",
"0.63417786",
"0.63267577",
"0.6317097",
"0.6303244",
"0.6285088",
"0.6275685",
"0.6275226",
"0.62641895",
"0.6247726",
"0.623320... | 0.0 | -1 |
Store a newly created resource in storage. POST /chats | public function store()
{
$this->pusher->trigger(Input::get('channel_name'), 'userNewMessage', array('username'=>Sentry::getUser()->username), Input::get('socket_id'));
$this->pusher->presence_auth(Input::get('channel_name'),Input::get('socket_id'), '123456', array('username'=>Sentry::getUser()->username));
return $this->pusher->get('/channels/demoChannel');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store(StoreChatRequest $request)\n {\n $from = $request->user()->id;\n $to = intval($request->input('to'));\n\n $chat = Chat::create([\n 'from' => $from,\n 'to' => $to,\n 'to_name' => $request->input('to_name'),\n 'message' => $req... | [
"0.654061",
"0.6455073",
"0.64084196",
"0.6346593",
"0.6337734",
"0.63215244",
"0.6218274",
"0.61983913",
"0.6195074",
"0.615334",
"0.6147825",
"0.61340994",
"0.60901433",
"0.60754323",
"0.6059505",
"0.6044388",
"0.6028299",
"0.6004514",
"0.5942181",
"0.5933102",
"0.59243727"... | 0.6008131 | 17 |
echo "mensaje desde el controlador"; | public function index()
{
$data["page_id"] = 1;
$data["page_tag"] = "Articulos";
$data["page_title"] = "Articulos - Yo contribuyo";
$data["page_name"] = "articulos";
$data["nav_articulos"] = "active";
$data["script"] = "Articulo/articulos.js";
$this->getView("Articulo/articulos", $data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function mostrar()\n {\n echo $this -> mensaje;\n }",
"public function hablar($mensaje){\n echo $mensaje; \n }",
"public function correu(){\n echo \" correu !\";\n }",
"public function locomover()\n {\n echo \"<p>Voando</p>\";\n ... | [
"0.77207005",
"0.7615034",
"0.7232078",
"0.7002965",
"0.68309116",
"0.6753759",
"0.67343426",
"0.6728354",
"0.6681412",
"0.6647356",
"0.65659755",
"0.65161276",
"0.64989996",
"0.6440048",
"0.6428877",
"0.6428027",
"0.6401578",
"0.6382192",
"0.6358726",
"0.6355493",
"0.6331544... | 0.0 | -1 |
Parses yaml file with caching. Uses if available | public static function parse ( $file )
{
$file_path = XT_PROJECT_DIR .'/'. $file;
$cached_path = XT_PROJECT_DIR .'/cache/'. $file;
// Check if YAML file was updated since the last caching
if ( !file_exists ( $cached_path ) ||
filemtime ( $file_path ) > filemtime ( $cached_path ) )
{
// Generate a new cache
$cached_dir = dirname ( $cached_path );
if ( !is_dir ( $cached_dir ) )
{
mkdir ( $cached_dir, 0777, true );
chmod ( $cached_dir, 0777 );
}
// Parse, cache & return
if ( extension_loaded ( 'yaml' ) )
{
$parsed = yaml_parse_file ( $file_path );
}
else
{
$parsed = yaml::load ( $file_path );
}
file_put_contents ( $cached_path, serialize ( $parsed ) );
// Chmod file if it isn't already world-writeable
$perms = substr ( decoct ( fileperms ( $cached_path ) ), -3 );
if ( $perms != 777 ) chmod ( $cached_path, 0777 );
return $parsed;
}
// Return cached file
return unserialize ( file_get_contents ( $cached_path ) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function load()\n {\n if ($this->sites) {\n return;\n }\n $data = Yaml::parse(file_get_contents($this->file));\n $this->sites = $data['sites'];\n }",
"protected function pull()\n {\n $this->definition = array();\n \n if (file_exists(\\s... | [
"0.663372",
"0.6606961",
"0.65717536",
"0.6263219",
"0.6199485",
"0.6124811",
"0.6055848",
"0.593784",
"0.5917581",
"0.5903929",
"0.5881257",
"0.58606184",
"0.58503187",
"0.58020586",
"0.57767034",
"0.5773183",
"0.5748266",
"0.57258004",
"0.5694039",
"0.5685027",
"0.5669432",... | 0.7357435 | 0 |
Create a new command instance. | public function __construct()
{
parent::__construct();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }",
"pu... | [
"0.8010746",
"0.7333379",
"0.72606754",
"0.7164165",
"0.716004",
"0.7137585",
"0.6748632",
"0.67234164",
"0.67178184",
"0.6697025",
"0.6677973",
"0.66454077",
"0.65622073",
"0.65437883",
"0.64838654",
"0.64696646",
"0.64292693",
"0.6382209",
"0.6378306",
"0.63773245",
"0.6315... | 0.0 | -1 |
Execute the console command. | public function handle()
{
$namespaces = [];
foreach (app('router')->getRoutes() as $route) {
$compiledRoute = (new RouteCompiler($route))->compile();
if (substr($route->uri, 0, 3) !== 'api'
|| !isset($route->action['controller']) || !$compiledRoute) {
continue;
}
$action = $route->action;
$parts = explode('Actions\\', $action['controller']);
if (count($parts) < 2) {
continue;
}
$actionArray = array_reverse(explode('\\', $parts[1]));
if (count($actionArray) < 2) {
continue;
}
$namespace = $actionArray[1];
$method = $actionArray[0];
$params = $compiledRoute->getVariables();
array_push($params, 'formData');
$methodName = strtolower($route->methods[0]);
if ($methodName === 'post') {
$params[] = 'callback';
}
$namespaces[$namespace][] = [
'method' => $methodName,
'name' => $method,
'params' => $params,
'path' => str_replace('?', '', str_replace('{', '${', $route->uri))
];
}
return file_put_contents(resource_path('assets/js/api.js'), view('core::apiClass', compact('namespaces'))->render());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }",
"public function handle()\n {\n //get us the Converter class instance and call the convert() meth... | [
"0.6469971",
"0.64641356",
"0.6427384",
"0.6349752",
"0.63188183",
"0.62750113",
"0.6261585",
"0.6261214",
"0.6235854",
"0.6225116",
"0.6222161",
"0.6214144",
"0.6193531",
"0.6191337",
"0.6183868",
"0.61772275",
"0.61766857",
"0.6172786",
"0.6149171",
"0.6148903",
"0.61484134... | 0.0 | -1 |
Twenty Seventeen functions and definitions Register style in functions | function add_style(){
wp_enqueue_style('style',get_template_directory_uri()."/css/style.css");
wp_enqueue_style('bootstrap',get_template_directory_uri()."/css/bootstrap.min.css");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function register_style() {\n}",
"abstract public function register_style();",
"function functions() {\n \n }",
"abstract protected function registerFunctions();",
"function styles() {\n\twp_register_style(\n\t\t'fontawesome',\n\t\tVINCENTRAGOSTA_COM_TEMPLATE_URL . \"/assets/lib/fontawesome/css/f... | [
"0.7701661",
"0.69940877",
"0.6115355",
"0.60321015",
"0.6008079",
"0.5964369",
"0.59529996",
"0.59514225",
"0.5888041",
"0.587987",
"0.58676535",
"0.5865487",
"0.58546937",
"0.5830268",
"0.58135563",
"0.5809773",
"0.5807954",
"0.57751805",
"0.5739739",
"0.57361466",
"0.57265... | 0.0 | -1 |
Register multiple menu in functions | function register_my_menus() {
register_nav_menus(
array(
'header-menu' => __('Header Menu')
)
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function menus();",
"protected function registerMenu()\n {\n }",
"function show_my_menus(){\n register_nav_menu('mainmenu', 'Huvudmeny');\n register_nav_menu('footermenu', 'Sociala medier');\n register_nav_menu('sidemenu', 'Sidomeny');\n register_nav_menu('blogsidepage', 'Blogg sidomeny sidor... | [
"0.74238884",
"0.7394668",
"0.73642564",
"0.7254563",
"0.7161574",
"0.711063",
"0.7080793",
"0.70750135",
"0.7032471",
"0.69798905",
"0.6977202",
"0.6975457",
"0.69701535",
"0.6950045",
"0.6914154",
"0.6898178",
"0.68850607",
"0.68760854",
"0.68637747",
"0.68458474",
"0.68412... | 0.64800274 | 81 |
Register Post Type (add imagee) | function add_image(){
add_theme_support('post-thumbnails');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ks_create_post_type() {\n\tregister_post_type( 'image-entry',\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name' => __( 'Comp. Entries', 'kilpailusivu' ),\n\t\t\t\t'singular_name' => __( 'Entry', 'kilpailusivu' ),\n\t\t\t\t'add_new' => __( 'Add New', 'kilpailusivu' )... | [
"0.77122635",
"0.7666254",
"0.7632909",
"0.76141346",
"0.7601364",
"0.7546025",
"0.7545849",
"0.75189126",
"0.7511664",
"0.74273306",
"0.7402771",
"0.73973",
"0.73842436",
"0.7375255",
"0.73636967",
"0.7361844",
"0.7345887",
"0.7328538",
"0.7328538",
"0.7297205",
"0.7276741",... | 0.0 | -1 |
Save an entity to repository. | public function save($entity); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function saveEntity($entity)\n\t{\n\t\t$entityManager = $this->getDoctrine()->getManager();\n\t $entityManager->persist($entity);\n\t $entityManager->flush();\n\t}",
"protected function saveEntity($entity)\n {\n $this->om->persist($entity);\n $this->om->flush($entity);\n }",
"p... | [
"0.7579266",
"0.73962927",
"0.727839",
"0.7157777",
"0.71353596",
"0.7115545",
"0.70606893",
"0.70390826",
"0.70053864",
"0.6863863",
"0.6776856",
"0.67650044",
"0.673296",
"0.6628384",
"0.65823925",
"0.6521103",
"0.65112805",
"0.6454482",
"0.6411596",
"0.640052",
"0.63952583... | 0.7868986 | 1 |
Fetch an entity from repository by its identity. | public function fetch($id, $throws = false); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function retrieve($entityName, $id);",
"public function findEntity($id);",
"protected function findEntity($id, $repositoryName=\"\")\n {\n return $this->getRepository($repositoryName)->find($id);\n }",
"public function getOneByEntityFetcher(PersistentEntityFetcher $entityFetcher)\n {\n... | [
"0.6885615",
"0.6697973",
"0.6623351",
"0.66210693",
"0.6476789",
"0.646898",
"0.6442858",
"0.6433002",
"0.64013356",
"0.6382388",
"0.63641435",
"0.6360448",
"0.6356885",
"0.63524157",
"0.63524157",
"0.63524157",
"0.63278645",
"0.6308263",
"0.6282753",
"0.6277844",
"0.6274753... | 0.0 | -1 |
Create a new command instance. | public function __construct() {
parent::__construct();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }",
"pu... | [
"0.8010746",
"0.7333379",
"0.72606754",
"0.7164165",
"0.716004",
"0.7137585",
"0.6748632",
"0.67234164",
"0.67178184",
"0.6697025",
"0.6677973",
"0.66454077",
"0.65622073",
"0.65437883",
"0.64838654",
"0.64696646",
"0.64292693",
"0.6382209",
"0.6378306",
"0.63773245",
"0.6315... | 0.0 | -1 |
Execute the console command. | public function handle() {
try {
//delete old one
DB::table('operation_renewal_notification as re')
->join('policies as p', 'p.id', '=', 're.policy_id')
->whereRaw('DATEDIFF(p.end_date,now())<-30')->delete();
$policyDetails = DB::table('policies as p')
->join('customers as c', 'c.id', '=', 'p.customer_id')
->leftJoin('insurance_product as pr', 'pr.id', '=', 'p.product_id')
->select('p.id as policyId','p.customer_id', DB::raw("(case p.policy_type when 2 then 'Medical' when 3 then 'Motor' else 'General' end) AS lobdata"),DB::raw(" DATEDIFF(p.end_date,now()) as daydifference"), 'c.channel', DB::raw('DATEDIFF(p.end_date,now()) as datediff'), 'p.end_date as expirydate', 'p.start_date as inceptiondate','c.name as customerName','pr.product_name as productName')->where('p.policy_status', 2)->whereRaw('DATEDIFF(p.end_date,now())<=60')->get();
$datetime = date('Y-m-d H:i');
//dd($policyDetails);
$insert_data = array();
$renewalRequstArray = array();
$customerArray = array();
if ($policyDetails && count($policyDetails) > 0) {
foreach ($policyDetails as $policyDetail) {
$existpolicyDetails = DB::table('operation_renewal_notification')->where('policy_id', $policyDetail->policyId)->select('id')->first();
if ($existpolicyDetails && count(get_object_vars($existpolicyDetails)) > 0) {
continue;
}
$insert_data[] = array(
'customer_id' =>$policyDetail->customer_id,
'policy_id' => $policyDetail->policyId,
'created_date' => $datetime,
'policy_type' => $policyDetail->lobdata
);
$salespersonDetails = $this->findSaleperson($policyDetail->customer_id);
$assignUser = DB::table('users')->select('id')->where('status', '1')->where('roles', 'like', "%ROLE_OPERATION_SUPERVISER%")->orderBy('id', 'desc')->first();
$requestNo = substr("CRM-" . uniqid(date("Ymdhis")), 0, -13);
$policySalesperson = ($salespersonDetails !='')? $salespersonDetails->policy_sales_person:null;
$lineofbusiness = DB::table('line_of_business')->select('id')->where('status', '1')->where('title', 'like', "%".$policyDetail->productName."%")->orderBy('id', 'desc')->first();
$renewalRequstArray = array(
'customer_id' =>$policyDetail->customer_id,
'crm_request_id' => $requestNo,
'assigned_to' => $assignUser->id,
'user_id' => $assignUser->id,
'status' => 0,
'type' => 3,
'notification_start_date' => date('Y-m-d', strtotime('+10 days')),
'policy_sales_person' => $policySalesperson,
'updated_date' => $datetime,
'crm_line_of_business'=>($lineofbusiness !='')? $lineofbusiness->id:null,
'renewal_policy_id'=>$policyDetail->policyId
);
$customerArray[] = $policyDetail->customerName;
//Insert request details
$requestId = DB::table('crm_main_table')->insertGetId($renewalRequstArray);
$maildetails = array();
$maildetails['cc_data'] =['b.alshaya@dbroker.com.sa','m.alabdullatif@dbroker.com.sa'];
//Operation supervisor
$operationSupervisor = DB::table('users')->select('email','name')->where('status', '1')->where('roles', 'like', "%ROLE_OPERATION_SUPERVISER%")->orderBy('id', 'desc')->first();
$maildetails['to'] = $operationSupervisor->email;
$maildetails['name'] = $operationSupervisor->name;
//Operation lead
$operationLead = DB::table('users')->select('email')->where('status', '1')->where('roles', 'like', "%ROLE_OPERATION_LEAD%")->orderBy('id', 'desc')->first();
if($operationLead && count(get_object_vars($operationLead))>0){
$maildetails['cc_data'][] = $operationLead->email;
}
//Sales Manager
$salesManager = DB::table('users')->select('email')->where('status', '1')->where('roles', 'like', "%ROLE_SALES_LEAD%")->orderBy('id', 'desc')->first();
if($salesManager && count(get_object_vars($salesManager))>0){
$maildetails['cc_data'][] = $salesManager->email;
}
//Technical manager
$technicalManager = DB::table('users')->select('email')->where('status', '1')->where('roles', 'like', "%ROLE_TECHNICAL_HEAD%")->orderBy('id', 'desc')->first();
$maildetails['cc_data'][] = $technicalManager->email;
//Sales person
if($salespersonDetails !='') {
$maildetails['cc_data'][] = $salespersonDetails->email;
}
$template = 'emails.renewalnotification';
$url = route('crmrequestOverview', ['requestId' => $requestId]);
$data['link'] = $url;
$data['Request_no'] = $requestNo;
$data['customerName'] = $policyDetail->customerName;
//Renewal request creation mail send area
Mail::send($template, $data, function($message) use($maildetails,$data) {
$message->to($maildetails['to'], $maildetails['name'])->subject
('New renewal request has created for customers '.$data['customerName']);
$message->cc($maildetails['cc_data']);
$message->from('info@dbroker.com.sa', 'Diamond Broker');
});
}
}
if (!empty($insert_data)) {
DB::table('operation_renewal_notification')->insert($insert_data);
}
$this->info('Renewal count down cron run successfully!');
} catch (Exception $e) {
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }",
"public function handle()\n {\n //get us the Converter class instance and call the convert() meth... | [
"0.6469962",
"0.6463639",
"0.64271367",
"0.635053",
"0.63190264",
"0.62747604",
"0.6261977",
"0.6261908",
"0.6235821",
"0.62248456",
"0.62217945",
"0.6214421",
"0.6193356",
"0.61916095",
"0.6183878",
"0.6177804",
"0.61763877",
"0.6172579",
"0.61497146",
"0.6148907",
"0.614841... | 0.0 | -1 |
Start batch submit callback. | public static function startBatch(array &$form, FormStateInterface $form_state) {
$form_state->setRedirect('glazed_builder.admin_paths');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n Sp_batch::insert([\n \t\t'batch'=>'1',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'2',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'3',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'4',\n ]);\n\n Sp_batch::ins... | [
"0.6395741",
"0.6367636",
"0.62361085",
"0.61705965",
"0.60444856",
"0.57669455",
"0.57488984",
"0.57232606",
"0.5682217",
"0.56328124",
"0.5629722",
"0.5561507",
"0.55205846",
"0.5509823",
"0.54953027",
"0.5467385",
"0.54573786",
"0.5455755",
"0.54425967",
"0.5407169",
"0.53... | 0.0 | -1 |
Display a listing of the resource. | public function index() {
return view('admin.dorp.dcrud', ['dorpen' => Dorp::all()]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create() {
return view('admin.dorp.create');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request) {
$dorp = new Dorp;
$dorp->naam = $request->naam;
$dorp->save();
if($request->hasFile('avatar')) {
$avatar = $request->file('avatar');
$filename = $request->naam . '.' . $avatar->getClientOriginalExtension();
Image::make($avatar)->resize(500, 860)->save( public_path('/img/' . $filename ) );
$image = new Imagemanager;
$image->img = $filename;
$image->dorp_id = $dorp->id;
$image->save();
}
return view('admin.dorp.create', [ 'message' => 'Dorp added to the database' ]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations... | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.63424... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id) {
return view('admin.dorp.edit', [ 'dorp' => $dorp = Dorp::find($id) ]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ... | [
"0.7855416",
"0.769519",
"0.72748375",
"0.724256",
"0.7173659",
"0.7064689",
"0.70549816",
"0.6985127",
"0.6949479",
"0.69474626",
"0.694228",
"0.6929372",
"0.6903047",
"0.6899655",
"0.6899655",
"0.688039",
"0.68649715",
"0.68618995",
"0.68586665",
"0.68477386",
"0.68366665",... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id) {
$dorp = Dorp::find($id);
$dorp->naam = $request->naam;
$dorp->save();
if($request->hasFile('avatar')) {
try {
$image = Imagemanager::where('dorp_id', '=', $id)->first();
Storage::delete('/img/' . $image->img);
} catch (\ErrorException $e) {
$image = new Imagemanager;
}
$avatar = $request->file('avatar');
$filename = $request->naam . '.' . $avatar->getClientOriginalExtension();
Image::make($avatar)->resize(500, 860)->save( public_path('/img/' . $filename ));
$image->img = $filename;
$image->dorp_id = $dorp->id;
$image->save();
}
return view('admin.dorp.edit', [ 'dorp' => Dorp::find($id),
'message' => 'Dorp is successfully edited']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ... | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890... | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id) {
try {
Storage::delete('/img/' . Imagemanager::where('dorp_id', '=', $id)->first()->img);
Imagemanager::where('dorp_id', '=', $id)->first()->delete();
} catch (\ErrorException $e) {
}
Dorp::find($id)->delete();
return redirect('admin/dorp/');
} | {
"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 |
fonction pour supprimer un commentaire | public function deleteComment($commentId)
{
$db = $this->dbconnect();
$deletedComment = $db->prepare('DELETE from comments WHERE id = ?');
$affectedLines = $deletedComment->execute(array($commentId));
return $affectedLines;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function remove()\n {\n $model = $this->getModel('comments');\n $count = $model->delete();\n if($count === false){\n $msg = JText::_('COM_JOOMGALLERY_COMMAN_MSG_ERROR_DELETING_COMMENT');\n } else {\n if($count == 1){\n $msg = JText::_('COM_JOOMGALLERY_COMMAN_MSG_COMMENT_DELETED... | [
"0.7541959",
"0.7455158",
"0.72495204",
"0.7248715",
"0.7136635",
"0.70373666",
"0.6997191",
"0.6949782",
"0.69133735",
"0.6850445",
"0.6828559",
"0.6785951",
"0.67853415",
"0.67823714",
"0.675948",
"0.6756106",
"0.6751455",
"0.674438",
"0.67413884",
"0.6662638",
"0.6661989",... | 0.0 | -1 |
fonction pour signaler un commentaire | public function reportComment($commentId)
{
$db = $this->dbConnect();
$reportedComment = $db->prepare('UPDATE comments SET report = 1 WHERE id = ?');
$reportedComment->execute(array($commentId));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function record_comment(){\n\t\t\t\n\t\t}",
"abstract public function comment();",
"function postCommentNotify($id, $postId){\r\n $commentManager = new CommentsManager();\r\n $notify = $commentManager->postNotify($id);\r\n}",
"function addCommentHandler() {\n global $inputs;\n\n ... | [
"0.7591362",
"0.70423377",
"0.7038375",
"0.6871365",
"0.6742379",
"0.6600258",
"0.65263706",
"0.6508232",
"0.6488092",
"0.64655125",
"0.6428186",
"0.642761",
"0.6416256",
"0.6414281",
"0.6410347",
"0.6392172",
"0.6391395",
"0.63911396",
"0.6362661",
"0.6361557",
"0.6351672",
... | 0.0 | -1 |
fonction pour signaler un commentaire | public function moderateComment($commentId)
{
$db = $this->dbConnect();
$reportedComment = $db->prepare('UPDATE comments SET report = 2 WHERE id = ?');
$reportedComment->execute(array($commentId));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function record_comment(){\n\t\t\t\n\t\t}",
"abstract public function comment();",
"function postCommentNotify($id, $postId){\r\n $commentManager = new CommentsManager();\r\n $notify = $commentManager->postNotify($id);\r\n}",
"function addCommentHandler() {\n global $inputs;\n\n ... | [
"0.7591346",
"0.7042539",
"0.7038271",
"0.68709236",
"0.6740591",
"0.6600419",
"0.6526642",
"0.65084934",
"0.64881945",
"0.64662343",
"0.6427823",
"0.6426412",
"0.6415647",
"0.64138913",
"0.6410248",
"0.63925505",
"0.639196",
"0.6391385",
"0.63631153",
"0.63615096",
"0.635189... | 0.0 | -1 |
This is just a dummy Twilio callback. | public function callback()
{
$this->jsonResponse([
'ok' => true
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function callback();",
"public function callback() {\n\t\t$this->load->library('twconnect');\n\n\t\t$ok = $this->twconnect->twprocess_callback();\n\t\t\n\t\tif ( $ok ) { redirect('twtest/success'); }\n\t\telse redirect ('twtest/failure');\n\t}",
"function handle_callback() {\r\n }",
"public functio... | [
"0.6735467",
"0.63991416",
"0.62943685",
"0.61327505",
"0.60058695",
"0.574995",
"0.5714228",
"0.565994",
"0.5649607",
"0.5649387",
"0.5557216",
"0.5537729",
"0.55124456",
"0.5477619",
"0.545547",
"0.5451063",
"0.5441673",
"0.5428308",
"0.53810996",
"0.53808165",
"0.5365673",... | 0.5478984 | 13 |
Get users based on usernames or group. | function hc_get_users($args, $widget = false){
//set gravatar size
if (!isset($args['gravatarsize']) || $args['gravatarsize'] == '') {
$gravatarSize = '32';
}else{
$gravatarSize = $args['gravatarsize'];
}
//display group or single
if(isset($args['single']) && ($args['single'] == 'single' || $args['single'] == true)){
$hc_users = array();
$user = $args['username'];
$userArr = explode(',',$user);
foreach ($userArr as $key => $username) {
$hc_users[] = get_user_by('login', $username);
}
}else{
//args for getting users
if (empty($args['group']))
return new WP_Error('No users', __("No group or user specified", 'hypercontact'));
$roles = array(
'role' => $args['group'],
'fields' => array('ID')
);
// Create a new user query
$wp_user_query = new WP_User_Query($roles);
// Get user meta
$groupId = $wp_user_query->get_results();
$hc_users = array();
foreach ($groupId as $key => $value) {
$hc_users[] = get_user_by('id', $value->ID);
}
}
foreach ($hc_users as $index => $user) {
$user->gravatar = get_avatar( $user->user_email, $gravatarSize);
$user = hc_filter($user, $widget);
}
if(isset($args['fields'])){
$fieldsString = $args['fields'];
$fieldsArray = explode(',',$fieldsString);
$fieldsArray = array_map('trim', $fieldsArray);
foreach ($hc_users as $key => $user){
foreach ($user as $field => $value) {
if (!in_array($field, $fieldsArray)) {
unset($user->$field);
}
}
}
}
if (!empty($hc_users) && (isset($hc_users[0]) && !empty($hc_users[0]))){
return $hc_users;
}else{
return new WP_Error('No info', __("No user info could be found", 'hypercontact'));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getUsers() {\n\n\tglobal $db;\n\treturn $db->getUsersByGroup ( $GLOBALS [\"targetId\"] );\n\n}",
"function group_users($group_name=NUL){\n $result = array();\n if ($group_name==NULL){ return (false); }\n if (!$this->_bind){ return (false); }\n $filter=\"(&(|(objectClass=posix... | [
"0.70128715",
"0.68453884",
"0.6828521",
"0.6817417",
"0.67922497",
"0.67922497",
"0.67274773",
"0.67274773",
"0.67274773",
"0.67226136",
"0.66707397",
"0.6659928",
"0.6657218",
"0.6627891",
"0.6565068",
"0.651909",
"0.6495842",
"0.64605284",
"0.6454021",
"0.642578",
"0.64188... | 0.6269052 | 39 |
Displays a single filed drom a single user | function hc_user_field($user, $field){
$args = array(
'single' => true,
'username' => $user,
'fields' => $field
);
$userObject = hc_get_users($args);
echo $userObject[0]->$field;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function show( $id_user ) {\n\n\t\treturn '';\n\t}",
"private function userDisplay() {\n $showHandle = $this->get('username');\n if (isset($showHandle)) {\n echo '<li class=\"user-handle\">'.$showHandle.'</li>';\n }\n }",
"public function displayUser()\n {\n $entry = $this->getEntry();... | [
"0.77957076",
"0.7396798",
"0.71890646",
"0.7060027",
"0.7008797",
"0.69479007",
"0.689526",
"0.6861521",
"0.68554735",
"0.68409884",
"0.6800803",
"0.6789776",
"0.6746153",
"0.674344",
"0.67190313",
"0.6694245",
"0.66941774",
"0.6634533",
"0.6612618",
"0.6612618",
"0.6593292"... | 0.0 | -1 |
Display a unordered list | function hc_users($args){
$users = hc_get_users($args);
if ( is_wp_error($users) ){
echo $users->get_error_message();
return false;
}
foreach ($users as $key => $user) {
echo '<ul class="hc_user_list">';
echo '<li class="hc_user_name">'.$user->display_name.'</li>';
echo '<li class="hc_user_gravatar">'.$user->gravatar.'</li>';
echo '<ul class="hc_user_info">';
foreach ($user as $field => $value) {
if (($field !=' display_name' && $field != 'gravatar') && $value != '') {
if ($field == 'user_url') {
echo '<li><a href="'.$value.'">'.$value.'</a></li>';
}else{
echo '<li>'.$value.'</li>';
}
}
}
echo '</ul>';
echo '</ul>';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function ul( $list, $attributes = '' )\n\t{\n\t\treturn _list( 'ul', $list, $attributes );\n\t}",
"function ul(array $list, $attributes = ''): string\n {\n return _list('ul', $list, $attributes);\n }",
"public function display() {\n\t\t$singular = $this->_args['singular'];\n\n\t\t$data_attr = '';\... | [
"0.7361656",
"0.7120589",
"0.6950768",
"0.6892926",
"0.68504846",
"0.6805155",
"0.6787533",
"0.677713",
"0.67704785",
"0.6716094",
"0.66842705",
"0.65790826",
"0.65501153",
"0.65442073",
"0.65290487",
"0.6510044",
"0.64838153",
"0.6439371",
"0.6426895",
"0.6418856",
"0.636266... | 0.0 | -1 |
Get information about author | function hc_get_the_author($gravatarSize = '', $field = ''){
global $post;
$username = get_user_by('id',$post->post_author);
$username = $username->user_login;
$args = array('single' => true, 'username' => $username, 'gravatarsize' => $gravatarSize);
if($field != '')
$args['fields'] = $field;
$users = hc_get_users($args);
if ( is_wp_error($users) ){
echo $users->get_error_message();
return false;
}
return $users;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor() {}",
"function GetAuthor()\n {\n return 'calguy1000';\n }",
"abstract public function getAuthor();",
"public function getAuthorname() {}",
"public function getAuthor(): str... | [
"0.84662867",
"0.84662867",
"0.84662867",
"0.8375912",
"0.82269514",
"0.81720644",
"0.81317747",
"0.80669045",
"0.7971506",
"0.7971506",
"0.7971506",
"0.7971506",
"0.7971506",
"0.7971506",
"0.7971506",
"0.7971506",
"0.79615307",
"0.7946916",
"0.7900962",
"0.7900962",
"0.79009... | 0.0 | -1 |
Dsiplay information about the author | function hc_the_author($gravatarSize = ''){
$info = hc_get_the_author($gravatarSize);
foreach ($info as $index => $author) {
if(file_exists(get_bloginfo('stylesheet_directory').'plugins/hypercontact/templates/author.php')){
include(get_bloginfo('stylesheet_directory').'plugins/hypercontact/templates/author.php');
}else{
include('templates/author.php');
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function GetAuthor()\n {\n return 'calguy1000';\n }",
"public function getAuthorname() {}",
"public function author();",
"public function getAuthor() {}",
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor();",
"function GetAuthor()\n {\n return 'texus... | [
"0.79558855",
"0.7904509",
"0.77215576",
"0.764562",
"0.7542337",
"0.7542337",
"0.7542337",
"0.74981505",
"0.7492772",
"0.74481726",
"0.74422085",
"0.7435193",
"0.73829925",
"0.73829925",
"0.7333721",
"0.7333721",
"0.7333721",
"0.7333721",
"0.7333721",
"0.7333721",
"0.727595"... | 0.0 | -1 |
return field from the author | function hc_get_author_field($field , $gravatarSize = ''){
$info = hc_get_the_author($gravatarSize, $field);
$author = $info[0];
$field = $author->$field;
return $field;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAuthor() {}",
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor() \r\n { \r\n return $this->_author; \r\n }",
"public function getAuthor(): string\n {\n return $this->_author;\n ... | [
"0.7781827",
"0.77806413",
"0.77806413",
"0.77806413",
"0.7651809",
"0.7600425",
"0.75850916",
"0.75850916",
"0.75850916",
"0.75850916",
"0.75850916",
"0.75850916",
"0.75850916",
"0.75850916",
"0.7561902",
"0.75602776",
"0.75276774",
"0.7515637",
"0.7515637",
"0.7515637",
"0.... | 0.8280632 | 0 |
display field from the author | function hc_author_field($field , $gravatarSize = ''){
$info = hc_get_author_field($field , $gravatarSize);
echo $info;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAuthorname() {}",
"public function getAuthor() {}",
"public function getAuthor();",
"public function getAuthor();",
"public function getAuthor();",
"public function get_author()\n\t{\n\t\treturn '';\n\t}",
"function hc_get_author_field($field , $gravatarSize = ''){\n\t\t$info = hc_ge... | [
"0.76121664",
"0.74682343",
"0.7414243",
"0.7414243",
"0.7414243",
"0.7344687",
"0.72971785",
"0.7285783",
"0.7276654",
"0.7276654",
"0.7262898",
"0.7222383",
"0.718863",
"0.718863",
"0.718863",
"0.718863",
"0.718863",
"0.718863",
"0.71846473",
"0.7177265",
"0.71614164",
"0... | 0.77923477 | 0 |
Filters output to only display allowed fields | function hc_filter($user, $widget = false){
$json = get_option('hc_extra_fields');
$json = json_decode($json);
foreach ($user as $key => $info) {
$display = 0;
foreach ($json as $fields => $field) {
if ($widget) {
if ($field->field == $key && $field->widget) {
$display = 1;
}
}else{
if ($field->field == $key) {
$display = 1;
}
}
}
if (!$display) {
unset($user->$key);
}
}
return $user;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function restrict_fields()\n {\n }",
"abstract public function filterFields();",
"public function action_allowed_fields() {\n return array();\n }",
"abstract protected function filterFieldvalue();",
"function acf_allow_unfiltered_html()\n{\n}",
"public function getAllowe... | [
"0.70206517",
"0.69598395",
"0.66163784",
"0.65169704",
"0.6397913",
"0.6299588",
"0.6257747",
"0.6253222",
"0.6213388",
"0.614839",
"0.6116486",
"0.6073218",
"0.59841883",
"0.59530145",
"0.5946287",
"0.5946287",
"0.5917061",
"0.59163415",
"0.59079033",
"0.59079033",
"0.59052... | 0.0 | -1 |
return field name for a field | function hc_get_field_name($field){
$json = get_option('hc_extra_fields');
$json = json_decode($json);
foreach ($json as $key => $value) {
if ($value->field == $field) {
return $value->fieldname;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_field_name();",
"public function getFieldName($field) {\n return $field['name'];\n }",
"public function name($field) {\n\t\treturn $field;\n\t}",
"public function getDbFieldName($field_name);",
"public function get_field_name($field_name)\n {\n }",
"public func... | [
"0.8976763",
"0.8629746",
"0.8415228",
"0.8260565",
"0.81128466",
"0.81089085",
"0.81089085",
"0.81089085",
"0.81003463",
"0.8058309",
"0.80272865",
"0.8022192",
"0.7982532",
"0.7925729",
"0.7765974",
"0.7674025",
"0.75414056",
"0.75409913",
"0.7539312",
"0.74961215",
"0.7493... | 0.7492836 | 21 |
Display field name for a field | function hc_field_name($field){
echo hc_get_field_name($field);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_field_name();",
"public function get_field_label() {\n\t\treturn $this->get_field_attr( 'name' );\n\t}",
"public function getFieldName() {}",
"public function name($field) {\n\t\treturn $field;\n\t}",
"public function getFieldName($field) {\n return $field['name'];\n }",
"pu... | [
"0.85888934",
"0.8006008",
"0.7874715",
"0.7757387",
"0.7756327",
"0.7720972",
"0.7611952",
"0.7594246",
"0.75942224",
"0.75537986",
"0.7534981",
"0.7510652",
"0.74924153",
"0.7444177",
"0.7436201",
"0.7436201",
"0.7436201",
"0.73844594",
"0.73829764",
"0.7267953",
"0.7223586... | 0.815123 | 1 |
overriding a method just to call the same method from the super class without performing any other actions is useless and misleading; | public function __construct(DrawingApi $drawingApi)
{
$this->drawingApi = $drawingApi;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function test3(){\n echo \"test3 method overridden<br>\";\n }",
"public function test1(){\n echo \"test1 method overridden</br>\";\n }",
"public function test5(){\n echo \"test5 method overidden<br>\";\n }",
"final public function moreTesting() {\n echo \"BaseClass::moreTesting() ca... | [
"0.6797181",
"0.6755164",
"0.66392714",
"0.6355156",
"0.6355156",
"0.6269181",
"0.62642145",
"0.6229907",
"0.60907584",
"0.60673046",
"0.60358083",
"0.60155857",
"0.5945254",
"0.5925487",
"0.5893805",
"0.5887868",
"0.5840724",
"0.58375823",
"0.583276",
"0.57541615",
"0.573959... | 0.0 | -1 |
Plugin Name: Two Column Data Description: Simple Two Column Data Version: 1.0 Author: rjoaquin | function the_table ( $content ) {
return $content .= '<table>
<tr><th>Column 1</th><th>Column 2</th<</tr>
<tr><td>Column 1 Text 1</td><td>Column 2 Text 1</td></tr>
<tr><td>Column 1 Text 2</td><td>Column 2 Text 2</td></tr>
</table>';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public static function columnData();",
"function columns_data( $column ) {\r\n\r\n\t\tglobal $post, $wp_taxonomies;\r\n\r\n\t\tswitch( $column ) {\r\n\t\t\tcase \"listing_thumbnail\":\r\n\t\t\t\tprintf( '<p>%s</p>', genesis_get_image( array( 'size' => 'thumbnail' ) ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase \... | [
"0.6446717",
"0.62450165",
"0.6241489",
"0.62296987",
"0.6212806",
"0.6179277",
"0.6159527",
"0.61465925",
"0.6109037",
"0.5951515",
"0.5929214",
"0.5921391",
"0.5886481",
"0.5868205",
"0.5851188",
"0.5846177",
"0.5844301",
"0.5817031",
"0.58082753",
"0.580405",
"0.5749247",
... | 0.0 | -1 |
Who is sending the IM | function bbsCoinSendPM($subject, $message, $to) {
$pmfrom = array(
'id' => 1,
'name' => 'admin',
'username' => 'admin'
);
// Who is receiving the IM
$pmto = array(
'to' => array($to),
'bcc' => array()
);
// Send the PM
return sendpm($pmto, $subject, $message, 0, $pmfrom);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSender();",
"public function identifySender()\n\t{\n\t\treturn true;\n\t}",
"function getSender(){\n $return = \"\";\n if( $this->FromName != \"\" ) $return .= $this->FromName.\" (\";\n $return .= $this->From;\n if( $this->FromName != \"\" ) $return .= \")\";\n retur... | [
"0.67249125",
"0.6467835",
"0.6296772",
"0.6290687",
"0.6250177",
"0.6246795",
"0.61469513",
"0.60712355",
"0.60402834",
"0.59893316",
"0.5966568",
"0.5966568",
"0.5966568",
"0.5966568",
"0.5966568",
"0.5966568",
"0.5932666",
"0.5899848",
"0.5838252",
"0.57737416",
"0.5752923... | 0.0 | -1 |
Do not modify under this line // | function connect_to_mysqli($mysqlserverhost, $username_mysql, $password_mysql, $database_name){
$connect = mysqli_connect($mysqlserverhost, $username_mysql, $password_mysql, $database_name);
if (!$connect) {
die("Connection failed mysql: " . mysqli_connect_error());
}
return $connect;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function __() {\n }",
"private function _i() {\n }",
"public function helper()\n\t{\n\t\n\t}",
"private function __construct()\t{}",
"final private function __construct(){\r\r\n\t}",
"private function j() {\n }",
"public function custom()\n\t{\n\t}",
"private function __construct... | [
"0.6620608",
"0.6597447",
"0.6063831",
"0.60162807",
"0.59471637",
"0.59245753",
"0.5836533",
"0.57862455",
"0.57821083",
"0.5759166",
"0.57536453",
"0.5750008",
"0.5750008",
"0.5750008",
"0.5748788",
"0.574545",
"0.574545",
"0.5737018",
"0.5737018",
"0.57203645",
"0.57167244... | 0.0 | -1 |
get pass in params | public function getClientParamAction()
{
$data = $this->bodyParams();
if(isset($data['account'])){
// service
$service = $this->sm->get('Lib\Openvpn\Service\ClientConfig');
$model = $service->getParam($data['account']);
// view
return new ViewModel(
$model->toArray()
);
}
//return new ApiProblem(422, 'Missing require field [account]');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getParams();",
"public function getParams();",
"public function getParams();",
"public function getParams();",
"public function getParams();",
"public function getParams();",
"public function getParams();",
"public function getParams();",
"public function getParams();",
"public fu... | [
"0.82746786",
"0.82746786",
"0.82746786",
"0.82746786",
"0.82746786",
"0.82746786",
"0.82746786",
"0.82746786",
"0.82746786",
"0.82746786",
"0.8227993",
"0.8204518",
"0.81418544",
"0.7990457",
"0.7990457",
"0.77693474",
"0.7595113",
"0.7540298",
"0.75054413",
"0.7490322",
"0.... | 0.0 | -1 |
change logged in user password | public function changePassword(Request $request)
{
try {
$validator = Validator::make($request->all(), [
'old_password' => 'required',
'password' => ['required', 'min:6'],
]);
if ($validator->fails()) {
return response()->jsend_error(new \Exception($validator->errors()->first()), $message = null);
}
$user = $this->userService->user->find($request->user()->id);
if (!Hash::check($request->old_password, $user->password)) {
return response()->jsend_error(new \Exception("Old password does not match"), $message = null, $code = 422);
}
$user->password = Hash::make($request->password);
if ($user->save())
return response()->jsend($data = $user, $presenter = null, $status = "success", $message = null, $code = 200);
} catch (\Exception $exception) {
$error['statusCode'] = $exception->getCode();
$error['message'] = $exception->getMessage();
Log::error('Password change error: ', $error);
return response()->jsend_error(new \Exception($exception->getMessage()), $message = null, $code = $error['statusCode'] ?? 200);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function changePassword() {}",
"public function changeUserPassword($uid,$newPassword);",
"function regiomino_user_change_password($account, $password) {\r\n\t//watchdog('pwdaction', '@password', array('@password' => $password));\r\n $edit['pass'] = $password;\r\n user_save($account, $edit);\r\n}",
... | [
"0.81949955",
"0.81889075",
"0.8090457",
"0.8007909",
"0.78384143",
"0.78288716",
"0.7764926",
"0.77606595",
"0.7746948",
"0.7691158",
"0.7684436",
"0.7645042",
"0.762154",
"0.7615261",
"0.7614543",
"0.7596261",
"0.75845605",
"0.7548509",
"0.75083905",
"0.74964046",
"0.748534... | 0.0 | -1 |
Determine if the user is authorized to make this request. | public function authorize()
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }"... | [
"0.8401071",
"0.8377486",
"0.8377486",
"0.8344406",
"0.8253731",
"0.824795",
"0.8213121",
"0.8146598",
"0.81115526",
"0.8083369",
"0.7991986",
"0.79907674",
"0.79836637",
"0.79604936",
"0.79516214",
"0.79494005",
"0.79265946",
"0.7915068",
"0.79001635",
"0.7894822",
"0.789145... | 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
return [
'name' => 'required|string|max:200',
'email' => 'required|email|max:200',
'message' => 'required|string|max:1000',
'g-recaptcha-response' => 'required|string|max:1000',
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }",
"public function getRules()\n {\n return $this->validator->getRules();\n }",
"public function getValidationRules()\n {\n $rules = [];\n\n // Get the sche... | [
"0.83426684",
"0.8012867",
"0.79357",
"0.7925642",
"0.7922824",
"0.79036003",
"0.785905",
"0.77895427",
"0.77832615",
"0.7762324",
"0.77367616",
"0.7732319",
"0.7709478",
"0.7691477",
"0.76847756",
"0.7682022",
"0.7682022",
"0.7682022",
"0.7682022",
"0.7682022",
"0.7682022",
... | 0.0 | -1 |
Create a new command instance. | public function __construct()
{
parent::__construct();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }",
"pu... | [
"0.8010746",
"0.7333379",
"0.72606754",
"0.7164165",
"0.716004",
"0.7137585",
"0.6748632",
"0.67234164",
"0.67178184",
"0.6697025",
"0.6677973",
"0.66454077",
"0.65622073",
"0.65437883",
"0.64838654",
"0.64696646",
"0.64292693",
"0.6382209",
"0.6378306",
"0.63773245",
"0.6315... | 0.0 | -1 |
Execute the console command. | public function handle()
{
$date = Carbon::now()->subMonth();
$trash_images = TreshImage::whereDate('created_at', '<', $date)
->limit(20)
->get();
foreach ($trash_images as $image){
if(file_exists (public_path($image->image_path) )){
unlink(public_path($image->image_path));
}
$image->delete();
}
info('Мусорные изображения успешно удалены! Дата и время: '.Carbon::now());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }",
"public function handle()\n {\n //get us the Converter class instance and call the convert() meth... | [
"0.6469962",
"0.6463639",
"0.64271367",
"0.635053",
"0.63190264",
"0.62747604",
"0.6261977",
"0.6261908",
"0.6235821",
"0.62248456",
"0.62217945",
"0.6214421",
"0.6193356",
"0.61916095",
"0.6183878",
"0.6177804",
"0.61763877",
"0.6172579",
"0.61497146",
"0.6148907",
"0.614841... | 0.0 | -1 |
Set phone number (example: "0888123456", "+35932261020" etc.). Max size is 20 symbols. | public function setNumber($number) {
$this->_number = $number;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setPhone($newPhone){\n //check if the phone number is numeric\n if(is_numeric($newPhone)) {\n $this->phone = $newPhone;\n }\n //if not set to default, 0000000000\n $this->phone = \"0000000000\";\n }",
"public function setPhone($phone = \"\");",
"private... | [
"0.75193363",
"0.70277536",
"0.70124793",
"0.69556785",
"0.6869411",
"0.68268085",
"0.6703002",
"0.669782",
"0.66754377",
"0.6580026",
"0.6519557",
"0.6505692",
"0.64666194",
"0.64656746",
"0.64401096",
"0.64122146",
"0.6396462",
"0.63931906",
"0.63931906",
"0.6376278",
"0.63... | 0.0 | -1 |
Set extension number. Max size is 10 symbols. | public function setInternal($internal) {
$this->_internal = $internal;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setExtensionLength($value)\n {\n $this->_fields['ExtensionLength']['FieldValue'] = $value;\n return $this;\n }",
"public function setExtension(?string $value): void {\n $this->getBackingStore()->set('extension', $value);\n }",
"public function setExtension($extensi... | [
"0.6676072",
"0.65358794",
"0.6426525",
"0.63958955",
"0.63930357",
"0.62402344",
"0.62402344",
"0.6236095",
"0.62102383",
"0.6130696",
"0.6064763",
"0.60187507",
"0.596195",
"0.5917399",
"0.58940536",
"0.5830838",
"0.5786979",
"0.5767769",
"0.57254",
"0.5700874",
"0.5699998"... | 0.0 | -1 |
Return standard class from this class | public function toStdClass() {
$stdClass = new stdClass();
$stdClass->number = $this->_number;
$stdClass->internal = $this->_internal;
return $stdClass;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function get_class(){\n return self::class;}",
"abstract protected function getDefaultClass();",
"public function get_class()\n {\n return $this->class;\n }",
"public function baseclass()\n {\n \n return new StringWrapper(substr_count($this->_public_class()->get(), '\... | [
"0.75609267",
"0.71174175",
"0.6988961",
"0.69630486",
"0.6944109",
"0.6913078",
"0.6904024",
"0.6879485",
"0.6759572",
"0.675955",
"0.67299354",
"0.6729222",
"0.6729222",
"0.67282176",
"0.6697327",
"0.6671992",
"0.6648799",
"0.6648799",
"0.6648799",
"0.6648799",
"0.6648799",... | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re... | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.683052... | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view(... | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.717428... | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations... | [
"0.72855324",
"0.71447515",
"0.7132799",
"0.6641042",
"0.66208744",
"0.6566955",
"0.65249777",
"0.6509032",
"0.6447701",
"0.63756555",
"0.6373163",
"0.63650846",
"0.63650846",
"0.63650846",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.6341676",
"0.63416... | 0.0 | -1 |
Display the specified resource. | public function show($id)
{
if(request()->has('page') && request('page') > 0)
{
$page = request('page');
} else {
$page = 1;
}
$data['categoryName'] = request('category_name');
$data['couponsData'] =
json_decode(file_get_contents("https://www.coupomated.com/apiv3/6c2a-d0b8-bbaf-b9e6/getBatchCoupons/1000/". $page . "/json"));
$data['coupons'] = [];
foreach ($data['couponsData'] as $key => $coupon) {
$cats = explode(',', $coupon->FINAL_CAT_LIST);
if(array_search($id, $cats)){
$data['coupons'][] = $coupon;
}
}
$data['page'] = $page;
$data['totalCoupons'] = json_decode(file_get_contents("https://www.coupomated.com/apiv3/6c2a-d0b8-bbaf-b9e6/getCouponCount"));
$data['pages'] = $data['totalCoupons'] / 50;
return view('categories.show', $data);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id... | [
"0.8233718",
"0.8190437",
"0.6828712",
"0.64986944",
"0.6495974",
"0.6469629",
"0.6462615",
"0.6363665",
"0.6311607",
"0.62817234",
"0.6218966",
"0.6189695",
"0.61804265",
"0.6171014",
"0.61371076",
"0.61207956",
"0.61067593",
"0.6105954",
"0.6094066",
"0.6082806",
"0.6045245... | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ... | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.6833... | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ... | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890... | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n ... | [
"0.6671365",
"0.6660839",
"0.66361386",
"0.6632988",
"0.6624729",
"0.6542195",
"0.6541645",
"0.6466739",
"0.6288393",
"0.61767083",
"0.6129533",
"0.608954",
"0.6054169",
"0.60443425",
"0.60073143",
"0.59338665",
"0.59317696",
"0.592145",
"0.5920155",
"0.59065086",
"0.5897853"... | 0.0 | -1 |
echo "Adding " . $file>getName() . " to " . $this>name . ""; | public function addFile($file) {
$this->files[$file->getName()] = $file;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toString() {\n return $this->getClassName().'['.$this->file->toString().']';\n }",
"public function name() : string {\n return $this->file->name;\n }",
"function writeName($fname)\n{\n echo $fname . \" Refsnes.<br>\";\n}",
"function writeName($fname){\n echo $fname.\" ... | [
"0.6283218",
"0.61540234",
"0.61254364",
"0.6090518",
"0.60007083",
"0.59761584",
"0.5885602",
"0.582456",
"0.5819445",
"0.575687",
"0.56869316",
"0.5676661",
"0.56359476",
"0.5634324",
"0.5629599",
"0.562736",
"0.56097925",
"0.56003636",
"0.5586386",
"0.558201",
"0.55738556"... | 0.0 | -1 |
echo "Adding " . $folder>getName() ." to " . $this>name . ""; | public function addFolder($folder) {
$this->folders[$folder->getName()] = $folder;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function writeName($fname){\n echo $fname.\" Refsnes.<br>\";\n}",
"function writeName($fname)\n{\n echo $fname . \" Refsnes.<br>\";\n}",
"public function getName()\n {\n return 'oo_folder';\n }",
"public function create_folder_name(){\n // create folder name\n return $this->config['p... | [
"0.5904917",
"0.58798707",
"0.5858815",
"0.58223593",
"0.58068657",
"0.5766334",
"0.567674",
"0.56352705",
"0.5592654",
"0.5517643",
"0.5515271",
"0.5489503",
"0.54653746",
"0.54372555",
"0.53264",
"0.5321125",
"0.5315991",
"0.53019756",
"0.5293061",
"0.527446",
"0.5240092",
... | 0.0 | -1 |
$folder is a Folder object | public function getFolder($folder) {
$foldername = $folder->getName();
if ($this->hasFolder($folder)) {
$ret = $this->folders[$foldername];
return $ret;
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function folder($folder)\n {\n // @todo\n }",
"public function getFolder();",
"public function find_folder($folder)\n {\n }",
"public function getFolderInfo() {}",
"public function folder()\n {\n return Folder::find($this->folder_id);\n }",
"public function ... | [
"0.7837446",
"0.7499997",
"0.7340194",
"0.72807676",
"0.7261641",
"0.7247935",
"0.7224383",
"0.72073805",
"0.7102556",
"0.7040515",
"0.693084",
"0.68993604",
"0.6889393",
"0.68673515",
"0.6845534",
"0.67534584",
"0.6737748",
"0.67144734",
"0.6713727",
"0.67104447",
"0.6709842... | 0.0 | -1 |
$folder is a Folder object | public function hasFolder($folder) {
$ret = array_key_exists($folder->getName(), $this->folders);
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function folder($folder)\n {\n // @todo\n }",
"public function getFolder();",
"public function find_folder($folder)\n {\n }",
"public function getFolderInfo() {}",
"public function folder()\n {\n return Folder::find($this->folder_id);\n }",
"public function ... | [
"0.78366333",
"0.75003713",
"0.7339303",
"0.7281221",
"0.7261594",
"0.72478884",
"0.7224264",
"0.72074234",
"0.7101713",
"0.70400846",
"0.6929706",
"0.6898206",
"0.6889333",
"0.68675405",
"0.6845774",
"0.6753704",
"0.6736642",
"0.6713922",
"0.6713693",
"0.6709805",
"0.6709558... | 0.0 | -1 |
$file is a File object | public function hasFile($file) {
$ret = array_key_exists($filer->getName(), $this->file);
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getFile(): object {\n return $this->file;\n }",
"function get_file()\n\t{\n\t\treturn $this->file;\n\t}",
"public function getFile() {}",
"public function getFile() {}",
"protected static function file()\n {\n }",
"public function getFile ();",
"public function setFile($file) {}"... | [
"0.71076196",
"0.70726573",
"0.7048535",
"0.7047975",
"0.70232457",
"0.7016773",
"0.7002165",
"0.6966359",
"0.696136",
"0.6944857",
"0.69071",
"0.69071",
"0.6881196",
"0.688092",
"0.68482625",
"0.68479294",
"0.68291104",
"0.6814526",
"0.67629206",
"0.6743429",
"0.6723617",
... | 0.0 | -1 |
Create an InfobloxWapiQuery object. | public function __construct($address, $user, $password, $version) {
$this->setAddress($address);
$this->setUser($user);
$this->setPassword($password);
$this->setVersion($version);
$this->setURL("https://$address/wapi/v$version/");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createQueryApi(): QueryApi;",
"public function createQuery(): QueryInterface;",
"public function createQuery() {}",
"public function createQuery() {}",
"public function createQuery() {}",
"public function createQuery() {}",
"public function createQuery() {\n\t\treturn $this->queryFactor... | [
"0.72192085",
"0.65358967",
"0.640208",
"0.6401989",
"0.6401989",
"0.6401989",
"0.6296883",
"0.6136078",
"0.60938644",
"0.6064766",
"0.60281855",
"0.592733",
"0.592733",
"0.58809245",
"0.58377916",
"0.58302915",
"0.5771945",
"0.57294166",
"0.5620584",
"0.55976236",
"0.5597403... | 0.0 | -1 |
Query to web service. | public function query($object, $fields = array(), $function = null, $method = "GET") {
// sets previous send query
$this->setObject($object);
$this->setFields($fields);
$this->setFuction($function);
$this->setMethod($method);
// send query to infoblox server
$this->sendQueryByCurl();
// return the results
return $this->getResult();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function query();",
"public function query();",
"public function query();",
"public function query();",
"function query() {}",
"private function _handle_query()\n\t{\t\n\t\t$this->_http_query = $this->_request;\n\t\t\n\t\t$response_object = $this->payments->gateway_request($this->_api_endpo... | [
"0.67486423",
"0.666413",
"0.666413",
"0.666413",
"0.6575142",
"0.64744765",
"0.6472993",
"0.64403135",
"0.6426635",
"0.62756807",
"0.62615514",
"0.6232975",
"0.61950934",
"0.61950934",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",
"0.6143483",... | 0.0 | -1 |
Set the object to request. Example: "record:a", "record:ptr", "network"... | private function setObject($object) {
$this->object = $object;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setObject($object);",
"public function setObject(string $object): void\n {\n $this->_object = $object;\n }",
"public function setObject(string $object): void\n {\n $this->_object = $object;\n }",
"function record($request) {\n\t\t$type = $request->getVar('type');\n\t\t$valu... | [
"0.6079203",
"0.6002442",
"0.6002442",
"0.57710844",
"0.57703066",
"0.5766617",
"0.57486117",
"0.56963575",
"0.568274",
"0.568274",
"0.568274",
"0.5678885",
"0.5675828",
"0.55973375",
"0.5568034",
"0.5543874",
"0.5481038",
"0.5476452",
"0.54431397",
"0.54321927",
"0.54271495"... | 0.5605844 | 13 |
Get the object to request. | private function getObject() {
return $this->object;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getObject() {}",
"public function getObject() {}",
"public function getObject();",
"public function getObject();",
"public function getObject() {\n return $this->object;\n }",
"public function getObject(): object;",
"public function getObject()\n {\n return $this->object;\... | [
"0.73799545",
"0.73799545",
"0.73257434",
"0.73257434",
"0.719861",
"0.7152944",
"0.71492344",
"0.71492344",
"0.7092992",
"0.6953768",
"0.6926222",
"0.69201267",
"0.68532425",
"0.68305796",
"0.67796487",
"0.6763178",
"0.6754883",
"0.67487836",
"0.674861",
"0.6742828",
"0.6742... | 0.7435714 | 0 |
Set the fields of the object. | private function setFields($fields) {
$this->fields = $fields;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract function setFields();",
"public function set_fields() {\n\n\t\t$this->fields = Pngx__Meta__Fields::get_fields();\n\t}",
"function set_fields($fields) {\n\t\t$this->fields = $fields;\n\t}",
"private function setFields(): void\n {\n $fields = acf_get_block_fields(array('name' => 'acf/' .... | [
"0.82745093",
"0.7875061",
"0.735328",
"0.71872056",
"0.71687704",
"0.71158344",
"0.71158344",
"0.70748204",
"0.70271134",
"0.6961778",
"0.6843715",
"0.6838409",
"0.67680806",
"0.6755868",
"0.6723553",
"0.6698234",
"0.6644564",
"0.6610585",
"0.6592066",
"0.6580707",
"0.654258... | 0.720332 | 3 |
Get _function variable. This is to set the function to call. | private function getFuction() {
return $this->_function;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFunction()\n {\n return $this->function;\n }",
"public function get_function() {\n\t\tif ( ! $this->is_function_set ) {\n\t\t\t$this->set_function( $this->derive_function() );\n\t\t}\n\t\treturn $this->function;\n\t}",
"private function setFuction($function) {\n $this->_f... | [
"0.7382957",
"0.72181535",
"0.7177902",
"0.6936956",
"0.6734655",
"0.6726698",
"0.6678767",
"0.6674748",
"0.6649321",
"0.6415708",
"0.64097846",
"0.60925364",
"0.6068881",
"0.6007994",
"0.5961791",
"0.5899766",
"0.580004",
"0.57506675",
"0.5744072",
"0.5679977",
"0.5663876",
... | 0.7324036 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.