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
Decide whether the provided issue is valid
public static function isIssueValid(Issue $issue) { $summary = $issue->getSummary(); $valid = !blank($summary); $status = $issue->getStatus(); $valid &= !blank($status); $type = $issue->getType(); $valid &= !blank($type); return $valid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isValid() {\n return Utilities::isValidText($this->issue) &&\n Utilities::isValidText($this->message) &&\n Utilities::isValidEmail($this->email) &&\n \n Utilities::hasRightLength($this->issue, self::MAX_LENG...
[ "0.66597736", "0.64619803", "0.63822114", "0.61666673", "0.5917044", "0.58786654", "0.58584905", "0.5831928", "0.576657", "0.5761081", "0.57281303", "0.57268", "0.5719111", "0.5714753", "0.5708133", "0.57066876", "0.57062453", "0.5694154", "0.5685139", "0.5685139", "0.5685139...
0.0
-1
Provide the character separation the project name from the issue number, may be different for merge requests
public static function getProjectIssueSeparator($isMergeRequest) { return '-'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIssuePrefix() : string;", "public abstract function getProjectName();", "public static function getProjectIssueSeparator($isMergeRequest)\n {\n return $isMergeRequest ? '!' : '#';\n }", "function get_forge_project_name()\n\t{\n\t\treturn '';\n\t}", "public function getProjec...
[ "0.6409201", "0.62410223", "0.6235086", "0.6232383", "0.6191263", "0.6130725", "0.60237056", "0.6015594", "0.58794904", "0.5871256", "0.58393794", "0.5826795", "0.57452464", "0.57138175", "0.562946", "0.5593079", "0.5593079", "0.55403495", "0.55237025", "0.55163467", "0.54988...
0.63528866
1
Get the url to the given issue at the given project
public function getIssueURL($projectId, $issueId, $isMergeRequest) { return $this->jiraUrl . '/browse/' . $projectId . '-' . $issueId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIssueEndpointUrl(IssueWrapper $issue)\n {\n\n }", "public function getIssuesUrl()\n {\n return $this->issuesUrl;\n }", "function cs_get_project_url() {\n\tif (function_exists('get_field')) {\n\t\tglobal $post;\n\t\t$project_url = get_field('project_url', $post->ID);\n\t\te...
[ "0.6983532", "0.6883664", "0.6772186", "0.6402887", "0.6285824", "0.6256087", "0.6060097", "0.6042788", "0.6041548", "0.59468997", "0.5923871", "0.5906531", "0.5841501", "0.5814671", "0.5758893", "0.57417166", "0.5716724", "0.569462", "0.5689039", "0.56650686", "0.56541044", ...
0.63622093
4
FIXME: somehow validate that we are allowed to retrieve that issue
public function retrieveIssue(Issue $issue) { $projectKey = $issue->getProject(); /** @var \helper_plugin_issuelinks_db $db */ $db = plugin_load('helper', 'issuelinks_db'); $webhooks = $db->getWebhooks('jira'); $allowedRepos = explode(',', $webhooks[0]['repository_id']); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchIssue()\n {\n $this->_oIssue = AM_Model_Db_Table_Abstract::factory('issue')->findOneBy('id', $this->issue);\n\n if (is_null($this->_oIssue)) {\n throw new AM_Model_Db_Exception(sprintf('Static pdf \"%s\" has no issue', $this->id));\n }\n\n return $this...
[ "0.67779756", "0.6369414", "0.62817484", "0.62589604", "0.62067497", "0.61993986", "0.603089", "0.6002856", "0.59815305", "0.5954161", "0.5943392", "0.5879769", "0.58533907", "0.5843892", "0.5843892", "0.5804655", "0.5765111", "0.575617", "0.562193", "0.5614684", "0.5585258",...
0.6213415
4
Get the total of issues currently imported by retrieveAllIssues() This may be an estimated number
public function getTotalIssuesBeingImported() { return $this->total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function totalIssues()\n {\n $url = $this->base_uri.'search?jql=project='.$this->project.'&startAt=0&maxResults=0';\n $issues = $this->request($url);\n if (!$this->infos['errorBoolean']) {\n return json_decode($issues)->total;\n }\n }", "protected function getTotal()\n ...
[ "0.83486587", "0.6618601", "0.65681076", "0.6443894", "0.64355946", "0.64127195", "0.6370253", "0.6367052", "0.63533825", "0.6346644", "0.6345541", "0.63357216", "0.63295615", "0.6322821", "0.62981313", "0.6297393", "0.62857234", "0.6277588", "0.6273738", "0.62620693", "0.625...
0.86565197
0
Get a list of all organisations a user is member of
public function getListOfAllUserOrganisations() { return ['All projects']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function all()\n {\n return $this->get('/user/memberships/orgs');\n }", "public function listOrganizations($user) {\n return $user->organizations;\n }", "public function get_organisers(){\n $sql = \"SELECT DISTINCT * from members WHERE members.id IN \"\n .\"(SELECT o...
[ "0.76634663", "0.7379162", "0.7372059", "0.70723677", "0.698785", "0.6977385", "0.696514", "0.68578535", "0.684014", "0.664089", "0.6487919", "0.64069617", "0.6307691", "0.62922287", "0.62767303", "0.62561554", "0.61909", "0.6177162", "0.6159785", "0.61528057", "0.61368436", ...
0.75359803
1
get old webhook id
public function createWebhook($project) { /** @var \helper_plugin_issuelinks_db $db */ $db = plugin_load('helper', 'issuelinks_db'); $webhooks = $db->getWebhooks('jira'); $projects = []; if (!empty($webhooks)) { $oldID = $webhooks[0]['id']; // get curr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getWebhookId()\n {\n return Mage::getStoreConfig('trello_api/webhook/id');\n }", "public function getOldId()\n {\n return $this->old_id;\n }", "public function getOriginalId();", "public function getLastItemChangeId()\n {\n return $this->doRequest(array('se...
[ "0.77329963", "0.69043547", "0.63334966", "0.6316938", "0.62296855", "0.6198814", "0.6126181", "0.61194164", "0.60144925", "0.59304696", "0.5920029", "0.577568", "0.5766566", "0.5748611", "0.5748611", "0.5748611", "0.5748611", "0.5719221", "0.567871", "0.567871", "0.5650591",...
0.0
-1
Delete our webhook in a source repository
public function deleteWebhook($project, $hookid) { // get old webhook id /** @var \helper_plugin_issuelinks_db $db */ $db = plugin_load('helper', 'issuelinks_db'); $webhooks = $db->getWebhooks('jira'); $projects = []; if (!empty($webhooks)) { $oldID = $web...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteWebhook(){\n return $this->make_http_request(__FUNCTION__);\n }", "private function delete()\n {\n $webhookId = $this->ask('Please enter Webhook ID');\n\n try {\n $response = $this->messageBirdClient->conversationWebhooks->delete($webhookId);\n\n ...
[ "0.68165326", "0.6486731", "0.6075549", "0.60054916", "0.59860814", "0.5821129", "0.5802665", "0.5759841", "0.5753529", "0.57513994", "0.57409286", "0.5642372", "0.5635392", "0.56314033", "0.56249815", "0.56241983", "0.56241983", "0.562143", "0.56206894", "0.55602235", "0.551...
0.0
-1
Do all checks to verify that the webhook is expected and actually ours
public function validateWebhook($webhookBody) { $data = json_decode($webhookBody, true); /** @var \helper_plugin_issuelinks_db $db */ $db = plugin_load('helper', 'issuelinks_db'); $webhooks = $db->getWebhooks('jira'); $projects = []; if (!empty($webhooks)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function check_for_webhook() {\n\t\tif ( ( 'POST' !== $_SERVER['REQUEST_METHOD'] )\n\t\t\t|| ! isset( $_GET['wc-api'] )\n\t\t\t|| ( 'wc_stripe' !== $_GET['wc-api'] )\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t$request_body = file_get_contents( 'php://input' );\n\t\t$request_headers = array_change_key_case( $t...
[ "0.77889085", "0.768437", "0.7027137", "0.69229573", "0.69026625", "0.68740785", "0.67419964", "0.6722175", "0.6699378", "0.6656201", "0.6577519", "0.65220124", "0.6516404", "0.6403186", "0.63922477", "0.6387871", "0.6381235", "0.63537246", "0.6297482", "0.62849295", "0.62729...
0.60802144
38
Handle the contents of the webhooks body
public function handleWebhook($webhookBody) { $data = json_decode($webhookBody, true); $issueData = $data['issue']; list($projectKey, $issueId) = explode('-', $issueData['key']); $issue = Issue::getInstance('jira', $projectKey, $issueId, false); $this->setIssueData($issue, $i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle_webhook() {\n\t\t$payload = file_get_contents( 'php://input' );\n\t\tif ( ! empty( $payload ) && $this->validate_webhook( $payload ) ) {\n\t\t\t$data = json_decode( $payload, true );\n\t\t\t$event_data = $data['event']['data'];\n\n\t\t\tself::log( 'Webhook received event: ' . print_r( ...
[ "0.7160706", "0.71327466", "0.6751222", "0.63093567", "0.63082385", "0.6240093", "0.61424047", "0.60548615", "0.59934527", "0.5951129", "0.5903839", "0.5834087", "0.58202344", "0.5753449", "0.57161653", "0.5712176", "0.5706408", "0.56778955", "0.5627228", "0.56094474", "0.559...
0.5994936
8
Called when activating the plugin
function on_activate() { // Disable buggy sitewide activation in WPMU and WP 3.0 if ((is_multisite() && isset($_GET['sitewide'])) || ($this->is_network_mode() && isset($_GET['networkwide']))) $this->network_activate_error(); // Default options update_option('ld_http_auth', 'none'); update_option('ld_hi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function activatePlugin();", "abstract protected function activate_plugin();", "public function activate() {\n\t\t/**\n\t\t * Fires when the plugin is being activated.\n\t\t *\n\t\t * @since 7.0\n\t\t */\n\t\tdo_action('audition_activate');\n\t}", "function activate() \n {\n // prepare the opt...
[ "0.8203552", "0.8018889", "0.7616073", "0.75961596", "0.750009", "0.746767", "0.74161804", "0.7392714", "0.73784673", "0.7365588", "0.72423255", "0.7170267", "0.7158208", "0.7139021", "0.7112136", "0.71087885", "0.7076638", "0.6906146", "0.69023275", "0.69023275", "0.69023275...
0.62727994
82
Returns true if it's WP with enabled Network mode
function is_network_mode() { static $network_mode = null; if ($network_mode === null) { $network_mode = (defined('MULTISITE') && MULTISITE); } return $network_mode; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function is_network_detected()\n {\n /* Plugin is loaded via mu-plugins. */\n\n if (strpos(Utility::normalize_path($this->root_path), Utility::normalize_path(WPMU_PLUGIN_DIR)) !== false) {\n return true;\n }\n\n if (is...
[ "0.76106954", "0.75821054", "0.7378136", "0.7021844", "0.70193887", "0.6970021", "0.6929094", "0.6860399", "0.67427504", "0.67328185", "0.67027545", "0.6689479", "0.668022", "0.66006565", "0.65965235", "0.65741277", "0.6571933", "0.6485057", "0.64530116", "0.6446313", "0.6433...
0.7266318
3
DISPLAY ITEM TO MODAL OF CART_PAGE..
public function display_item(Request $request){ $id = $request->item_id; $item_id = item::where('id', $id)->first(); return response()->json($item_id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display_items() {\n\t\t$wrap_class = str_replace( '_', '-', $this->parant_plugin_slug );\n\t\t?>\n\t\t<div id=\"wpaddons-io-wrap\" class=\"wrap <?php echo $wrap_class; ?>-wrap\">\n\n\t\t\t<?php\n\t\t\t// Get addon\n\t\t\t$addons = $this->get_addons();\n\n\t\t\t// Load the display template\n\t\t\tin...
[ "0.6727339", "0.6346032", "0.62905097", "0.62762725", "0.62298626", "0.61925036", "0.60497975", "0.6041301", "0.60172355", "0.60047704", "0.5940576", "0.58672947", "0.5861009", "0.58248466", "0.5807389", "0.5807389", "0.579114", "0.57811254", "0.57549244", "0.57391053", "0.57...
0.0
-1
/desc:generate authcode /input:arg(email,code_type(1register,2change password,3change email,4change phone),user_type,user_id) /output:return(authcode,errorcode(1success,0failed))
function generate_authcode_email($email,$code_type=0,$user_id="",$user_type=Constant::USER_TYPE_TEACHER,$check=true) { $authcode=""; if($check) $errorcode=$this->check_authcode_email($email,$code_type,$user_id); else $errorcode=array('errorcode'=>false); if(!$errorcode['errorcode']) { $au...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generate_authcode_phone($phone,$code_type=0,$user_id=\"\",$user_type=Constant::USER_TYPE_TEACHER)\n\t{\n\t\t$authcode=\"\";\n\t\t$errorcode=$this->check_authcode_phone($phone,$code_type);\n if(!$errorcode['errorcode'])\n {\n\t\t\t$authcode=random_string('nozero',6);\n $data=$this-...
[ "0.7041306", "0.6664811", "0.6414264", "0.63870126", "0.6328473", "0.6225655", "0.6189174", "0.6171091", "0.6162935", "0.61328924", "0.6098717", "0.6017145", "0.600179", "0.5996775", "0.5996761", "0.5988542", "0.59841704", "0.59823465", "0.5956479", "0.5842074", "0.5827205", ...
0.73247254
0
/desc:generate authcode /input:arg(phone,code_type(1register,2change password),user_type,user_id) /output:return(authcode,errorcode(1success,0failed))
function generate_authcode_phone($phone,$code_type=0,$user_id="",$user_type=Constant::USER_TYPE_TEACHER) { $authcode=""; $errorcode=$this->check_authcode_phone($phone,$code_type); if(!$errorcode['errorcode']) { $authcode=random_string('nozero',6); $data=$this->bind_verify($user_id,""...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_authcode_phone($phone,$code_type,$user_id=\"\")\n {\n\t\tif($phone)\n\t\t{\n\t\t\tif($this->_redis)\n\t\t\t{\n\n\t\t\t\t$errorcode=$this->check_auth('phone',sha1($phone));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->db->select(\"id\");\n\t\t\t\t$this->db->from($this->_table);\n\t\t\t\t$this->db...
[ "0.6973977", "0.68567944", "0.653663", "0.6469809", "0.6230544", "0.6160553", "0.6155896", "0.6071113", "0.606184", "0.6061542", "0.60458225", "0.6037689", "0.5979467", "0.595551", "0.59494174", "0.5949014", "0.59301543", "0.5901704", "0.5869621", "0.58634496", "0.5858948", ...
0.79321396
0
/desc:check authcode time /input:arg(user_id,code_type,email) /output:return(errorcode(1success,0failed))
function check_authcode_email($email,$code_type,$user_id="") { if($email) { if($this->_redis) { $errorcode=$this->check_auth('email',$email); } else { $this->db->select("id"); $this->db->from($this->_table); $this->db->where("email",$email); $t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function verify_authcode_email($authcode)\n\t{\n\t\t$user_id=$email=$code_type=$user_type=0;\n\t\tif($this->_redis)\n\t\t{\n\t\t\t$data=$this->cache->get($authcode);\t\n\t\t\tif(!empty($data))\n\t\t\t{\n\t\t\t\t$data=json_decode($data);\n\t\t\t\t$user_id=$data->user_id;\n\t\t\t\t$email=$data->email;\n\t\t\t\t$code...
[ "0.70175093", "0.6671944", "0.6636695", "0.6557928", "0.65566397", "0.64303976", "0.64200485", "0.639658", "0.63700753", "0.6228954", "0.6207038", "0.60789436", "0.60712767", "0.60692966", "0.60504144", "0.6032281", "0.6017066", "0.5968752", "0.59380555", "0.5934535", "0.5929...
0.7296355
0
/desc:check authcode time /input:arg(user_id,code_type,phone) /output:return(errorcode(1success,0failed))
function check_authcode_phone($phone,$code_type,$user_id="") { if($phone) { if($this->_redis) { $errorcode=$this->check_auth('phone',sha1($phone)); } else { $this->db->select("id"); $this->db->from($this->_table); $this->db->where("phone",sha1($phone));//需要通过服务获得加密后的电话号码 $thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_authcode_email($email,$code_type,$user_id=\"\")\n\t{\n\t\tif($email)\n\t\t{\n\t\t\tif($this->_redis)\n {\n\t\t\t\t$errorcode=$this->check_auth('email',$email);\n }\n else\n {\n\t\t\t\t$this->db->select(\"id\");\n\t\t\t\t$this->db->from($this->_table);\n\t\...
[ "0.66229653", "0.66124845", "0.6599462", "0.65965307", "0.65910935", "0.6551686", "0.6520834", "0.64820313", "0.6337884", "0.6298369", "0.62243575", "0.622435", "0.620291", "0.61889225", "0.6100215", "0.6006341", "0.59979546", "0.5992259", "0.5990905", "0.59638214", "0.588976...
0.7295115
0
/desc:send authcode /input:arg(authcode,email,code_type) /output:email,return(errorcode(1success,0failed))
function send_authcode_email($authcode,$email,$code_type=0) { $this->load->library("mail"); $this->load->model('login/register_model'); $msg_head=$msg_end=$lang=$link=$stuid=''; if($this->_user_id) { $user_info=$this->register_model->get_user_info($this->_user_id); if($user_info['errorcode'] && $user_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeCommandAUTH(&$SMSGW, $argument = null)\n{\n $code = $SMSGW->getAndSaveAuthCode();\n\n if ($code > 9999 && $code < 100000)\n {\n return $SMSGW->sendMessage('Auth code: ' . $code);\n }\n else\n {\n $SMSGW->log(__FUNCTION__, 'Unable to save auth code to db or invalid code - ' . $code);\n ...
[ "0.6587561", "0.65309834", "0.65000844", "0.6454442", "0.6268056", "0.61848456", "0.61538", "0.61411166", "0.6133378", "0.6067421", "0.6039789", "0.60335094", "0.6011027", "0.5980633", "0.59568024", "0.59484214", "0.5912318", "0.58550596", "0.5849572", "0.5830296", "0.582752"...
0.6484421
3
/desc:send authcode /input:arg(authcode,phone) /output:phone,return(errorcode(1success,0failed))
function send_authcode_phone($authcode,$phone,$code_type=0) { $this->load->library('sms'); $msg_head=$msg_end=$lang=''; switch($code_type) { case Constant::CODE_TYPE_REGISTER: $lang="verify";break; case Constant::CODE_TYPE_CHANGE_PASSWORD: $lang="reset";break; case Constant::CODE_TYPE_CHANGE_PHONE: $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function executeCommandAUTH(&$SMSGW, $argument = null)\n{\n $code = $SMSGW->getAndSaveAuthCode();\n\n if ($code > 9999 && $code < 100000)\n {\n return $SMSGW->sendMessage('Auth code: ' . $code);\n }\n else\n {\n $SMSGW->log(__FUNCTION__, 'Unable to save auth code to db or invalid code - ' . $code);\n ...
[ "0.689822", "0.6738459", "0.66279936", "0.64241266", "0.6382327", "0.63817763", "0.63147527", "0.60499066", "0.5902512", "0.587917", "0.58738446", "0.58483106", "0.5804973", "0.57992697", "0.57807124", "0.57551396", "0.57377243", "0.57367593", "0.57090575", "0.5672435", "0.56...
0.69796145
0
/desc:verify email /input:arg(authcode) /output:return(user_id,email,code_type,errorcode(1success,0failed))
function verify_authcode_email($authcode) { $user_id=$email=$code_type=$user_type=0; if($this->_redis) { $data=$this->cache->get($authcode); if(!empty($data)) { $data=json_decode($data); $user_id=$data->user_id; $email=$data->email; $code_type=$data->code_type; $user_type=$data->use...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_authcode_email($email,$code_type,$user_id=\"\")\n\t{\n\t\tif($email)\n\t\t{\n\t\t\tif($this->_redis)\n {\n\t\t\t\t$errorcode=$this->check_auth('email',$email);\n }\n else\n {\n\t\t\t\t$this->db->select(\"id\");\n\t\t\t\t$this->db->from($this->_table);\n\t\...
[ "0.7357168", "0.72274476", "0.72213393", "0.69830644", "0.69380236", "0.6888172", "0.67501175", "0.6735601", "0.6733808", "0.67028695", "0.66032106", "0.6547012", "0.64602464", "0.6446105", "0.64100087", "0.6404664", "0.63921386", "0.6387383", "0.63602126", "0.6347601", "0.63...
0.7359493
0
/desc:verify phone /input:arg(authcode,verify(1verified,2not verified)) /output:return(user_id,phone,code_type,errorcode(1success,0failed))
function verify_authcode_phone($authcode,$phone,$verify=true) { $user_id=$code_type=0; if($this->_redis) { $data=$this->cache->get($authcode.'_'.sha1($phone)); if(!empty($data)) { $data=json_decode($data); $user_id=$data->user_id; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function check_authcode_phone($phone,$code_type,$user_id=\"\")\n {\n\t\tif($phone)\n\t\t{\n\t\t\tif($this->_redis)\n\t\t\t{\n\n\t\t\t\t$errorcode=$this->check_auth('phone',sha1($phone));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->db->select(\"id\");\n\t\t\t\t$this->db->from($this->_table);\n\t\t\t\t$this->db...
[ "0.7081012", "0.7042071", "0.69467556", "0.69088787", "0.6656038", "0.6648316", "0.6640863", "0.66265166", "0.6513513", "0.6507705", "0.6505614", "0.6425127", "0.638509", "0.6370607", "0.6327103", "0.63181174", "0.62563235", "0.62260467", "0.6206373", "0.61765593", "0.6142251...
0.7232017
0
Execute the console command.
public function handle() { $permission = $this->argument('name'); $actions = ['index', 'create', 'view', 'edit', 'delete']; foreach ($actions as $action) { $data = ['name' => $permission . '-' . $action]; Permission::firstOrCreate($data); } return 0;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }", "public function handle()\n {\n //get us the Converter class instance and call the convert() meth...
[ "0.6469962", "0.6463639", "0.64271367", "0.635053", "0.63190264", "0.62747604", "0.6261977", "0.6261908", "0.6235821", "0.62248456", "0.62217945", "0.6214421", "0.6193356", "0.61916095", "0.6183878", "0.6177804", "0.61763877", "0.6172579", "0.61497146", "0.6148907", "0.614841...
0.0
-1
Specifies the list of events to listen
public function getSubscribedEvents() { return array( 'prePersist', 'preUpdate' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listeners($event);", "public function listeners($eventName);", "protected function setSwooleServerListeners()\n {\n foreach ($this->events as $event) {\n $listener = Str::camel(\"on_$event\");\n $callback = method_exists($this, $listener) ? [$this, $listener] : f...
[ "0.66679925", "0.6616843", "0.6577618", "0.6517733", "0.6479103", "0.64048636", "0.6392826", "0.6364057", "0.62442756", "0.62316775", "0.62316775", "0.61235845", "0.6062544", "0.6035194", "0.60324657", "0.60220236", "0.60212046", "0.6009963", "0.59433967", "0.59387356", "0.58...
0.0
-1
Update flexible fields when a value is updated
protected function updateFlexibleFields(ObjectManager $om, AbstractFlexible $flexible, $fields) { $meta = $om->getClassMetadata(get_class($flexible)); $uow = $om->getUnitOfWork(); $now = new \DateTime('now', new \DateTimeZone('UTC')); $changes = array(); foreach ($fields as...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _updatefields() {}", "public function testUpdateExtraFields(): void { }", "function updateField() {\n DATABASE::INIT_TABLE($this->database, $this->table);\n $fname = $this->urlParam('fname');\n $fvalue = $this->urlParam('fvalue');\n $id = $this->u...
[ "0.80435646", "0.7480888", "0.702666", "0.698054", "0.6813463", "0.67963946", "0.6721599", "0.66869694", "0.6650359", "0.65971", "0.65971", "0.65971", "0.65971", "0.65884465", "0.65811956", "0.6474933", "0.6465617", "0.63198245", "0.6267695", "0.6239532", "0.6220739", "0.62...
0.6203038
23
Transform the resource into an array.
public function toArray($request) { return ['id'=> $this->id, 'name'=>$this->name, 'lyrics'=>$this->lyrics, 'artists'=>$this->artists, 'duration'=>$this->duration, 'created_at'=>$this->created_at->format('Y-m-d H:i:s'), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }", "public function toArray(): array\n {\n if (is_null($this->r...
[ "0.7750928", "0.7750928", "0.7715773", "0.75906307", "0.7310379", "0.7138024", "0.7134791", "0.7096877", "0.7096877", "0.70968604", "0.70968604", "0.70968604", "0.70968604", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.7...
0.0
-1
Convert HTTP request to backend request.
protected function createBackendRequest(Request $request) { $method = $request->getMethod(); $uri = $request->getPathInfo(); $uri .= !is_null($qs = $request->getQueryString()) ? '?'.$qs : ''; $headers = $request->request->all(); if (!$headers) { $headers = null; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function convertFromRequest(SimplifiedRequest $request);", "abstract protected function createBackendRequest(Request $request);", "public function toRequest(): Request\n {\n // Create URI\n $uri = new Uri(sprintf($this->uriTemplate, $this->shop));\n\n // Create headers\n...
[ "0.6923919", "0.6508892", "0.5988641", "0.5963723", "0.5808577", "0.5795457", "0.5785965", "0.57526016", "0.5750149", "0.57199204", "0.5714393", "0.5711751", "0.5699852", "0.567262", "0.5659152", "0.5656905", "0.5619941", "0.5613398", "0.5556132", "0.5552009", "0.5533105", ...
0.6059352
2
Creates a Symfony framework response from a backend response.
protected function createResponse(GuzzleResponse $response) { return Response::create($response->getBody(), $response->getStatusCode(), $response->getHeaders()->getAll()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createResponse()\n {\n return new Response;\n }", "public function createResponse()\n {\n return new GuzzleResponse();\n }", "public function createResponse(): ResponseInterface {\n return $this->responseFactory->createResponse()->withHeader('Content-Type', 'app...
[ "0.7036142", "0.6870034", "0.6793093", "0.6659858", "0.6650396", "0.66433126", "0.66349405", "0.6527649", "0.6510318", "0.65088177", "0.64706933", "0.63542026", "0.631651", "0.63139945", "0.6203885", "0.6200207", "0.61149365", "0.60920995", "0.6092079", "0.60885465", "0.60302...
0.60805005
20
Get the fully qualified location of the view.
public function find($name) { if (isset($this->views[$name])) { return $this->views[$name]; } if ($this->hasHintInformation($name = trim($name))) { return $this->views[$name] = $this->findNamespacedView($name); } return $this->views[$name] = $th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function view()\n {\n return $this->entry->getPath();\n }", "public function getViewPath()\n {\n return $this->viewPath;\n }", "public function getViewPath()\n {\n return $this->viewPath;\n }", "public function getViewPath()\n {\n return Kerisy::$app->v...
[ "0.74754924", "0.731299", "0.731299", "0.7310194", "0.7252983", "0.71457577", "0.70997614", "0.7052534", "0.6998455", "0.6991721", "0.69238716", "0.6780578", "0.6703089", "0.66386616", "0.6589892", "0.65583473", "0.65274715", "0.65189034", "0.6448963", "0.6409178", "0.6391837...
0.0
-1
Get an array of possible view files.
protected function getPossibleViewFiles($name) { $user_id = Auth::user()->id ?? 0; //var_dump($user_id); return array_map(function ($extension) use ($name, $user_id) { return str_replace('.', '/', $name) . '.' . $extension; $segments = explode(".", $name); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function availableViews() {\n\tglobal $fmdb, $__FM_CONFIG;\n\t\n\t$array[0][] = __('All Views');\n\t$array[0][] = '0';\n\t\n\t$j = 0;\n\t/** Views */\n\t$result = basicGetList('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'views', 'view_name', 'view_');\n\tif ($fmdb->num_rows) {\n\t\t$results = $fmdb->last_result;\n\t...
[ "0.68583673", "0.6747502", "0.6722233", "0.6706559", "0.6586508", "0.6569959", "0.6563175", "0.649346", "0.63854706", "0.63686913", "0.63263506", "0.63124937", "0.6309444", "0.6297853", "0.6285851", "0.6274101", "0.6222237", "0.6213446", "0.61889684", "0.61388683", "0.6132831...
0.7155296
0
Run the database seeds.
public function run() { Music::create([ 'nombre'=>'The legend of Hourai', 'descripcion'=>'La legenda nunca contada', 'album_id'=>'1', ]); Music::create([ 'nombre'=>'Default', 'descripcion'=>'Musica por defecto', 'album_i...
{ "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
Show the form for creating a new resource.
public function create() { $categories=$this->model->getCategories(); $colors=$this->model->getColours(); return view("admin.pages.insertProduct",['categories'=>$categories,'colors'=>$colors]); }
{ "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( AddProductRequest $r) { // if($r->has('sendProduct')) { $productAdmin= $r->input('productAdmin'); $priceAdmin= $r->input('priceAdmin'); $categoryAdmin= $r->input('categoryAdmin'); $colorAdmin= $r->input('colorAdmin'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8232636", "0.81890994", "0.68296117", "0.64987075", "0.649589", "0.64692974", "0.64633286", "0.63640857", "0.6307513", "0.6281809", "0.621944", "0.61926234", "0.61803305", "0.6173143", "0.61398774", "0.6119022", "0.61085826", "0.6106046", "0.60947937", "0.6078597", "0.6047...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // $colors=$this->model->getColours(); $categories=$this->model->getCategories(); $productOne=$this->model->getOneProduct($id); return view("admin.pages.updateProduct",['product'=>$productOne,'colors'=>$colors, 'categories'=>$categories]);...
{ "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(UpdateProductRequest $re, $id) { // //dd($re); if($re->has('sendProductUpdate')) { $productAdminUpdate= $re->input('productAdminUpdate'); $priceAdminUpdate= $re->input('priceAdminUpdate'); $categoryAdminUpdate= $re->input('category...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // try{ $this->model->deleteProduct($id); return redirect()->back()->with('message', 'Product has been deleted'); } catch(\Exception $e){ return response(["greska" => $e->getMessage()], 505); } }
{ "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
/ private $host = "localhost"; private $user = "mysql"; private $pass = "mysql"; private $dbname = "bwt";
public static function DB() { if (!isset(self::$instance)){ //self::$db = new Model; self::$instance = new self; } return self::$instance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function DB($dbname='MichelinClassroomDB', $host='localhost',$user='root', $password='console')\r\n\t{\r\n\t\t$this->user=$user;\r\n\t\t$this->password=$password;\r\n\t\t$this->host=$host;\r\n\t\t$this->dbname=$dbname;\r\n\t}", "function Database()\n {\n\t\t$config = new Config();\n\n\t\t$this->host = $config...
[ "0.7497263", "0.7456955", "0.7452766", "0.7375823", "0.73622453", "0.7347748", "0.73273903", "0.73267317", "0.73246735", "0.7303673", "0.7294988", "0.7243647", "0.7232832", "0.7231543", "0.7228978", "0.7219174", "0.7217229", "0.710932", "0.7071614", "0.7025692", "0.702271", ...
0.0
-1
/ PPBKDF2 A Password KDF called Parallel PBKDF2. Written in 2020 Steve "Sc00bz" Thomas (steve at tobtu dot com) To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warran...
function ppbkdf2($algo, $password, $salt, $cost, $length = 0, $binary = false) { // Hash length and PHP limits // There is no actual limit to cost. When 384*cost is more than 2^32-1, // iterations is doubled and cost is halved until 384*cost is less than 2^32. $hashLen = strlen(hash_pbkdf2($algo, '', '', 1, 0, true...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pbkdf2($algorithm, $password, $salt, $count, $key_length, $raw_output = false)\n{\n $algorithm = strtolower($algorithm);\n if(!in_array($algorithm, hash_algos(), true))\n trigger_error('PBKDF2 ERROR: Invalid hash algorithm.', E_USER_ERROR);\n if($count <= 0 || $key_length <= 0)\n tr...
[ "0.74503815", "0.7211696", "0.71586984", "0.70948225", "0.6761175", "0.64212", "0.60631734", "0.598255", "0.58243155", "0.58212477", "0.56231505", "0.5556102", "0.53807485", "0.5266688", "0.5222263", "0.51415634", "0.51129895", "0.50296575", "0.49911317", "0.49544737", "0.493...
0.73477584
1
A basic test example.
public function testProduct() { $this->post('/api/v1/login',['email' => 'mesonero@luna.com','password' => 12345]) ->get('api/v1/producto') ->seeJson([]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testExample()\n {\n }", "public function test() {\n \t\n\t\tprint_r('hello stef');\n \t\n }", "public function testBasicExample()\n {\n $this->assertTrue(true);\n }", "public function testBasicExample()\n {\n $this->assertEquals(1, 1);\n }", "functio...
[ "0.7977854", "0.77753335", "0.76435244", "0.7610687", "0.754975", "0.75405073", "0.75393844", "0.74867696", "0.74400353", "0.7432722", "0.7412231", "0.73547494", "0.73383486", "0.7337478", "0.7308627", "0.7305436", "0.72681046", "0.7260569", "0.72460294", "0.7215908", "0.7195...
0.0
-1
Transform the resource into an array.
public function toArray($request) { $storeM = Store::find($this->store_id); return [ 'id' => $this->id , 'store_id' => $this->store_id , 'store_name' => $storeM->name , 'user_id' => $this->user_id , 'TM' => $this->TM , 'all_TM' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }", "public function toArray(): array\n {\n if (is_null($this->r...
[ "0.7750928", "0.7750928", "0.7715773", "0.75906307", "0.7310379", "0.7138024", "0.7134791", "0.7096877", "0.7096877", "0.70968604", "0.70968604", "0.70968604", "0.70968604", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.7...
0.0
-1
Recoger los datos del usuario
public function register(Request $request){ $json = $request->input('json',null); $params = json_decode($json); $params_array = json_decode($json,true); if(!empty($params) && !empty($params_array)){ //Limpiar datos $params_array = array_map('trim',$params_array); //Validar da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function datos_usuario(){\n\t\t$data = json_decode(json_encode($_SESSION['USER']),true);\n\n\t\t$result = $this->_db->query(\"\n\t\tSELECT a.roleid FROM \".DB_PRE.\"role_assignments a, \".DB_PRE.\"context b \n\t\tWHERE a.userid = '$data[id]' AND a.contextid = b.id AND b.instanceid =\".ID_CURSO\n\t\t);\n\n\t...
[ "0.7129954", "0.7052306", "0.7000962", "0.6958368", "0.68119097", "0.66411966", "0.66149396", "0.6606021", "0.65998924", "0.6591766", "0.65428185", "0.65392315", "0.65370804", "0.653632", "0.6532443", "0.6514418", "0.64949816", "0.64941466", "0.64788216", "0.64495367", "0.644...
0.0
-1
Check if url exists
public function checkURL($url) { $ret = false; $headers = get_headers( 'http://gdata.youtube.com/feeds/api/videos/'. $this->getVideoId($url) ); if (strpos($headers[0], '200')) { $ret = true; } return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function url_exist($url)\r\n\t\t{\r\n\t\t\r\n\t\t}", "function url_exists($url){ \r\n $url_data = parse_url($url); // scheme, host, port, path, query\r\n if(!fsockopen($url_data['host'], isset($url_data['port']) ? $url_data['port'] : 80)){\r\n $this->set...
[ "0.8412321", "0.82694304", "0.8186502", "0.81785977", "0.81164354", "0.8105718", "0.7988185", "0.79230607", "0.78769326", "0.78215384", "0.78013206", "0.7749806", "0.77096796", "0.76084083", "0.7569082", "0.7512232", "0.7510689", "0.7453848", "0.74467", "0.73903924", "0.72976...
0.6545332
68
Return a specific attribute
private function getAttribute($attribute) { return isset($this->_data->{$attribute}) ? $this->_data->{$attribute} : ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdentifyingAttribute();", "public function get($attribute);", "public function getAttribute(string $attribute): string;", "public function getAttribute($attribute)\n {\n }", "public function getAttribute($attribute)\r\n\t{\r\n\t\t\r\n\t}", "public function readAttribute($attribut...
[ "0.7967078", "0.7923695", "0.78670603", "0.7857419", "0.78026295", "0.7565481", "0.7512786", "0.7512786", "0.74653256", "0.7453992", "0.7447422", "0.74411756", "0.7416943", "0.73885655", "0.73750514", "0.7374862", "0.7345002", "0.7329161", "0.7328028", "0.7316482", "0.7300801...
0.7141839
28
/ | | Common attributes | Iframe code to embed video
public function embed() { if (empty($this->_videoId)) { return ''; } return '<iframe width="100%" height="'.$height.'" src="//www.youtube.com/embed/'.$this->_videoId.'" frameborder="0" allowfullscreen></iframe>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function neu_custom_iframe_video(){\n\t// get iframe HTML\n\t$iframe = get_field('video');\n\n\n\t// use preg_match to find iframe src\n\tpreg_match('/src=\"(.+?)\"/', $iframe, $matches);\n\t$src = $matches[1];\n\n\n\t// add extra params to iframe src\n\t$params = array(\n\t /*'controls' => 0,*/\n\t 'hd' ...
[ "0.7947435", "0.74100304", "0.73970544", "0.7303058", "0.72988105", "0.723098", "0.7149711", "0.71355397", "0.7067044", "0.70485836", "0.69778174", "0.6935423", "0.68400264", "0.6724045", "0.6712874", "0.6683594", "0.6662239", "0.6594677", "0.6587823", "0.658486", "0.65621775...
0.6903546
12
check if account exists
function checkAccount($name, $username){ $query = "SELECT * FROM users_account WHERE fullname = ? OR username = ?"; $paramType = "ss"; $paramValue = array( $name, $username ); $result = $this->db_handle->runquery($query, $paramType, $paramValue); return $r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isAccountExist()\n {\n $sessionId = \\Session::getId();\n $account = Account::where('session_id', $sessionId)->first();\n if (!$account) return false;\n\n return true;\n }", "public function checkUserExist($account){\n $query = \"select * from members w...
[ "0.79502535", "0.779367", "0.74163085", "0.7391764", "0.71684486", "0.7159462", "0.71255577", "0.7097755", "0.70869243", "0.70120394", "0.7012008", "0.6972208", "0.6968287", "0.69172627", "0.68746346", "0.68355745", "0.6791166", "0.6757868", "0.67085475", "0.6697441", "0.6625...
0.6193197
76
update users account info
function updateProfile($name, $phone, $email, $username, $userid) { $query = "UPDATE users_account SET fullname = ?,mobileno = ?,email = ?,username WHERE userid = ?"; $paramType = "ssssi"; $paramValue = array( $name, $phone, $email, $username, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function account_update_info()\n\t{\n\t\t$data = $this->input->post();\n\t\tif ($this->ion_auth->update($this->mUser->id, $data))\n\t\t{\n\t\t\t$messages = $this->ion_auth->messages();\n\t\t\t$this->system_message->set_success($messages);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$errors = $this->ion_auth->errors();\n...
[ "0.7884176", "0.74927115", "0.74875236", "0.73785305", "0.7355444", "0.7265568", "0.72541094", "0.71562374", "0.71379924", "0.7118838", "0.70697623", "0.70301", "0.702997", "0.70167625", "0.7001047", "0.6990665", "0.693241", "0.69005805", "0.6889815", "0.6877632", "0.6859657"...
0.66218793
35
function to trigger user account password change
function changePassword($password, $userid){ $query = "UPDATE users_account SET password = ? WHERE userid = ?"; $paramType = "si"; $paramValue = array( $password, $userid ); $this->db_handle->update($query, $paramType, $paramValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function changePassword() {}", "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}", "public function changeUserPassword($uid,$newPassword);", ...
[ "0.8312075", "0.8306013", "0.8209947", "0.8002731", "0.79494894", "0.77816314", "0.77121973", "0.76271075", "0.75843954", "0.7537494", "0.74955547", "0.7424394", "0.7373984", "0.736864", "0.7345142", "0.7341299", "0.7318712", "0.7302697", "0.72897345", "0.72659004", "0.725076...
0.67763263
85
function to lock user account
function lockAccount($userid){ $query = "UPDATE users_account SET status ='Locked' WHERE userid = ?"; $paramType = "i"; $paramValue = array( $userid ); $this->db_handle->update($query, $paramType, $paramValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lockout($username = \"\") {\n\t\tglobal $wpdb;\n\n\t\t$ip = $this->get_user_ip();;\n\n\t\t$username = sanitize_user($username);\n\n\t\t$user = get_user_by( 'login', $username );\n\n\t\tif ( !$user ) { \n\t\t\t$user = new stdClass();\n\t\t\t$user->ID = 0;\n\t\t}\n\n\t\t$sql = \"insert into \" . $this->lock...
[ "0.699564", "0.6948573", "0.6936408", "0.6891661", "0.6808437", "0.67276627", "0.67084074", "0.6677602", "0.6629723", "0.6624969", "0.66050994", "0.653671", "0.6534801", "0.6527167", "0.6525149", "0.65177596", "0.6380179", "0.63343114", "0.6333951", "0.6330517", "0.62679476",...
0.77444375
0
function to unlock(reactivate) user account
function unlockAccount($userid){ $query = "UPDATE users_account SET status ='Active' WHERE userid = ?"; $paramType = "i"; $paramValue = array( $userid ); $this->db_handle->update($query, $paramType, $paramValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function unlock_account() {\n $model = \\Auth::$model;\n\n # hash GET param exists\n if ($hash = data('hash')) {\n\n # verificando se ha algum usuário com a hash.\n $user = $model::first(array(\n 'fields' => 'id, hash_unlock_account',\n ...
[ "0.7728947", "0.6833659", "0.6818787", "0.67574424", "0.6682874", "0.6681313", "0.6660578", "0.66593945", "0.66593945", "0.66593945", "0.66593945", "0.66593945", "0.663565", "0.65629786", "0.6530485", "0.64594066", "0.64483666", "0.6439482", "0.64256066", "0.633211", "0.63257...
0.73606616
1
get user by id
function getUserById($user_id) { $query = "SELECT * FROM users_account WHERE userid = ?"; $paramType = "i"; $paramValue = array( $user_id ); $result = $this->db_handle->runQuery($query, $paramType, $paramValue); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUser($id);", "private function getUserById($id) {\n\t\t$em = $this->getDoctrine()->getManager()->getRepository('AppBundle\\Entity\\User');\n\n\t\t$user = $em->findOneById($id);\t\n\t\t\n\t\treturn $user;\n\t}", "public static function getUserById($id)\n\t{\n\t\t$user = self::where('ID',$id)-...
[ "0.8660723", "0.85768", "0.8517957", "0.8405645", "0.8374372", "0.8355505", "0.83284163", "0.83204186", "0.82987565", "0.82902765", "0.8268308", "0.8257888", "0.8238321", "0.8221167", "0.82054377", "0.8173569", "0.81547225", "0.8153795", "0.8148725", "0.81314933", "0.811817",...
0.0
-1
return the image path
public function saveImage(Request $request){ preg_match_all('/^[a-zA-Z]+/',$request->path(), $result); // take the table name $path = implode('',$result[0]); // array to string if ($request->file('image') !== null){ $path = $request->file('image')->store($path); //dump($p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getImagePath () {\n return luxbum::getImage($this->dir, $this->file);\n }", "public function getImagePath(){\r\n\t\t\treturn $this->imagePath;\r\n\t\t}", "public function path()\n {\n return $this->image->path;\n }", "public function imagePath(){\n return $this->upload_dir...
[ "0.84208506", "0.8233903", "0.8196182", "0.8169768", "0.81438994", "0.80555916", "0.8048422", "0.7955272", "0.7757954", "0.7711666", "0.7711479", "0.7690967", "0.76587427", "0.76066184", "0.76061934", "0.7590499", "0.7559635", "0.75256515", "0.7517796", "0.7490722", "0.739895...
0.0
-1
See if a Rets Rabbit search exists.
public function exists($id = 0) { $search = craft()->retsRabbit_searches->getById($id); return !is_null($search); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSearchFilterExists(): bool;", "private function isSearch() {\n\t\tif (!is_null($this->search))\n\t\t\treturn true;\n\t\treturn false;\n\t}", "function is_search()\n {\n }", "public static function searchQueriesExist(){\n \n if (empty($_GET['lookfor']))\n return fals...
[ "0.59660745", "0.5927011", "0.5827908", "0.57014567", "0.5696672", "0.5666628", "0.5648116", "0.56401366", "0.5629795", "0.5580266", "0.5553644", "0.5541919", "0.55297583", "0.54535544", "0.54331195", "0.54331195", "0.54331195", "0.54329264", "0.54238576", "0.5401853", "0.538...
0.65967464
0
/ Function definition Add interface to LAS_API
function las_add_interface($name, $url, $msgtype='json', $rettype='json') { global $LAS_API; if ( $name && $url && $msgtype ) { $entry = new stdClass; $entry->url = $url; $entry->msgtype = $msgtype; $entry->rettype = $rettype; $LAS_API[$name] = $entry; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function las_get_interface($name = null) {\n\tglobal $LAS_CFG, $LAS_API;\n\n\t$las_api = $LAS_CFG->wwwroot . '/api';\n\t$report_api = $LAS_CFG->wwwroot . '/report';\n\t\n\tlas_add_interface(\n\t\t'GetAPIs',\n\t\t$las_api . '/GetAPIs',\n\t\tLAS_API_MSGTYPE_JSON,\n\t\tLAS_API_MSGTYPE_JSON\n\t);\n\t\n\tlas_add_interf...
[ "0.6499728", "0.62105834", "0.60508", "0.5871631", "0.5857463", "0.57444525", "0.5723107", "0.5674913", "0.56539774", "0.555263", "0.5550741", "0.55499077", "0.5504947", "0.54936004", "0.5485003", "0.5468451", "0.5464812", "0.5438502", "0.54377526", "0.54197794", "0.5410646",...
0.7473338
0
Get interface from LAS_API
function las_get_interface($name = null) { global $LAS_CFG, $LAS_API; $las_api = $LAS_CFG->wwwroot . '/api'; $report_api = $LAS_CFG->wwwroot . '/report'; las_add_interface( 'GetAPIs', $las_api . '/GetAPIs', LAS_API_MSGTYPE_JSON, LAS_API_MSGTYPE_JSON ); las_add_interface( 'UploadFile', $las_api . ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInterface();", "public function getInterface()\n {\n return $this->interface;\n }", "public function getApi();", "public function getApi();", "public function getApi();", "function las_add_interface($name, $url, $msgtype='json', $rettype='json') {\n\tglobal $LAS_API;\n\n\t...
[ "0.7175563", "0.62512624", "0.6231569", "0.6231569", "0.6231569", "0.5970218", "0.5890664", "0.5888556", "0.5847565", "0.58154094", "0.5804445", "0.5797872", "0.5750256", "0.57447606", "0.5722948", "0.56863195", "0.5651915", "0.5639321", "0.56219655", "0.56097263", "0.5604869...
0.7418081
0
Send message to Message Queue server
function sendMessageToQueue($messageObj){ global $LAS_CFG; $daemon_host = $LAS_CFG->las_daemon_server['host']; $daemon_port = $LAS_CFG->las_daemon_server['port']; $daemon_url = 'tcp://'.$daemon_host.':'.$daemon_port; $client_timeout = $LAS_CFG->las_daemon_server['timeout']; $exchange_name = $LAS_CFG->messag...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function send_message ($message)\t\t\t\t\n\t{\n\t\t$con = new Stomp('tcp://'.ACTIVEMQ_SERVER.':61613');\n\t\t$con->connect();\n\t\t$con->send(\"/queue/s3backup\", $message);\n\t\n\t}", "public function send($message);", "public function send($message);", "public function send($message);", "public function ...
[ "0.765517", "0.7229767", "0.7229767", "0.7229767", "0.7229767", "0.71146226", "0.70541126", "0.69842416", "0.69728214", "0.67216265", "0.65892786", "0.65770423", "0.6534626", "0.65290236", "0.64492756", "0.64386046", "0.643076", "0.643076", "0.643076", "0.643076", "0.643076",...
0.6961422
9
Success message with links to notices.
public static function make(string $noticeId): string { $message = <<<'EX' ⚡ --- ExceptionLive is installed! ----------------------------------------------- Good news: You're one deploy away from seeing all of your exceptions in ExceptionLive. For now, we've generated a test exception for you: https:/...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function license_success_message() {\n\t\t$message = __( 'Your Block Lab license was successfully activated!', 'block-lab' );\n\t\treturn sprintf( '<div class=\"notice notice-success\"><p>%s</p></div>', esc_html( $message ) );\n\t}", "public function notice_success( $itens = '' ) {\n\t\t$class = 'notice n...
[ "0.75259745", "0.7432046", "0.7427186", "0.73961884", "0.7361995", "0.73310107", "0.7174746", "0.7160757", "0.7140715", "0.69768286", "0.6965433", "0.6925982", "0.6924342", "0.6915881", "0.6888714", "0.68815714", "0.6854168", "0.6850474", "0.6828856", "0.68172807", "0.6783794...
0.0
-1
Complete semifinished result URL as two section strings and system params array. First section as base section with scheme, domain and base path, second section as application requested path and query string and third section as system params like `localization` or `media_version`. Those params could be inserted betwee...
protected abstract function urlByRouteSections (\MvcCore\IRoute $route, array & $params = [], $urlParamRouteName = NULL);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function urlByRoutePrefixSystemParams ($urlBaseSection, $urlPathWithQuerySection, array $systemParams = [], $urlPathWithQueryIsHome = NULL) {\n\t\t// complete prefixes section from system params\n\t\t$urlPrefixesSection = trim(implode('/', array_values($systemParams)), '/');\n\t\t$urlPrefixesSectionHasVa...
[ "0.59822166", "0.5686179", "0.5507244", "0.53819686", "0.5380631", "0.53669024", "0.531435", "0.5249101", "0.52304393", "0.52137184", "0.5196802", "0.51910526", "0.5170278", "0.516561", "0.5165282", "0.51595217", "0.5144615", "0.5127107", "0.5120047", "0.5114621", "0.5096322"...
0.52286905
9
Get `TRUE` if path with query string target homepage `/` (or `/index.php` request script name)
protected function urlIsHomePath ($pathWithQueryString) { $questionMarkPos = mb_strpos($pathWithQueryString, '?'); $pathWithoutQueryString = $questionMarkPos !== FALSE ? mb_substr($pathWithQueryString, 0, $questionMarkPos) : $pathWithQueryString; return trim($pathWithoutQueryString, '/') === '' || $pathWit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIsHomePage()\n {\n return $this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true));\n }", "public function getIsHomePage()\n {\n return $this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true));\n }", ...
[ "0.71505463", "0.71505463", "0.6697872", "0.66574013", "0.6594174", "0.6338522", "0.61764175", "0.6166108", "0.6161302", "0.6158105", "0.6083697", "0.60542035", "0.6033753", "0.60319906", "0.6017848", "0.59655505", "0.59545064", "0.59489495", "0.59120226", "0.5898876", "0.585...
0.7101664
2
Complete final URL, simply concatenate strings from three given sources: `$urlBaseSection` Begin URL part containing http, domain and base path like: ` `$urlPathWithQuerySection` Subject url part with application path and possible query string: `/some/path?with=query` `$systemParams` Array to implode it's values into s...
protected function urlByRoutePrefixSystemParams ($urlBaseSection, $urlPathWithQuerySection, array $systemParams = [], $urlPathWithQueryIsHome = NULL) { // complete prefixes section from system params $urlPrefixesSection = trim(implode('/', array_values($systemParams)), '/'); $urlPrefixesSectionHasValue = $urlPref...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toString(): string\n\t{\n\t\t$url = $this->base();\n\t\t$slash = true;\n\n\t\tif (empty($url) === true) {\n\t\t\t$url = '/';\n\t\t\t$slash = false;\n\t\t}\n\n\t\t$path = $this->path->toString($slash) . $this->params->toString(true);\n\n\t\tif ($this->slash && $slash === true) {\n\t\t\t$path .= ...
[ "0.6093951", "0.6050948", "0.59143114", "0.57995987", "0.566326", "0.5639802", "0.56183654", "0.56003124", "0.55905324", "0.5583229", "0.55726826", "0.5559579", "0.55568993", "0.55234265", "0.5523188", "0.5499795", "0.5465034", "0.54419494", "0.5425271", "0.5397729", "0.53547...
0.6669317
0
array that holds image object should be only one object
public function __construct($thumb_id, $file_ref){ $this->thumb_id = $thumb_id; $this->file_ref = $file_ref; $this->images = $this->get_related_images(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getImageArray();", "function getImages() \t{\n \t\treturn $this->images_array;\n \t}", "public function colectImages(&$arr) {\r\n\r\n $len = count($arr);\r\n $arrImg = [];\r\n\r\n for ($i = 0; $i < $len; $i++) {\r\n\r\n if ($arr[$i]['note'] !== false && $arr[$i...
[ "0.75568104", "0.6810632", "0.66469777", "0.66224015", "0.6386128", "0.62774396", "0.6252395", "0.6199608", "0.6102984", "0.6038838", "0.6037552", "0.59988153", "0.599877", "0.5986335", "0.59856915", "0.5982722", "0.59802794", "0.5938882", "0.5915553", "0.5891282", "0.5879766...
0.0
-1
protected $with = ['classes'];
public function subjects() { return $this->hasMany(Subject::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function myClasses(){\n return $this->hasMany('App\\Teacher_classes', 'teacher_id', 'id');\n }", "public function class()\n {\n return $this->belongsTo('App\\Classe', 'class_id');\n }", "public function classes() {\n return $this->hasManyThrough('aClass', 'Department')->orderBy('n...
[ "0.66706526", "0.6609155", "0.6416624", "0.6416107", "0.6388686", "0.6338504", "0.6297976", "0.603177", "0.5972203", "0.5956292", "0.594186", "0.59185946", "0.5911151", "0.58807945", "0.58692765", "0.58625865", "0.58344805", "0.5809084", "0.5803938", "0.57938755", "0.57275605...
0.0
-1
solution 1 this algorithm solves the problem with Time Complexity O(N^2)
function getSubseqMaxSum( $arr ) { //firstly we determine the number of the elements $N = count($arr) - 1; $sumMax = -999; $iMax = -1; $jMax = -1; //for i = 0 to N execute for($i = 0; $i <= $N; $i++) { $sum = 0; for($j = $i;$j <= $N...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function solution(array $A) {\n $result = $started = 0;\n foreach ($A as $d) {\n if ($d === 0) {\n $started++;\n } else if ($d === 1 and $started > 0) {\n $result += $started;\n }\n }\n if ($result > (int) 1E9) {\n return -1;\n }\n return $result;...
[ "0.6655046", "0.6574615", "0.6466907", "0.6448415", "0.6409319", "0.6371445", "0.6246942", "0.60129553", "0.5971421", "0.594417", "0.59158975", "0.5874815", "0.58338666", "0.5820739", "0.58071846", "0.57875353", "0.5775552", "0.5754062", "0.5573826", "0.55677235", "0.5510685"...
0.5141598
48
end function print_r( getMaxSumSubseq( $arr2 ) ); solution 3 this algorithm solves the problem using Divide et Impera and time complexity N log N and it's more efficient. using bestMax = max(bestL, max(bestR, maxSuf + maxPref)) array(2,11,4,13,5,2);
function getMaxSumSubSequence($arr, $li, $ls) { if($li == $ls) return $arr[ $li ]; $middle = intval(($li+$ls)/2); $bestL = getMaxSumSubSequence($arr, $li, $middle); $bestR = getMaxSumSubSequence($arr, $middle+1,$ls); $maxSuf = -9999; $maxPre = -9999; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSubseqMaxSum( $arr ) {\n\n //firstly we determine the number of the elements\n $N = count($arr) - 1;\n\n $sumMax = -999;\n\n $iMax = -1; $jMax = -1; \n\n //for i = 0 to N execute\n for($i = 0; $i <= $N; $i++) {\n\n $sum = 0;\n\n f...
[ "0.8007989", "0.79851335", "0.6944018", "0.637297", "0.59953517", "0.5988412", "0.59877753", "0.5943928", "0.57496715", "0.5673573", "0.5635653", "0.56223387", "0.55939406", "0.55181825", "0.54633176", "0.54430175", "0.5437487", "0.5400719", "0.53926146", "0.5384839", "0.5295...
0.7979368
2
echo getMaxSumSubSequence($arr, 0, 5); The following algorithm solves the problem with time complexity O(N^3) and it's not so efficient because it computes partial sums many times.
function getSubseqSum( $arr ) { $N = count($arr) - 1; $bestSum = 0; $posBest = -1; for($i = 0; $i <= $N; $i++) { for($j = $N; $j >= $i; $j--) { $partialSum = 0; for($k = $i; $k <= $j; $k++) { $partialSum += $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSubseqMaxSum( $arr ) {\n\n //firstly we determine the number of the elements\n $N = count($arr) - 1;\n\n $sumMax = -999;\n\n $iMax = -1; $jMax = -1; \n\n //for i = 0 to N execute\n for($i = 0; $i <= $N; $i++) {\n\n $sum = 0;\n\n f...
[ "0.8041444", "0.77919126", "0.73802394", "0.7115275", "0.6726554", "0.65194285", "0.6506421", "0.6403983", "0.64031935", "0.62988573", "0.6288922", "0.6204386", "0.6123467", "0.61165744", "0.6093035", "0.60909206", "0.60499895", "0.60432196", "0.590041", "0.5755475", "0.57342...
0.8347308
0
This algorithm solve the problem with linear O(N) time complexity using Dynamic Programming best[i] = sum[i] min(sum[j1])
function getSumSeq( $arr ) { $N = count($arr) - 1; $sum = array(); $sum[ 0 ] = $arr[ 0 ]; for($i = 1; $i <= $N; $i++) { $sum[ $i ] = $arr[ $i ] + $sum[ $i - 1 ]; } $bestSum = 0; $best = array(); $best[ 0 ] = $sum[ 0 ]; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSubseqSum( $arr ) {\n\n $N = count($arr) - 1;\n\n $bestSum = 0;\n\n $posBest = -1;\n\n for($i = 0; $i <= $N; $i++) {\n\n for($j = $N; $j >= $i; $j--) {\n\n $partialSum = 0;\n\n for($k = $i; $k <= $j; $k++) {\n\n ...
[ "0.6152062", "0.56653184", "0.5628356", "0.56030554", "0.5586677", "0.55404663", "0.54934293", "0.5446083", "0.5429773", "0.54093146", "0.5397866", "0.53958863", "0.536665", "0.53467995", "0.52943546", "0.52510643", "0.5216274", "0.5210172", "0.5135657", "0.51047444", "0.5104...
0.6439385
0
/ | Main Methods |
protected function setUp() { parent::setUp(); $this->blog = new Blog; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function main(){\n\t\t\t\n\t\t}", "public function main()\r\n {\r\n \r\n }", "public function main()\n\t{\n\t}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function main() {}", "public function m...
[ "0.7967887", "0.79450196", "0.7944685", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.776339", "0.7...
0.0
-1
/ | Tests |
public function it_can_be_instantiated() { $blog = Blog::instance(); static::assertInstanceOf(Blog::class, $blog); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testBasicTest()\n {\n\n }", "public function testExample()\n {\n }", "public function testGetExpert()\n {\n }", "function test_sample() {\n\n\t\t$this->assertTrue( true );\n\n\t}", "public function testGetAll() {\n }", "public function preTest() {}", "function test(...
[ "0.74613214", "0.7154873", "0.70369124", "0.69628215", "0.6951414", "0.69477105", "0.69418055", "0.69417113", "0.69271964", "0.6899723", "0.68542415", "0.6852062", "0.68330353", "0.6831723", "0.68160737", "0.68042785", "0.67973584", "0.6788511", "0.6785745", "0.6782197", "0.6...
0.0
-1
Devolvemos las franquicias que pertenecen a esta categoria.
public function index($tipo) { //Contador de franquicias que devuelve a la vista como paramtro cuando se busca en //franquicias en la global por ejemplo si de Alimentación si pinchamos en Alimentacion devuelve de fruterias,congelados, etc.. $resultados = 0; //Array de collect subcat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCategorias(){\r\n $conector = new Conector();\r\n $banco = new BancoCategoria();\r\n return $banco->getCategorias($conector->getConexao());\r\n }", "public function HM_CategoCuentas()\n {\n }", "public function verCategoria(){\n\t\t\t$array[] = array(\"id\"=>\"A00-B99\...
[ "0.5882453", "0.5854695", "0.58492804", "0.5798894", "0.576304", "0.56880164", "0.56803846", "0.56634134", "0.5612725", "0.56107444", "0.56107444", "0.558962", "0.55874664", "0.5564493", "0.5561148", "0.5552837", "0.5534987", "0.5451437", "0.54492", "0.5437908", "0.54344505",...
0.54461807
19
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.72875285", "0.71454394", "0.71323526", "0.6639812", "0.6620611", "0.6568348", "0.6526527", "0.6509403", "0.64499927", "0.6375791", "0.63739914", "0.6365971", "0.6365971", "0.6365971", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667", "0.6342667"...
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "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($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.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
Obtain Paystack payment information
public function handleGatewayCallback() { $paymentDetails = Paystack::getPaymentData(); //dd($paymentDetails); //dd($paymentDetails['data']['metadata']['Amount']); // dd($paymentDetails['data']['customer']['email']); // Now you have the payment details, // you can store the aut...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getPaymentInfo()\n {\n $baseUrl = 'http://embeddables.eastus2.cloudapp.azure.com/payment/';\n\n return json_decode(\n file_get_contents(\n $baseUrl . 'payment.json'\n )\n );\n }", "public function getInfoPayment()\n {\n $r...
[ "0.7720097", "0.7406579", "0.7180323", "0.6895206", "0.68616605", "0.6849942", "0.6826235", "0.6810686", "0.67703545", "0.67139083", "0.6651937", "0.6604245", "0.6531639", "0.64967364", "0.64831966", "0.64774376", "0.6443647", "0.6422266", "0.6381054", "0.6381054", "0.6381054...
0.0
-1
Get all combat units attached to this formation
function get_by_formation($formation_id) { return $this->db->query('SELECT * FROM combatunits WHERE formation_id='.$formation_id)->result(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unitsCombo()\n\t{\n\t\treturn Unit::all();\n\t}", "public function getUnits()\n {\n return $this->hasMany(Unit::className(), ['patient_ar_gl_acc_id' => 'account_id']);\n }", "public static function retrieveAllUnits() {\n return R::getAll('SELECT * FROM unit');\n }", "pu...
[ "0.6339565", "0.61949414", "0.611038", "0.6086017", "0.5991607", "0.5954808", "0.5640394", "0.56348264", "0.54640234", "0.543047", "0.536129", "0.51922613", "0.5111714", "0.5052967", "0.5006957", "0.4981392", "0.4971673", "0.49438918", "0.49270824", "0.48697177", "0.485338", ...
0.5316667
11
Converts any embeditem shortcode into its current state representation
protected function convertShortcodeNodes(&$component) { $page = $this->getPage(); if (isset($component['identifier']) && strpos($component['identifier'], 'embeddeditem') && isset($component['content'])) { $dataAttrs = isset($component['data']['data_attributes']) ? $component['data']['da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function shortcode_menu($item_output, $item) \n{\n \n if (!empty($item->title)) \n {\n $output = do_shortcode($item->title);\n\n //echo $item->title;\n \n if ($output != $item->title) $item_output = $output;\n }\n \n return $item_output;\n}", "function _filter_do_sho...
[ "0.58701247", "0.558858", "0.55556846", "0.5519841", "0.5514991", "0.54809016", "0.542927", "0.54198325", "0.540887", "0.5349261", "0.5314765", "0.5311587", "0.52698344", "0.52514625", "0.5248058", "0.52216387", "0.5218389", "0.5214565", "0.51846534", "0.5174611", "0.51448315...
0.5173348
20
Are we in edit mode?
public function getEditMode() { $page = $this->getPage(); if (!$page->canEdit()) { $this->endEditing(); return false; } $stage = Versioned::get_stage(); if ($stage != Versioned::DRAFT) { return false; } // one-off preview...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isEditOnlyMode();", "public function isSwitchToEditEnabled();", "public static function getEditMode(): bool\n\t{\n\t\treturn self::$editMode;\n\t}", "public function isEditable() {}", "protected function canEdit() {}", "private function isEditMode(){\n\t\tif(isset($this->AddRecordInsertDa...
[ "0.90717554", "0.86034536", "0.8497553", "0.81918395", "0.81680906", "0.8126412", "0.8073284", "0.8066822", "0.8066822", "0.7998006", "0.798625", "0.7966577", "0.7944133", "0.7889652", "0.78798366", "0.7799832", "0.779833", "0.7762823", "0.77104485", "0.7613159", "0.75540346"...
0.7790308
17
Load url helper for use later.(base_url()).
public function index() { redirect(base_url("index.php")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct() {\n parent::__construct();\n $this->load->helper('url'); \n }", "public function __construct()\r\n {\r\n helper([\"url\"]);\r\n }", "public function __construct() {\n parent::__construct();\n $this->load->helper('url');\n }", "pub...
[ "0.7130748", "0.7029656", "0.69483984", "0.69199526", "0.68676734", "0.68498653", "0.6832008", "0.6800604", "0.6687828", "0.65610117", "0.65453994", "0.65253687", "0.65214115", "0.6465156", "0.6364982", "0.63411045", "0.63374484", "0.6304357", "0.62724274", "0.62724274", "0.6...
0.0
-1
Returns the default table name to use for a model class.
private static function tableName($className) { return strtolower(Util::getSimpleClassName($className)) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDefaultTableName(): string\n {\n return \\implode('_', \\array_map(function ($element) {\n return Str::plural($element);\n }, \\array_merge(\n \\is_null($this->getModelGroup()) ? [] : \\explode('_', $this->getModelGroup()),\n ['pivot'],\n ...
[ "0.83081025", "0.80639595", "0.7891343", "0.7824138", "0.7780653", "0.77632016", "0.7735491", "0.7594263", "0.75616866", "0.75223917", "0.7514863", "0.7512523", "0.7486616", "0.7485304", "0.746534", "0.7460153", "0.7458463", "0.7439198", "0.743416", "0.74321383", "0.7396428",...
0.0
-1
Tells whether a Relation is a one or many to one relation.
private static function isXToOne(Relation $rel) { return $rel instanceof OneToOne || $rel instanceof ManyToOne ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isRelation()\n {\n return $this instanceof Relation;\n }", "public function canAutoJoin()\n {\n return ($this instanceof SingleRelation);\n }", "public function isRelated();", "public static function isRelation($type)\n {\n return in_array($type, ['ref-one'...
[ "0.74016815", "0.68106323", "0.680415", "0.66039115", "0.6597948", "0.65817165", "0.65535295", "0.6481432", "0.63150096", "0.63116264", "0.6306999", "0.61576355", "0.6132554", "0.61204356", "0.6109598", "0.6106486", "0.6071716", "0.60665417", "0.605936", "0.6057006", "0.60561...
0.68577045
1
Creates a new Printer instance.
public function __construct(/*private readonly */DefaultPrinter $printer) { $this->printer = $printer; // .. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrinter();", "public static function USBPrint($printerIp)\n {\n// $printer = new Printer($connector);\n $connector = new NetworkPrintConnector($printerIp, 9100);\n $printer = new Printer($connector);\n return $printer;\n }", "public function __construct(stri...
[ "0.62952435", "0.6098094", "0.5961678", "0.5875306", "0.58268577", "0.575805", "0.5686378", "0.5568351", "0.55188984", "0.54504544", "0.54504544", "0.53146243", "0.52919644", "0.5236908", "0.5216187", "0.5202395", "0.51797396", "0.5149941", "0.50577265", "0.49893075", "0.4987...
0.62267506
1
Calls the original method, but reports any errors to the reporter.
public function __call(/*string */$name, array $arguments)/*: mixed*/ { $name = backport_type_check('string', $name); try { return $this->printer->$name(...$arguments); } catch (\Exception $throwable) { } catch (\Error $throwable) { } catch (Throwable $throwable)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function report()\n {\n $this->logException();\n }", "function invoke($method) {\r\n set_error_handler('simpleTestErrorHandler');\r\n parent::invoke($method);\r\n $queue = &SimpleErrorQueue::instance();\r\n while (list($severity, $message, $file, $l...
[ "0.6064449", "0.6047144", "0.5817738", "0.5807725", "0.55490655", "0.5491397", "0.5409428", "0.53674114", "0.53574836", "0.5356493", "0.53558916", "0.53325206", "0.53306293", "0.5315821", "0.5284208", "0.52838075", "0.52406096", "0.51441914", "0.5103054", "0.50586087", "0.505...
0.0
-1
Run the database seeds.
public function run() { // DB::table('users')->insert([ [ 'name' => 'user', 'email' => 'user1@example.com', 'password' => Hash::make('12345678'), 'remember_token' => Str::random(10), 'created_at' => time(), 'updated_at' => time(), ],...
{ "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
Directory that users are allowed to place images for importing.
public function getDirectory(): ReadInterface { $path = $this->getDirectoryRelativePath(); return $this->filesystem->getDirectoryReadByPath( $this->filesystem->getDirectoryRead(DirectoryList::ROOT)->getAbsolutePath($path) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getUploadDir()\n {\n return 'images';\n }", "protected function getUploadRootDirImg() {\n // guardar los archivos cargados\n return __DIR__ . '/../../../../web/uploads/portafolios/' . $this->getId() . '/img';\n }", "public function getImagesFolder()\n {\n ...
[ "0.649574", "0.6274508", "0.626752", "0.62422156", "0.6142182", "0.61290085", "0.6107396", "0.61045575", "0.609239", "0.60852534", "0.6082692", "0.6077527", "0.60754645", "0.6074158", "0.6015895", "0.60075384", "0.5997599", "0.5986119", "0.5979913", "0.5978961", "0.5947457", ...
0.0
-1
The directory's path relative to Magento root.
public function getDirectoryRelativePath(): string { return $this->config->getValue('general/file/import_images_base_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dirPath() {return (\"../../../../\"); }", "function dirPath () { return (\"../../\"); }", "function dirPath() { return (\"../\"); }", "public function getSystemDirectoryPath() {\n return Mage::getBaseDir('var') . '/smartling/localization_files';\n }", "public function getDir() {\n ...
[ "0.7859769", "0.78360724", "0.780368", "0.75862926", "0.7585584", "0.7483402", "0.7382295", "0.7363991", "0.7294507", "0.7288443", "0.72712487", "0.7257862", "0.72456384", "0.71722764", "0.71362966", "0.71315885", "0.7119225", "0.7109731", "0.709021", "0.709021", "0.70663756"...
0.7299077
8
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 [ 'nombres'=>'required | max:100 |regex:/^([ a-zA-ZñÑáéíóúÁÉÍÓÚ_-])+((\s*)+([ a-zA-ZñÑáéíóúÁÉÍÓÚ_-]*)*)+$/', 'carnet'=>'required | max:100', 'apellidos'=>'required | max:100 | regex:/^([ a-zA-ZñÑáéíóúÁÉÍÓÚ_-])+((\s*)+([ a-zA-ZñÑáéíóúÁÉÍÓÚ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the sche...
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.76830...
0.0
-1
Handle the product "created" event.
public function created(Seller $seller) { $transaction = new Transaction(); $transaction->amount = 0; $transaction->seller_id = $seller->id; $transaction->save(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function notifyProductCreated(ProductCreatedEvent $event) : void\n {\n // prepare Product data to use it in email template\n // us some Mailer to send Email notification\n }", "public function created(Product $product)\n {\n $loggerService = new ProductLoggerService($product)...
[ "0.76553744", "0.7185743", "0.6743361", "0.66305625", "0.6271156", "0.6192757", "0.6118819", "0.604169", "0.60283846", "0.60106784", "0.5954505", "0.59446913", "0.5916624", "0.5909948", "0.5907699", "0.59069127", "0.59069127", "0.59068996", "0.5906755", "0.5878996", "0.585346...
0.0
-1
Handle the product "updated" event.
public function updated(Seller $seller) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function product_update_post()\n\t\t\t\t{\n\t\t\t\t}", "public function updated(Product $product): void\n {\n event(new OnProductUpdateEvent($product));\n }", "public function updated(Product $producto)\n {\n\n }", "public function logUpdate(Varien_Event_Observer $observer)\r\n{\r\n...
[ "0.757021", "0.72963434", "0.6792905", "0.6771126", "0.67581177", "0.6548295", "0.6505954", "0.6452342", "0.64054716", "0.6401304", "0.63919085", "0.6344084", "0.63221747", "0.6315688", "0.62788844", "0.62533593", "0.62493336", "0.6187151", "0.61824864", "0.61650133", "0.6159...
0.0
-1
Handle the product "deleted" event.
public function deleted(Seller $seller) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function productDelete(Varien_Event_Observer $observer)\n {\n try \n {\n $helper = Mage::helper('increasingly_analytics');\n\n if ($helper->isEnabled()){\n $productId = $observer->getEvent()->getProduct()->getId();\n\n $productData = array('product_id' => $productId);\n $hel...
[ "0.7335102", "0.7067108", "0.70120865", "0.69779956", "0.693579", "0.6791323", "0.67251253", "0.6722548", "0.6670478", "0.6650355", "0.6602119", "0.65973645", "0.65728694", "0.6553173", "0.65527487", "0.6530389", "0.64949846", "0.64717406", "0.64289016", "0.640731", "0.636965...
0.0
-1
Handle the product "restored" event.
public function restored(Seller $seller) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restored(Product $producto)\n {\n //\n }", "protected function onRestored()\n {\n return true;\n }", "public function restored(PurchaseReceipt $purchaseReceipt)\n {\n //\n }", "public function restored(ProductImage $productImage)\n {\n //\n ...
[ "0.658101", "0.65215385", "0.64965594", "0.6352464", "0.6332657", "0.61661994", "0.61608434", "0.60924774", "0.6031409", "0.6019611", "0.6019611", "0.60031486", "0.60009795", "0.59737563", "0.59667754", "0.59374636", "0.59350294", "0.59184474", "0.5917748", "0.59089535", "0.5...
0.55779475
55
Handle the product "force deleted" event.
public function forceDeleted(Seller $seller) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function forceDeleted(Product $producto)\n {\n //\n }", "public function onBeforeDelete();", "public function productDelete(Varien_Event_Observer $observer)\n {\n try \n {\n $helper = Mage::helper('increasingly_analytics');\n\n if ($helper->isEnabled()){\n $productId =...
[ "0.7240171", "0.7073542", "0.6912405", "0.6848888", "0.68262094", "0.6740949", "0.67384857", "0.6731796", "0.6709827", "0.6706043", "0.6703373", "0.66893554", "0.6689212", "0.66892064", "0.66864073", "0.66362995", "0.6604372", "0.65910536", "0.65802634", "0.6575309", "0.65744...
0.0
-1
/ replace placeholders in message with values from content array
public function formate($message, array $content) { foreach ($content as $placeholder => $value) { $replacement['{' . $placeholder . '}'] = (string) $value; } return \strtr($message, $replacement); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function makeReplacements(&$message, $token, $replacement) {\n foreach($message as $key => &$value){\n $value = nl2br($value);\n }\n $message['subject'] = str_replace($token, $replacement, $message['subject']);\n $message['body'] = str_replace($token, $replacement, $message['body']);...
[ "0.68687326", "0.67710483", "0.6470346", "0.6353506", "0.63520706", "0.6323045", "0.6194089", "0.618991", "0.6100591", "0.60618514", "0.59654427", "0.59377706", "0.5934986", "0.5905428", "0.58528835", "0.5832218", "0.58300316", "0.58032006", "0.579664", "0.57896924", "0.57749...
0.75160474
0
Run the database seeds.
public function run() { foreach ($this->getAgencies() as $orgao) { Agency::firstOrCreate($orgao); } }
{ "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
/ WELCOME TO KOSTLAB X CODEIGNITER FRAMEWORK Framework inidibuat untuk memudahkan development chatbot LINE
public function __construct() { parent::__construct(); //Codeigniter : Write Less Do More $this->load->model(array('Dbs')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function chatbot()\n {\n // no code needed.\n }", "public function execute() {\n \n $message = $this->getMessage(); // Get Message object\n\n $chat_id = $message->getChat()->getId(); // Get the current Chat ID\n $nama = $message->get...
[ "0.75831056", "0.6789915", "0.63199896", "0.6314304", "0.628125", "0.62314945", "0.6118826", "0.6118642", "0.6100605", "0.60997593", "0.60969764", "0.60642976", "0.60547507", "0.6050241", "0.60116524", "0.60076785", "0.6004268", "0.59915847", "0.59570676", "0.5947858", "0.594...
0.0
-1
/ / Constructors /
public function __construct (Memcached $memcached) { $this->memcached = $memcached; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __construct()\t{}", "function _construct() {\n \t\n\t\t\n\t}", "private function __construct( )\n {\n\t}", "private function __construct()\r\n\t{\r\n\t\r\n\t}", "final private function __construct() {\n\t\t\t}", "final private function __construct()\n\t{\n\t}", "private function ...
[ "0.8467337", "0.8248555", "0.8224319", "0.82192165", "0.81950736", "0.81936085", "0.818786", "0.81849396", "0.81849396", "0.81849396", "0.81849396", "0.81849396", "0.81849396", "0.81849396", "0.81849396", "0.81849396", "0.81849396", "0.81849396", "0.81849396", "0.81849396", "...
0.0
-1
Checks extension is okay
public static function load (array $config) : self { if (!extension_loaded('memcached')) { if (extension_loaded('memcache')) { throw new CacheException("Can't initialize Memcached cache engine: PHP extension memcached not loaded. This class uses the Memcached extension AND NOT the Me...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validExtension() {\t\n\t\tif(in_array($this->extension, $this->extensions)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "protected function checkExtension() {\n\t\t\n\t\t//If no extensions set, all are valid\n\t\tif(empty($this->valid_extensions)) {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t...
[ "0.78653854", "0.77242017", "0.76244456", "0.75356364", "0.7257333", "0.7173007", "0.7171945", "0.7084392", "0.70505697", "0.70359766", "0.6995934", "0.6976371", "0.69710815", "0.69574195", "0.69421923", "0.69223785", "0.6892601", "0.6892601", "0.68881446", "0.68408394", "0.6...
0.0
-1
/ / Cache operations / Gets the specified key's data
function get (string $key, mixed $default = null) : mixed { $key = $this->getUnsafePrefix() . $key; $result = $this->memcached->get($key); return match ($result) { false => $default, default => unserialize($result), }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get ($key) {\n return $this->memcached->get($key);\n }", "public function getObjFromCache($key);", "function get($key) {\n return $this->cacheObj->get($key);\n }", "function get($key) {\n return $this->memcached->get($key);\n }", "public function getValFromCache($key);...
[ "0.7954589", "0.7759613", "0.7734601", "0.7683159", "0.7657801", "0.74805397", "0.74276024", "0.74225837", "0.74194884", "0.73984116", "0.73984116", "0.7360951", "0.7360374", "0.7347785", "0.72912455", "0.72902447", "0.72877294", "0.7286532", "0.72533745", "0.7205624", "0.718...
0.0
-1
Sets the specified data at the specified key
function set ( string $key, mixed $value, null|int|\DateInterval $ttl = null ) : bool { $key = $this->getUnsafePrefix() . $key; return $this->memcached->set($key, serialize($value)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set($key, $data);", "public function set(string $key, $data);", "public function set_data($key, $data)\n\t{\n\t\t$this->_data[$key] = $data;\n\t}", "public function setDataByKey($key, $data)\n {\n $data = $this->hydrateIfJsonToArray($data);\n $this->data[$key] = $data;\n }...
[ "0.8836089", "0.8808068", "0.8503419", "0.8469229", "0.84649765", "0.84515786", "0.8041483", "0.78729576", "0.7846157", "0.7846157", "0.77286106", "0.7668747", "0.76631165", "0.75729126", "0.744478", "0.7431797", "0.74141586", "0.74141586", "0.73792315", "0.7283875", "0.72626...
0.0
-1
Deletes the specified key's data
function delete (string $key) : bool { $key = $this->getUnsafePrefix() . $key; return $this->memcached->delete($key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delData($key) {\n\t\tunset($this->_data[$key]);\n\t}", "public function delete( $key );", "public function del($key);", "public function delete($key);", "public function delete($key);", "public function delete($key);", "abstract public function delete( $key );", "abstract public funct...
[ "0.83516246", "0.81429935", "0.8136656", "0.8077837", "0.8077837", "0.8077837", "0.7903742", "0.7899064", "0.7872455", "0.785028", "0.7844502", "0.7739798", "0.7592863", "0.75309414", "0.74576163", "0.742858", "0.7405364", "0.7299999", "0.7278668", "0.7260282", "0.72602487", ...
0.0
-1