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
/ Tirer de la pioche. Returns the drawn card. TODO: check there are cards to draw from.
function drawCard($userId) { $options = getUnusedCards(getGameOf($userId)); if (count($options) == 0) { return false; } $index = array_rand($options); $card = $options[$index]; $to_draw = SQLGetChamp("select cards_to_draw from users where id = $userId"); SQLInsert("insert into decks (user_id, card_name) val...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function drawCard(int $cardId): Card;", "function drawCard (&$deck) {\n \n $suit = array_rand($deck);\n $card = array_rand($deck[$suit]);\n \n // Determine the face value of the card.\n\t// Face cards are worth 10\n\tif ($card >=10){\n $card_value = 10;\n }...
[ "0.73021245", "0.7212572", "0.68607736", "0.6795838", "0.6688588", "0.66626126", "0.65951407", "0.65161854", "0.6349048", "0.6337755", "0.62691665", "0.62661743", "0.620163", "0.6134332", "0.61262697", "0.59650844", "0.5953658", "0.5836524", "0.5834895", "0.5786683", "0.57789...
0.6515488
8
/ Returns whether the player has really won or not.
function screamUno($userId) { if (count(getDeck($userId)) == 1) { SQLUpdate("update users set uno = 1 where id = $userId"); return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function playerHasWon() {\n foreach ($this->players as $player) {\n if ($player->score >= $this->game->winningScore) {\n return true;\n }\n }\n return false;\n }", "private function checkIfPlayerHasWon()\n {\n $totalResult = $this->sco...
[ "0.85423005", "0.8413764", "0.7634838", "0.756626", "0.75569654", "0.7500653", "0.7442703", "0.74108243", "0.7317596", "0.6951828", "0.69191384", "0.6883003", "0.6874566", "0.67927724", "0.67880744", "0.67042583", "0.6697415", "0.66900074", "0.66669", "0.66468066", "0.6623643...
0.0
-1
/ Not right now, but like, later. Takes skips cards into account.
function nextToPlay($gameId, $direction = null) { $sql = "select user_to_play, direction from games where id = $gameId"; $info = parcoursRs(SQLSelect($sql))[0]; $placed = getPlacedCards($gameId); if ($direction !== null) { $info["direction"] = $direction; } $direction = $info["direction"] == 1 ? 1 : -1; $to_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpcom_vip_disable_likes() {\n\tadd_filter( 'wpl_is_likes_visible', '__return_false', 999 );\n}", "public function unlike() {\r\n return $this->setLike(false);\r\n }", "function userDisliked($post_id)\n{\n global $conn;\n global $user_id;\n $sql = \"SELECT * FROM vote_info WHERE user_id=$u...
[ "0.5837771", "0.58122045", "0.55468416", "0.5442333", "0.54384893", "0.54378736", "0.5411125", "0.5396633", "0.5391006", "0.53606445", "0.535624", "0.5346532", "0.53181684", "0.52923733", "0.52758634", "0.52693754", "0.52231586", "0.521481", "0.51983273", "0.5198026", "0.5197...
0.0
-1
Handle dynamic static method calls into the method.
public function __call($method, $parameters) { $user_generate_method = [ 'getGenerateEmail', 'getGeneratePassword', 'getGenerateUserName', 'getUserHeaderImg', 'getUserName', 'setUserName', 'getIntegrateUser', 'ge...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function __callStatic($method, $parameters);", "public static function __callStatic($method, $arguments=null) {}", "protected static function __callStaticHook($method, array & $arguments)\n { }", "public static function __callStatic($method, $args){ return null; }", "final public static ...
[ "0.65930265", "0.651704", "0.6474863", "0.6405543", "0.6341253", "0.625352", "0.6124201", "0.60933346", "0.6092328", "0.6092328", "0.6092328", "0.6074769", "0.60258573", "0.601157", "0.60054225", "0.59978604", "0.59908247", "0.59851223", "0.5966756", "0.5941926", "0.5893095",...
0.0
-1
Create a new job instance.
public function __construct(AssigneeAddedEvent $event) { $this->event = $event; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createJob( $creationParameters ){ return $this->APICallSub( '/jobs', array( 'create' => $creationParameters ), \"Could not create new job with query \" . $creationParameters['query'] . \" and operation \" . $creationParameters['operation'] ); }", "abstract public function makeJob();", "abstract...
[ "0.6920272", "0.6905722", "0.6905722", "0.6869542", "0.6808916", "0.65271425", "0.65184414", "0.64918077", "0.6489135", "0.6468623", "0.6425879", "0.64058304", "0.63938236", "0.63899404", "0.63753885", "0.6304669", "0.6256802", "0.6241474", "0.620155", "0.61789167", "0.607414...
0.0
-1
Takes token, validates it
public function validateToken($token) { //get user from password_resets table $user = User::whereNotNull('password_resets.token') ->join('password_resets', 'users.email', '=', 'password_resets.email')->first(); //validate user if ($this->broker()->tokenExists($user, $token)) { return response()->json(['...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validate($token);", "public function validate_token($token) {\n\t\t$splittedtoken = explode('-', $token);\n\t\t$offset = hexdec($splittedtoken[0]);\n\t\t$value = $splittedtoken[1];\n\t\treturn ($this->calculate_tokenvalue($offset) === $value);\n\t}", "public function token_is_valid() {\n ...
[ "0.9018019", "0.74569577", "0.7435489", "0.73838896", "0.73342836", "0.73121375", "0.7285047", "0.7222612", "0.7162359", "0.70722413", "0.69772106", "0.69735074", "0.6930169", "0.6826915", "0.6790193", "0.6783608", "0.6750895", "0.67254597", "0.67092586", "0.6696792", "0.6662...
0.6755088
16
Get the password reset validation rules.
protected function rules() { return [ 'resetToken' => 'required', 'email' => 'required|email', 'password' => 'required|min:10', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrievePasswordValidationRules()\n {\n return $this->startAnonymous()->uri(\"/api/tenant/password-validation-rules\")\n ->get()\n ->go();\n }", "private function validationRules()\n {\n return [\n 'newPassword' => [\n new PasswordRule($this-...
[ "0.7697964", "0.76810664", "0.7573457", "0.75676525", "0.7446678", "0.7397398", "0.7349158", "0.73256934", "0.7252323", "0.72143346", "0.7177448", "0.7172756", "0.71625215", "0.7133961", "0.7125829", "0.71037596", "0.70725363", "0.7067946", "0.7064178", "0.7042733", "0.703090...
0.0
-1
Get the password reset credentials from the request.
protected function credentials(Request $request) { $credentials = $request->only( 'email', 'password', 'resetToken' ); $credentials['token'] = $credentials['resetToken']; $credentials['password_confirmation'] = $credentials['password']; unset($credentials['resetToken']); return $credentials; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function credentials(ResetPasswordRequest $request)\n {\n return $request->only(\n 'email', 'password', 'password_confirmation', 'token'\n );\n }", "function getRequestPassword()\n {\n return $this->_props['RequestPassword'];\n }", "protected function getCredentials(...
[ "0.75875694", "0.6941066", "0.6430689", "0.63787794", "0.6330609", "0.6330609", "0.62676007", "0.6263194", "0.6256812", "0.62427086", "0.61685264", "0.61373", "0.60599726", "0.60483235", "0.6028288", "0.6006547", "0.5948538", "0.5945101", "0.59418595", "0.59301466", "0.592637...
0.65736973
2
Get the response for a successful password reset.
protected function sendResetResponse($response) { return response()->json(['isValid' => true], 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function completeResetPassword() {\n $validator = new ResetPasswordValidator(\\Input::all());\n if (!$validator->passes()) {\n return $this->json(array('status' => 'error',\n 'errors' => $validator->getValidator()->messages()->all()));\n }\n $dat...
[ "0.7363584", "0.73476464", "0.728257", "0.7190303", "0.7131655", "0.70843375", "0.70240545", "0.7008574", "0.70035994", "0.6974559", "0.6943094", "0.69192195", "0.6896523", "0.6840337", "0.6826271", "0.6822732", "0.677602", "0.6774154", "0.67708755", "0.6731316", "0.6719775",...
0.0
-1
Get the response for a failed password reset.
protected function sendResetFailedResponse(Request $request, $response) { $message = ($response == Password::INVALID_USER) ? 'User does not exist' : 'Reset token is invalid'; return response()->json(['code' => 500, 'message' => trans($message), 'error' => []], 500); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getFailedResetPasswordMessage()\r\n {\r\n return 'We can\\'t find a user with that e-mail address.';\r\n }", "public function resetPasswordAction()\n {\n // specify required fields\n $requirements = array(\n 'key'\n );\n\n // fech post jso...
[ "0.7468882", "0.6679239", "0.6547944", "0.6545718", "0.6514435", "0.64671266", "0.6401218", "0.6348882", "0.6323448", "0.6320657", "0.63100183", "0.6305281", "0.62862825", "0.6279374", "0.62683797", "0.6262106", "0.62468404", "0.6239811", "0.6170976", "0.6169413", "0.61547285...
0.6508438
5
browse show list of matakuliah
function _browse() { if ($this->_access === 'BAAK') { return $this->MatakuliahModel->browse(); } else { redirect(base_url('/auth/logout')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexmatakuli()\n {\n $matakuliah = DB::table('tabel_matakuliah')->paginate(5);\n\n // lempar data dari db\n return view('/admin/input/distmk',['matakuliah' => $matakuliah]);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "fu...
[ "0.6585432", "0.6556157", "0.6531069", "0.6512181", "0.646323", "0.6462662", "0.6458836", "0.620735", "0.6199737", "0.61956936", "0.61841923", "0.6181279", "0.6178897", "0.61165166", "0.61036044", "0.610115", "0.6096473", "0.6093606", "0.6089512", "0.6078423", "0.6061738", ...
0.60628116
20
read search data use fullname or read data use single username user
public function read($id_matakuliah) { if ($this->_access === 'BAAK') { $matakuliahData = $this->MatakuliahModel->read($id_matakuliah); foreach ($matakuliahData as $data) { $jurusans = $this->jurusan->browse(); echo " <div class='modal-header'> <h1 class='modal-title'>Edit matakuliah</h1> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function searchReader()\n\t{\n\t\tif (cookie('staffAccount') != '') {\n\t\t\t$text = $_POST['text'];\n\t\t\t$type = $_POST['type'];\n\t\t\t//$return = array();\n\t\t\t$book = D('User');\n\n\t\t\t$sql = \"SELECT * FROM lib_user\n\t\t\t\t\t where {$type} like '%{$text}%' ORDER BY register_time DESC;\";\n\t\...
[ "0.6911216", "0.65676785", "0.6391177", "0.6355805", "0.6269937", "0.62493885", "0.6201419", "0.61375695", "0.6131841", "0.6127572", "0.6126675", "0.6121554", "0.6105776", "0.6101659", "0.6091019", "0.6071242", "0.6065023", "0.6057099", "0.60393584", "0.60151047", "0.60013837...
0.0
-1
edit edit data from a single username of user
public function edit($id_matakuliah) { if ($this->_access === 'BAAK') { if ($this->MatakuliahModel->dataExists('matakuliah', array('id_matakuliah' => $id_matakuliah)) === 1) { $matakuliahData = array( 'id_jurusan' => $this->input->post('id_jurusan'), 'nama' => $this->input->post('namamatakuliah...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit($username)\n {\n //\n }", "public function editUser()\n {\n\n $this->displayAllEmployees();\n $new_data = [];\n $id = readline(\"Unesite broj ispred zaposlenika čije podatke želite izmjeniti: \");\n\n $this->displayOneEmployees( $id);\n\n fo...
[ "0.8177034", "0.8097481", "0.7906151", "0.77309227", "0.757009", "0.7566514", "0.7563302", "0.75299776", "0.7474551", "0.7457438", "0.7401386", "0.73831826", "0.73800683", "0.7344664", "0.7316913", "0.7296272", "0.7293069", "0.72908115", "0.72899014", "0.72792023", "0.7271986...
0.0
-1
add add new data of user
public function add() { if ($this->_access === 'BAAK') { if (empty($this->input->post('id_matakuliah'))) { $jurusans = $this->jurusan->browse(); echo " <div class='modal-header'> <h1 class='modal-title'>Add Mata Kuliah</h1> </div> <div id='error_form_matakuliah'></div> <form ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addUser($data)\n{\n\t$this->insert($data);\n}", "public function addUser(){}", "public static function addUser()\n {\n // ADD NEW DATA TO A TABLE\n // MAKE SURE TO SEND USERS TO THE /users page when a user is added\n }", "public function addUser(){\n\t}", "public functio...
[ "0.8081852", "0.8060037", "0.8041902", "0.77860093", "0.7721111", "0.7613323", "0.7598796", "0.75038767", "0.74760294", "0.7458764", "0.74248195", "0.73906946", "0.73738205", "0.73395324", "0.72912884", "0.7267677", "0.7258352", "0.7246416", "0.7232921", "0.7229681", "0.72271...
0.0
-1
fix it delete delete user data by username
public function delete($id_matakuliah) { if ($this->_access === 'BAAK') { if ($this->MatakuliahModel->dataExists('matakuliah', array('id_matakuliah' => $id_matakuliah)) === 1) { echo ($this->MatakuliahModel->delete($id_matakuliah) === TRUE ? 'TRUE' : 'FALSE'); } else { echo "ERROR"; } }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteUser($username)\r\n {\r\n $this->querySimpleExecute('delete from t_user where useUsername = ' . $username);\r\n }", "public function delete() {\n try {\n $db = Database::getInstance();\n $sql = \"DELETE FROM `User` WHERE username = :username\";\n $stmt = $db->prepare...
[ "0.7897824", "0.7664261", "0.7628001", "0.75153863", "0.74352586", "0.7389769", "0.73874515", "0.7365762", "0.73305196", "0.7242954", "0.723207", "0.71599376", "0.71176", "0.70891833", "0.70626605", "0.70572025", "0.70435417", "0.7038207", "0.70345604", "0.70335776", "0.70263...
0.0
-1
Run the database seeds.
public function run() { DB::table('operacaos')->insert([ 'nome' => 'Depósito', ]); DB::table('operacaos')->insert([ 'nome' => 'Saque', ]); }
{ "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.8014072", "0.7980389", "0.7977261", "0.79545176", "0.7951285", "0.7949779", "0.79447794", "0.79427236", "0.7938544", "0.7937133", "0.7933888", "0.7892658", "0.78813094", "0.7879304", "0.78790134", "0.7875582", "0.78718805", "0.7870327", "0.7851507", "0.78506047", "0.784165...
0.0
-1
Getter for firewall's FQDN.
public function getHostname() { return $this->hostname; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFirewallName(): string;", "public function getFIp()\n {\n return $this->f_ip;\n }", "public function getFqdn(): string;", "public function getFQN(): string\n {\n return DomainLocator::concatFQN($this->name, $this->parent);\n }", "public function getFQN()\n {\...
[ "0.70161164", "0.6217314", "0.62065583", "0.61110544", "0.603489", "0.5859223", "0.5835207", "0.58127993", "0.5787254", "0.57771677", "0.57771677", "0.57706726", "0.5757147", "0.5746668", "0.57421577", "0.5735328", "0.5722173", "0.5700741", "0.56621677", "0.56438243", "0.5637...
0.0
-1
Getter for API autorized user.
public function getUsername() { return $this->username; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getApiUser()\n {\n return $this->security->getToken()->getUser()->getUser();\n }", "function get_user()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_USER);\r\n }", "function get_user()\r\n {\r\n return $this->get_default_property(self :: PROP...
[ "0.8063729", "0.7763377", "0.7763377", "0.7711069", "0.7705783", "0.7589543", "0.75548947", "0.75350547", "0.75350547", "0.75350547", "0.75350547", "0.75303143", "0.751932", "0.7509684", "0.7477085", "0.7456816", "0.74527943", "0.7448125", "0.74176306", "0.74174875", "0.74173...
0.0
-1
Getter for API autorized user's password.
public function getPassword() { return $this->password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPassword() {\n return $this->get('password', 'user');\n }", "public function getAuthPassword()\n {\n return $this->user_pass;\n }", "public function getAuthPassword()\n {\n return $this->user_pass;\n }", "public function getUserPassword()\n {\n ...
[ "0.8484643", "0.8447342", "0.8447342", "0.8426809", "0.83746016", "0.83532757", "0.8346173", "0.8312889", "0.82929105", "0.82579833", "0.8250493", "0.8244037", "0.8234663", "0.8226177", "0.8226177", "0.8226177", "0.8226177", "0.8226177", "0.8226177", "0.8226177", "0.8226177",...
0.0
-1
Setter for curl's timeout in ms.
public function setTimeout(int $timeout) { $this->timeout = $timeout; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTimeout($timeout){\n curl_setopt($this->ch, CURLOPT_TIMEOUT_MS, $timeout);\n curl_setopt($this->ch, CURLOPT_CONNECTTIMEOUT_MS, $timeout);\n }", "public function setTimeout($timeout) {\n\t\t\tcurl_setopt($this->_curl, CURLOPT_TIMEOUT, $timeout);\n\t\t}", "public function getC...
[ "0.7814167", "0.7599739", "0.74715817", "0.74715817", "0.74628955", "0.7011938", "0.6977306", "0.6977306", "0.6949746", "0.6912299", "0.6851381", "0.68273747", "0.6777008", "0.67673594", "0.6744462", "0.668816", "0.66812575", "0.66812575", "0.66635853", "0.65858835", "0.65716...
0.63452166
32
Getter for curl's timeout in ms.
public function getTimeout() { return $this->timeout; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurlTimeout()\n {\n return $this->curlTimeout;\n }", "public function getCurlTimeout()\n {\n return $this->curlTimeout;\n }", "public function getCurlTimeout() {\n return $this->curlTimeout;\n }", "public function getCurlConnectTimeout()\n {\n ...
[ "0.87914246", "0.87914246", "0.8756881", "0.8104021", "0.8051326", "0.79714906", "0.7945701", "0.79448473", "0.79448473", "0.79448473", "0.79448473", "0.79448473", "0.7932231", "0.7896554", "0.7888847", "0.7877955", "0.7877475", "0.786031", "0.7842552", "0.78193796", "0.78193...
0.7933239
12
Setter for curl's option to verify SSL peer.
public function setSSLVerifyPeer(bool $verifySSLPeer) { $this->SSLVerifyPeer = $verifySSLPeer; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _configureVerifyHost() {\n if ($this->_do_not_verify_host) {\n $this->setOpt(CURLOPT_SSL_VERIFYHOST, FALSE);\n }\n\n if ($this->_do_not_verify_peer) {\n $this->setOpt(CURLOPT_SSL_VERIFYPEER, FALSE);\n }\n return $this;\n }", "public function setSslVerifyPeer(bool $ssl...
[ "0.6882541", "0.67364484", "0.66501164", "0.6544106", "0.6474665", "0.6436541", "0.6421983", "0.6300211", "0.6253641", "0.62041634", "0.6005113", "0.5922082", "0.5899028", "0.5856868", "0.5846333", "0.5823697", "0.56321776", "0.56321776", "0.5626376", "0.5626376", "0.56042236...
0.69324565
0
Getter for curl's option to verify SSL peer.
public function getSSLVerifyPeer() { return $this->SSLVerifyPeer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVerifyPeerSSL()\n {\n return $this->verifyPeerSSL;\n }", "public function getSslVerifyPeer(): bool\n {\n return $this->sslVerifyPeer;\n }", "#[Pure]\n public function getSslOptions() {}", "protected function _configureVerifyHost() {\n if ($this->_do_not_veri...
[ "0.7294176", "0.6806716", "0.65023905", "0.6446547", "0.6419565", "0.6419565", "0.6323359", "0.63040197", "0.62865126", "0.62145185", "0.6202334", "0.6133987", "0.6125497", "0.61195713", "0.6062529", "0.60503244", "0.5997765", "0.59941584", "0.59659374", "0.59659374", "0.5965...
0.68446076
1
Setter for curl's option to verify SSL peer.
public function setSSLVerifyHost(bool $verifySSLHost) { $this->SSLVerifyHost = ($verifySSLHost) ? 2 : 0; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setSSLVerifyPeer(bool $verifySSLPeer) {\r\n\t\t$this->SSLVerifyPeer = $verifySSLPeer;\r\n\t\treturn $this;\r\n\t}", "protected function _configureVerifyHost() {\n if ($this->_do_not_verify_host) {\n $this->setOpt(CURLOPT_SSL_VERIFYHOST, FALSE);\n }\n\n if ($this->_do_not_verify_peer...
[ "0.69328046", "0.6882348", "0.67372304", "0.6650963", "0.64770794", "0.64371765", "0.64217913", "0.6301226", "0.6255012", "0.620653", "0.60062057", "0.5923588", "0.58986413", "0.5856279", "0.5849234", "0.5824339", "0.5633482", "0.5633482", "0.56257474", "0.56257474", "0.56035...
0.6544286
4
Getter for curl's option to verify SSL peer.
public function getSSLVerifyHost() { return $this->SSLVerifyHost; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVerifyPeerSSL()\n {\n return $this->verifyPeerSSL;\n }", "public function getSSLVerifyPeer() {\r\n\t\treturn $this->SSLVerifyPeer;\r\n\t}", "public function getSslVerifyPeer(): bool\n {\n return $this->sslVerifyPeer;\n }", "#[Pure]\n public function getSslOptio...
[ "0.7294176", "0.68446076", "0.6806716", "0.65023905", "0.6446547", "0.6419565", "0.6419565", "0.6323359", "0.63040197", "0.62865126", "0.62145185", "0.6202334", "0.6125497", "0.61195713", "0.6062529", "0.60503244", "0.5997765", "0.59941584", "0.59659374", "0.59659374", "0.596...
0.6133987
12
_getUpdateKeys will return the update keys
public function _getUpdateKeys() { return array(Model_Fields_PracticeFieldCoordinatorDB::DB_COLUMN_ID => $this->{Model_Fields_PracticeFieldCoordinatorDB::DB_COLUMN_ID}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _getUpdateKeys() {\n return array(Model_Fields_FieldDB::DB_COLUMN_ID => $this->{Model_Fields_FieldDB::DB_COLUMN_ID});\n }", "public function _getUpdateKeys() {\r\n return array(Model_Fields_LeagueDB::DB_COLUMN_ID => $this->{Model_Fields_LeagueDB::DB_COLUMN_ID});\r\n }", "pub...
[ "0.75509113", "0.74989474", "0.6467931", "0.6302946", "0.627223", "0.62503654", "0.6244785", "0.62071365", "0.611348", "0.6110936", "0.6102717", "0.6034112", "0.59426516", "0.5914245", "0.5905945", "0.5889035", "0.5889035", "0.5889035", "0.5889035", "0.5889035", "0.58815587",...
0.75280595
1
/ List all of the commands as an index.
function listCmds() { global $commands; ?> <ul width="700"> <?php foreach ($commands as $idx => $command): ?> <li> <strong><a href="#<?= htmlspecialchars($command['title']) ?>"><?= htmlspecialchars($command['title']) ?></a></strong> </li> <?php endforeach; ?> </ul> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function buildCommandsIndex() {}", "public function index()\n {\n return Command::orderBy('id')->get();\n }", "public function index()\n {\n return Command::all();\n }", "public function listCommands()\n {\n $commands = $this->library->getAll();\n\n foreac...
[ "0.793251", "0.7591807", "0.74901193", "0.717233", "0.70074975", "0.68075603", "0.674983", "0.6719281", "0.6645472", "0.66397184", "0.6550231", "0.654234", "0.6516168", "0.65111214", "0.64758646", "0.6370422", "0.63503194", "0.63056755", "0.6278105", "0.6275807", "0.6262146",...
0.70653564
4
/ Execute all of the commands which were defined by a call to defCmd.
function execCmds() { global $commands; foreach ($commands as $idx => $command) { showCmdT($idx, $command); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function execute()\n {\n foreach ($this->commands as $command) {\n $command->execute();\n }\n }", "function performCommand($cmd){\n switch ($cmd){\n // list all commands that need write permission here\n case \"editProperties\":\t\t\n ...
[ "0.716668", "0.63844454", "0.63216937", "0.62449616", "0.62316173", "0.6209649", "0.6208212", "0.6169735", "0.6136712", "0.60918254", "0.60392755", "0.60356617", "0.5994778", "0.59842914", "0.5972534", "0.59467286", "0.59399635", "0.59085864", "0.5883688", "0.58508223", "0.58...
0.72279155
0
/ Define a command, with a title, to be executed later.
function defCmdT($idx, $title, $command, $has_filter = false, $header_size = 0) { global $commands; $title = htmlspecialchars($title, ENT_NOQUOTES); $commands[$idx] = array( 'title' => $title, 'command' => $command, 'has_filter' => $has_filter, 'header_size' => $header_size); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function cli_set_process_title($title)\n{\n}", "public static function setTitle(string $title) {}", "public function command($name)\n {\n $this->name = $name;\n }", "public function addCommand($command);", "public function setTitle(string $title);", "function cli_set_process_title(string $ti...
[ "0.71256137", "0.62166727", "0.6145505", "0.61246043", "0.6109873", "0.60980177", "0.6092369", "0.6000132", "0.5973146", "0.5973146", "0.5973146", "0.5973146", "0.5973146", "0.5973146", "0.5973146", "0.5946619", "0.5909338", "0.59040457", "0.5835975", "0.5817727", "0.5814606"...
0.7107565
1
Handle an incoming request.
public function handle($request, Closure $next) { if(Auth::check()) { if(Auth::user()->quyen == 1){ return $next($request); } else{ $msg = "Tài khoản được phép đăng nhập"; return response()->json($ms...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function handle_request();", "public function handleRequest();", "public function handleRequest();", "public function handleRequest();", "protected abstract function handleRequest();", "abstract public function handleRequest($request);", "abstract public function handleRequest(Request $...
[ "0.8299201", "0.8147294", "0.8147294", "0.8147294", "0.8127764", "0.7993589", "0.7927201", "0.7912899", "0.7899075", "0.76317674", "0.75089735", "0.7485808", "0.74074036", "0.7377414", "0.736802", "0.7294553", "0.72389543", "0.7230166", "0.72108", "0.71808434", "0.7170364", ...
0.0
-1
/ Created dbConn to act as a callable function to connect directly to the local database, can be reused easily. Connects to database by providing address, username, and password (additional optional criteria can be provided such as the database name and the port being connected on).
function DatabaseConnection2() { $host ="host.docker.internal"; $username ="root"; $password ="password"; //$dbname ="clean"; //$port = "33066"; /* This line will lead to the connection being refused by the database and i am unsure why I ha...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function OpenConnection( $user, $pass, $ip, $port, $db, $options );", "public function connect($host, $database, $user, $password);", "function db_connect($db_hostname, $db_username, $db_password, $db_name)\n\t{ global $db_port;\n\t\t$this->db_connection = pg_connect(\"host=\".$db_hostname.\" p...
[ "0.7171739", "0.65743583", "0.6424827", "0.6397188", "0.63740414", "0.63604504", "0.6351201", "0.6265176", "0.6235581", "0.6185248", "0.6179922", "0.61667746", "0.61661565", "0.61657476", "0.6161544", "0.61415195", "0.61392546", "0.6134181", "0.6130765", "0.6128273", "0.61222...
0.0
-1
Makes html id for section
static function html_id($name) { global $smcFunc; $name = str_replace(array('%3A', '+', '%'), array(':', '_', '.'), urlencode(un_htmlspecialchars($name))); while($name[0] == '.') $name = substr($name, 1); return $name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fn_makeid($editableareaname) {\r\r\n\tglobal $sectionid, $pageid;\r\r\n\t$idstring = $pageid . '_' . $editableareaname;\r\r\n\tif ($sectionid != '')\r\r\n\t\t$idstring = $sectionid . $idstring;\r\r\n\treturn $idstring;\t\r\r\n}", "function rordb_section_header_callback($args){\n\techo \"<p id=\\\"\".esc...
[ "0.69072545", "0.6777588", "0.63526326", "0.63415015", "0.6231621", "0.62241405", "0.61618066", "0.6061156", "0.6059656", "0.60034436", "0.59141463", "0.58314294", "0.58139104", "0.5786361", "0.57460564", "0.57457983", "0.5719343", "0.56891674", "0.56888276", "0.5688206", "0....
0.53467447
51
Parser content into text for use in parameters etc.
static public function toText($content, $single_line = true) { $return = ''; foreach ($content as $c) { switch ($c['type']) { case Wiki_Parser_Core::NEW_LINE: $return .= $single_line ? ' ' : '<br />'; break; case Wiki_Parser_Core::NEW_PARAGRAPH: $return .= $single_line...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function parse($content);", "public function parse(string $content);", "public function parse(string $content);", "public function parse( $contents );", "public function parse(string $content, array $data = []): string;", "function _parse() {\n $txt = $this->_text;\n for($i=0; $i<count($txt)...
[ "0.6701736", "0.66947556", "0.66947556", "0.6681259", "0.6618902", "0.6526563", "0.62483776", "0.6221378", "0.61714095", "0.6159372", "0.6156381", "0.60390246", "0.5995332", "0.59187603", "0.5909063", "0.59069425", "0.59069425", "0.59069425", "0.5861882", "0.5839693", "0.5838...
0.0
-1
Parser content into text for use in parameters etc.
static function getUnparsed($content, $single_line = true) { $return = ''; foreach ($content as $c) $return .= !empty($c['unparsed'])? $c['unparsed'] : $c['content']; return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function parse($content);", "public function parse(string $content);", "public function parse(string $content);", "public function parse( $contents );", "public function parse(string $content, array $data = []): string;", "function _parse() {\n $txt = $this->_text;\n for($i=0; $i<count($txt)...
[ "0.6701736", "0.66947556", "0.66947556", "0.6681259", "0.6618902", "0.6526563", "0.62483776", "0.6221378", "0.61714095", "0.6159372", "0.6156381", "0.60390246", "0.5995332", "0.59187603", "0.5909063", "0.59069425", "0.59069425", "0.59069425", "0.5861882", "0.5839693", "0.5838...
0.0
-1
Prepares content array for boolean conversion
static protected function __boolean_trim($content) { $return = array(); foreach ($content as $c) { switch ($c['type']) { case Wiki_Parser_Core::NEW_LINE: case Wiki_Parser_Core::NEW_PARAGRAPH: break; case Wiki_Parser_Core::ELEMENT: $return[] = $c; break; case Wiki...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function toBoolean($content)\r\n\t{\r\n\t\t$content = Wiki_Parser_Core::__boolean_trim($content);\r\n\t\t\r\n\t\tif (count($content) != 1 || ($content[0]['type'] != Wiki_Parser_Core::ELEMENT && $content[0]['type'] != Wiki_Parser_Core::WARNING))\r\n\t\t{\r\n\t\t\t$result = Wiki_Parser_Core::toText($content);...
[ "0.5847623", "0.5777596", "0.56586695", "0.5655845", "0.55385774", "0.55211246", "0.54677653", "0.54483616", "0.54424417", "0.537309", "0.52657694", "0.5235262", "0.5210518", "0.5210518", "0.5209036", "0.5195377", "0.51793647", "0.509323", "0.5090657", "0.50481176", "0.502761...
0.5623857
4
Convert content array to boolean
static function toBoolean($content) { $content = Wiki_Parser_Core::__boolean_trim($content); if (count($content) != 1 || ($content[0]['type'] != Wiki_Parser_Core::ELEMENT && $content[0]['type'] != Wiki_Parser_Core::WARNING)) { $result = Wiki_Parser_Core::toText($content); return !empty($result); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toBoolean() {\n return $this->content != false;\n }", "public function testConvertToBoolean() {\r\n $data = array(\r\n true => true,\r\n false => false,\r\n 'true' => true,\r\n 'false' => false,\r\n 'test' => true,\r\n 0...
[ "0.6845962", "0.63453716", "0.6312975", "0.62089044", "0.6081801", "0.6081801", "0.6079825", "0.6064722", "0.58788896", "0.5857571", "0.58527595", "0.5844531", "0.58417153", "0.5806632", "0.5779585", "0.5762508", "0.57615805", "0.57383806", "0.57194036", "0.5667835", "0.56660...
0.72971016
0
Checks that method _load_ throws _DataDirectoryNotFoundException_, if data directory was not found.
public function testLoadThrowsDataDirectoryNotFoundForNonExistingDir(): void { $dirname = 'nonexistent'; $path = $this->getFullPath($dirname); $this->expectException(DataDirectoryNotFoundException::class); $this->expectExceptionExactMessage("Root folder $path was not found."); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testLoadThrowsDataDirectoryNotFoundForNonReadableDirectory(): void\n {\n $dirname = 'forbidden';\n $this->addDirectoryToVFS($dirname, 0);\n $path = $this->getFullPath($dirname);\n $this->expectException(DataDirectoryNotFoundException::class);\n $this->expectExc...
[ "0.8110693", "0.78229994", "0.6789695", "0.59919906", "0.59202546", "0.5832519", "0.57075226", "0.56565315", "0.56031394", "0.5587415", "0.55260384", "0.5520538", "0.54952514", "0.5461734", "0.54442966", "0.54427797", "0.54328895", "0.54191715", "0.53932315", "0.53719383", "0...
0.8085527
1
Checks that method _load_ throws _DataDirectoryNotFoundException_, if read access to data directory is denied.
public function testLoadThrowsDataDirectoryNotFoundForNonReadableDirectory(): void { $dirname = 'forbidden'; $this->addDirectoryToVFS($dirname, 0); $path = $this->getFullPath($dirname); $this->expectException(DataDirectoryNotFoundException::class); $this->expectExceptionExact...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testLoadThrowsDataDirectoryNotFoundForFileInsteadOfDirectory(): void\n {\n $filename = 'accessible.json';\n $this->addFileToVFS($filename);\n $path = $this->getFullPath($filename);\n $this->expectException(DataDirectoryNotFoundException::class);\n $this->expect...
[ "0.73274696", "0.6951977", "0.6154955", "0.59455526", "0.5696819", "0.56874084", "0.56486386", "0.56125045", "0.5513242", "0.5491798", "0.5438474", "0.5403089", "0.5361558", "0.5317423", "0.53033257", "0.5298568", "0.5292611", "0.5265657", "0.52390426", "0.52330214", "0.52278...
0.8051038
0
Checks that method _load_ throws _DataDirectoryNotFoundException_, if data directory is actually a file.
public function testLoadThrowsDataDirectoryNotFoundForFileInsteadOfDirectory(): void { $filename = 'accessible.json'; $this->addFileToVFS($filename); $path = $this->getFullPath($filename); $this->expectException(DataDirectoryNotFoundException::class); $this->expectExceptionEx...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testLoadThrowsDataDirectoryNotFoundForNonReadableDirectory(): void\n {\n $dirname = 'forbidden';\n $this->addDirectoryToVFS($dirname, 0);\n $path = $this->getFullPath($dirname);\n $this->expectException(DataDirectoryNotFoundException::class);\n $this->expectExc...
[ "0.8073221", "0.77692044", "0.6773753", "0.6123974", "0.6119891", "0.60418874", "0.5997595", "0.5851567", "0.57685053", "0.57673746", "0.5674731", "0.5671657", "0.5664472", "0.5659976", "0.56397593", "0.56390274", "0.56239116", "0.5581382", "0.55016166", "0.5485913", "0.54821...
0.81286526
0
Checks that method _load_ calls data loader's method _load_ for each file in the given folder.
public function testLoadCallsDataLoaderLoadForEachFile(string $path, string $filenameRegExp, array $expectedFilesMap): void { $this->prepareVFSDirectoryStructure(); $fullPath = $this->getFullPath($path); $expectedFilenames = array_values($expectedFilesMap); $dataLoaderMockCallback = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadAll()\n {\n $this->setAll(array());\n $d = dir($this->getPath());\n $this->load($d);\n $d->close();\n }", "protected function loadFiles() {\n if ($this->loaded === true) {\n return;\n }\n $iter = new RecursiveDirectoryIterator(...
[ "0.6698514", "0.66538554", "0.645682", "0.63700205", "0.5995556", "0.5979308", "0.5963646", "0.5948187", "0.5873748", "0.5867739", "0.585716", "0.58527035", "0.5833193", "0.5760506", "0.57397145", "0.5727868", "0.5698817", "0.5695705", "0.5694314", "0.5680861", "0.5680386", ...
0.56678486
21
Provides correct test data for testing method _load_.
public function directoryWithFilesDataProvider(): array { $multiMap = ['OtherFile' => 'other_file.json', 'JSONFile' => 'j_s_o_n_file.json']; $multiDirMap = ['FileFirst' => 'first/file_first.exe', 'FileSecond' => 'first/file_second.exe']; $multiDirMap['FileThird'] = 'second/file_third.exe'; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function loadData();", "public function testLoad()\n {\n $fixture = new Mad_Test_Fixture_Base($this->_conn, 'unit_tests');\n $this->assertEquals('0', $this->_countRecords());\n\n $fixture->load();\n $this->assertEquals('6', $this->_countRecords());\n }", "publi...
[ "0.7357341", "0.68124354", "0.67742395", "0.67742395", "0.67742395", "0.6700625", "0.65999746", "0.65756214", "0.6527443", "0.6527443", "0.6527443", "0.6527443", "0.65109664", "0.65109664", "0.6455664", "0.64220345", "0.64166003", "0.6400629", "0.63900745", "0.6360639", "0.63...
0.0
-1
Checks that method _load_ returns array combined from arrays returned from data loaders' method _load_.
public function testLoadReturnsResultOfLoadOfDataLoaders(string $path, string $filenameRegExp, array $expectedFilesMap, array $expectedLoadData): void { $this->prepareVFSDirectoryStructure(); $fullPath = $this->getFullPath($path); $dataLoaderMockCallback = $this->prepareDataLoaderMockCallbac...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function load(): array;", "public function load() : array;", "protected function _load()\n {\n return array();\n }", "public function loaded()\n {\n return is_array($this->data);\n }", "abstract public function loadData();", "public function load(array $data);...
[ "0.73180246", "0.7026126", "0.68491983", "0.66283596", "0.6205293", "0.6041006", "0.5980546", "0.59709144", "0.5950842", "0.59474516", "0.58296406", "0.5827969", "0.57729363", "0.5753817", "0.56466377", "0.56466377", "0.56466377", "0.56466377", "0.5643907", "0.5623824", "0.55...
0.0
-1
Checks that method _load_ returns loading results even if errors occurred during processing of some files.
public function testLoadReturnsCorrectDataWithExceptionsThrownByDataLoaders(): void { $this->prepareVFSDirectoryStructure(); $fullPath = $this->getFullPath('container'); $expectedFilesMap = ['FileSecond' => 'first/file_second.exe', 'SomeExt' => 'some_ext.exe']; $expectedLoadData = ['...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _load()\n\t{\n\t\t$_file = $this->_storagePath . DIRECTORY_SEPARATOR . $this->_fileName;\n\n\t\tif ( is_file( $_file ) && file_exists( $_file ) && is_readable( $_file ) )\n\t\t{\n\t\t\tif ( false !== ( $_data = Utility\\Storage::defrost( file_get_contents( $_file ) ) ) )\n\t\t\t{\n\t\t\t\t//\tIf...
[ "0.6530118", "0.6468308", "0.6468308", "0.6468308", "0.6468308", "0.6398187", "0.6360412", "0.61929655", "0.6162414", "0.61575955", "0.61575955", "0.6152795", "0.61042905", "0.60975623", "0.6032236", "0.5989458", "0.5964382", "0.5961701", "0.5959401", "0.59563017", "0.5921872...
0.6198579
7
Prepares directory data loader with mock object for data processor.
private function prepareDirectoryDataLoader(?callable $dataLoaderMockCallback = null): DirectoryDataLoaderInterface { $dataLoaderMock = Mockery::mock(DataLoaderInterface::class); if (null !== $dataLoaderMockCallback) { $dataLoaderMockCallback($dataLoaderMock); } return n...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUp()\n {\n $folder = dirname(__DIR__) . '/fixtures';\n\n $this->keyVal(true);\n $this->_mutableLoader = new Loader($folder);\n $this->_immutableLoader = new Loader($folder, true);\n }", "public function setUp()\n {\n foreach (glob(__DIR__.'/../data/*...
[ "0.67082214", "0.6618764", "0.65211236", "0.646287", "0.6299706", "0.619", "0.60907036", "0.6071325", "0.60702026", "0.6058675", "0.60256207", "0.5968181", "0.59307015", "0.59234875", "0.5914662", "0.5871581", "0.58656985", "0.5838043", "0.57885945", "0.5788488", "0.5777952",...
0.69854474
0
Prepares directory structure in virtual file system for testing method _load_.
private function prepareVFSDirectoryStructure(): void { $structure = [ 'single' => ['one_file.json' => ''], 'multi' => ['other_file.json' => '', 'j_s_o_n_file.json' => '', 'text.txt' => ''], 'container' => [ 'first' => ['file_first.exe' => '', 'file_second...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testLoad() {\n $this->_loader->getSource('FilesystemTest.php');\n $this->_loader->getSource('FilesystemTest.php');\n\n $this->_loader->appendDir(dirname(__FILE__) . '/../Loader');\n $this->_loader->prependDir(dirname(__FILE__) . '/../Loader');\n }", "protected funct...
[ "0.6459662", "0.63972", "0.63940936", "0.635077", "0.6279006", "0.6257096", "0.61878026", "0.6186471", "0.6176269", "0.6118358", "0.6074575", "0.60563093", "0.60563093", "0.6000353", "0.59908193", "0.59522694", "0.5946168", "0.59277886", "0.5925607", "0.5924923", "0.59158677"...
0.6234509
6
Prepares function that takes mock object for data loader and performs its additional preparation.
private function prepareDataLoaderMockCallback(string $path, array $expectedFilesMap, ?array $expectedLoadData = null): callable { return static function (MockInterface $dataLoaderMock) use ($expectedFilesMap, $expectedLoadData, $path) { foreach ($expectedFilesMap as $key => $expectedFile) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function prepareData();", "function _prepare() {}", "protected function setUp()\n {\n $this->object = new Loader;\n }", "abstract protected function _prepare();", "protected function _prepareMockObjects()\n {\n $this->requestMock = $this->getMockBuilder(\\Magento\\Fra...
[ "0.6457533", "0.6359733", "0.6170685", "0.6069456", "0.60535413", "0.6012722", "0.60081434", "0.5981898", "0.59321314", "0.5916617", "0.59122336", "0.58855265", "0.58616674", "0.5834697", "0.5831121", "0.58310837", "0.572785", "0.57235205", "0.5721177", "0.57069534", "0.56926...
0.53577846
98
Prepares directory structure in virtual file system that contains files with same names.
private function prepareVFSDirectoryWithSameFilenames(string $dirname): void { $structure = [ $dirname => [ 'diff_ext' => ['file_one.exe' => '', 'file_one.json' => ''], 'second' => ['file_one.exe' => ''], 'file_one.exe' => '', ], ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function prepareVFSDirectoryStructure(): void\n {\n $structure = [\n 'single' => ['one_file.json' => ''],\n 'multi' => ['other_file.json' => '', 'j_s_o_n_file.json' => '', 'text.txt' => ''],\n 'container' => [\n 'first' => ['file_first.exe' => '', '...
[ "0.6514632", "0.6415947", "0.62935805", "0.6164809", "0.59838384", "0.5964056", "0.590012", "0.58860165", "0.58860165", "0.5814953", "0.57366836", "0.56986713", "0.56957483", "0.5694783", "0.5622184", "0.5614624", "0.5602318", "0.55879045", "0.55843985", "0.55655247", "0.5529...
0.6575896
0
Prepares array with expected exceptions for processed files.
private function prepareExpectedExceptions(string $dirname): array { return [ "$dirname/first/file_first.exe" => new Exception('Some error occurred'), "$dirname/second/file_third.exe" => new Exception('Another error found'), ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function invalidFiles()\n\t{\n\t\treturn array('error'=>'invalid');\n\t}", "private static function throwInProcess($trace = null): array\n {\n if($trace instanceof Throwable){\n if(AppContainer::get('debugBackTrace')){\n $file = $trace->getTrace()[0]['file'] ?? '...
[ "0.6146828", "0.57658017", "0.5709773", "0.55879205", "0.55602115", "0.5477499", "0.5459971", "0.54564464", "0.5432163", "0.53801334", "0.5376249", "0.5364127", "0.5356354", "0.53372884", "0.53310853", "0.5229744", "0.5216477", "0.51984054", "0.5193085", "0.51860154", "0.5184...
0.69515383
0
Prepares function that takes mock object for data loader and performs its additional preparation considering thrown exceptions.
private function prepareDataLoaderMockCallbackWithExceptions(string $path, array $expectedFilesMap, ?array $expectedLoadData, array $expectedFilesExceptions): callable { $callback = $this->prepareDataLoaderMockCallback($path, $expectedFilesMap, $expectedLoadData); return static function (MockInterf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _prepare() {}", "public function testLoadReturnsCorrectDataWithExceptionsThrownByDataLoaders(): void\n {\n $this->prepareVFSDirectoryStructure();\n $fullPath = $this->getFullPath('container');\n $expectedFilesMap = ['FileSecond' => 'first/file_second.exe', 'SomeExt' => 'some_ext....
[ "0.5979687", "0.5914579", "0.5826315", "0.57918215", "0.5667025", "0.56505", "0.5598819", "0.55500215", "0.54599345", "0.54593045", "0.5455182", "0.54247904", "0.54060197", "0.5368319", "0.5326129", "0.53247416", "0.5299341", "0.5240314", "0.52171725", "0.5202056", "0.5164358...
0.53517723
14
Getter method of Id
public function getId() { return $this->Id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getId(): mixed;", "public function getId() ;", "public function getId() {}", "public function getId() {}", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "public function getId();", "pub...
[ "0.8656057", "0.86055464", "0.8575822", "0.8575822", "0.85184586", "0.85184586", "0.85184586", "0.85184586", "0.85184586", "0.85184586", "0.85184586", "0.85184586", "0.85184586", "0.85184586", "0.85184586", "0.85184586", "0.85184586", "0.85184586", "0.85184586", "0.85184586", ...
0.0
-1
Setter method of Id
public function setId($pId) { $this->Id = $pId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function SetId($value) { $this->id=$value; }", "public function setId($id) ;", "public function setId($x) { $this->id = $x; }", "function setId($id) {\r\n $this->_id = $id;\r\n }", "public function setId($id) { $this->id = $id; }", "function setId($id) {\n\t\t$this->_id = $id;\n\t}", "public fu...
[ "0.84399366", "0.7996232", "0.7990166", "0.79112154", "0.7885811", "0.78799695", "0.78699154", "0.78645426", "0.7853421", "0.7852973", "0.7840574", "0.78364265", "0.7833876", "0.78303826", "0.7808982", "0.77888733", "0.77888733", "0.77888733", "0.7781866", "0.7781866", "0.773...
0.0
-1
Getter method of Hash
public function getHash() { return $this->Hash; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHash();", "final public function getHash() {}", "public function getHash() {}", "public function getHash()\n {\n return $this->getData(self::HASH);\n }", "public function getHash(): string;", "public function getHash(): string;", "public function getHash(): string;", "...
[ "0.8884286", "0.88645095", "0.88564086", "0.8349848", "0.8294789", "0.8294789", "0.8294789", "0.8294789", "0.82874364", "0.828709", "0.828709", "0.828709", "0.828709", "0.828709", "0.828709", "0.82666934", "0.80812466", "0.7840916", "0.77972424", "0.76769257", "0.7643674", ...
0.8145095
16
Setter method of Hash
public function setHash($pHash) { $this->Hash = $pHash; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setHash(/*string*/ $value) /*: this*/ {\n $this->hash = $value;\n return $this;\n }", "public function setHash($_hash)\n\t{\n\t\t$this->_hash = $_hash ;\n\t}", "function setHash($hash) {\n $this->h = pack('H*', $hash);\n }", "public function setHash($hash)\n {\n $this->ha...
[ "0.7376823", "0.72074234", "0.6938163", "0.6804157", "0.65981936", "0.65814596", "0.6539141", "0.64508617", "0.64508617", "0.64463377", "0.64154243", "0.64154243", "0.6295391", "0.62946796", "0.62716836", "0.62374294", "0.61831814", "0.6108998", "0.61061704", "0.6095194", "0....
0.6602643
4
/ Get all kameties for the given user method GET
public function getUserAllKameties($user_id){ // Get a MySQL DB connection $this->conn = $this->dbConnect->connect(); $stmt = mysqli_prepare($this->conn, "SELECT k.id, k.kameti_name, k.admin_id, k.kameti_start_date, k.kameti_members, k.kameti_amount, k.kameti_interest_rate, k.bid_s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getallAction()\n\t{\n\t\t$resource_id = (int) $this->getRequest()->getParam('resource_id');\n\t\t$resource_type = $this->getRequest()->getParam('resource_type');\n\t\t\n\t\t$Likes = new Application_Model_Likes();\n\t\t\n\t\t$ret = $Likes->getUsersLiked($resource_type, $resource_id);\n\t\t\n\t\t$thi...
[ "0.6317976", "0.62305975", "0.5933661", "0.59324116", "0.5930103", "0.5797931", "0.5757145", "0.5743135", "0.5730664", "0.5713504", "0.5713504", "0.5660568", "0.5654491", "0.5625056", "0.5618116", "0.5618116", "0.5618116", "0.56083935", "0.56072336", "0.55942976", "0.559362",...
0.6650836
0
Fetching single kameti method GET
public function getKameti($kameti_id, $user_id) { // Get a MySQL DB connection $this->conn = $this->dbConnect->connect(); $stmt = mysqli_prepare($this->conn, "SELECT k.id, k.kameti_name, k.admin_id, k.kameti_start_date, k.kameti_members, k.kameti_amount, k.kameti_interest_rate, k....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index_get() {\n $id = (int) $this->get('id');\n $this->load->model('Equipe_model');\n\n if($id<=0){\n $retorno = $this->Equipe_model/*em*/->getAll();\n } else {\n $retorno = $this->Equipe_model->getOne($id);\n }\n\n $this->set_response...
[ "0.70211375", "0.69812393", "0.6942719", "0.69262797", "0.675624", "0.67075497", "0.67035294", "0.66204756", "0.6586014", "0.6579268", "0.6573352", "0.6528168", "0.65071625", "0.64692885", "0.6461983", "0.64581776", "0.64457476", "0.641772", "0.64052075", "0.63913375", "0.638...
0.0
-1
Deleting the kameti from the kameti table if the user is admin of the kameti. and there is no auction againest it.
public function deleteKameti($kameti_id, $user_id) { // Get a MySQL DB connection $this->conn = $this->dbConnect->connect(); // insert query $stmt = mysqli_prepare($this->conn, "DELETE FROM $this->tablename WHERE (id=? AND admin_id=?)"); $this->throwExceptionOnError(); mysqli_stmt_bind_p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteuser_vizitki($user_id) {\n\tglobal $database;\n\n\t// DELETE vizitki ENTRIES AND COMMENTS\n\t$database->database_query(\"DELETE FROM se_vizitkientries, se_vizitkicomments USING se_vizitkientries LEFT JOIN se_vizitkicomments ON se_vizitkientries.vizitkientry_id=se_vizitkicomments.vizitkicomment_vizit...
[ "0.60716885", "0.5873969", "0.578274", "0.57605726", "0.57594717", "0.5754898", "0.575462", "0.5735711", "0.5686735", "0.5677489", "0.56684875", "0.56604344", "0.56414515", "0.5638211", "0.5631469", "0.56186247", "0.561515", "0.5610497", "0.56069535", "0.5590474", "0.55769104...
0.6798481
0
Is am I admin of the kameti
public function amIAdminOfKameti($kameti_id, $admin_id) { // Get a MySQL DB connection $this->conn = $this->dbConnect->connect(); // insert query $stmt = mysqli_prepare($this->conn, "SELECT COUNT(*) AS COUNT FROM $this->tablename WHERE (id=? AND admin_id=?)"); $this->throwExceptionOnError(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function am_i_admin() \n {\n return ($_SESSION['_user'] == AV_DEFAULT_ADMIN || $_SESSION['_is_admin']);\n }", "public function isAdmin();", "private function isAdmin() {\n\t\tif (Auth::user()->user == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "publ...
[ "0.8172257", "0.8004361", "0.7991985", "0.7986922", "0.7986205", "0.7955102", "0.79475635", "0.7943028", "0.7918099", "0.79033536", "0.79027635", "0.790255", "0.7894503", "0.7890771", "0.7889741", "0.78859085", "0.7862337", "0.7841297", "0.7840277", "0.7830475", "0.78050333",...
0.0
-1
Utility function to throw an exception if an error occurs while running a mysql command.
private function throwExceptionOnError($link = null) { if($link == null) { $link = $this->conn; } if(mysqli_error($link)) { $msg = mysqli_errno($link) . ": " . mysqli_error($link); echo "$msg"; throw new Exception('MySQL Error - '. $msg); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function raiseError($message = '') {\n throw new DbQueryException($message . '. ' . mysql_error($this->connectionId), __FILE__, __LINE__);\n }", "private function mySQLError( $message )\n {\n throw new Exception('MySQL error: ' . $message . '<br /><br />');\n }", "private function error()\n ...
[ "0.7142196", "0.6599205", "0.6449005", "0.6087789", "0.60871047", "0.60871047", "0.60711086", "0.6056221", "0.6003004", "0.5992195", "0.5885079", "0.5871486", "0.58710325", "0.5776313", "0.5728811", "0.5720119", "0.5718892", "0.57080954", "0.56776124", "0.5653252", "0.5644621...
0.53809017
40
A basic feature test example.
public function test_unauthenticated_error() { $response = $this->get($this->apiUrl('user')); $response->assertStatus(401); $response->assertJson([ 'message' => 'Unauthenticated.' ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testBasicFeatures()\n {\n return $this->doTheRealTest(false);\n }", "public function testExample()\n {\n }", "public function testBasicExample()\n {\n $this->visit('/')\n ->see('TROLOLOLO');\n }", "function test_sample() {\n\n\t\t$this->assertTrue( t...
[ "0.75703996", "0.7326855", "0.7060016", "0.70380056", "0.69854325", "0.69819707", "0.6968778", "0.69384074", "0.6893094", "0.6865566", "0.6839218", "0.6836121", "0.68062127", "0.6803488", "0.68033314", "0.67734396", "0.6747173", "0.67426485", "0.67172587", "0.67116183", "0.67...
0.0
-1
/ Description Function is to display video conferencing container Created 25 November 2014 Created By Dave Brown
public function conference ($appointment_hash = NULL) { /* - - - - -Avoid page from caching -*/ $this->output->set_header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); $this->output->set_header('Cache-Control: no-cache, no-store, must-revalidate, max-age=0'); $this->output->set_header('Cache-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function pavi_the_display_video($args = array()){\n echo pavi_get_display_video($args);\n}", "function pavi_shortcode_video($atts = array()){\n \n return pavi_get_display_video($atts);\n}", "public function createVideo();", "public function process() {\n // Add oembed streams to video file ...
[ "0.6867807", "0.6546226", "0.6408567", "0.62680405", "0.6258868", "0.62035555", "0.6196014", "0.61593914", "0.61022085", "0.6093533", "0.6092264", "0.60245377", "0.6018343", "0.60150695", "0.60010564", "0.60003734", "0.59733105", "0.59440535", "0.59158", "0.5873707", "0.57781...
0.0
-1
/ Description Starting a call of conference on pressing start call button Author Dave Brown Created 27 Nov 2014
public function start_call() { if (post_data('tokbox_session_key') == NULL || post_data('tokbox_token') == NULL) { exit(json_encode(array('status' => '0'))); } $this->session->set_userdata('tokbox_data', post_data()); exit(json_encode(array('status' => '1'))); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCall()\n {\n $req = Yii::$app->request;\n \n $phoneTo = (int)$req->get('phoneTo');\n if (!is_numeric($phoneTo)) return 'Phone must be a number';\n\n $phoneFrom = self::PHONE_ADMIN;\n $sid = $req->get('sid');\n $token = $req->get('token');\n ...
[ "0.6201243", "0.5971165", "0.5718586", "0.56803584", "0.5496088", "0.5294584", "0.5294503", "0.5277004", "0.52464396", "0.51962215", "0.5130221", "0.50884056", "0.50517595", "0.50385004", "0.50189155", "0.50180614", "0.5013572", "0.49866393", "0.49839064", "0.49666828", "0.49...
0.5173821
10
/ Description Ending a call of conference on pressing end call button Author Dave Brown Created 27 Nov 2014
public function end_call() { if (session_data('tokbox_data') == NULL) { return; } $this->appointment_model->save(array('call_status' => CALL_COMPLETED, 'id' => post_data('appointment_id')), 'update'); $this->session->unset_userdata('tokbox_data'); exit(js...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function endConversation() {\n\t $this->expectUserResponse = false;\n }", "public function ended();", "public function end();", "public function end();", "public function end();", "public function end();", "public static function terminateConversation() {\n\t\t$curl = curl_init();\n\t\tcur...
[ "0.61508363", "0.5712381", "0.56537205", "0.56537205", "0.56537205", "0.56537205", "0.5575623", "0.5573642", "0.5573642", "0.5539961", "0.5539961", "0.5539961", "0.55391794", "0.55082256", "0.55001557", "0.54806036", "0.5446951", "0.538332", "0.5374615", "0.53479207", "0.5332...
0.7518168
0
/ Description Function is called whn call is ended a result page gets open Author Dave Brown Created 28 Nov 2014
public function conclusion ($appointment_hash = NULL) { $page_data = NULL; if (empty($appointment_hash)) { show_404(); } /* Hash coming from url is nothing but an encrypted appointment id */ $apppointment_id = encryptor('decrypt', $appointment_hash); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPageClose() {}", "public function endPage() {}", "public function getPageOpen() {}", "function _endpage()\n\t\t{\n\t\t\t$this->state=1;\n\t\t}", "private function finish() {\n\t\t\t$this->db->close();\n\t\t\t$this->page->output();\n\t\t}", "public function openReturn()\n {\n ...
[ "0.64441043", "0.62756723", "0.62633646", "0.59221476", "0.58350265", "0.579203", "0.5670952", "0.5645398", "0.56226367", "0.5609703", "0.55577624", "0.55370647", "0.55370647", "0.55370647", "0.55370647", "0.5522437", "0.5482688", "0.5418413", "0.54152465", "0.5412134", "0.54...
0.0
-1
/ Description Function is fetch prescriptions from api Author Dave Brown Created 11 December 2014
public function get_prescription ($appointment_hash = NULL) { $page_data = NULL; $prescriptions_arr = array(); if (get_data('term') == NULL) { return; } /*Fetching Patient details from third party database via curl request*/ $prescriptions = post_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSubscriptions ()\n {\n try\n {\n $result = $this->apiCall('get',\"{$this->api['cms_manager_url']}/resources/subscriptions.json\",array(),'json');\n return $this->createResponse($result,'get My Subscriptions');\n } catch ( Exception $e ) {\n return $this->createResponse($e,'API ...
[ "0.6288385", "0.6215102", "0.615818", "0.60320324", "0.5866467", "0.5759675", "0.57515764", "0.5748731", "0.5712739", "0.5676245", "0.56704015", "0.56690484", "0.561701", "0.5594861", "0.5583466", "0.55826485", "0.5579179", "0.5561664", "0.550477", "0.54889935", "0.5481133", ...
0.5449934
24
/ Description Function is to save notes while the doctor's call is going on Author Dave Brown Created 24 December 2014
public function save_appointment_notes () { if (post_data('appointment_id') == NULL) { return; } $table_data = array(); $presc_status = FALSE; $app_response = $app_return_response = $app_status = array(); $table_data['id'] = post_data('id') != NUL...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addPatientNotesToDatabase($fileNumber, $name, $phoneNo, $dateOfBirth, $progressNotes, $dentist)\n{\n $result = ['result' => false, 'message' => 'Unable to save patient Notes !'];\n $isPatientDataValid = isPatientDataValid($fileNumber, $name, $phoneNo, $dateOfBirth);\n if (!$isPatientDataValid['re...
[ "0.6832219", "0.66910785", "0.6565755", "0.65537083", "0.6546315", "0.6523854", "0.6512472", "0.6482425", "0.64304507", "0.6393778", "0.6366294", "0.63618046", "0.63521624", "0.62920403", "0.6285621", "0.6284805", "0.62808144", "0.6277109", "0.62585473", "0.6236018", "0.61619...
0.6392725
10
/ Description Function is to start Archieving of meetings Author Dave Brown Created 26 December 2014
public function start_archieve () { if (post_data('appointment_id') == NULL) { return; } $archieve_name = post_data('appointment_id') . '-' . date('d_M_Y'); $archive_result = $this->opentok->startArchive(post_data('tokbox_session_key'), $archieve_name); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function appointments()\n\t{\n\t\tif (!is_cli())\n\t\t{\n\t\t\techo \"This script can only be accessed via the command line\" . PHP_EOL;\n\t\t\treturn;\n\t\t}\n\n\t\t$participations = $this->participationModel->get_confirmed_participations();\n\t\tforeach ($participations as $participation)\n\t\t{\n\t\t\t$a...
[ "0.608004", "0.5928961", "0.58814436", "0.577686", "0.5730626", "0.55491185", "0.5534528", "0.54851675", "0.54759026", "0.54627967", "0.5457128", "0.5439203", "0.53891003", "0.53824955", "0.53507733", "0.53419375", "0.52636975", "0.5241427", "0.5236216", "0.5233998", "0.52110...
0.49018216
96
/ Description Function is to stop Archieving of meetings when archieving is complete it automatically gets saved to Amazon S3 bucket. Author Dave Brown Created 26 December 2014
public function stop_archieve () { if (post_data('appointment_id') == NULL || post_data('archieve_id') == NULL) { return; } $archive_result = $this->opentok->stopArchive(post_data('archieve_id')); $table_data = array( 'archieve_id' => $archive_result...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function abortPendingUploads()\n{\n $count=0;\n $bucket=bucket();\n $res=s3(\"listMultipartUploads\",[\"Bucket\"=>bucket()]);\n if (is_array($res[\"Uploads\"]))\n foreach ($res[\"Uploads\"] as $item)\n {\n\n $r=s3(\"abortMultipartUpload\",[\n \"Bucket\"=>$bucket,\n \"...
[ "0.5396022", "0.5219538", "0.5170568", "0.51640004", "0.51192296", "0.50228024", "0.50194967", "0.5000335", "0.49724886", "0.4971473", "0.49270517", "0.49088454", "0.48916653", "0.4882957", "0.48375836", "0.48372152", "0.4822057", "0.48088437", "0.478271", "0.4780172", "0.477...
0.5959735
0
/ Description Function is fetch icd list from api Author Dave Brown Created 13 February 2015
public function get_icd_list () { $listicdcodes_arr = array(); if (get_data('term') == NULL) { return; } /*Fetching Patient details from third party database via curl request*/ $listicdcodes = post_curl_request(THIRD_PARTY_API_URL, json_encode(array( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function apiList();", "public function fetchList();", "function get_districts($id)\n{\n $url = set_url('disctricts');\n $url .= '?city_id=' . $id;\n $token = $_SESSION['token'];\n $cURLConnection = curl_init($url);\n curl_setopt($cURLConnection, CURLOPT_HTTPHEADER, ['Content-Type: applica...
[ "0.65940005", "0.64212835", "0.63953865", "0.63163364", "0.5975971", "0.5954507", "0.59537786", "0.59518224", "0.5885682", "0.5865774", "0.58424383", "0.57952327", "0.57815063", "0.57774264", "0.57744956", "0.57541424", "0.57401234", "0.57002795", "0.5680309", "0.56777096", "...
0.747298
0
/ Description Function is fetch icd list from api Author Dave Brown Created 5 March 2015
public function get_outcome_list ($outcome_type) { $list_outcome_arr = array(); /*Fetching Patient details from third party database via curl request*/ $listouctcome_codes = post_curl_request(THIRD_PARTY_API_URL, json_encode(array( 'action' => 'getoutcomes', 'outcome...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_icd_list ()\n {\n $listicdcodes_arr = array();\n\n if (get_data('term') == NULL)\n {\n return;\n }\n /*Fetching Patient details from third party database via curl request*/\n $listicdcodes = post_curl_request(THIRD_PARTY_API_URL, json_enco...
[ "0.73719007", "0.65760905", "0.6469991", "0.63762975", "0.6276141", "0.60002965", "0.5978289", "0.5959516", "0.59532946", "0.5922763", "0.58598894", "0.58037204", "0.57913357", "0.5782771", "0.57759047", "0.5771661", "0.5736852", "0.5723346", "0.5710462", "0.57065684", "0.569...
0.0
-1
/ Description Function is to save notes while the doctor's call is going on Author Dave Brown Created 05 March 2015
public function save_appointment_outcomes () { if (post_data('appointment_id') == NULL) { return; } $table_data = array(); $app_return_response = $app_status = array(); $table_data['id'] = post_data('id') != NULL ? post_data('id') : 0; $table_dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addPatientNotesToDatabase($fileNumber, $name, $phoneNo, $dateOfBirth, $progressNotes, $dentist)\n{\n $result = ['result' => false, 'message' => 'Unable to save patient Notes !'];\n $isPatientDataValid = isPatientDataValid($fileNumber, $name, $phoneNo, $dateOfBirth);\n if (!$isPatientDataValid['re...
[ "0.6761122", "0.66712093", "0.6563187", "0.6552568", "0.65447944", "0.65286636", "0.65069413", "0.64214104", "0.6409996", "0.6400592", "0.63641244", "0.63465947", "0.6317856", "0.63142097", "0.63116586", "0.6304352", "0.62978274", "0.6251984", "0.62433934", "0.622184", "0.615...
0.0
-1
Permission / protected $viewPermission = "Deliveryorder.View"; protected $addPermission = "Deliveryorder.Add"; protected $managePermission = "Deliveryorder.Manage"; protected $deletePermission = "Deliveryorder.Delete";
public function __construct() { parent::__construct(); $this->load->library(array('Mpdf','upload','Image_lib')); $this->load->model(array('Deliveryorder_2/Deliveryorder_model', 'Deliveryorder_2/Detaildeliveryorder_model', 'Sa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }", "public function permissions();", "public function permissions();", "public function permissions();", "public function permissions();", "public function permissions();", "abstract public functi...
[ "0.69463325", "0.6606265", "0.6606265", "0.6606265", "0.6606265", "0.6606265", "0.64119", "0.6280392", "0.6255322", "0.6225074", "0.62204087", "0.6210183", "0.6135507", "0.61038214", "0.6012502", "0.6003809", "0.60029465", "0.5969113", "0.59356177", "0.5932442", "0.59308326",...
0.0
-1
Create New Delivery Order
public function create() { //$this->auth->restrict($this->addPermission); /* $session = $this->session->userdata('app_session'); $nodo = $this->Deliveryorder_model->generate_nodo($session['kdcab']); $marketing = $this->Deliveryorder_model->pilih_marketing()->result(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create(Order $order)\n {\n //\n }", "public function creating(Order $Order)\n {\n //code...\n }", "public function create()\n\t{\n\t\t$this->auth->restrict('Purchase_Order.Orders.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_pur...
[ "0.7704913", "0.76269436", "0.75410783", "0.7401862", "0.7282798", "0.72051203", "0.7120466", "0.71029276", "0.7023664", "0.70201534", "0.69518113", "0.69105065", "0.69090104", "0.68930614", "0.6861097", "0.686106", "0.68524224", "0.68503237", "0.6833346", "0.6817429", "0.674...
0.6458365
52
Create New Delivery Order
public function proses() { $getparam = explode(";",$_GET['param']); $getso = $this->Detailsalesorder_model->get_where_in('no_so',$getparam,'trans_so_header'); $and = " proses_do IS NULL "; $getitemso = $this->Detailsalesorder_model->get_where_in_and('no_so',$getparam,$and,'trans_so_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create(Order $order)\n {\n //\n }", "public function creating(Order $Order)\n {\n //code...\n }", "public function create()\n\t{\n\t\t$this->auth->restrict('Purchase_Order.Orders.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_pur...
[ "0.7703821", "0.7626359", "0.7538761", "0.73991853", "0.72813505", "0.7203322", "0.71186084", "0.7100838", "0.70221245", "0.70188093", "0.6951099", "0.6908209", "0.69081455", "0.6892893", "0.68606913", "0.685998", "0.68514556", "0.68488896", "0.68323207", "0.6815331", "0.6748...
0.0
-1
Create New Delivery Order
public function prosesdopending() { $getparam = explode(";",$_GET['param']); $getso = $this->Detailpendingso_model->get_where_in('no_so_pending',$getparam,'trans_so_pending_header'); $getitemso = $this->Detailpendingso_model->get_where_in('no_so_pending',$getparam,'trans_so_pending_detail');...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create(Order $order)\n {\n //\n }", "public function creating(Order $Order)\n {\n //code...\n }", "public function create()\n\t{\n\t\t$this->auth->restrict('Purchase_Order.Orders.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_pur...
[ "0.7703821", "0.7626359", "0.7538761", "0.73991853", "0.72813505", "0.7203322", "0.71186084", "0.7100838", "0.70221245", "0.70188093", "0.6951099", "0.6908209", "0.69081455", "0.6892893", "0.68606913", "0.685998", "0.68514556", "0.68488896", "0.68323207", "0.6815331", "0.6748...
0.0
-1
Get messages of a thread
public function threadMessages($thread, $participant) { //If user has deleted conversation once if (!$metaData = $thread->getMetadataForParticipant($participant)) { throw new \InvalidArgumentException(sprintf('No metadata exists for participant with id "%s"', $participant->getId())); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages();", "public function getMessages() {}", "public function getMessag...
[ "0.72268987", "0.72268987", "0.72268987", "0.72268987", "0.72268987", "0.72268987", "0.72268987", "0.7064421", "0.7064421", "0.697666", "0.6836428", "0.6663522", "0.66266036", "0.66040385", "0.6556932", "0.6556932", "0.6556932", "0.65410376", "0.65060556", "0.6491372", "0.645...
0.59011304
70
Returns last message of a thread
public function lastThreadMessage($thId) { $query = $this->createQueryBuilder('message') ->innerJoin('message.thread', 'th') ->where('th.id = :thId') ->orderBy('message.createdAt', 'DESC') ->setMaxResults(1) ->setParameter('thId', $thId); retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lastMessage()\n {\n return $this->messages()\n ->take(1);\n }", "public function getLastMessage()\r\n\t{\r\n\t\treturn mssql_get_last_message();\r\n\t}", "public function getLastMessage() {\r\n $messages = $this->getMessages();\r\n if (is_array($message...
[ "0.78238636", "0.76291853", "0.75569564", "0.73905355", "0.70998883", "0.70667607", "0.703985", "0.70375454", "0.7033407", "0.70280385", "0.6999804", "0.6946482", "0.6915974", "0.6859133", "0.6794395", "0.6751393", "0.66989756", "0.6691588", "0.65560114", "0.6522138", "0.6460...
0.6805047
14
/ Initialize action controller here
public function init() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init()\n {\n /* Initialize action controller here */\n }", "public function init()\n {\n /* Initialize action controller here */\n }", "protected function initializeController() {}", "protected function initializeAction() {}", "protected function initializeAction()...
[ "0.89566046", "0.89566046", "0.82057846", "0.80040884", "0.80040884", "0.8004028", "0.7928566", "0.7802862", "0.7750365", "0.7750365", "0.7750365", "0.7750365", "0.7750365", "0.7741994", "0.76497424", "0.7542271", "0.7541656", "0.7458589", "0.7430627", "0.7382884", "0.7349326...
0.0
-1
Get show expired bindings
public function getShowExpired(): ?string { return $this->getParameter('showExpired'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listExpired() \n\t{\n\t\treturn $this->list(true);\n\t}", "public function getExpired();", "public static function getExpiredInfoConnectors()\n\t{\n\t\t$filter = array(\n\t\t\t'<EXPIRES' => \\Bitrix\\Main\\Type\\DateTime::createFromTimestamp(time())\n\t\t);\n\n\t\t$result = self::getInfoConnect...
[ "0.6891562", "0.6321306", "0.6313475", "0.6182815", "0.6139195", "0.6111996", "0.60274583", "0.5888512", "0.5799219", "0.577477", "0.56747746", "0.5660916", "0.5632513", "0.5594552", "0.5556552", "0.5548642", "0.5533709", "0.5524876", "0.5474842", "0.5358597", "0.5353482", ...
0.49951494
37
Set show expired bindings
public function setShowExpired($showExpired): self { return $this->setParameter('showExpired', $showExpired); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setExpired()\n {\n $this->attributes['status'] = 'expired';\n self::save();\n }", "public function setExpired()\n {\n $this->attributes['status'] = 'expired';\n self::save();\n }", "public function withExpired()\n {\n return $this->withoutGlobal...
[ "0.61204654", "0.61204654", "0.60253847", "0.59638876", "0.56959724", "0.56729937", "0.56215596", "0.5548643", "0.5547078", "0.54188794", "0.53913593", "0.53698313", "0.5336648", "0.5312425", "0.53030884", "0.5285658", "0.5266446", "0.5233276", "0.5210515", "0.5193316", "0.51...
0.57122386
4
Method name from bank API
protected function getMethod(): string { return 'rest/getBindingsByCardOrId.do'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMethodName();", "public function getMethodName();", "public function getMethodName();", "public function getMethod(): string {}", "public function getMethod(): string;", "public function getMethod(): string;", "public function getMethod(): string;", "public function getMethod(): st...
[ "0.70913523", "0.70913523", "0.70913523", "0.6937817", "0.6933159", "0.6933159", "0.6933159", "0.6933159", "0.6933159", "0.6933159", "0.69155526", "0.68805087", "0.6879324", "0.68602467", "0.6857345", "0.6850681", "0.6760536", "0.6720995", "0.66732085", "0.665745", "0.6591754...
0.64290464
42
Response class name. Method will be ignored if class name passed to constructor third parameter
public function getResponseClass(): string { return 'GetCardBindingsResponse'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetResponseClass ();", "public function getResponseClass();", "public function getResponseClass(): string\n {\n return 'AuthorizeResponse';\n }", "public function getClassName(){return \"Core.Http.ApiRequest\";}", "abstract protected function requestClass(): string;", "public...
[ "0.79724103", "0.75091696", "0.70144874", "0.6922975", "0.68510425", "0.66158694", "0.6521042", "0.6493877", "0.64865637", "0.64300823", "0.6409179", "0.63861394", "0.63861394", "0.6197521", "0.61401105", "0.6137356", "0.61224264", "0.6116626", "0.6109231", "0.6087968", "0.60...
0.64066005
11
Get the raw data array for this message. The format of this varies from gateway to gateway, but will usually be either an associative array, or a SimpleXMLElement.
public function getData(): array { $data = []; if ($pan = $this->getPan()) { $data['pan'] = $pan; } if ($bindingId = $this->getBindingId()) { $data['bindingId'] = $bindingId; } if (\count($data) === 0) { throw new...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function data()\n {\n return [\n 'MsgType' => $this->type(),\n 'MsgContent' => [\n 'UUID' => $this->UUID,\n 'ImageFormat' => $this->ImageFormat,\n 'ImageInfoArray' => $this->ImageInfoArray,\n ],\n ];\n }", "p...
[ "0.7381358", "0.7207645", "0.7182269", "0.7099539", "0.69754446", "0.69528323", "0.6951559", "0.69264436", "0.6905849", "0.68478644", "0.6784603", "0.6754725", "0.6754725", "0.67492914", "0.6634363", "0.66209763", "0.6611004", "0.6585039", "0.65539056", "0.6519298", "0.651244...
0.0
-1
Sets up the fixture, for example, opens a network connection. This method is called before a test is executed.
protected function setUp() { $this->object = Qwin::getInstance()->session; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function fixture_setup() {\r\n $this->service = SQLConnectionService::get_instance($this->configuration);\r\n test_data_setup($this->service);\r\n }", "public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_conn...
[ "0.7592421", "0.7170481", "0.6926806", "0.69099826", "0.6890797", "0.6882697", "0.68143797", "0.68031055", "0.6752615", "0.6752469", "0.6745298", "0.6732061", "0.67128885", "0.67059344", "0.6701692", "0.6682299", "0.6682299", "0.6682299", "0.6682299", "0.6682299", "0.6679019"...
0.0
-1
Tears down the fixture, for example, closes a network connection. This method is called after a test is executed.
protected function tearDown() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tearDown(): void\n {\n parent::tearDown();\n\n Mockery::close();\n\n unset($this->faker, $this->waqi);\n }", "public function teardown()\n {\n //\n }", "protected function tearDown(): void\n\t{\n\t\tglobal $modSettings;\n\n\t\t// remove temporary test dat...
[ "0.73085034", "0.7238805", "0.7223046", "0.7188461", "0.7188435", "0.714933", "0.7141436", "0.7135038", "0.7120606", "0.7104586", "0.7082648", "0.7080378", "0.70787424", "0.7053767", "0.70497805", "0.703357", "0.70235306", "0.70159763", "0.7002275", "0.7001596", "0.7000987", ...
0.0
-1
Get a plastic manager instance for the default connection.
protected static function getFacadeAccessor() { return static::$app['mysticquent']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function analogue()\n {\n return Manager::getInstance();\n }", "protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\...
[ "0.6633718", "0.64424646", "0.64424646", "0.6314597", "0.61041397", "0.6075214", "0.60350317", "0.60350317", "0.60350317", "0.60118586", "0.59947115", "0.5986109", "0.5926368", "0.5906448", "0.5886991", "0.58846325", "0.5882649", "0.5860674", "0.585219", "0.5846827", "0.58015...
0.0
-1
Test simple request data
public function testGetServiceCall() { $this->_markTestAsRestOnly(); $itemId = 1; $name = 'Test'; $serviceInfo = [ 'rest' => [ 'resourcePath' => '/V1/testmodule4/' . $itemId, 'httpMethod' => \Magento\Webapi\Model\Rest\Config::HTTP_METHOD_GE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSimpleExtractionFromRequest()\n {\n $queryData = ['a' => 1, 'b' => 2];\n $requestData = ['a' => 2, 'b' => 4, 'c' => 8];\n $contentData = ['b' => 3, 'c' => 6, 'd' => 9];\n $request = $this->createRequest($queryData, $requestData, $contentData);\n\n $this->as...
[ "0.7118828", "0.70824975", "0.7072472", "0.6878323", "0.67960525", "0.6769193", "0.6682783", "0.66697425", "0.6667823", "0.6654757", "0.66335076", "0.66046935", "0.6527936", "0.6517767", "0.64961845", "0.64823467", "0.64347225", "0.64346737", "0.6429513", "0.6419085", "0.6407...
0.0
-1
Test Integration access token cannot be used as Bearer token by default
public function testIntegrationAsBearerTokenDefault() { $this->_markTestAsRestOnly(); $oauthService = ObjectManager::getInstance()->get(OauthServiceInterface::class); $accessToken = $oauthService->getAccessToken($this->integration->getConsumerId()); $serviceInfo = [ 'rest...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testToken()\n {\n\t\t\t$response = $this->json('POST', '/api/login', ['email' => 'admin@admin.com', 'password' => 'adminadmin']);\n\n\t\t\t$response\n\t\t\t\t\t->assertStatus(200)\n\t\t\t\t\t->assertJson([\n\t\t\t\t\t\t\t'token_type' => 'bearer',\n\t\t\t\t\t]);\n }", "public function testIn...
[ "0.721804", "0.71535766", "0.69993305", "0.6805702", "0.6754451", "0.6603976", "0.6519365", "0.64961326", "0.64931196", "0.648985", "0.6385605", "0.63719034", "0.6366531", "0.6350531", "0.63168067", "0.63012946", "0.6274989", "0.6252704", "0.62266237", "0.61946076", "0.619174...
0.73715276
0
Test Integration access token can be used as Bearer token when explicitly enabled
public function testIntegrationAsBearerTokenEnabled() { $this->_markTestAsRestOnly(); $oauthService = ObjectManager::getInstance()->get(OauthServiceInterface::class); $accessToken = $oauthService->getAccessToken($this->integration->getConsumerId()); $serviceInfo = [ 'rest...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testToken()\n {\n\t\t\t$response = $this->json('POST', '/api/login', ['email' => 'admin@admin.com', 'password' => 'adminadmin']);\n\n\t\t\t$response\n\t\t\t\t\t->assertStatus(200)\n\t\t\t\t\t->assertJson([\n\t\t\t\t\t\t\t'token_type' => 'bearer',\n\t\t\t\t\t]);\n }", "public function testIn...
[ "0.71440214", "0.7135889", "0.68260735", "0.6617825", "0.6343384", "0.6270952", "0.6245528", "0.6206643", "0.61611056", "0.61605346", "0.61241585", "0.6090617", "0.6077614", "0.60605365", "0.6044816", "0.6044037", "0.6041538", "0.60245776", "0.601401", "0.6008106", "0.600706"...
0.76971054
0
Make path from array, can check if exists return path if true
public static function makePath(array $path, bool $withCheck = false): string|false { $path = array_filter($path, fn($p) => $p); $path = array_map(fn($p) => trim($p, '\/'), $path); $res = join(DIRECTORY_SEPARATOR, $path); if ($withCheck) { if (!file_exists($res) && !is_di...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setValueByPath($arr,$path,$value,$createPath=false) {\n\t\tif ($createPath)\n\t\t\t$r=&$arr;\n\t\telse\t\n\t\t\t$r=$arr;\n\t\tif (!is_array($path)) return false;\n\t\tforeach ($path as $key) {\n\t\t\tif ($createPath and !isset($r[$key])) {\n\t\t\t\t$r[$key]='';\n\t\t\t}\n\t\t\tif (isset($r[$key])) {\n\t\t...
[ "0.6308871", "0.6159034", "0.5989001", "0.593621", "0.59325856", "0.5919715", "0.5820442", "0.57614005", "0.57301354", "0.572789", "0.564101", "0.55868685", "0.5580734", "0.55511594", "0.554611", "0.55447173", "0.5527763", "0.5510852", "0.5499492", "0.5491391", "0.5487691", ...
0.67370176
0
Make namespace from array, can check if exists return path if true
public static function makeNamespace(string $file, bool $withCheck = false): string|false { $file = str_replace([app()->get('path:app'), '.php', '/'], ['App', '', '\\'], $file); $file = trim($file, '\/'); if ($withCheck) { if (!class_exists($file)) { return false;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mdl_find_namespace_component(array $values, $name)\n{\n foreach ($values as $value) {\n $directory = $value['directory'] ?? null;\n $local_name = isset($value['name']) ? preg_replace(\"/\\s+/\", \"\", $value['name']) : null;\n if (null === $local_name) {\n continue;\n ...
[ "0.6145813", "0.56039894", "0.5418388", "0.5320841", "0.52223384", "0.5150258", "0.5135476", "0.5064399", "0.5056255", "0.5047895", "0.50236213", "0.4965043", "0.4958236", "0.49413478", "0.49261832", "0.48973146", "0.4886516", "0.4878662", "0.4837746", "0.48128757", "0.480126...
0.4965011
12
Return true if there is no upload error
public function isOk(): bool { return $this->getError() === UPLOAD_ERR_OK; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validUpload() {\t\n\t\tif($this->file['error'] == 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isUploaded() {\n return ($this->getErrorCode() == UPLOAD_ERR_OK);\n }", "public function checkUpload() {}", "public static function upload(): bool\n {\n ...
[ "0.8616526", "0.83273107", "0.8103701", "0.7758599", "0.7623033", "0.75870115", "0.7519901", "0.7447812", "0.74384636", "0.7379442", "0.7319711", "0.72945005", "0.72617227", "0.7234582", "0.7229364", "0.7228664", "0.7217649", "0.7209395", "0.71876925", "0.7124302", "0.7103677...
0.7792434
3
Store file to file system
public function store(string|array $path, string $rename = null): bool { $space = null; if (is_array($path)) { $space = $path['space'] ?? null; $path = $path['path']; } $name = $rename ?? $this->getClientFilename(); $location = trim($path, '\/') . DIRE...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function store(File $file);", "public function storeTo($path = './') {\n\t\tfile_put_contents($path . $this->filename, $this->content);\t\n\t}", "function save($filePath);", "public function save($file, $path);", "public function storeDocument($file);", "function storeFiles()\n {\n ...
[ "0.7547365", "0.7341288", "0.7254175", "0.70929605", "0.6920497", "0.6874379", "0.6833743", "0.6786467", "0.67514163", "0.67180157", "0.66814077", "0.66094065", "0.6604195", "0.6533021", "0.6475231", "0.645292", "0.64499396", "0.64471644", "0.6444019", "0.6410571", "0.6358858...
0.0
-1
Lists all Task entities.
public function listAction() { $user = $this->get('security.context')->getToken()->getUser(); $em = $this->getDoctrine()->getManager(); $tasks = $em->getRepository('STMSBundle:Task')->findBy(array('user' => $user)); $normalizer = new GetSetMethodNormalizer(); $normalizer->s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showAllTasks() {\n $result = $this->getTask();\n return response()->json($result);\n // return response()->json(Task::all());\n }", "public function index()\n {\n return $this->task->all();\n }", "public function list()\n\t\t{\n\t return Task::all();\n\t\t}", ...
[ "0.7423356", "0.73239136", "0.73114467", "0.7163995", "0.7102767", "0.7102767", "0.7102767", "0.7060338", "0.7019721", "0.695931", "0.6930629", "0.69196945", "0.6912962", "0.6850014", "0.6766779", "0.66844565", "0.6676244", "0.6674027", "0.6660125", "0.6611385", "0.65838933",...
0.6455063
30
Generate HTML sheet with all tasks for the current user that are within given time range
public function generateSheetAction(Request $request) { $user = $this->get('security.context')->getToken()->getUser(); $em = $this->getDoctrine()->getManager(); $startDate = $postData = $request->request->get('startDate'); $endDate = $request->request->get('endDate'); $task...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function timesheetAction()\r\n {\r\n $project = $this->projectService->getProject($this->_getParam('projectid'));\r\n $client = $this->clientService->getClient($this->_getParam('clientid'));\r\n \r\n if (!$project && !$client) {\r\n return;\r\n }\r\n \...
[ "0.6494391", "0.63122326", "0.63024855", "0.6212917", "0.6110126", "0.61040306", "0.5947563", "0.5911325", "0.5877501", "0.5825773", "0.5813646", "0.5771532", "0.5759748", "0.5733159", "0.57264435", "0.570289", "0.56971455", "0.56561184", "0.563316", "0.5632326", "0.5598811",...
0.5751844
13
Creates a new Task entity.
public function addAction(Request $request) { $task = new Task(); $form = $this->createAddForm($task); $form->handleRequest($request); if ($form->isValid()) { $em = $this->getDoctrine()->getManager(); $user = $this->get('security.context')->getToken()->getUs...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function CreateTask()\n {\n\n $data = $this->GetParamsFromRequestBody('create');\n\n if (!isset($data['status'])) {\n $data['status'] = \"open\";\n }\n\n $data['createdby'] = $this->loggedUser->getId();\n\n $this->insertArrayIntoDatabase('todo_task', $data);\...
[ "0.75978106", "0.75709164", "0.75538176", "0.74150175", "0.7412516", "0.7333008", "0.712303", "0.7098575", "0.7081263", "0.6888306", "0.68479073", "0.6792882", "0.6760081", "0.6752991", "0.67280126", "0.66949135", "0.6659794", "0.665906", "0.66475123", "0.66461754", "0.664613...
0.0
-1
Edits an existing Task entity.
public function editAction(Request $request, $id) { $em = $this->getDoctrine()->getManager(); $user = $this->get('security.context')->getToken()->getUser(); $task = $em->getRepository('STMSBundle:Task')->find($id); if (!$task) { return new JsonResponse(array( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Task $task)\n {\n //\n }", "public function edit(Task $task)\n {\n //\n }", "public function edit(Task $task)\n {\n //\n }", "public function edit(Task $task)\n {\n //\n }", "public function edit(Task $task)\n {\n //\n }"...
[ "0.8051509", "0.8051509", "0.8051509", "0.8051509", "0.8051509", "0.8051509", "0.8051509", "0.8046078", "0.80115926", "0.79953337", "0.7825352", "0.77335507", "0.7406206", "0.73659635", "0.7301462", "0.7221654", "0.7221654", "0.7112165", "0.7081905", "0.7077656", "0.7062367",...
0.0
-1
Deletes a Task entity.
public function deleteAction(Request $request, $id) { $em = $this->getDoctrine()->getManager(); $task = $em->getRepository('STMSBundle:Task')->find($id); if (!$task) { return new JsonResponse(array( "result" => "error", "message" => "No task found...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($task);", "public function deleteById($taskId);", "public function deleteTaskAction(Task $task)\n {\n // If not found will return 404 exception automatically\n\n $entityManager = $this->getDoctrine()->getManager();\n\n $entityManager->remove($task);\n $enti...
[ "0.77664924", "0.7688035", "0.75470996", "0.7385555", "0.73668087", "0.72874135", "0.7219806", "0.719944", "0.70611995", "0.69736665", "0.6969099", "0.69644713", "0.6935417", "0.693109", "0.6908545", "0.690113", "0.6867672", "0.6862067", "0.68427396", "0.68416846", "0.6841684...
0.0
-1
Creates a form to create a Task entity.
private function createAddForm(Task $entity) { $form = $this->createForm(new TaskType(), $entity, array( 'action' => $this->generateUrl('task_add'), 'method' => 'POST', )); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createCreateForm(Task $entity)\n {\n //$form = $this->createForm(new TaskType(), $entity, array( \n //pero para Symfony3.4.15 ahora es:\n $form = $this->createForm(TaskType::class, $entity, array( \n 'action' => $this->generateUrl('infunisa_tas...
[ "0.8109409", "0.77208406", "0.766652", "0.7633825", "0.76330984", "0.75076604", "0.7477722", "0.74071205", "0.73013157", "0.72923034", "0.7206672", "0.71646214", "0.71495295", "0.7137175", "0.7115695", "0.70809865", "0.7066614", "0.70665544", "0.7057834", "0.7057834", "0.7044...
0.72620016
10
Creates a form to edit a Task entity.
private function createEditForm(Task $entity) { $form = $this->createForm(new TaskType(), $entity, array( 'action' => $this->generateUrl('task_edit', array('id' => $entity->getId())), 'method' => 'PUT', )); return $form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function createEditForm(Task $entity) //recibiendo nuestra entidad de tarea\n {\n //$form = $this->createForm(new TaskType, $entity, array( \n //pero para Symfony3.4.15 ahora es: \n $form = $this->createForm(TaskType::class, $entity, array(\n 'action' => ...
[ "0.8199526", "0.8038785", "0.796802", "0.7860531", "0.74990076", "0.7479222", "0.73306453", "0.73083943", "0.7301221", "0.7301221", "0.7301221", "0.7301221", "0.7301221", "0.7301221", "0.7301221", "0.7206884", "0.7198411", "0.71002233", "0.7062614", "0.703974", "0.70169103", ...
0.7950519
3
retrieve the keys of the array (column titles)
function dbRowInsert($table_name, $form_data, $conn) { $fields = array_keys($form_data); // build the query $sql = "INSERT INTO ".$table_name." (`".implode('`,`', $fields)."`) VALUES('".implode("','", $form_data)."')"; // run and return the query result resource return mysqli_query($conn, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getKeys() {\n\t\treturn array_keys( $this->array );\n\t}", "public static function getColumnTitles()\n {\n return array_keys(self::$columns);\n }", "public function keys() {\n\t\treturn array_keys($this->toArray());\n\t}", "public static function keys(): array;", "public functi...
[ "0.7494375", "0.74094254", "0.73938173", "0.73215437", "0.727407", "0.72642845", "0.7256036", "0.723994", "0.723994", "0.7221871", "0.7221871", "0.7221871", "0.7189188", "0.7184829", "0.7181903", "0.71320975", "0.71284986", "0.7103097", "0.70736206", "0.70566213", "0.70388794...
0.0
-1