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
Defines the props that are shared by default.
public function share(Request $request) { $location = Location::get(); if (!$location) { throw new Exception('location_service_failure'); } $key = env('WEATHER_API_KEY', ''); $lat = $location->latitude; $lng = $location->longitude; $locationArra...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initProps()\n {\n foreach ($this->cmds as $key => $parseValues) {\n $this->props[$key] = false;\n }\n\n foreach ($this->flags as $key => $parseValues) {\n $this->props[$key] = false;\n }\n }", "public function set_default_properties(){\n\t\t...
[ "0.5947392", "0.5346081", "0.53405166", "0.53042525", "0.5266392", "0.52301306", "0.52056587", "0.518751", "0.51378745", "0.5104388", "0.5095114", "0.5061604", "0.50492287", "0.50486624", "0.5039966", "0.5026632", "0.50234526", "0.5004508", "0.49763393", "0.4962831", "0.49071...
0.0
-1
Run the database seeds.
public function run() { DB::table('MatHangTable')->insert([ 'id' =>'1', 'id_Xuatxu' => '3', 'id_MaLoai'=>1, 'id_LKLT'=>"1", 'id_LDVT'=>2, 'id_NhaCC'=>, 'TenMH'=>'Sản Phẩm a', 'BiDanh'=>'ah1', ...
{ "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
Event function that is called when a new user connects to the WebSocket server.
public function onOpen(ConnectionInterface $conn) { echo "new connection from {$conn->remoteAddress}\n"; $this->users->attach($conn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function onOpen(ConnectionInterface $conn)\n {\n /** @var QueryString $GET */\n $GET = $conn->WebSocket->request->getQuery();\n if(empty($this->users[$GET->get('userId')])) $this->users[$GET->get('userId')] = [];\n $this->users[$GET->get('userId')][] = $conn;\n\n echo \"New co...
[ "0.7034876", "0.6938503", "0.6439499", "0.63925016", "0.6170298", "0.6148819", "0.59281355", "0.5854689", "0.57586795", "0.5747205", "0.5715446", "0.5701054", "0.56625396", "0.5642664", "0.5620012", "0.5604752", "0.55724883", "0.5522115", "0.55186266", "0.5498154", "0.5491874...
0.6049925
6
Event function that is called when a user disconnects from the WebSocket server.
public function onClose(ConnectionInterface $conn) { echo "connection closed by {$conn->remoteAddress}\n"; $this->users->detach($conn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function onClientDisconnected(WebSocketClient $client);", "public function onConnectionClosed();", "public function onClose(ConnectionInterface $connection) {\n\n $user = $connection->user;\n\n $this->clients->detach($connection);\n\n $this->sendToAll([\n 'type...
[ "0.7654642", "0.6935726", "0.6802278", "0.6703611", "0.665572", "0.65716463", "0.6518616", "0.6437045", "0.64265066", "0.64265066", "0.64265066", "0.64265066", "0.64265066", "0.64265066", "0.64265066", "0.64265066", "0.63856894", "0.6341516", "0.6341453", "0.63060534", "0.629...
0.6151372
37
Event function that is called when a user sends a message to the WebSocket server.
public function onMessage(ConnectionInterface $sender, $msg) { echo "received message '$msg' from {$sender->remoteAddress}\n"; $response = strrev($msg); $sender->send($response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function onMessageRecieved(WebSocketClient $sender, $message);", "public function handleSendEvent(object $message): void;", "function wsOnMessage($clientID, $message, $messageLength, $binary) {\n\tglobal $Server;\n\tglobal $userlist;\n\t$ip = long2ip( $Server->wsClients[$clientID][6] );\n\n\...
[ "0.73342466", "0.67716205", "0.65874314", "0.65827554", "0.65678304", "0.64386886", "0.6383517", "0.62717795", "0.6154262", "0.6121851", "0.60810363", "0.60745895", "0.606751", "0.6057296", "0.601663", "0.6014884", "0.59988445", "0.5993076", "0.5942476", "0.58811116", "0.5878...
0.0
-1
Event function that is called when an error occurs during handshake or an event.
public function onError(ConnectionInterface $conn, Exception $err) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function errorOccured();", "public function onForcedFaxNegotiationFailure( Streamwide_Engine_Events_Event $event )\n {\n return $this->dispatchErrorEvent( self::FAX_NOT_RECEIVED_ERR_CODE );\n }", "function error(){}", "public function onKernelException()\n {\n echo '<br> somethi...
[ "0.68167263", "0.62676585", "0.62595105", "0.62479335", "0.6154236", "0.61383426", "0.6010534", "0.58959365", "0.58959365", "0.5859031", "0.58250344", "0.58194315", "0.576358", "0.57508874", "0.5703376", "0.56794167", "0.56770444", "0.5670169", "0.5658375", "0.5640785", "0.56...
0.58420265
10
function to get category
public function get_category() { $data['get_category'] = $this->Category_model->get_category(); return $data['get_category']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCategory();", "public function getCategory();", "public function getCategory() {}", "public function category() {\n\t\treturn $this->get_category();\n\t}", "public function getCategory()\n {\n }", "public function getCategory()\n {\n\t\treturn self::$categories[ $this-...
[ "0.8412069", "0.8412069", "0.83770454", "0.8022635", "0.7941426", "0.7889097", "0.7808731", "0.77566826", "0.77459335", "0.77339804", "0.7683892", "0.76803803", "0.76803803", "0.76803803", "0.7636858", "0.7635879", "0.7618767", "0.7604141", "0.7569231", "0.75404495", "0.75404...
0.75747603
18
function to update category
public function update_category() { $category_id = $_GET['category_id']; $data['category_branch_location'] = $this->get_branch_location(); $data['update_category'] = $this->Category_crud->get_category_by_id($category_id); $this->load->view('restaurant/category/update_category', $data); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateCategory()\n {\n Category::findOrFail($this->category_id)->update([\n 'category_name' => $this->categoryName,\n 'slug' => Str::slug($this->categoryName),\n 'class' => $this->class,\n\n ]);\n }", "function wp_update_category($catarr)\n...
[ "0.81891274", "0.77369666", "0.7539791", "0.7485624", "0.7469842", "0.72384894", "0.71285075", "0.7119705", "0.70992917", "0.7095617", "0.70151657", "0.6978497", "0.69397867", "0.6915729", "0.68732697", "0.68602175", "0.68553513", "0.6852658", "0.6852301", "0.6837294", "0.682...
0.6461277
50
function to get branch and location
public function get_branch_location() { $data['category_branch_location'] = $this->Category_model->get_branch_location(); return $data['category_branch_location']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBranch()\n {\n return $this->branch;\n }", "public function getBranch()\n {\n return $this->branch;\n }", "public function getBranch()\n {\n return $this->_options['branch'];\n }", "public function getBranchOf()\n {\n return $this->branchOf;...
[ "0.6536095", "0.6536095", "0.64267313", "0.64188987", "0.6408203", "0.6360562", "0.62474173", "0.6195869", "0.6134331", "0.61105436", "0.60455585", "0.60140353", "0.59977937", "0.5967617", "0.5910091", "0.58967876", "0.5886438", "0.5876694", "0.5876694", "0.5855066", "0.58533...
0.7846424
0
function to delete category
public function delete_category() { $category_id = $_GET['category_id']; $data['delete_category'] = $this->Category_crud->get_category_by_id($category_id); $this->load->view('restaurant/category/delete_category_model', $data); if (isset($_POST['delete_category_yes'])) { $th...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function product_category_delete(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u;\n\t\t\n\t\tmysql_q(\"DELETE FROM product_category WHERE id='\".add_slash($_r['id']).\"'\");\n\n\t\tredirect(\"product_category.htm\", \"\");\n\t}", "public function delete(){\n\n\t\t$sql = new Sql();\n\n\t\t$sql->query(\"DELETE ...
[ "0.806734", "0.7868333", "0.78312993", "0.78284895", "0.77868664", "0.77768135", "0.76278305", "0.76135665", "0.7610701", "0.75457287", "0.74990773", "0.7480619", "0.7477582", "0.74124753", "0.7352465", "0.7316523", "0.73014915", "0.7295821", "0.7279788", "0.7262396", "0.7240...
0.7691669
6
function to get printer that would to print this category on it
public function get_printer() { $data['get_printer'] = $this->Category_crud->get_printer(); return $data['get_printer']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPrinter();", "public function getPrinter()\n {\n return $this -> printer;\n }", "public function getPrinter()\n {\n return $this->printer;\n }", "function GetPrinterName() { return 'natbib'; }", "function printer_create_dc($printer_handle)\n{\n}", "public func...
[ "0.7400668", "0.6859968", "0.6748694", "0.63765824", "0.6251554", "0.6093854", "0.59891593", "0.578682", "0.56962395", "0.5675855", "0.5536019", "0.54635394", "0.5420744", "0.5416333", "0.54016167", "0.5398349", "0.53568083", "0.53254265", "0.53174317", "0.53154683", "0.53127...
0.75373244
0
function to insert category information
public function get_category_form_by_ajax() { $category_count = $_POST['id']; $data['category_id'] = $category_count; $data['category_branch_location'] = $this->get_branch_location(); $data['get_printer'] = $this->get_printer(); $this->load->view('restaurant/category/insert_categ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insertCategory($data){\n\treturn dbInsert('categories', $data);\n}", "public function insert() {\n\t\t\t$conn = parent::connect();\n\t\t\t$sql = \"INSERT INTO \" . TBL_CATEGORY . \" ( \n\t\t\t\t\t\t\t\ttitle,\n\t\t\t\t\t\t\t\talias,\n\t\t\t\t\t\t\t\tdescription\n\t\t\t\t\t\t\t) VALUES (\n\t\t\t\t\t\t\t\...
[ "0.7077886", "0.706604", "0.70463437", "0.7024284", "0.6999519", "0.6958674", "0.69291216", "0.69209373", "0.69158804", "0.6871572", "0.6814281", "0.67500216", "0.6736799", "0.66526103", "0.6647954", "0.66455215", "0.6643374", "0.66071266", "0.66028905", "0.65850914", "0.6571...
0.0
-1
function to insert category
public function insert_category() { $counter = $_POST['category_form_number']; $data = array(); for ($i = 1; $i <= $counter; $i++) { $config['upload_path'] = "assets/lib/images/category/"; $config['allowed_types'] = 'jpg|png|jpeg'; $this->load->library('uplo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createCategory();", "function insertCategory($data){\n\treturn dbInsert('categories', $data);\n}", "function InsertCategory_board()\n {\n $this->model->InsertCategory();\n }", "function target_add_cat($cat)\n{\n\tif ($GLOBALS['VERBOSE']) pf('...'. $cat['name']);\n\n\tq('INSERT IN...
[ "0.75985473", "0.75416887", "0.74991786", "0.73013544", "0.7283045", "0.7258791", "0.7223839", "0.7135809", "0.7133006", "0.7132927", "0.709556", "0.7062583", "0.702961", "0.70258474", "0.7023463", "0.70222706", "0.70134056", "0.6987936", "0.6984606", "0.6984254", "0.696624",...
0.0
-1
function to download excel template
public function download_category_excel_sheet() { $spreadsheet = new Spreadsheet(); $sheet = $spreadsheet->getActiveSheet(); $sheet->setCellValue('A1', 'ar_name'); $sheet->setCellValue('B1', 'en_name'); $sheet->setCellValue('C1', 'discount'); $writer = new Xlsx($spreadsh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function downloadEmolumentTemplate(){\n\n $financialYear = FinancialYear::where('status', '=', true)->first();\n $items = RefEmolument::all();\n $headers = array(\n \"Content-type\"=>\"application/ms-excel\",\n \"Content-Disposition\"=>\"attachment;Filename= Person...
[ "0.79654384", "0.75250506", "0.7398328", "0.72662187", "0.7198402", "0.7180465", "0.7151814", "0.71487117", "0.7097534", "0.70667934", "0.70434767", "0.7039052", "0.6986554", "0.69827384", "0.69646686", "0.6949154", "0.6843675", "0.6822336", "0.68050545", "0.6789642", "0.6768...
0.7245861
4
function to show excel data in to table
public function upload_category_excel() { $data = array(); $this->form_validation->set_rules('fileURL', 'Upload File', 'callback_checkFileValidation'); if ($this->form_validation->run() == false) { } else { if (!empty($_FILES['fileURL']['name'])) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tuExcel(){\n $fields= $this->db->field_data('hotel');\n $query= $this->db->get('hotel');\n return array (\"fields\" => $fields, \"query\" => $query);\n }", "abstract protected function excel ();", "public function excel()\n {\n Excel::create('...
[ "0.67646", "0.67189884", "0.66751486", "0.66610664", "0.65876794", "0.6479519", "0.6458022", "0.63660556", "0.63100106", "0.6304067", "0.6279873", "0.62617314", "0.6256604", "0.6253376", "0.62355787", "0.62345177", "0.62109685", "0.620764", "0.62004745", "0.61948925", "0.6190...
0.0
-1
function to check validation of excel extension
public function checkFileValidation($string) { $file_mimes = array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function extensionValid() \n\t{\n\t\tif (!in_array($this->extension_of_file, $this->file_types)) //{\n\t\t\tthrow new Exception(\"Invalid file Extension\",5);\n\t\t//}\n\t}", "function tableValidator( &$errors, &$warnings, &$excel, &$lang ){\n $valid = 0;\n for( $col = 1; $col <= $excel->numCols(); ...
[ "0.7111907", "0.6916137", "0.69068867", "0.6834214", "0.6832493", "0.6718815", "0.6714836", "0.6647879", "0.64669764", "0.646332", "0.6404592", "0.6402823", "0.6359192", "0.6353798", "0.6353798", "0.63263005", "0.6249764", "0.62161684", "0.61907876", "0.6153609", "0.61182797"...
0.6274524
16
function to insert the data in excel into database
public function insert_category_excel() { $counter = $_POST['category_excel_form_number']; $data = array(); for ($i = 0; $i < $counter; $i++) { $config['upload_path'] = "assets/lib/images/category/"; $config['allowed_types'] = 'gif|jpg|png|jpeg'; $this->load-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function import_xls($filename = ''){\n\t\trequire_once('includes/xls_report/PHPExcel.php');\n\t\t$xls_file = 'uploads/DataBkd/DocUpload/'.$filename;\n\n\t\t$objReader = new PHPExcel_Reader_Excel5();\n\t\t$objReader->setReadDataOnly(true);\n\t\t$objPHPExcel = $objReader->load($xls_file); #return $filename;\n\t\t$sh...
[ "0.6961934", "0.6711542", "0.6689713", "0.6650267", "0.65594286", "0.65391743", "0.6417791", "0.6365089", "0.63600427", "0.6295671", "0.6284269", "0.62297964", "0.6218513", "0.6185614", "0.6175645", "0.6158023", "0.6072238", "0.6066109", "0.6037373", "0.60279614", "0.60137767...
0.0
-1
sends a response to the user
function sendResponse($status, $text = '') { $response = array(); $response['status'] = $status; $response['text'] = $text; echo json_encode($response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendResponse();", "protected function sendResponse() {}", "function send($response)\n {\n }", "public function reply()\n\t{\n\t\tif($this->return){\n\t\t\t$this->_reply(200, 'Ok', $this->return);\n\t\t}else{\n\t\t\t$this->_reply(200, 'Ok', $this->return);\n\t\t}\n\t\texit();\n\t}", "p...
[ "0.801928", "0.7762375", "0.72961384", "0.7098009", "0.70235366", "0.6925314", "0.6902655", "0.6898702", "0.68928015", "0.6865996", "0.6865395", "0.6864558", "0.6844764", "0.6834358", "0.6816901", "0.6774408", "0.67732453", "0.6766407", "0.6739111", "0.67247", "0.67247", "0...
0.0
-1
Determine whether the user can view any coupons.
public function viewAny(User $user) { return $user->isAdmin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n $user = $this->user();\n if(!$user){\n return false;\n }\n\n return $user->can('create',Coupon::class);\n }", "public function authorize()\n\t{\n\t\treturn current_user()->hasValidCoffeeShop();\n\t}", "public function authorize()\n ...
[ "0.68489844", "0.6821446", "0.67878485", "0.6746491", "0.6685917", "0.6678283", "0.64696884", "0.646824", "0.6439463", "0.6407111", "0.6374908", "0.6371119", "0.63552856", "0.63419026", "0.63299155", "0.63220394", "0.6317187", "0.6310459", "0.6268794", "0.62676364", "0.626666...
0.0
-1
Determine whether the user can view the coupon.
public function view(User $user, Coupon $coupon) { return $user->isAdmin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n $user = $this->user();\n if(!$user){\n return false;\n }\n\n return $user->can('create',Coupon::class);\n }", "public function view(User $user, Coupon $coupon)\n {\n return $coupon->user_id == NULL || $coupon->user_id = auth...
[ "0.7811253", "0.72118443", "0.71347106", "0.7120189", "0.6866632", "0.67625254", "0.67199266", "0.6715765", "0.6715103", "0.67113316", "0.67043763", "0.662617", "0.66183776", "0.66159093", "0.6594832", "0.6583766", "0.6575066", "0.6573211", "0.6538997", "0.6526429", "0.652397...
0.75364816
1
Determine whether the user can create coupons.
public function create(User $user) { return $user->isAdmin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n $user = $this->user();\n if(!$user){\n return false;\n }\n\n return $user->can('create',Coupon::class);\n }", "protected function canApplyCoupon()\n {\n if (!$this->coupon->exists) {\n return false;\n }\n\n...
[ "0.7549897", "0.6995758", "0.678811", "0.678811", "0.6764038", "0.6690486", "0.66859156", "0.6639538", "0.663423", "0.65637326", "0.65484416", "0.6534439", "0.65169156", "0.651376", "0.6509675", "0.6507278", "0.64910984", "0.6485681", "0.64788455", "0.6451078", "0.64419365", ...
0.0
-1
Determine whether the user can update the coupon.
public function update(User $user, Coupon $coupon) { return $user->isAdmin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _isAllowed()\r\n {\r\n return $this->_authorization->isAllowed('AAllen_PriceUpdate::update');\r\n }", "public function update(): bool\n {\n return $this->isAllowed(self::UPDATE);\n }", "public function authorize()\n {\n if (auth()->user()->can('update')) {...
[ "0.73519367", "0.7034736", "0.70057094", "0.69838256", "0.69304764", "0.6897762", "0.68903756", "0.6821744", "0.6800291", "0.6798615", "0.67777663", "0.6767162", "0.6725232", "0.6714436", "0.6696566", "0.6641731", "0.6591711", "0.65914595", "0.65504783", "0.6503364", "0.64990...
0.75852114
0
Determine whether the user can delete the coupon.
public function delete(User $user, Coupon $coupon) { return $user->isAdmin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canDelete()\n {\n $user = $this->getUser();\n\n if ($user->getData('role') == 'Admin' && $this->getData('status') != Service\\BalanceWithdrawals::STATUS_PENDING) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n ...
[ "0.739681", "0.70783633", "0.70067054", "0.6989163", "0.6944121", "0.692288", "0.6892897", "0.6835907", "0.6821034", "0.67946357", "0.6789956", "0.6734321", "0.6701368", "0.6701184", "0.6678834", "0.666716", "0.6650466", "0.66484255", "0.65794325", "0.65410525", "0.65371186",...
0.7517314
0
more quote request by client
public function moreQuoteClient(){ $this->addElement('text', 'more_quote_client_request', array ( "required" => TRUE, 'class' => 'form-control required', "label" => "How many more quote do you want?" , "maxlength"=>"2", "filters" => array("StringTrim","StripTags"), "validators" => array( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function quote()\n {\n $jiekou = Jiekou::where(['id'=>2])->first();\n while (1){\n $response = Curl::to($jiekou->url)\n ->get();\n $obj_xml = simplexml_load_string($response);\n $items = $obj_xml->Body->Deliver;\n if (!$obj_x...
[ "0.62255466", "0.615382", "0.6087315", "0.60296965", "0.59515095", "0.59364206", "0.5917992", "0.5917291", "0.5839777", "0.58035094", "0.5787025", "0.5772414", "0.571023", "0.5674282", "0.5634628", "0.5588553", "0.5572788", "0.5562482", "0.5532545", "0.5514442", "0.5513982", ...
0.5991907
4
more quote request by Admin
public function moreQuoteAdmin(){ $this->addElement('text', 'more_quote_admin_allowed', array ( "required" => TRUE, 'class' => 'form-control required', "label" => "How many more quote do you allow?" , "maxlength"=>"2", "filters" => array("StringTrim","StripTags"), "validators" => array( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function returnQuoteAction()\n {\n $this->_returnQuote();\n $this->getResponse()->setBody(Mage::helper('core')->jsonEncode(array('success' => 1)));\n }", "public function quote($status = null, $id = null) {\n if($status == 'create') {\n $ongoing = $this->CrmQuotation->fin...
[ "0.663314", "0.6624041", "0.6571595", "0.65572137", "0.65311736", "0.64576644", "0.6404816", "0.6375539", "0.6355895", "0.6277825", "0.6239178", "0.6185064", "0.6140349", "0.61013275", "0.60703766", "0.60651785", "0.6051109", "0.60501903", "0.60097164", "0.598306", "0.5970907...
0.60962725
14
/$modelproject = new Application_Model_Project(); $zipcodelist = $modelproject>zipcodelist();
public function postnewjob(){ global $job_deadline; $this->addElement('select', 'job_deadline', array ( 'class' => 'form-control required' , "required"=>true, 'id' => 'job_deadline', "multioptions"=>$job_deadline, // 'onchange' => 'Checkoption(this)', "label" => "When do you need the work to...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function list_coo_approval1($emp_code)\n{\n\t\n\t$this->load->database(); \n $this->load->model('purchase/qcs_model'); \t\n\t$data['approval1_list']=$this->qcs_model->list_coo_approval1($emp_code); \t\t \t\t\n\treturn $data['approval1_list'];\n\t\t \n}", "function list_cfo_approval1($emp_code)\n{\n\t\n\...
[ "0.60770637", "0.60148877", "0.5972543", "0.59200054", "0.58738333", "0.5860076", "0.5809836", "0.5748475", "0.571598", "0.56751126", "0.55535996", "0.54852986", "0.54803294", "0.54545736", "0.5418441", "0.5405388", "0.53860366", "0.53449565", "0.5342703", "0.531764", "0.5280...
0.0
-1
end add project form......................... comment form
public function communication() { $this->addElement('textarea','c_massage',array( 'class' => 'form-control required user_text userChatMsgInput' , "required"=>true, "rows"=>3, "label"=>"Write Message...", "placeholder"=>"Enter your Message.....", "filter"=> array(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit()\n\t{\n\t//mnot finished\n\t\techo '<div id=\"content\">';\n\t\t$this->par->load(\"form2\",\"fb\");\n\t\t$fb = $this->par->fb;\n\t\t$fb->_init(false,\" id=\\\"forms\\\"\",false,true);//autofill=false, validate = true\n\t\t\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'label' => 'Project Name:...
[ "0.66776633", "0.6323203", "0.62600523", "0.6258903", "0.6221154", "0.6193342", "0.61694235", "0.61351943", "0.61221814", "0.6086759", "0.6057474", "0.59937197", "0.5971443", "0.5970257", "0.59684414", "0.59636116", "0.59557414", "0.59487176", "0.5944934", "0.593456", "0.5912...
0.0
-1
add service category form
public function servicecat(){ $modelservices = new Application_Model_Services(); $servicelist = $modelservices->servicesdata(); //prd($servicelist); $this->addElement('text', 'service_name', array ( "required" => TRUE, 'class' => 'form-control required', "label" => "Service Category Title " ,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getVictoire_Form_Blog_CategoryService()\n {\n return $this->services['victoire.form.blog.category'] = new \\Victoire\\Bundle\\BlogBundle\\Form\\CategoryType();\n }", "public function subcategory(){\n\t\t$modelservices = new Application_Model_Services();\n\t\t$servicelist = $models...
[ "0.7063193", "0.6993759", "0.6818711", "0.67902887", "0.6784535", "0.66870534", "0.6632568", "0.66116166", "0.65957975", "0.65793395", "0.6505954", "0.6483027", "0.64724094", "0.6423389", "0.6397256", "0.637253", "0.6366223", "0.6361002", "0.6349619", "0.6348972", "0.63203317...
0.8375481
0
end add service category form................................................................. add sub category form
public function subcategory(){ $modelservices = new Application_Model_Services(); $servicelist = $modelservices->servicesdata(); $caterories = $modelservices->categorydata(); //prd($caterories); $this->addElement('text', 'service_name', array ( "required" => TRUE, 'class' => 'form-control required', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function servicecat(){\n\t\t$modelservices = new Application_Model_Services();\n\t\t\n\t\t$servicelist = $modelservices->servicesdata();\n\t\t//prd($servicelist);\n\t\t\t\t\t\n \t\t$this->addElement('text', 'service_name', array (\n\t\t\t\"required\" => TRUE,\n\t\t\t'class' => 'form-control required',\n\t\t...
[ "0.82134324", "0.699833", "0.6962463", "0.67629516", "0.6686701", "0.6632237", "0.659526", "0.6575569", "0.65673053", "0.6563907", "0.65521944", "0.65497583", "0.6528963", "0.65132064", "0.6493462", "0.6481833", "0.6466463", "0.64642113", "0.6421452", "0.6395452", "0.6393261"...
0.8335337
0
end add sub category form.............................................................................
public function submitButton(){ $this->addElement('button', 'bttnsubmit', array ( 'class' => 'btn blue ', 'ignore'=>true, 'type'=>'submit', 'label'=>'<i class="fa fa-check"></i> Save', 'escape'=>false )); $this->bttnsubmit->setDecorators(array('ViewHelper',array(array('controls' => 'HtmlTa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function subcategory(){\n\t\t$modelservices = new Application_Model_Services();\n\t\t$servicelist = $modelservices->servicesdata();\n\t\t$caterories = $modelservices->categorydata();\n\t//prd($caterories);\n\n \t\t$this->addElement('text', 'service_name', array (\n\t\t\t\"required\" => TRUE,\n\t\t\t'class' ...
[ "0.7845029", "0.72772086", "0.7248909", "0.69779617", "0.6976178", "0.69613826", "0.69456404", "0.68882364", "0.6874051", "0.6847088", "0.6840655", "0.6832333", "0.6806601", "0.6803466", "0.67945325", "0.6784531", "0.6783481", "0.6778899", "0.67330074", "0.67083544", "0.67069...
0.0
-1
Need use as _prepareLayout but problem in declaring collection from another block (was problem with search result)
protected function _beforeToHtml() { $toolbar_top = $this->getToolbarBlock(); $toolbar_bottom = $this->getBottomToolbarBlock(); // called prepare sortable parameters $collection = $this->_getProductCollection(); // use sortable parameters if ($orders = $this->getAva...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _prepareCollection() {\n /**\n * \n * @var unknown\n */\n /**\n * Calling the parent Construct Method.\n * \n * Getting collection for bank details\n */\n $managebankdetailsCollection = Mage::getModel ( 'airhotels/managebankdetails' )->getCollection ();\n $this->setCollection ( $manageb...
[ "0.6813128", "0.67679286", "0.6746976", "0.66857326", "0.6673509", "0.6657748", "0.65986603", "0.65978336", "0.6545874", "0.64322394", "0.63644415", "0.6344732", "0.63308483", "0.62322503", "0.62122494", "0.6208193", "0.61997765", "0.61782855", "0.6132371", "0.61199653", "0.6...
0.0
-1
Retrieve Toolbar bottom block
public function getBottomToolbarBlock() { $blockName = self::TOOLBAR_BOTTOM; if ($block = $this->getLayout()->getBlock($blockName)) { return $block; } $block = $this->getLayout()->createBlock($this->_defaultToolbarBlock, microtime()); return $block; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getToolbarPosition()\n {\n return $this->toolbar['position'];\n }", "public function &getToolbar()\n {\n return $this->toolbar;\n }", "public function getBottomUserSpace() {}", "public function getToolbarHtml()\n {\n return $this->getChildHtml('toolbar');\n...
[ "0.6349703", "0.63266915", "0.6302731", "0.62384135", "0.62384135", "0.6163485", "0.61381024", "0.60160625", "0.5860434", "0.5837628", "0.5821601", "0.58033854", "0.5797263", "0.5790943", "0.5782591", "0.57331", "0.5717258", "0.5717249", "0.57160044", "0.5709937", "0.56944376...
0.83441037
0
ROW COUNT IN DATABASE FUNCTION
function row_count($result) { // global $dataBaseConnection; $result = mysqli_num_rows($result); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RowCount() {}", "public abstract function row_count();", "function NumRows() {}", "public abstract function GetNumRows();", "public function getNumRows();", "public function numOfRows();", "abstract public function getNumRows();", "abstract public function getNumRows();", "function countRo...
[ "0.8663105", "0.8617373", "0.7865475", "0.7833955", "0.78130853", "0.7794051", "0.7769415", "0.7769415", "0.7761482", "0.7734351", "0.76162624", "0.7595625", "0.75299233", "0.7499053", "0.748042", "0.7463518", "0.7449461", "0.7417514", "0.741434", "0.7360191", "0.7354018", ...
0.752113
13
End the row count function QUERY DATABASE FUNCTIONS
function execute($sql) { global $dataBaseConnection; $result = mysqli_query($dataBaseConnection, $sql); // confirm($result); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RowCount() {}", "public abstract function row_count();", "function dbCount(){\r\n global $db_query;//voor alle code leesbaar\r\n return $db_query->rowCount();\r\n}", "function sql_num_rows($res)\n {\n // DELETE, INSERT, UPDATE\n // do not use : SELECT\n return $res->row...
[ "0.72405297", "0.7127944", "0.6912113", "0.67332596", "0.6698957", "0.66785896", "0.6650137", "0.663012", "0.66016847", "0.6556856", "0.65533215", "0.65307295", "0.65167546", "0.65083784", "0.6485952", "0.64708376", "0.64708376", "0.6470763", "0.64186996", "0.64174736", "0.64...
0.0
-1
End of query functions TO CHECK IF ERROR EXISTS IN DATADASE
function confirm($result) { global $dataBaseConnection; if (!$result) { die("QUERY FAILED" . mysqli_error($dataBaseConnection)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasError();", "public function hasError();", "public function hasError();", "public function hasError();", "public function hasErrors();", "protected function setErrorsExist() {}", "public function has_errors()\n {\n }", "function checkForDbError($preparedStatement) {\n\...
[ "0.6711534", "0.6711534", "0.6711534", "0.6711534", "0.65140015", "0.6475202", "0.63773173", "0.6324962", "0.6247114", "0.6247114", "0.6241179", "0.6192756", "0.61566883", "0.6140063", "0.6122054", "0.61059695", "0.6083479", "0.60806483", "0.6065012", "0.6065012", "0.60569996...
0.0
-1
End of function confirm error functions CLEANING DATA BEDFORE SUBMISSION
function escape($result) { global $dataBaseConnection; return mysqli_real_escape_string($dataBaseConnection, $result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cleanRepair() {}", "function resetErrorData()\n {\n $this->errorData = array();\n }", "public function resetErrors() {}", "public function actionCleanData()\n\t{\n\t\tif($this->confirm(\"Are you sure to clean all data?\")) {\n\t\t\tYii::$app->db->createCommand()->truncateTable('alert')->...
[ "0.64905727", "0.6341653", "0.62112945", "0.6160311", "0.6119992", "0.61033845", "0.59971434", "0.5974191", "0.59396076", "0.5916758", "0.5916291", "0.59144783", "0.59091777", "0.5870594", "0.58279616", "0.58246976", "0.58234394", "0.5810625", "0.5806649", "0.580371", "0.5803...
0.0
-1
End of escape function FETCHIN ALL DATA FROM DATABASE
function fetch_array($result) { // global $dataBaseConnection; return mysqli_fetch_array($result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function doFetchAll();", "public function readAll(){\n //select all data\n $query = \"SELECT\n id, num_compte, cle_rib, num_agence, duree_epargne, frais, solde, created\n FROM\n \" . $this->table_name . \"\n ORDE...
[ "0.6351734", "0.63074005", "0.6261003", "0.6143521", "0.6071509", "0.6050722", "0.6040521", "0.6031049", "0.60295874", "0.59894305", "0.5987172", "0.5983864", "0.5980551", "0.59635013", "0.5931771", "0.5920145", "0.59064066", "0.5872663", "0.587057", "0.58692604", "0.5865195"...
0.0
-1
end of fetch array
function fetch_all_assoc($result) { return mysqli_fetch_assoc($result); # AUTHENTICATIONS }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function fetchMore(): void\n {\n $url = $this->client->urlTo($this->cql, $this->position, $this->count, $this->extraParams);\n $body = $this->client->request('GET', $url);\n $this->lastResponse = new SearchRetrieveResponse($body);\n $this->data = $this->lastResponse->records;...
[ "0.66349405", "0.6604337", "0.6604337", "0.65527856", "0.63944006", "0.62724227", "0.62491304", "0.6205921", "0.6205921", "0.6180916", "0.6096032", "0.5998667", "0.5998667", "0.58930093", "0.5884614", "0.58811307", "0.58796895", "0.58719176", "0.5863313", "0.5844266", "0.5838...
0.0
-1
For internal only. DO NOT USE IT.
public function deserialize($param) { if ($param === null) { return; } if (array_key_exists("Name",$param) and $param["Name"] !== null) { $this->Name = $param["Name"]; } if (array_key_exists("Type",$param) and $param["Type"] !== null) { $t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init__() { }", "private function __() {\n }", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}", "protected function init() {}...
[ "0.6265887", "0.6151413", "0.5989358", "0.5989358", "0.5989358", "0.5989358", "0.598889", "0.598889", "0.598889", "0.598889", "0.598889", "0.598889", "0.59878796", "0.59878796", "0.59487283", "0.593907", "0.5916422", "0.5916422", "0.5870066", "0.586617", "0.5855197", "0.585...
0.0
-1
Run the database seeds.
public function run() { /** 2018 Curriculum **/ $course = new Course; $course->course_code = 'IntroComp'; $course->description = 'Introduction to Computing'; $course->units = 3; $course->lab_units = 1; $course->save(); $course = new Course; $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
Get the building associated with the appliance.
public function building() { return $this->belongsTo('App\Building', 'building_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBuilding()\n {\n return $this->building;\n }", "public function getBuilding()\n {\n return $this->building;\n }", "public function currentBuilding()\n {\n if (! $this->building_id) {\n return null;\n }\n\n return $this->building->a...
[ "0.76651776", "0.76651776", "0.6559151", "0.64373726", "0.638137", "0.63334006", "0.62703216", "0.6190588", "0.6187779", "0.610897", "0.604471", "0.600601", "0.5941149", "0.58589023", "0.5599215", "0.5525471", "0.55125815", "0.5492519", "0.5456593", "0.54529834", "0.5450822",...
0.58778507
13
$this>printLine("Welcome to MATA installation.");
public function actionInstall() { // $response = $this->prompt("Would you like to install MATA? (yes|no)"); // if ($response != "yes") // $this->emptyLine()->printLine("Terminating. Have a nice day!")->emptyLine(); $dbName = "yii-app-mata-template"; $host = "83.170.88.249"; $username = "yiimataapptempl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function welcome()\n{\n outputString(PHP_EOL.'To set up your Craft install, from your project directory, run:', Console::FG_YELLOW);\n $script = './craft setup';\n outputString(PHP_EOL.' '.$script, Console::FG_GREEN);\n outputString(PHP_EOL.'Then to set up custom settings, run:', Console::FG_YELLOW)...
[ "0.6972512", "0.66647094", "0.66541374", "0.66417074", "0.6560426", "0.6516581", "0.63987267", "0.6190629", "0.60115033", "0.60105515", "0.59814024", "0.5959263", "0.594059", "0.5917932", "0.5871861", "0.58581394", "0.58345354", "0.5808453", "0.57882655", "0.5787112", "0.5758...
0.6244555
7
handle the action, use the domain services to finish the domain logic
public function handle(array $request = []);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function executeAction() {}", "protected function executeAction() {}", "protected function executeAction() {}", "protected function executeAction() {}", "protected function executeAction() {\n \n }", "protected function executeAction() {\r\n\t\t$this->objectAction->validateAction();\r...
[ "0.66092134", "0.6608155", "0.6608155", "0.6608155", "0.6433227", "0.63906085", "0.6298351", "0.62680006", "0.6239573", "0.61962837", "0.6091866", "0.6055963", "0.6042222", "0.60367215", "0.59545416", "0.5949172", "0.5947133", "0.5929056", "0.5909625", "0.59001786", "0.588659...
0.0
-1
Create a new issue
public function createIssue( $data ) { $this->issue->create([ 'name' => $data['name'], 'slug' => $data['slug'], 'description' => $data['description'], 'product_id' => $data['productId'], 'issue_stage_id' => 1, 'issue_status' => 0 ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create($project, CreateIssueRequest $request)\n {\n $issue = new Issue();\n $issue->hidden \t = $request->has('hidden');\n $issue->author_id = Auth::user()->id;\n $issue->project_id = $project->id;\n $issue->summary = $request->summary;\n $issu...
[ "0.7497412", "0.71835065", "0.6654536", "0.65584433", "0.65296596", "0.64862573", "0.6470389", "0.6430089", "0.63946193", "0.6385254", "0.6377761", "0.6332548", "0.6204228", "0.61395395", "0.61062", "0.6059672", "0.6041962", "0.59955794", "0.59887075", "0.5939525", "0.5891853...
0.7469697
1
Get a specific issue by it's id
public function getIssueById( $id ) { return $this->issue->with('stage')->find($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find($id)\n {\n return Issue::find($id);\n }", "function getNewsletterIssue($id){\n\t$issue = \"\";\n\t$issue = data_newsletterIssue($id);\n\treturn $issue;\n}", "public function get()\n {\n return $this->apiSearch($this->endpoint, ['class' => 'Managed\\Issue', 'parameter...
[ "0.8071597", "0.7012111", "0.68616325", "0.6636876", "0.6509536", "0.63574904", "0.6351253", "0.63005114", "0.62704486", "0.6223833", "0.6204687", "0.6177307", "0.61651725", "0.61630154", "0.6119312", "0.6079296", "0.6062684", "0.6031616", "0.6028899", "0.6028899", "0.6028899...
0.7509371
1
Create issue from external sources
public function createIssueFromExternal( $data ) { // TODO: Implement createIssueFromExternal() method. }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create($project, CreateIssueRequest $request)\n {\n $issue = new Issue();\n $issue->hidden \t = $request->has('hidden');\n $issue->author_id = Auth::user()->id;\n $issue->project_id = $project->id;\n $issue->summary = $request->summary;\n $issu...
[ "0.5615984", "0.54565364", "0.5437673", "0.5394115", "0.5293787", "0.5279442", "0.52691895", "0.52210164", "0.50953907", "0.50837404", "0.5074793", "0.5028427", "0.5028029", "0.5004874", "0.5001713", "0.4951741", "0.49508682", "0.4947335", "0.49119937", "0.4858314", "0.484888...
0.64900386
0
Get all issue stages
public function getIssueStages() { $stages = $this->issueStage->orderBy('order')->get()->toArray(); $stages[ (count($stages) - 1) ]['is_last'] = true; return $stages; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function Rechercher_Stages(){\n\t\t \t//connexion à la base de données\n\t\t \t$oMysqliLib = new MySqliLib();\n\t\t \t//requête de recherche du Document\n\t\t \t$sRequete = \"SELECT * FROM stages\";\t\t \t\t\n\t\t \t\n\t\t \t//exécuter la requête\n\t\t \t$oResult = $oMysqliLib->executer($sRequete); \...
[ "0.6339274", "0.61207366", "0.58776796", "0.57820356", "0.5769516", "0.57614636", "0.5680162", "0.5615745", "0.56102407", "0.560511", "0.5597102", "0.55728483", "0.5371005", "0.53661054", "0.5362586", "0.5362586", "0.53622985", "0.5346003", "0.53405684", "0.53378177", "0.5298...
0.7984028
0
There is a timing issue so we need to wait a second
public function openAddPanel() { sleep(1); // TODO: Add ID to "Add" button $this->_webui->clickButton('.btn.btn-primary.btn-xs.pull-right.mb20'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __sleep() {}", "private function __sleep() {}", "private function __sleep() {}", "private function __sleep() {}", "function __sleep(){\n\n\t\t}", "private function updateOperation() {\n sleep(1);\n }", "function __sleep()\n {\n }", "public function iWait() {\n slee...
[ "0.6828402", "0.6828402", "0.6828402", "0.6828402", "0.6713573", "0.6631917", "0.6318536", "0.6237579", "0.62023747", "0.61900574", "0.61701643", "0.6169618", "0.6169618", "0.6169618", "0.6168827", "0.6168827", "0.6168827", "0.6168827", "0.6168827", "0.6168827", "0.6168827", ...
0.0
-1
TODO: Use Save button's ID
public function clickSaveButton() { $this->_webui->clickButton('.btn.btn-xs.btn-info.pull-right.mr20.btn-save'); sleep(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function clickSaveButton()\n {\n $this->browser->webui()->clickButton(\n WebDriverBy::cssSelector('.btn.btn-xs.btn-info.pull-right.mr20')\n );\n\n // TODO: Add Try/Catch\n // TODO: Validate Data (via API)\n\n print(\"ACTION : Clicked SAVE Button\".PHP_EOL);\n }...
[ "0.720786", "0.69002706", "0.68441993", "0.6817233", "0.6794484", "0.6762061", "0.6723477", "0.6566381", "0.6566381", "0.64511377", "0.64470845", "0.64462084", "0.64462084", "0.6382585", "0.63739383", "0.63544965", "0.631375", "0.63132477", "0.63132477", "0.63124084", "0.6312...
0.7074003
1
TODO: Add ID to "Done" button
public function clickDoneButton() { $this->_webui->clickButton(".btn.btn-default.btn-xs.pull-right.btn-dismiss"); sleep(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function markAsDoneAction() {\n\t\t$todo = new todo;\n\t\t$todo = $todo->Get($this->get['id']);\n\t\t$todo->done = 1;\n\t\t$todo->Save();\n\n\t\treturn $this->indexAction();\n\t}", "function clickDoneButton()\n {\n $this->browser->webui()->clickButton(\n WebDriverBy::cssSelector(\".bt...
[ "0.720554", "0.6969985", "0.65293556", "0.65184945", "0.6437788", "0.62210166", "0.6139907", "0.60160226", "0.58567065", "0.58041406", "0.56461644", "0.5645433", "0.5610623", "0.5568733", "0.55642205", "0.55567676", "0.55518323", "0.5546954", "0.55460995", "0.5526766", "0.552...
0.6894103
2
This method will get the route url get('route.name > /foo/bar') Route::get('route.name.here') output: /foo/bar
public static function get($route) { $path = preg_replace('/\:(.*)/', '', self::$routes[$route]['url']); $args = func_get_args(); if (count($args) > 1): unset($args[0]); foreach ($args as $arg): $path .= $arg . "/"; endforeach; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRoute();", "function get()\n {\n $route = substr($_SERVER['REQUEST_URI'], 1);\n // $route = explode('?', $slug)[0];\n $route = rtrim($route, \"/\");\n $matches = explode('/', $route);\n\n\n $route = $this->bind($matches);\n\n if ($route) {\n ...
[ "0.70652175", "0.6989795", "0.67014694", "0.66860193", "0.6658499", "0.66563827", "0.66522086", "0.6586165", "0.6572178", "0.6560844", "0.6516989", "0.6498719", "0.64962393", "0.6460232", "0.6445047", "0.63655293", "0.6346924", "0.6297418", "0.6283409", "0.628159", "0.6221552...
0.60363084
39
Redirect to a specific route if it is valid or uses the given string as route.
public static function redirect($route) { return header("location: {$route}"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setRedirectRoute($route, array $parameters = array(), $code = Codes::HTTP_FOUND);", "protected function redirect(array $route) {\n\t\tif (!isset($route['controller']) && !isset($route['action'])) throw new URIException(\"The given route isn't in valid format\"); \n\t\t$route += ['controller'=>'', 'actio...
[ "0.61906576", "0.61858714", "0.60204786", "0.5860737", "0.585465", "0.5781032", "0.5761831", "0.57286525", "0.5673606", "0.5541214", "0.55350393", "0.5512371", "0.55004376", "0.5492179", "0.5479961", "0.5475638", "0.547173", "0.5465714", "0.54386806", "0.5405145", "0.5396484"...
0.52133805
34
Refresh after the number of seconds of wait to a route given as second parameter
public static function refresh($seconds, $route) { return header("refresh:{$seconds}; url='{$route}'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function app_auto_refresh(int $delay)\n{\n header('Refresh: ' . $delay . '; ' . $_SERVER['REQUEST_URI']);\n}", "public function getRouteRefresh() {\n\t\treturn \"/refresh_\";\n\t}", "private function reload() {\r\n\r\n \t\t$timestamp = (int) (microtime(true) * 1000);\r\n\r\n \t\t// if the value is empty\r\n ...
[ "0.65511787", "0.60685563", "0.5654879", "0.563779", "0.5598207", "0.5540994", "0.55125666", "0.54841274", "0.546938", "0.5396969", "0.53563714", "0.5336272", "0.5303141", "0.52596986", "0.52052045", "0.51820076", "0.5181421", "0.5157877", "0.5157444", "0.5143645", "0.5123018...
0.67110145
0
Returns the references for the specified locale
public function getAll($locale) { $qb = $this->createQueryBuilder('r'); $qb->addSelect('t'); $qb->innerJoin('r.translations', 't'); $qb->andWhere('t.locale=:locale'); $qb->setParameter(':locale', $locale); return $qb->getQuery()->execute(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function localizedUris($locale)\n {\n return $this->repo()->getUris($locale);\n }", "abstract public function getTranslationIn(string $locale);", "abstract public function getTranslationIn(string $locale);", "abstract public function getTranslationIn(string $locale);", "public function ...
[ "0.63834786", "0.6006425", "0.6006425", "0.6006425", "0.59432894", "0.5880009", "0.5759425", "0.57545125", "0.5702035", "0.564575", "0.56391144", "0.55936146", "0.5502687", "0.5481837", "0.5475956", "0.546923", "0.5465394", "0.54647356", "0.5453201", "0.5443889", "0.54230607"...
0.50768286
50
/ 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
/ Default setup page
public function index() { $this->load->model('user_model'); if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } $this->load->view('layout/header'); $this->load->view('setup/index'); $this->load->view('layout/footer'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setup() {\n // show setup page\n }", "protected function setupPage() {}", "public function admin_setup()\n\t{\n\t\t\n\t}", "function gettingStarted()\n {\n $data['$option'] = \"doc/gettingstarted\";\n $this->loadContent('doc/home', $data);\n }", "function displayMaste...
[ "0.77339464", "0.73001194", "0.719739", "0.70814645", "0.70530313", "0.7044365", "0.7043841", "0.70348555", "0.6987461", "0.6977053", "0.69041973", "0.68844855", "0.68742687", "0.68688506", "0.68342024", "0.67652446", "0.6735043", "0.6726542", "0.6643878", "0.6641313", "0.662...
0.0
-1
Ensure that container constructor consumes all func arg rules and not only the first one
public function testConstructorLength() { $rule = new OrRule( new FalseRule(), new TrueRule() ); $this->assertTrue($rule->validate()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testConstructorContainer()\n {\n $rule = new AndRule(\n new TrueRule(),\n new OrRule(\n new FalseRule(),\n new TrueRule()\n ),\n new NotRule(\n new FalseRule()\n )\n );\n $thi...
[ "0.6271217", "0.5981488", "0.59591854", "0.5911709", "0.58464164", "0.58268595", "0.5799596", "0.5706361", "0.5669892", "0.566135", "0.566135", "0.566135", "0.566135", "0.566135", "0.56240714", "0.5479685", "0.54647183", "0.54619056", "0.54599017", "0.5445722", "0.5415207", ...
0.48620182
88
Test creating a rule tree via constructor injection
public function testConstructorContainer() { $rule = new AndRule( new TrueRule(), new OrRule( new FalseRule(), new TrueRule() ), new NotRule( new FalseRule() ) ); $this->assertTrue($ru...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function test__construct() {\n\n\t\t$objBuilder = new LeftRightTreeTraversal\\TreeBuilder();\n\n\t\t$this\n\t\t\t->object($objBuilder)\n\t\t\t->isNotNull($objBuilder)\n\t\t\t->isInstanceOf('LeftRightTree...
[ "0.70304364", "0.676181", "0.66080326", "0.6460071", "0.62236583", "0.62236583", "0.6215634", "0.6048498", "0.6047723", "0.59935254", "0.5992588", "0.5965784", "0.5893989", "0.5883927", "0.58747905", "0.5839561", "0.58342093", "0.5818476", "0.58051574", "0.5804716", "0.578191...
0.7122626
0
Test inversion of rule results with the NOT rule
public function testNotRule() { $rule = new NotRule(); $rule->addRule(new TrueRule()); $this->assertFalse($rule->validate()); $rule = $this->getRuleBuilder()->fromArray(array( 'false', ), 'not'); $this->assertTrue($rule->validate()); try { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lola_check_all_transitions_negated($check_name, $formula) {\n global $petrinet;\n foreach ($petrinet[\"transitions\"] as $transition) {\n $ret = lola_check_single_transition($check_name, $formula, $transition[\"id\"]);\n if ($ret->result) {\n debug(\"Single negated transition check ...
[ "0.66278315", "0.6223093", "0.6064134", "0.57122105", "0.5702052", "0.5674904", "0.55687404", "0.555494", "0.5550307", "0.5500415", "0.54908234", "0.54851496", "0.54568493", "0.5456521", "0.54147285", "0.53749377", "0.53638357", "0.5358693", "0.53454846", "0.5335941", "0.5320...
0.64131546
1
Test logical OR rule container
public function testOrRule() { $rule = $this->getRuleBuilder()->fromArray(array( 'false', 'true' ), 'or'); $this->assertTrue($rule->validate()); $rule = $this->getRuleBuilder()->fromArray(array( 'false', 'false' ), 'or'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isOr();", "static function logicalOr()\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::logicalOr', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "protected static functi...
[ "0.7764997", "0.73263615", "0.7212945", "0.65953505", "0.6547403", "0.6541039", "0.6427818", "0.6359863", "0.6252859", "0.6169831", "0.60080785", "0.5965086", "0.5962326", "0.5929085", "0.5884612", "0.5790692", "0.57676154", "0.5754312", "0.5749105", "0.5728345", "0.5705428",...
0.74625754
1
Test logical AND rule container
public function testAndRule() { $rule = $this->getRuleBuilder()->fromArray(array( 'false', 'true' ), 'and'); $this->assertFalse($rule->validate()); $rule = $this->getRuleBuilder()->fromArray(array( 'true', 'true' ), 'and'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isAnd();", "protected static function logicalAND(){\n\t\t$values = func_get_args();\n\t\tif(is_array($values[0])){\n\t\t\t$values = $values[0];\n\t\t}\n\t\treturn self::junction('AND', $values);\n\t}", "static function logicalAnd()\n {\n try {\n return call_user_func_array(...
[ "0.76887393", "0.73466086", "0.7150239", "0.6608609", "0.6476244", "0.6384772", "0.62369454", "0.6224481", "0.6117457", "0.60457873", "0.60331917", "0.6002561", "0.59213495", "0.5826279", "0.572008", "0.5701629", "0.56992877", "0.56877637", "0.5686607", "0.5584749", "0.555536...
0.68841064
3
Test logical XOR rule container
public function testXorRule() { $rule = $this->getRuleBuilder()->fromArray(array( 'false', 'true', 'false' ), 'xor'); $this->assertTrue($rule->validate()); $rule = $this->getRuleBuilder()->fromArray(array( 'false', 'false' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function logicalXor()\n {\n try {\n return call_user_func_array('PHPUnit_Framework_Assert::logicalXor', func_get_args());\n } catch (\\Exception $e) {\n self::callSlack($e, debug_backtrace()[1]);\n }\n }", "function variant_xor($left, $right) {}", "public...
[ "0.70542306", "0.6796768", "0.6493458", "0.63636845", "0.6223751", "0.6161255", "0.6079877", "0.59898204", "0.5517666", "0.5402776", "0.53718126", "0.5317665", "0.5187056", "0.51767814", "0.51181215", "0.5091755", "0.5089368", "0.50859904", "0.5049944", "0.50069714", "0.49999...
0.7732247
0
Create the connection to Fishbowl
public function __construct($host, $port, $user, $pass) { $this->host = $host; $this->port = $port; $this->user = $user; $this->pass = base64_encode(md5($pass, true)); $this->id = fsockopen($this->host, $this->port); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function connect() {\n $fedora_user = new stdClass();\n $fedora_user->name = $this->config->fedora->username;\n $fedora_user->pass = $this->config->fedora->password;\n $this->fedora_connect = new FedoraConnection($fedora_user, $this->config->fedora->protocol . '://' . $this->config->fedora->host . ':' ...
[ "0.6757397", "0.668233", "0.66250664", "0.6612265", "0.65369177", "0.65150857", "0.65052325", "0.6505077", "0.6505077", "0.6505077", "0.6505077", "0.6505077", "0.6505077", "0.6505077", "0.6505077", "0.6505077", "0.6505077", "0.6505077", "0.64991874", "0.64906687", "0.6482048"...
0.0
-1
Save the customer information
public function saveCustomer($customerName = "Kevin", $customerNumber = "734", $active = "true", $address ="test", $city="amarillo", $zip="12345", $type="Main Office", $state = 'UT', $phone="800-555-5555", $email="email") { // Setup XML $xml = " <CustomerSaveRq>\n". " <...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saveCustomer($customer) {\n $customer->save();\n\n $customerAccount = $this->newCustomerAccount($customer->id);\n $customerAccount->save();\n\n $customer->sl_customer_account_id = $customerAccount->id;\n $customer->save();\n }", "public static function saveCu...
[ "0.7357428", "0.73563224", "0.7269272", "0.7219316", "0.71492916", "0.690299", "0.68556327", "0.68530786", "0.6797456", "0.6783201", "0.6746828", "0.67001164", "0.669137", "0.6691266", "0.6675675", "0.6651309", "0.66199183", "0.660432", "0.66018665", "0.65976244", "0.6596507"...
0.66112953
17
Get list of SO's by location group
public function getSOList($LocationGroup = 'SLC') { // Parse XML $xml = "<GetSOListRq>\n<LocationGroup>{$LocationGroup}</LocationGroup>\n</GetSOListRq>\n"; // Create request and pack $this->createRequest($xml); $len = strlen($this->xmlRequest); $packed = pack("N", $len); // Send ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGroups()\n\t{\t\t\n\t\t$groups = $this->tax_class->getTerms();\n\t\tforeach ($groups as &$group) \n\t\t{\n\t\t\t$key = md5($group->meta['location_address']);\n\t\t\t$cache = $this->getCache($key);\n\t\t\tif($cache)\n\t\t\t{\n\t\t\t\t$group->meta['location'] = $cache;\n\t\t\t}\n\t\t\telse\n\t\t...
[ "0.6448998", "0.63617736", "0.63432306", "0.6173446", "0.5886566", "0.5883038", "0.5780492", "0.57054776", "0.56658375", "0.56591964", "0.55755407", "0.55111146", "0.55110687", "0.546118", "0.54394937", "0.5425999", "0.541794", "0.53901446", "0.53532434", "0.5331348", "0.5319...
0.5990868
4
Loads SO for a given number
public function getSO($number = '50032') { // Parse XML $xml = "<LoadSORq>\n<Number>{$number}</Number>\n</LoadSORq>\n"; // Create request and pack $this->createRequest($xml); $len = strlen($this->xmlRequest); $packed = pack("N", $len); // Send and get the response fwrit...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadSeries(){\n $series = new Series();\n\n if($this->id == -1 || empty($this->databasePath))\n return $series;\n\n \n $sqlQuery = 'SELECT S.* FROM books_series_link BSL, series S WHERE BSL.series= S.id and BSL.book='.$this->id;\n\n $pdo = new SPDO($thi...
[ "0.5242366", "0.50811344", "0.49460033", "0.48375", "0.47370535", "0.47128862", "0.4707274", "0.46813342", "0.46627095", "0.46470162", "0.46289974", "0.4620826", "0.4614079", "0.46085113", "0.4598162", "0.45809907", "0.45809907", "0.45700136", "0.45700136", "0.45700136", "0.4...
0.6350256
0
Saves a Sales Order with items
public function saveSO() { // Setup XML $xml = "<FbiXml>". " <Ticket>". " <Key></Key>". " </Ticket>". "<FbiMsgsRq>". ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function saving(Order $Order)\n {\n //code...\n }", "public function add_sales_order() {\n\t\t$values=array(\"customer_name\"=>$_POST['customer_name'],\"product_id\"=>$_POST['inv_id'],\"sell_price\"=>$_POST['selling_price'],\"sell_date\"=>$_POST['selling_date'],\"prod_qty\"=>$_POST['selling_q...
[ "0.7077204", "0.7058806", "0.70355624", "0.7013302", "0.7002516", "0.69565934", "0.6924895", "0.6820649", "0.6781784", "0.67737675", "0.66718173", "0.66254985", "0.66124856", "0.6605389", "0.6587599", "0.655393", "0.65169644", "0.6491994", "0.64840305", "0.6481085", "0.644816...
0.0
-1
Get part information. Can be search by either PartNum or UPC
public function getPart($partNum, $upc) { // Setup xml $xml = "<PartGetRq>\n"; if (!is_null($partNum)) { $xml .= "<Number>{$partNum}</Number>\n"; } else { $xml .= "<Number>{$upc}</Number>\n"; } $xml .= "</PartGetRq>\n"; // Create request and pack $this->createReque...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_available_parts($part_id, $version) {\n // Database connection \n $conn = database_connection();\n\n $sql = \"SELECT SERIAL_NUMBER FROM CMS_GEM_CORE_CONSTRUCT.PARTS WHERE KIND_OF_PART_ID='\" . $part_id . \"' AND SERIAL_NUMBER LIKE '%\" . $version . \"%' AND IS_RECORD_DELETED = 'F' AND PART_ID...
[ "0.63410145", "0.6182517", "0.61764985", "0.60918325", "0.6057426", "0.5983155", "0.5972876", "0.5933482", "0.5907702", "0.5903215", "0.58501124", "0.58047414", "0.57543623", "0.5741276", "0.57096606", "0.57059246", "0.56646955", "0.5619997", "0.56184435", "0.5578696", "0.556...
0.7160516
0
Get inventory quantity information for a part $param string $partNum
public function getInvQty($partNum) { // Setup xml $xml = "<InvQtyRq>\n<PartNum>{$partNum}</PartNum>\n</InvQtyRq>\n"; // Create request and pack $this->createRequest($xml); $len = strlen($this->xmlRequest); $packed = pack("N", $len); // Send and get the response f...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findInventoryByPart($partno) {\n\n $query = $this->getEntityManager()\n ->createQuery('\n SELECT\n s.rackno, s.diecode, s.heatcode, s.inqty, s.onhold,\n m.dano, m.partno, m.batchno, m.indate,\n l.shipdate\n ...
[ "0.6660462", "0.6132399", "0.6132399", "0.6004119", "0.6004119", "0.6004119", "0.59469104", "0.58763176", "0.58225596", "0.5746147", "0.5618265", "0.5595219", "0.5588948", "0.55698216", "0.55632305", "0.5552674", "0.55480206", "0.55139685", "0.5500972", "0.5496082", "0.548813...
0.8221353
0
Get tax rate list
public function getTaxRates() { // Parse XML $xml = "<TaxRateGetRq></TaxRateGetRq>\n"; // Create request and pack $this->createRequest($xml); $len = strlen($this->xmlRequest); $packed = pack("N", $len); // Send and get the response fwrite($this->id, $packed,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTaxRate();", "public function getTaxRates(){\n $taxRates = [];\n foreach ($this->data as $taxRate) {\n $newTaxRate = [];\n $newTaxRate['accounting_id'] = IndexSanityCheckHelper::indexSanityCheck('TaxType', $taxRate);\n $newTaxRate['code'] = IndexS...
[ "0.7906354", "0.771376", "0.73928463", "0.73269075", "0.72271836", "0.7067093", "0.6976278", "0.69280666", "0.6871433", "0.6860583", "0.6728387", "0.66911477", "0.66283065", "0.6625015", "0.6580278", "0.6578986", "0.6548295", "0.64964306", "0.6472996", "0.6472856", "0.6453268...
0.755543
2
Parse xml data and store the results
protected function parseXML($xml, $recursive = false, $cust = false) { if (!$recursive) { $array = simplexml_load_string($xml); } else { $array = $xml; } $newArray = array(); $array = (array) $array; foreach ($array as $key=>$value) { $value = (array) $value; if (isset($value[0])) { if (c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function parseXmlFile() {}", "protected function processData()\n {\n if (empty($this->data)) {\n throw new \\Netcreators\\NcgovPdc\\Xml\\Search\\SamenwerkendeCatalogi40\\ResponseParser\\Exception('Error: No XML data supplied.');\n }\n\n libxml_clear_errors();\n ...
[ "0.71299076", "0.6738705", "0.658204", "0.6455392", "0.64235216", "0.63851154", "0.6369252", "0.63048816", "0.62966776", "0.62382084", "0.62297755", "0.62230605", "0.6144148", "0.607942", "0.6065264", "0.6055967", "0.6015603", "0.6009095", "0.5983039", "0.5967268", "0.5955906...
0.0
-1
Set the XML Request
protected function createRequest($xmlData) { $this->xmlRequest = $this->xmlHeader() . $xmlData . $this->xmlFooter(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setRequestXml(){\n\n $orderHandleRepos = new InternationOrderHandleRepository();\n $this->orderInfo = $orderHandleRepos->getOneWithNotes($this->handleId);\n\n //设置请求用户信息\n $this->userInfoSet($this->requestXml);\n $this->currencySet($this->requestXml);\n\n ...
[ "0.7258424", "0.684771", "0.65927774", "0.6479331", "0.6415225", "0.63833296", "0.63043296", "0.6294739", "0.6254427", "0.62200373", "0.6182985", "0.61808455", "0.61189413", "0.60839725", "0.6075451", "0.6049277", "0.6029166", "0.60199004", "0.60170954", "0.5990846", "0.59373...
0.59654087
20
Determine the length (in bytes) of our reponse and stream it.
private function getResponse() { $packed_len = stream_get_contents($this->id, 4); //The first 4 bytes contain our N-packed length $hdr = unpack('Nlen', $packed_len); $len = $hdr['len']; $this->xmlResponse = stream_get_contents($this->id, $len); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _setContentLength() {\n\t\t$shouldSetLength = !isset($this->_headers['Content-Length']) && !in_array($this->_status, range(301, 307));\n\t\tif (isset($this->_headers['Content-Length']) && $this->_headers['Content-Length'] === false) {\n\t\t\tunset($this->_headers['Content-Length']);\n\t\t\tretur...
[ "0.6586103", "0.6537876", "0.64760494", "0.6271659", "0.62327397", "0.6225083", "0.6205151", "0.61919105", "0.60390973", "0.6015385", "0.60052824", "0.59714776", "0.5868513", "0.5849501", "0.5835116", "0.577322", "0.5765429", "0.5754051", "0.5730395", "0.5684209", "0.56434035...
0.67875105
0
Set the results from a response
private function setResult($res) { $this->result = $res; $this->statusCode = $this->result['FbiMsgsRs']['@attributes']['statusCode']; //$this->statusMsg = $this->result['FbiMsgsRs']['@attributes']['statusMessage']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function setresults();", "function setResults ($result) {\n\t\t$this->_results = $result;\n\t}", "public function setResults($results){\n $this->results = $results;\n }", "final protected function setResults(array $results)\n {\n $this->results = $results;\n }", "p...
[ "0.775509", "0.76000893", "0.7467166", "0.692865", "0.67400855", "0.66929984", "0.66602606", "0.66506505", "0.6587824", "0.6553314", "0.65466875", "0.64256144", "0.6402162", "0.6320113", "0.6274513", "0.62688404", "0.62407386", "0.6226751", "0.6202416", "0.61636704", "0.61519...
0.68013006
4
===== Employee Id =======
public function setEmpId($val){ if(intval($val) > 0){ $this->employeeId = intval($val); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmployeeId()\n {\n return $this->employee_id;\n }", "public function getEmployeeID()\n {\n return $this->employeeID;\n }", "public function determineId() {}", "private function getEmployeesIDs() {\n return DB::table('dx_users as u')\n ->selec...
[ "0.82639277", "0.79021835", "0.68641347", "0.6795072", "0.6769959", "0.6769959", "0.6769959", "0.67374957", "0.66256416", "0.662104", "0.6600593", "0.65612024", "0.65418285", "0.6505947", "0.6477745", "0.6475243", "0.64396244", "0.6430536", "0.6430157", "0.6425504", "0.640209...
0.67394257
7
===== Employee Name =======
public function setEmpName($val){ if(trim($val) != ''){ $this->employeeName = trim($val); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmployeeName()\r\n {\r\n return $this->deleted ? $this->old_username : $this->username;\r\n }", "public function getNameE()\n {\n return $this->name_e;\n }", "abstract public function get_name();", "abstract public function get_name();", "abstract public functio...
[ "0.77697086", "0.7055254", "0.69926053", "0.69926053", "0.69926053", "0.69472253", "0.68847024", "0.68410635", "0.68410635", "0.68410635", "0.6797153", "0.6796199", "0.6780412", "0.6737445", "0.67165726", "0.6663416", "0.66478384", "0.66421294", "0.66421294", "0.66421294", "0...
0.0
-1
===== Employee Mobile =======
public function setEmpMobile($val){ if(trim($val) != ''){ $this->employeeMobile = trim($val); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mobile_employee_code($mobile)\n{\n\t$sql=\"select emp_id from employee_master where mobile_no='$mobile'\";\n\t$res = mysql_query($sql);\n\t$rt=mysql_fetch_assoc($res);\n\treturn $rt['emp_id'];\n}", "public function getEmployeeInfo() {\n\n $employeeModel = $GLOBALS[\"employeeModel\"];\n\n $...
[ "0.61257786", "0.6084011", "0.58897", "0.5787911", "0.5718764", "0.5712554", "0.5704612", "0.56070507", "0.5572408", "0.5550776", "0.5516409", "0.54929566", "0.54775256", "0.5475962", "0.5465419", "0.54384214", "0.5436511", "0.542072", "0.5417289", "0.53847605", "0.5384535", ...
0.5846865
3
====== Set Get Result Type =====
public function setResultType($val){ if(trim($val) != ""){ $this->resultType = trim($val); }else{ $this->resultType = "Array"; } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function responseType ();", "public function get_type();", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type()\n {\n }", "public function get_type()\n...
[ "0.6954915", "0.68674046", "0.68476486", "0.68476486", "0.68473315", "0.6847215", "0.6846058", "0.68439883", "0.67430454", "0.6672242", "0.6645201", "0.66145843", "0.6589703", "0.6565559", "0.65616256", "0.65592295", "0.6531488", "0.6526389", "0.6505215", "0.6505215", "0.6505...
0.6683183
9
Set attribute swatch option
private function setSwatchAttributeOption( AttributeInterface $attribute, AttributeOption $option, string $optionId ): void { $optionsValue = trim($option->getLabel() ?: ''); if ($this->swatchHelper->isVisualSwatch($attribute)) { if (strpos($optionsValue, "#") ===...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAttributes();", "function set_attr($attr=array()) {\n $this->other_attr = $attr;\n }", "public function testSetAttribs()\n {\n $this->todo('stub');\n }", "function useattrib($attribute) { atkuse(\"attribute\", $attribute); }", "public function setAttributes($attri...
[ "0.6359591", "0.5986671", "0.5921983", "0.5597901", "0.557272", "0.5512836", "0.54989403", "0.5421103", "0.539422", "0.53904796", "0.5389652", "0.53434515", "0.5341784", "0.5341784", "0.5341784", "0.5327409", "0.5303777", "0.52947956", "0.527504", "0.5274072", "0.5264004", ...
0.572727
3
Get option id to create new option
private function getNewOptionId(AttributeOption $option): string { $optionId = trim($option->getLabel() ?: ''); if (empty($optionId)) { $optionId = 'new_option'; } return 'id_' . $optionId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProductOptionId();", "public function getOptionId()\n {\n return $this->optionId;\n }", "function ppom_get_option_id($option, $data_name=null) {\n\t\n\t$default_option = is_null($data_name) ? $option['option'] : $data_name.'_'.$option['option'];\n\t\n\t$option_id = empty($option...
[ "0.74493146", "0.7327861", "0.6758422", "0.6726272", "0.6434927", "0.6333391", "0.6283048", "0.60707146", "0.59963584", "0.5978969", "0.59081644", "0.59034336", "0.58509886", "0.58349884", "0.58088547", "0.5804071", "0.57917976", "0.57917976", "0.5763694", "0.5763694", "0.575...
0.71576184
2
filter, retornando true or false
function aprovados($nota){ return $nota >= 7; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isFiltered() : bool;", "public function hasFilter(): bool;", "public function isFilterable(): bool;", "public function filter();", "public function isFiltered(): bool\n {\n return (bool) $this->prepare()->filtered;\n }", "protected abstract function filter();", "public func...
[ "0.72347635", "0.7150549", "0.6631984", "0.6631743", "0.6588239", "0.65518427", "0.6497843", "0.6450877", "0.64178115", "0.63863057", "0.6354727", "0.6320365", "0.631643", "0.6296135", "0.61952615", "0.6144664", "0.6037879", "0.60338944", "0.6025301", "0.60069185", "0.596827"...
0.0
-1
Returns the static model of the specified AR class.
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model() {\n return parent::model(get_called_class());\n }", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($cl...
[ "0.74850124", "0.73803526", "0.7154113", "0.71401674", "0.70629025", "0.703232", "0.69285315", "0.69285315", "0.6925706", "0.6902751", "0.6894916", "0.6894916", "0.68900806", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0....
0.0
-1
Retrieves a list of models based on the current search/filter conditions.
public function criteriaSearch() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria=new CDbCriteria; if(!empty($this->periksakacamata_id)){ $criteria->addCondition('periksakacamata_id = '.$this->periksakacamata_id); } if(!empty($this->pendafta...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModels();", "public function getModels();", "public function findAll($model);", "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('w...
[ "0.6744587", "0.6744587", "0.66071475", "0.6480176", "0.6380854", "0.63459533", "0.6310267", "0.6301479", "0.62540275", "0.625096", "0.625096", "0.6111257", "0.60779804", "0.6071859", "0.60465646", "0.6035604", "0.60343957", "0.6015879", "0.59832615", "0.59805286", "0.5979286...
0.0
-1
Retrieves a list of models based on the current search/filter conditions.
public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria=$this->criteriaSearch(); $criteria->limit=10; return new CActiveDataProvider($this, array( 'cri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModels();", "public function getModels();", "public function findAll($model);", "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('w...
[ "0.6744886", "0.6744886", "0.660744", "0.6478935", "0.63809466", "0.634619", "0.6310661", "0.63017946", "0.62542254", "0.6251588", "0.6251588", "0.6110578", "0.60789883", "0.6072824", "0.6045855", "0.60337853", "0.6033558", "0.60152847", "0.5982737", "0.5980334", "0.5979643",...
0.0
-1
Warning: Please modify the following code to remove attributes that
public function searchPrint() { // should not be searched. $criteria=$this->criteriaSearch(); $criteria->limit=-1; return new CActiveDataProvider($this, array( 'criteria'=>$criteria, 'pagination'=>false, )); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeBlacklistedAttributes($attribs) \n { \n $this->_html = preg_replace('/[\\s]+('.$attribs.')=[\\s]*(\"[^\"]*\"|\\'[^\\']*\\')/i',\"\",$this->_html); \n $this->_html = preg_replace('/[\\s]+('.$attribs.')=[\\s]*[^ |^>]*/i',\"\",$this->_html); \n }", "public function removeAttribute...
[ "0.71117824", "0.7035495", "0.6810129", "0.6756575", "0.6662393", "0.64803207", "0.63691974", "0.6355436", "0.6354229", "0.6353134", "0.6352825", "0.6333506", "0.6317176", "0.627881", "0.6275085", "0.62605983", "0.6248935", "0.62345755", "0.61991394", "0.6188764", "0.6176879"...
0.0
-1
$data = \DB::table('aula.archivos')>where('iArchivoId',$id)>delete(); aliminado fisico
public function deleteFilesUser($id){ $data = DB::table('aula.archivos')->where('iArchivoId', $id)->update(['bEstadoActivo' => false]); return response()->json($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function excluirAnuncio($id){\n global $pdo;\n $sql = $pdo->prepare(\"DELETE FROM anuncios_imagens WHERE id_anuncio = :id_anuncio\"); // vai remover o registro de imagens\n $sql->bindValue(\":id_anuncio\", $id);\n $sql->execute(); \n\n $sql = $pdo->prepare(\"DELETE FROM an...
[ "0.75309813", "0.73321193", "0.7283382", "0.7226446", "0.7138038", "0.7136303", "0.7098265", "0.7093458", "0.7078388", "0.7063934", "0.70151156", "0.7014747", "0.70083284", "0.70062655", "0.7002818", "0.700189", "0.6995671", "0.69954187", "0.69917935", "0.69664353", "0.696334...
0.7192866
4
Get api access token
public function getAccessToken() { return trim($this->scopeConfig->getValue(self::XML_PATH_GENERAL_API_CREDENTIALS_ACCESS_TOKEN)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken($access_token);", "public function getAccessToken()\n {\n return $this->get(s...
[ "0.8310489", "0.8310489", "0.8310489", "0.8310489", "0.8310489", "0.80417573", "0.7703571", "0.7677438", "0.7650841", "0.76337296", "0.7633071", "0.7598896", "0.7575737", "0.75592554", "0.7491925", "0.74746567", "0.7472849", "0.74697536", "0.7435633", "0.7435452", "0.7398265"...
0.7128449
62
/ Default title and description for modules that are not yet installed
public function __construct() { $this->setTitle('Low Order Fee'); $this->setDescription('Low Order Fee'); $this->init('loworderfee'); if ($this->isInstalled() === true){ $this->taxClass = $this->getConfigData('TAX_CLASS'); $this->allowFees = $this->getConfigData('MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function title()\n {\n return 'Untitled module';\n }", "protected function getModuleHeadline() {}", "public function getDefaultTitle(): string;", "public function getDefaultModule();", "public function get_module_title()\n {\n return \"LC__DIALOG_ADMIN\";\n }", "pu...
[ "0.6884893", "0.6558452", "0.6430557", "0.6348112", "0.62850535", "0.616982", "0.612619", "0.6022216", "0.60219437", "0.5983826", "0.5935141", "0.5932729", "0.5924254", "0.5922221", "0.5830168", "0.5807998", "0.5805914", "0.57973075", "0.57915634", "0.5789766", "0.5775734", ...
0.0
-1
When the queried entityId is found
public function test_it_can_delete_an_entity() { $this->mockHandler ->append( new Response(200, [], file_get_contents(__DIR__ . '/fixture/delete_response_success.json')) ); $response = $this->client->delete('db2e5c63-3c54-4962-bf4a-d6ced1e9cf33'); $thi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find($entity_id);", "public function afterFindOne(&$id, Entity $entity = null) { }", "public function findEntity($id);", "public function checkId($entityId){\n\t\t$select = $this->_getReadAdapter()->select()\n\t\t\t->from($this->getMainTable(), 'entity_id')\n\t\t\t->where('entity_id = :entity...
[ "0.6783258", "0.6565709", "0.6288146", "0.62735283", "0.6072054", "0.6072054", "0.6072054", "0.59998626", "0.5986953", "0.5860847", "0.5831752", "0.5831473", "0.57355994", "0.56722146", "0.56600547", "0.559804", "0.55741805", "0.55741805", "0.5493485", "0.5434988", "0.5417571...
0.0
-1
Set limits accordingly to
protected function setLimits() { if (!isset($this->settings->cpuLoad)) { $this->settings->cpuLoad = "low"; } $memoryLimit = self::MAX_MEMORY_RATIO; $timeLimit = self::EXECUTION_TIME_RATIO; switch ($this->settings->cpuLoad) { case "medium": ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _setLimits() {\n\n\n\n $north = $this->_point->getRelativePoint($this->_radius, '0', $this->_unit);\n $south = $this->_point->getRelativePoint($this->_radius, '180', $this->_unit);\n\n $this->_limits['n'] = $north->lat;\n $this->_limits['s'] = $south->lat;\n\n ...
[ "0.7731031", "0.70651484", "0.7033516", "0.68895143", "0.68252325", "0.67285824", "0.66184056", "0.66021335", "0.6579789", "0.6574888", "0.65023375", "0.64781356", "0.6470008", "0.6463898", "0.6423711", "0.6326232", "0.6324432", "0.63239527", "0.6316685", "0.6306547", "0.6305...
0.70218843
3
Format bytes into ini_set favorable form
protected function formatBytes($bytes) { if ((int)$bytes < 1) { return ''; } $units = ['B', 'K', 'M', 'G']; // G since PHP 5.1.x so we are good! $bytes = (int)$bytes; $base = log($bytes) / log(1000); $pow = pow(1000, $base - floor($base)); retur...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public function ini_bytes($val) {\n\t\t$val = trim($val);\n\t\t$last = strtolower($val{strlen($val)-1});\n\t\tswitch ($last) {\n\t\t\t// The 'G' modifier is available since PHP 5.1.0\n\t\t\tcase 'g':\n\t\t\t\t$val *= 1024;\n\t\t\tcase 'm':\n\t\t\t\t$val *= 1024;\n\t\t\tcase 'k':\n\t\t\t\t$val *= 1024;\n\t\t...
[ "0.5891323", "0.5847121", "0.5652638", "0.5475815", "0.5448631", "0.5427061", "0.54184324", "0.5204507", "0.50616807", "0.47969723", "0.47937164", "0.47230864", "0.46664613", "0.4657962", "0.46568787", "0.4625947", "0.4576941", "0.45601052", "0.45364356", "0.45355237", "0.450...
0.0
-1
Get current time in seconds
protected function time() { $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; return $time; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getCurrentTime()\n {\n return time();\n }", "private function getCurrentTime() {\n return microtime( true );\n }", "private function getCurrentTime()\n {\n return microtime(true);\n }", "function getElapsedSeconds() {\n\t\treturn $this->time;\n\t}", ...
[ "0.77175754", "0.77125806", "0.76925564", "0.740111", "0.7326574", "0.7256872", "0.7203192", "0.71893406", "0.7176922", "0.7057095", "0.70336956", "0.7022913", "0.69788796", "0.69640225", "0.69485277", "0.6911663", "0.68615353", "0.6834106", "0.6826285", "0.6824054", "0.68187...
0.65171224
78
Checks if calls are over recursion limit
protected function isRecursionLimit() { return ($this->maxRecursionLimit > 0 && $this->totalRecursion >= $this->maxRecursionLimit); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkXdebugMaxNestingLevel() {}", "public function isLimitExceeded();", "public function isAPICallLimitErr() {\n // create implementation of this function inside gogoLib for trademe\n // it's easier to hook it there for api call limit checks\n // also if call limit occur...
[ "0.64803374", "0.62775165", "0.6108257", "0.60986096", "0.59806573", "0.5966221", "0.59483224", "0.5866838", "0.5866479", "0.58570784", "0.5793295", "0.567655", "0.56548727", "0.56530756", "0.56471217", "0.5550599", "0.5508779", "0.549021", "0.5431311", "0.5427538", "0.539536...
0.75162834
0
Throw a errror message via json and stop further execution
public function returnException($message = '') { wp_die( json_encode( [ 'job' => isset($this->options->currentJob) ? $this->options->currentJob : '', 'status' => false, 'message' => $message, 'error' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function throw()\n {\n $response = new JsonResponse($this->getResponse(), $this->code);\n\n die($response->send());\n }", "protected function error()\n {\n $this->response = $this->response->withStatus(500);\n $this->jsonBody([\n 'input' => $this->payload->g...
[ "0.7286752", "0.71994686", "0.7082114", "0.6931237", "0.68939364", "0.68295175", "0.68233883", "0.6803885", "0.6764631", "0.6746284", "0.67190915", "0.66572684", "0.6633592", "0.66039854", "0.6554429", "0.6547174", "0.65447205", "0.6543288", "0.65015733", "0.6497367", "0.6479...
0.6378874
24
Delete all product orders
public function updateOrder(Request $request){ $ids_product_to_delete = array(); $order_details = OrderDetails::select('id')->where('order_id','=',$request->order_id)->get()->toArray(); foreach($order_details as $value){ array_push($ids_product_to_delete,$value); } DB...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteAllOrdersInBasket() {\n\n //$delete = $this->delete($where);\n // first we need the basketID\n $basketUser = $this->getBasketUserFromAuth();\n // then we delete all detail of the basket\n $result = null;\n if ($basketUser != null) {\n $bask...
[ "0.74484295", "0.7284402", "0.71858174", "0.69368607", "0.6928705", "0.6926994", "0.6918711", "0.6909996", "0.6853684", "0.68527776", "0.68527776", "0.6844658", "0.6830891", "0.6820455", "0.67776", "0.6758542", "0.67324024", "0.67176944", "0.6672855", "0.6639976", "0.65909255...
0.0
-1
Renvoie un batiment d'identifiant donne TODO utiliser le cache
public function getByIdAndLanguage($id, $language) { $select = $this->_createSelectQuery(); // batiment $select->field('id', $this->_tableName); $select->field('nom_' . $language, $this->_tableName, 'nom'); $select->field('description_' . $language, $this->_tableName, 'descr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getNewId();", "public function obtenerID();", "public function obtenerId() {}", "protected function _makeId()\n\t{\n\t\treturn JCache::makeId();\n\t}", "public function cache() {\n if(!array_key_exists($this->steamId64, self::$steamIds)) {\n self::$steamIds[$this->steamId64] = $t...
[ "0.637864", "0.63666236", "0.6334305", "0.63067317", "0.6259508", "0.6257808", "0.62526435", "0.6163532", "0.6130416", "0.6083993", "0.60776883", "0.6061837", "0.60077876", "0.598774", "0.5984884", "0.59676456", "0.59628224", "0.5948035", "0.5945641", "0.59442484", "0.5944248...
0.0
-1
Renvoie la liste de tous les batiments TODO utiliser le cache
public function findBatiments($language) { $select = $this->_createSelectQuery(); // batiment $select->field('id', $this->_tableName); $select->field('nom_' . $language, $this->_tableName, 'nom'); $select->field('description_' . $language, $this->_tableName, 'description'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _getBans()\r\n\t{\r\n\t\t$ban_file_name = md5($this->CI->config->config['encryption_key'].$this->ban_file);\r\n\t\t\r\n\t\t// Check if the cache file previously exists\r\n\t\tif(file_exists(CACHEPATH . $ban_file_name))\r\n\t\t{\r\n\t\t\t// Dont wast time with the DB, load the cached version\r\n\t\...
[ "0.66875595", "0.66161966", "0.6536415", "0.641037", "0.6178357", "0.6120532", "0.6109238", "0.60359925", "0.6029658", "0.5949941", "0.59477276", "0.59362024", "0.59362024", "0.59203494", "0.59199154", "0.58672845", "0.58555084", "0.58313066", "0.5803488", "0.5799098", "0.579...
0.0
-1
If the timer is stopped the returned value is the time passed between start() and stop() If called when the timer is started, the method returns the currently passed time.
public function getTimePassed(): float { if ($this->started) { return microtime(true) - $this->start_time; } else { return $this->stop_time - $this->start_time; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function time()\n\t{\n\t\treturn $this->endTimer-$this->startTimer;\n\t}", "function timer(){\n static $start;\n\n if (is_null($start))\n {\n $start = microtime(true);\n }\n else\n {\n $diff = round((microtime(true) - $start), 4);\n $start = null;\n return $di...
[ "0.78012633", "0.71666104", "0.69945776", "0.6935704", "0.6892228", "0.68796", "0.68100804", "0.68027616", "0.67837566", "0.67712915", "0.6749795", "0.6749795", "0.67477113", "0.6682063", "0.66339284", "0.6618404", "0.6617332", "0.66017705", "0.6531413", "0.6525499", "0.65202...
0.71786827
1
Retrieves a list of models based on the current search/filter conditions. Typical usecase: Initialize the model fields with values from filter form. Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields. Pass data provider to CGridView, CListView or any simil...
public function search() { // @todo Please modify the following code to remove attributes that should not be searched. $criteria=new CDbCriteria; $criteria->compare('id_node_type',$this->id_node_type,true); $criteria->compare('translit',$this->translit,true); $criteria->compare('name',$this->name,true); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t//$criteria->compare('object_id',$this->object_id);\n\t\t$criteria->compare('object_type_id',$this->object...
[ "0.7212874", "0.7136809", "0.7094321", "0.70936954", "0.6985914", "0.69613945", "0.6948008", "0.694271", "0.6934379", "0.69245327", "0.69107914", "0.69031674", "0.6899002", "0.6898315", "0.6892818", "0.6882706", "0.6880382", "0.68744856", "0.68505204", "0.6849779", "0.6837228...
0.0
-1
Returns the static model of the specified AR class. Please note that you should have this exact method in all your CActiveRecord descendants!
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function model() {\n return parent::model(get_called_class());\n }", "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model($className=__CLASS__) { return parent::model($className); }", "public static function model($className=__CLA...
[ "0.7573804", "0.7530022", "0.7271674", "0.7270135", "0.72620845", "0.72142005", "0.72139233", "0.7131974", "0.71288854", "0.71288854", "0.7102769", "0.7102769", "0.7102521", "0.7074754", "0.7064285", "0.7064285", "0.7064285", "0.7064285", "0.7064285", "0.7064285", "0.7064285"...
0.0
-1