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
Test case for webinarCreate Create a Webinar.
public function testWebinarCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarRegistrantCreate()\n {\n }", "public function testWebinarPollCreate()\n {\n }", "public function testWebinar()\n {\n }", "public function testWebinarRegistrants()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function tes...
[ "0.7855212", "0.7379238", "0.69512796", "0.6878894", "0.6584363", "0.6553019", "0.64912003", "0.6440262", "0.6421352", "0.64194024", "0.6349812", "0.63445705", "0.62597454", "0.62102824", "0.61887443", "0.6174561", "0.61369574", "0.6054688", "0.601544", "0.5883184", "0.587968...
0.8172204
0
Test case for webinarDelete Delete a Webinar.
public function testWebinarDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPollDelete()\n {\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function deleteSportsVenue($venue);", "public function testDeleteSurvey()\n {\n $survey = Survey::factory()->c...
[ "0.7386751", "0.7297796", "0.71680236", "0.66529924", "0.6622835", "0.6563354", "0.65136284", "0.6496925", "0.6489714", "0.64357275", "0.64357275", "0.637083", "0.63620377", "0.6346963", "0.6310489", "0.6308891", "0.6300885", "0.6295698", "0.6273204", "0.62324136", "0.6232029...
0.8196134
0
Test case for webinarPanelistCreate Add Panelists.
public function testWebinarPanelistCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelists()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function set_panelist() {\n\t\tif (!isset($this->args[0]) || empty($this->args[0])) {\n\t\t\t$this->out('Provide MV user_id...
[ "0.7211089", "0.65043837", "0.6392804", "0.5913536", "0.5587062", "0.5463761", "0.5356804", "0.5312291", "0.5305108", "0.5288998", "0.5263735", "0.5252212", "0.52127165", "0.5202787", "0.52021176", "0.52019876", "0.5184639", "0.51807183", "0.5171748", "0.5163554", "0.51232785...
0.81021476
0
Test case for webinarPanelistDelete Remove a Panelist.
public function testWebinarPanelistDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testRemoveListSuccessfully(): void\n {\n $this->createMailchimpList($list);\n\n $this->delete(\\sprintf('/mailchimp/lists/%s', $list['list_id']));\n\n ...
[ "0.795948", "0.58884895", "0.5749253", "0.5748073", "0.573655", "0.5675471", "0.5661825", "0.5626825", "0.55920637", "0.5565379", "0.5538664", "0.5531006", "0.5487608", "0.5451873", "0.5446417", "0.54163927", "0.5416242", "0.54077244", "0.54077244", "0.54077244", "0.54077244"...
0.7986915
0
Test case for webinarPanelists List Panelists.
public function testWebinarPanelists() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function testListPastWebinarPollResults()\n {\n }", ...
[ "0.8041716", "0.69889045", "0.68276155", "0.6213921", "0.61039495", "0.60195667", "0.5794682", "0.5651228", "0.563803", "0.5618443", "0.55301744", "0.5524846", "0.5513889", "0.54806244", "0.5478555", "0.5473747", "0.53977513", "0.5363002", "0.5349754", "0.5313243", "0.5302042...
0.8328777
0
Test case for webinarPanelistsDelete Remove Panelists.
public function testWebinarPanelistsDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelistDelete()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_...
[ "0.80611134", "0.6175651", "0.6084192", "0.5854993", "0.5779039", "0.56939197", "0.5672255", "0.5665499", "0.5657381", "0.56455123", "0.5625484", "0.5580941", "0.5545405", "0.55362356", "0.55231667", "0.5510384", "0.54702806", "0.5467625", "0.5467625", "0.5467625", "0.5467625...
0.83671415
0
Test case for webinarPollCreate Create a Webinar's Poll.
public function testWebinarPollCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPollGet()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function createpollAction(Request $request)\n {\n $poll = new PollImpl();\n $form = $this->createForm(new NewPoll(), $poll);\n\n $form->handleRequest($request);\n ...
[ "0.645826", "0.64233947", "0.6303108", "0.62919855", "0.6287759", "0.6279859", "0.61923283", "0.59656316", "0.59515786", "0.59352744", "0.5929518", "0.59017617", "0.589709", "0.5864389", "0.5771486", "0.5754985", "0.5707631", "0.5687261", "0.5679037", "0.56305504", "0.5621797...
0.7899342
0
Test case for webinarPollDelete Delete a Webinar Poll.
public function testWebinarPollDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deletepoll(){\n \tSiteController::loggedInCheck();\n\n\t\t$pollid = $_POST['pollid'];\n\t\t$poll = Poll::loadById($pollid);\n\t\t$pollAuthorId = $poll->get('userId');\n\t\t$pollAuthor = User::loadById($pollAuthorId);\n\n\t\t//user is the author of the poll, allow delete\n\t\tif($pollAuthor->get(...
[ "0.71641266", "0.66191196", "0.6587096", "0.6559964", "0.64290196", "0.6392854", "0.63748217", "0.6316476", "0.61818117", "0.60412574", "0.59323484", "0.5928612", "0.58898", "0.5859758", "0.5821917", "0.5783073", "0.5772443", "0.57544917", "0.5753902", "0.5753902", "0.5738498...
0.8047244
0
Test case for webinarPollGet Get a Webinar Poll.
public function testWebinarPollGet() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarPollResults()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function polls_get($pollId = NULL){\n $this->load->model(\"poll\");\n\n if (isset($pollId)) {\n try {\n $poll = $this->poll->getPoll($pollId)...
[ "0.6517212", "0.63763607", "0.63285667", "0.61603045", "0.61146563", "0.5927292", "0.58602315", "0.56228215", "0.54828477", "0.54216975", "0.53326815", "0.5261555", "0.5261327", "0.5234743", "0.5209806", "0.51862484", "0.5137796", "0.51247567", "0.5106876", "0.50816756", "0.5...
0.761019
0
Test case for webinarPollUpdate Update a Webinar Poll.
public function testWebinarPollUpdate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_poll()\n {\n //var_dump::display($_POST);\n @session::init();\n $v_website_id = session::get('session_website_id');\n $v_poll_id = get_post_var('hdn_item_id','');\n $v_poll_name = get_post_var('txt_poll_name');\n $v_p...
[ "0.67058426", "0.6567143", "0.6510409", "0.5973442", "0.59719884", "0.5864462", "0.5863904", "0.58290815", "0.57604766", "0.5751709", "0.57137495", "0.5650021", "0.5637855", "0.56267464", "0.5623237", "0.56209123", "0.56080276", "0.5605678", "0.55975664", "0.5576203", "0.5551...
0.79205805
0
Test case for webinarPolls List a Webinar's Polls.
public function testWebinarPolls() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarPollResults()\n {\n }", "public function testGetAllPolls()\n {\n Passport::actingAs(\n factory(\"App\\User\")->create(),\n ['*']\n );\n $polls= factory(\"App\\Poll\",5)->create();\n $response = $this->get('/polls');\n ...
[ "0.7220611", "0.67623955", "0.64286876", "0.6334028", "0.61761254", "0.5999231", "0.58641374", "0.58622104", "0.5815001", "0.5744109", "0.562562", "0.5541564", "0.5434194", "0.54106075", "0.5409291", "0.5376", "0.53354937", "0.53315526", "0.53140426", "0.53073347", "0.5287145...
0.7082206
1
Test case for webinarRegistrantCreate Add a Webinar Registrant.
public function testWebinarRegistrantCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarRegistrants()\n {\n }", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = arr...
[ "0.68164665", "0.68048227", "0.65093935", "0.64443994", "0.6280504", "0.6259114", "0.6228451", "0.6091112", "0.59748995", "0.5923236", "0.58715576", "0.58711356", "0.586229", "0.58319163", "0.58306944", "0.5823281", "0.58220184", "0.5764362", "0.57226545", "0.57079804", "0.56...
0.7710731
0
Test case for webinarRegistrantGet Get a Webinar Registrant.
public function testWebinarRegistrantGet() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/res...
[ "0.68977153", "0.6843426", "0.6761253", "0.6463811", "0.64311665", "0.6392972", "0.63280797", "0.62443304", "0.60247093", "0.5908627", "0.57308906", "0.55995554", "0.5596293", "0.558569", "0.5451014", "0.54231215", "0.53971064", "0.53788775", "0.53557867", "0.5348735", "0.533...
0.7519076
0
Test case for webinarRegistrantQuestionUpdate Update Registration Questions.
public function testWebinarRegistrantQuestionUpdate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateSurveyQuestion0()\n {\n }", "public function testUpdateSurveyQuestion0()\n {\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function testUpdateVendorComplianceSurvey()\n {\n }", "public function testUpdateSurveyQuestionChoice0...
[ "0.6326959", "0.6326959", "0.6215054", "0.6106913", "0.5868318", "0.5868318", "0.5843494", "0.58333194", "0.5764647", "0.5714424", "0.5704338", "0.570071", "0.570071", "0.56935734", "0.5648956", "0.5614041", "0.5593699", "0.5581167", "0.558031", "0.5559604", "0.5554796", "0...
0.81059843
0
Test case for webinarRegistrantStatus Update Webinar Registrant Status.
public function testWebinarRegistrantStatus() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_organiser_status(){\r\n\t\t$this->organiser_model->update_organiser_status($_POST['status'],$_POST['organiser_id']);\r\n\t\t$this->send_status_email($_POST['status'],$_POST['organiser_id']);\r\n\t\techo \"1\";exit;\r\n\t}", "public function testWebinarUpdate()\n {\n }", "public function t...
[ "0.61954045", "0.596753", "0.5939235", "0.59271204", "0.58863634", "0.58448845", "0.5814457", "0.5804797", "0.573674", "0.55866015", "0.5571828", "0.554309", "0.5540145", "0.55377865", "0.5517234", "0.5506369", "0.54942244", "0.5482305", "0.5469329", "0.5466056", "0.54422605"...
0.7310263
0
Test case for webinarRegistrants List Webinar Registrants.
public function testWebinarRegistrants() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/res...
[ "0.712533", "0.6706353", "0.65471625", "0.63244635", "0.60663444", "0.59959614", "0.5994309", "0.5917624", "0.5810444", "0.57461953", "0.5665831", "0.5652421", "0.56106544", "0.5591197", "0.5565672", "0.5482361", "0.54760706", "0.5439773", "0.54333013", "0.543098", "0.5406093...
0.72998947
0
Test case for webinarRegistrantsQuestionsGet List Registration Questions.
public function testWebinarRegistrantsQuestionsGet() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registration_questions() {\n\t\t// return $this->get_registration_token_list();\n\t\t$category = Category::with('questions')->where('name', 'registration')->first();\n\n\t\tif($this->categoryHasLessThanFiveQuestions($category)) {\n\t\t\treturn response()->json(['status' => false, 'code' => 200, 'me...
[ "0.7154707", "0.60555196", "0.60346353", "0.5704522", "0.5638833", "0.5632243", "0.5621794", "0.5526942", "0.5455713", "0.54485816", "0.5391416", "0.53890324", "0.53485394", "0.53445524", "0.53413343", "0.53380704", "0.5323038", "0.5306515", "0.5293291", "0.5253302", "0.52309...
0.7223803
0
Test case for webinarStatus Update Webinar Status.
public function testWebinarStatus() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarUpdate()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function update_status();", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($dat...
[ "0.7402796", "0.7066509", "0.6592195", "0.65656424", "0.614286", "0.6069463", "0.6058696", "0.59344006", "0.5911069", "0.5883186", "0.5882107", "0.58265615", "0.5811445", "0.5768166", "0.5738013", "0.5712161", "0.569947", "0.568407", "0.56723994", "0.56482786", "0.5633261", ...
0.7082255
1
Test case for webinarUpdate Update a Webinar.
public function testWebinarUpdate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPollUpdate()\n {\n }", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function update($meeting)\n {\n\n }", "public function test_update() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n ...
[ "0.73612994", "0.6821884", "0.6562233", "0.6452065", "0.64265007", "0.6362201", "0.6313415", "0.6226509", "0.6219833", "0.60943675", "0.6045985", "0.6031974", "0.6031974", "0.6027522", "0.5991147", "0.5972692", "0.59578246", "0.59480345", "0.59453034", "0.59413856", "0.592457...
0.8108941
0
Test case for webinars List Webinars.
public function testWebinars() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelists()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function list_wilayah()\n\t{\n\t\tif($this->is_login){\n\t\t\t$products = $this->M_region->getAll();\n\t\t\t// Set Response\n\t\t\t$this->response_code = 200;\n\t\t\t$this->response['status']...
[ "0.635775", "0.6300158", "0.6266826", "0.61853427", "0.6053846", "0.5991229", "0.59525377", "0.59223324", "0.5878913", "0.5813563", "0.5790048", "0.57246953", "0.5714969", "0.5712513", "0.56930894", "0.5674928", "0.5632804", "0.5627633", "0.5627321", "0.56119186", "0.559497",...
0.7002258
0
Function that return the user index page
public function index() { $users = $this->getDoctrine() ->getRepository(User::class) ->findAll(); $recipes = $this->getDoctrine() ->getRepository(Recipe::class) ->findAll(); $reviews = $this->getDoctrine() ->getRepository(Review::class) ->findAll(); return $this->render('user/index.html.twig', [ 'users' => $users]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n return view('Admin::pages.user.index');\n }", "public function index()\n\t{\n\n\t\treturn \"this is the index of the user\";\n\t}", "public function index()\r\n\t{\r\n\t\tif(\\Gate::denies('user-index')){//allows=false, denies=true\r\n\t\t\treturn back()->withInput();...
[ "0.77639157", "0.7499306", "0.7486094", "0.7472788", "0.7465875", "0.7460587", "0.74434274", "0.7431844", "0.74158597", "0.74060506", "0.7405215", "0.737081", "0.7366425", "0.7346302", "0.7329595", "0.7312476", "0.7292304", "0.7280763", "0.72574264", "0.7253274", "0.72514105"...
0.0
-1
Function for managing the users account
public function userAccount() { $recipes= $this->getDoctrine() ->getRepository(Recipe::class) ->findAll(); $user = $this->getUser(); $reviews= $this->getDoctrine() ->getRepository(Review::class) ->findAll(); $user = $this->getUser(); return $this->render('user/show.html.twig', [ 'user' => $user, 'recipes' => $recipes, 'reviews' => $reviews, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function manageAccountAction()\n {\n $errors = [];\n $preserved = [];\n if(!empty($_POST)){\n $userValidation = new UserValidation($_POST, ['fullname', 'address', 'contact']);\n $errors = $userValidation->getNamedErrors();\n\n $preserved = $_POST;\n\n...
[ "0.7514075", "0.70708793", "0.70543474", "0.6989934", "0.6916115", "0.67563695", "0.6702663", "0.6675265", "0.66733545", "0.6635744", "0.662976", "0.66025585", "0.65718895", "0.6527581", "0.6526054", "0.65228367", "0.6500487", "0.64702404", "0.6467899", "0.64444", "0.64378524...
0.0
-1
Get the tender for the this essence.
public function newTender() { return $this->belongsTo( Tender::class, BelongsToTenderRestartSchema::COLUMN_NEW_TENDER_ID ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tender()\n {\n return $this->hasOne('App\\Tender', 'id', 'tender_id')->first();\n }", "public function getParticipant()\n\t{\n\t\treturn $this->getContext()->getParticipant();\n\t}", "public function getEventTactic()\n {\n return $this->eventTactic;\n }", "public function ...
[ "0.70141715", "0.6030877", "0.5965515", "0.59264225", "0.57535315", "0.57524127", "0.5688184", "0.56827146", "0.56827146", "0.5671178", "0.566597", "0.566597", "0.565748", "0.565748", "0.5602234", "0.56008667", "0.55848664", "0.55658627", "0.5485963", "0.5439807", "0.5430029"...
0.5709085
6
Composer hook that fires when composer createproject has finished.
public static function postCreateProjectCmd(Event $event): void { // Get a CLI object $cli = new CLImate(); $cli->br(); // Is the user running windows? if (Platform::isWindows()) { // Is the user running under WSL? If not then display warning message and die. if (!Platform::isWindowsSubsystemForLinux()) { $cli->br(); $cli ->bold() ->lightYellow( 'Warning: The Willow command line will only work in Linux, Mac or Windows running WSL' ); $cli ->bold() ->lightYellow( 'It appears you are running Windows without WSL. Please install WSL on Windows,' ); $cli->bold()->lightYellow('then re-run `composer create-project ...`'); $cli ->bold() ->lightYellow( 'See https://itsfoss.com/run-linux-commands-in-windows for methods of installing WSL' ); $cli->br(); die(); } } // Display Willow's fancy message self::fancyBanner($cli); $vendorDir = $event->getComposer()->getConfig()->get('vendor-dir'); $binDir = $event->getComposer()->getConfig()->get('bin-dir'); $baseDir = preg_replace('/vendor$/', '', $vendorDir); $projectName = basename($baseDir); // Create the willow symlink file try { $symlinkCreated = symlink($binDir . '/robo', 'willow'); } catch (\Exception $exception) { $symlinkCreated = false; } // Did the symlink NOT get created? if (!$symlinkCreated) { $cli->br(); $cli->bold()->lightYellow('Warning: Unable to create a symlink for the `willow` command.'); $cli->bold()->white('You may not have rights to create symlinks.'); $cli->bold()->white('You will need to create the willow symlink manually.'); $cli->br(); } $cli->br(); $cli->bold()->lightGray('# change directory to ' . $projectName); $cli->bold()->lightGreen('cd ' . $projectName)->br(); // Display what commands to run depending on if the symlink was created and the O/S if ($symlinkCreated) { $cli->bold()->lightGray('# Run the sample app'); $cli->bold()->lightGreen('./willow sample')->br(); $cli->bold()->lightGray('# Open the docs on the web'); $cli->bold()->lightGreen('./willow docs')->br(); $cli->bold()->lightGray('# List available commands'); $cli->bold()->lightGreen('./willow list')->br(); } else { $cli->error('Unable to create a symlink to robo. You will need to run robo in vendor\bin')->br(); $cli->bold()->lightGray('# Run the sample app'); $cli->bold()->lightGreen('./vendor/bin/robo sample'); $cli->bold()->lightGray('# Open the docs on the web'); $cli->bold()->lightGray('./vendor/bin/robo docs'); $cli->bold()->lightGray('# List available commands'); $cli->bold()->lightGray('./vendor/bin/robo list'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onPostCreateProject(Event $event): void\n {\n if (self::$isGlobalCommand) {\n return;\n }\n\n [$json, $manipulator] = Util::getComposerJsonFileAndManipulator();\n\n // new projects are most of the time proprietary\n $manipulator->addMainKey('license'...
[ "0.6951853", "0.6223732", "0.60013527", "0.5837917", "0.5768798", "0.5731014", "0.56544524", "0.5625449", "0.5586626", "0.5584911", "0.55537343", "0.5547075", "0.5485206", "0.5451462", "0.5417309", "0.5415619", "0.5399613", "0.5349584", "0.5326386", "0.53252244", "0.5311584",...
0.5642597
7
Show Willow fancy Banner
public static function fancyBanner(CLImate $cli): void { // Display Willow's fancy message $cli->forceAnsiOn(); $cli->green()->border('*', 55); $cli->addArt(__DIR__); $cli->bold()->lightGreen()->animation('willow')->speed(200)->enterFrom('left'); $cli->backgroundGreen()->lightGray(' https://github.com/RyanNerd/willow'); $cli->green()->border('*', 55); $cli->bold()->white()->inline('Thanks for installing '); $cli->bold()->lightGreen()->inline('Willow'); $cli->bold()->white('!'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function display_banner() {\n\n\t\tif ( empty( $this->browser_args['banner'] ) ) {\n\t\t\treturn;\n\t\t}\n\n \t\t$banner = $this->browser_args['banner'];\n\n \t\t$defaults = array(\n \t\t\t'html' => '',\n\t\t\t'src' => '',\n\t\t\t'url' => '',\n\t\t\t'title' => '',\n\t\t\t'message' => '',\...
[ "0.68516976", "0.6587832", "0.6394018", "0.6394018", "0.6394018", "0.6394018", "0.632088", "0.63093805", "0.62459654", "0.6232449", "0.6146874", "0.60914296", "0.6090134", "0.6030458", "0.6026002", "0.59937584", "0.5976901", "0.5966882", "0.59396654", "0.5919131", "0.590568",...
0.64830697
2
Display the comment form after the article
public function onContentAfterDisplay($context, &$row, &$params, $page = 0) { $component = $this->findOutComponent($context); $lang = JFactory::getLanguage(); $lang->load('com_comment', JPATH_SITE, '', true); $showinfeatured = JComponentHelper::getParams('com_comment')->get('showinfeatured', 0); $showincategory = JComponentHelper::getParams('com_comment')->get('showincategory', 0); if($component == 'featured' || $component == 'article' || $component == 'category') { $enablecomment = json_decode($row->attribs)->enablecomment; } if((($component == 'featured' && $showinfeatured == '1') || ($component == 'category' && $showincategory=='1')) && $enablecomment=='1') { $model = JModelLegacy::getInstance('Comment', 'CommentModel'); $countComment = $model->countComment($row->id); // get url of article $url = JRoute::_(ContentHelperRoute::getArticleRoute($row->id, $row->catid, $row->language)); return '<span>'.JText::_('COM_COMMENT_COMMENT_COUNT').': <a href="'.$url.'/#article-comment">'.$countComment.'</a></span>'; } elseif($component == 'article' && $enablecomment=='1') // if( setting allow comment = ON ) { JLoader::register('CommentViewComments', JPATH_SITE . '/components/com_comment/views/comments/view.html.php'); $view = new CommentViewComments( array('base_path' => JPATH_SITE . '/components/com_comment') ); //die($view->getLayout()); $model = JModelLegacy::getInstance('Comments', 'CommentModel'); $view->setModel( $model, true); ob_start(); $view->display(); $content = ob_get_clean(); return $content; } else { return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function viewLayoutComments($article) {\n\t\tif (!HookRegistry::call('CopyeditorAction::viewLayoutComments', array(&$article))) {\n\t\t\timport(\"submission.form.comment.LayoutCommentForm\");\n\n\t\t\t$commentForm = &new LayoutCommentForm($article, ROLE_ID_COPYEDITOR);\n\t\t\t$commentForm->initData();\n\t\t\t$comm...
[ "0.70642835", "0.6915574", "0.6703869", "0.66667587", "0.6615313", "0.66068804", "0.6592865", "0.6561666", "0.6531651", "0.64475995", "0.6400383", "0.6360965", "0.63443464", "0.6284919", "0.6280764", "0.62241083", "0.62152326", "0.6213076", "0.6189545", "0.6167252", "0.611676...
0.58897406
41
Prepare form and add my field.
function onContentPrepareForm($form, $data) { $app = JFactory::getApplication(); $option = $app->input->get('option'); switch($option) { case 'com_content': if ($app->isAdmin()) { JForm::addFormPath(__DIR__ . '/forms'); $form->loadFile('content', false); } return true; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function prepare() {\n $this->addChild(new fapitng_FormHidden('form_build_id', array(\n 'value' => $this->build_id,\n )));\n $this->addChild(new fapitng_FormHidden('form_id', array(\n 'value' => $this->id,\n )));\n if ($this->token) {\n $this->addChild(new fapitng_FormHidden('form_tok...
[ "0.73237437", "0.72511697", "0.6938432", "0.67985356", "0.6775654", "0.6767052", "0.6766404", "0.67580056", "0.6753042", "0.6696634", "0.6693603", "0.66925764", "0.6690799", "0.66672605", "0.6639371", "0.6610207", "0.6603243", "0.65810496", "0.65748847", "0.65747625", "0.6573...
0.0
-1
Find out the component that we are integrating with
private function findOutComponent($context) { $component = null; switch ($context) { case 'com_content.article': $component = 'article'; break; case 'com_content.featured': $component = 'featured'; break; case 'com_content.category': $component = 'category'; break; } return $component; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getComponentImplementation();", "public function component()\n {\n return $this->component;\n }", "function getComponentName()\n {\n $p = get_class($this);\n\n $reflector = new ReflectionClass($p);\n $path = dirname($reflector->getFileName());\n\n $co...
[ "0.69335926", "0.68826085", "0.68071604", "0.6785194", "0.6765853", "0.67071277", "0.66711885", "0.66655177", "0.6653527", "0.6510271", "0.64143026", "0.63449496", "0.62314475", "0.6209189", "0.6167782", "0.6112368", "0.60868937", "0.60348946", "0.60175943", "0.6013549", "0.5...
0.6282652
12
Returns 1, 0, or 1 for left wins, draw, or right wins
function compare_cards($lhs, $rhs) { // Ignore the suit $lhs = substr($lhs, 1); $rhs = substr($rhs, 1); // Elevate the Aces if($lhs == 1) $lhs = 1000; if($rhs == 1) $rhs = 1000; // Spaceships! // Pew pew pew // and you said you'd never found a use for them... return $lhs <=> $rhs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkForWinState() {\n $squares = $this->buildSquaresArray();\n foreach($this->winConditions as $strike => $cond) {\n if($this->conditionMet($cond, $squares)) {\n $this->winner = $squares[$cond[0]];\n $this->strike = $strike;\n $...
[ "0.68886536", "0.6453478", "0.6437333", "0.6333727", "0.6307213", "0.6273931", "0.624584", "0.6217939", "0.616523", "0.61190385", "0.60731834", "0.6040307", "0.6033046", "0.6025202", "0.59888196", "0.5966481", "0.5951794", "0.5896567", "0.58789885", "0.587759", "0.5874849", ...
0.0
-1
Where deck is either $p1Deck or $p2Deck
function displayDeck($deck, $id) { echo "<select name='$id' class='deckPicker'>\n"; foreach($deck as $card) { echo "<option data-img-src='gamepieces/$card.jpg' data-img-class='card' value='$card'/>"; } echo "</select>\n"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function rpc ($p1, $p2) {\n if ($p1 === $p2) {\n \t$result = 'Draw!';\n } elseif (($p1 == 'scissors' && $p2 == 'paper') || ($p1 == 'paper' && $p2 == 'rock') || ($p1 == 'rock' && $p2 == 'scissors')) {\n \t$result = 'Player 1 won!';\n } elseif (($p2 == 'scissors' && $p1 == 'paper') || ($p2 == 'paper' ...
[ "0.56040764", "0.49433467", "0.48106474", "0.479095", "0.45728463", "0.45610946", "0.45520627", "0.4543738", "0.45402363", "0.4532464", "0.45183286", "0.44582188", "0.4454192", "0.4452065", "0.43948802", "0.4379582", "0.43509", "0.43356055", "0.43310162", "0.43303293", "0.432...
0.0
-1
Display a listing of the resource.
public function __construct() { $this->middleware('auth'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { // if (!auth()->user()->can('model.register')) { // abort(401, 'You are not allowed to access this page.'); // } // if(!auth()->user()->hasPermissionTo('model.register', 'web')){ // abort(401, 'You are not allowed to access this page.'); // } $data['countries'] = Selector::GetCountries(); $data['builds'] = Selector::GetBuilds(); $data['services'] = Selector::GetServices(); $data['availabilities'] = Selector::GetAvailabilities(); return view('models::create')->with($data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $name = ucwords($request->name); $email = $request->email; $phone_no = $request->phone_no; $real_phone_no = $request->real_phone_no; $gender = $request->gender; $dob = $request->dob; $age = Carbon::parse($dob)->diffInYears(Carbon::now()); $country_id = $request->country_id; $city_id = $request->city_id; $town_id = $request->town_id; $ethnicity_id = $request->ethnicity_id; $build_id = $request->build_id; $service_id = $request->service_id; $availability_id = $request->availability_id; $about = $request->about; //$password = Hash::make($request->password); /** Run validator for both email and phone number */ $email_validator = Validator::make($request->all(), [ 'email' => ['unique:users'], ]); $phone_validator = Validator::make($request->all(), [ 'phone_no' => ['unique:models'], ]); if ($email_validator->fails() && !$phone_validator->fails()) { toastr()->error('Email already registered!'); DB::rollBack(); return back(); } elseif (!$email_validator->fails() && $phone_validator->fails()) { toastr()->error('Phone already registered!'); DB::rollBack(); return back(); } elseif ($email_validator->fails() && $phone_validator->fails()) { toastr()->error('Email and phone already registered!'); DB::rollBack(); return back(); }elseif($age < 18){ toastr()->error('Minimum age should be 18 years'); DB::rollBack(); return back(); } else { /** Generate random password */ $password = Models::GeneratePassword(8); $password = '1234.abc'; $user = new User(); $user->name = $name; $user->email = $email; $user->password = Hash::make($password); DB::beginTransaction(); try { $user->save(); $saved_user_id = $user->id; $user_role_data = array( 'role_id' => 2, 'model_type' => 'App\User', 'model_id' => $saved_user_id ); $save_user_role_data = DB::table('model_has_roles')->insert($user_role_data); $accessToken = $user->createToken('authToken')->accessToken; $success_response['token'] = $user->createToken('authToken')->accessToken; $success_response['name'] = $user->name; /** Generate model number */ $length = 6; $intMin = (10 ** $length) / 10; // 100... $intMax = (10 ** $length) - 1; // 999... $model_no = mt_rand($intMin, $intMax); /** Process the image */ $file = $request->file('preview_image'); $file_name = Models::GeneratePassword(30).$file->getClientOriginalName(); $file->move('uploads/model_preview_images', $file_name); $preview_image_url = 'uploads/model_preview_images/' . $file_name; /** Save model details */ $model = new Models(); $model->model_no = $model_no; $model->m_model_id = $saved_user_id; $model->phone_no = $phone_no; $model->real_phone_no = $real_phone_no; $model->gender = $gender; $model->age = $age; $model->country_id = $country_id; $model->city_id = $city_id; $model->m_town_id = $town_id; $model->ethnicity_id = $ethnicity_id; $model->build_id = $build_id; $model->services = 1; $model->availability = 1; $model->preview_image = $preview_image_url; $model->about = $about; $model->save(); /** save model services in m_services table */ $count = count($service_id); for ($i = 0; $i < $count; $i++) { $data = array( 'ms_model_id' => $saved_user_id, 'ms_service_id' => $service_id[$i] ); $insertServices[] = $data; } ModelServices::insert($insertServices); /** save model availabilities in m_availability table */ $count = count($availability_id); for ($i = 0; $i < $count; $i++) { $data1 = array( 'ma_model_id' => $saved_user_id, 'ma_availability_id' => $availability_id[$i] ); $insertAvailability[] = $data1; } ModelAvailability::insert($insertAvailability); DB::commit(); toastr()->success('User added successfully'); return back(); } catch (\Throwable $e) { DB::rollBack(); \Log::emergency("File:" . $e->getFile() . "Line:" . $e->getLine() . "Message:" . $e->getMessage()); toastr()->error('Ooops!!! Try again'); return back(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Show the specified resource.
public function show($id) { return view('models::show'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function show($id)\n {\n ...
[ "0.8661945", "0.8655518", "0.70617014", "0.70157945", "0.6972034", "0.6936089", "0.6916712", "0.6891719", "0.68023425", "0.6679236", "0.66607267", "0.6638694", "0.6617495", "0.6607225", "0.6594313", "0.65942454", "0.658194", "0.658077", "0.65533966", "0.6550209", "0.6550209",...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { return view('models::edit'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78557473", "0.76946205", "0.72731614", "0.7241571", "0.71700776", "0.70650244", "0.7052897", "0.698311", "0.69465625", "0.6944826", "0.69399333", "0.69286525", "0.69031185", "0.68969506", "0.68969506", "0.6878258", "0.6862812", "0.6859171", "0.68560475", "0.68436426", "0.6...
0.665213
58
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Populate this object from an array
public function fromArray(array $input) { if(array_key_exists("includeEpisodes", $input)) $this->includeEpisodes = $input["includeEpisodes"]; if(array_key_exists("id", $input)) $this->id = $input["id"]; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fromArray($array) {\n \n foreach ( $array as $key => $value ) {\n \n $this->$key = $value; \n }\n \n //return $this;\n }", "public function init_from_array($array)\n { \n foreach($array as $key ...
[ "0.76482165", "0.73549527", "0.7252974", "0.7252974", "0.723193", "0.7192051", "0.71524996", "0.7125901", "0.7115698", "0.7115698", "0.7049943", "0.6965487", "0.69480735", "0.6943731", "0.69368577", "0.69111794", "0.687051", "0.6850275", "0.6841959", "0.68289727", "0.68244815...
0.62006336
67
Serialize this object to an array
public function toArray(): array { return [ "includeEpisodes" => $this->includeEpisodes, "id" => $this->id, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __serialize(): array\n {\n return $this->buffered()->toArray();\n }", "public function serialize(): array;", "function jsonSerialize() {\n return $this->asArray();\n }", "function jsonSerialize()\r\n {\r\n return $this->to_array();\r\n }", "functi...
[ "0.7780803", "0.7753661", "0.76458377", "0.76345575", "0.7628547", "0.76049304", "0.76049304", "0.75964075", "0.75543237", "0.7550399", "0.7550399", "0.75494975", "0.75494975", "0.75494975", "0.75494975", "0.7549406", "0.7549406", "0.7549406", "0.7549406", "0.7549406", "0.754...
0.0
-1
Request information from API endpoint, using a Guzzle client
public function execute(SubsonicClient $client): ResponseInterface { return $client->executeRequest("/rest/getPodcasts", $this->toArray(), ["podcasts"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function requestFromApi() \n {\n $clientApi = new \\GuzzleHttp\\Client([\n \"base_uri\" => \"https://services.mysublime.net/st4ts/data/get/type/\",\n \"timeout\" => 4.0]);\n \n try { \n $response = $clientApi->request(\"GET\", $this->_urlEndPo...
[ "0.7312213", "0.6698579", "0.629872", "0.6262119", "0.6256361", "0.6190327", "0.6172232", "0.6075884", "0.60495263", "0.601892", "0.59545106", "0.5939351", "0.5889484", "0.5889484", "0.58766663", "0.58695644", "0.5858623", "0.5837372", "0.5829674", "0.5782101", "0.5771461", ...
0.0
-1
Sets up the fixture, for example, opens a network connection. This method is called before a test is executed.
protected function setUp() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function fixture_setup() {\r\n $this->service = SQLConnectionService::get_instance($this->configuration);\r\n test_data_setup($this->service);\r\n }", "public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_conn...
[ "0.7593164", "0.71706903", "0.6927489", "0.6910292", "0.6891104", "0.6882925", "0.6814723", "0.6802981", "0.67535055", "0.67530024", "0.6745982", "0.67330414", "0.67140543", "0.67068344", "0.67015326", "0.6683793", "0.6683793", "0.6683793", "0.6683793", "0.6683793", "0.667945...
0.0
-1
Tears down the fixture, for example, closes a network connection. This method is called after a test is executed.
protected function tearDown() { $test_dirs = array( ROOT.DS.'test_dir', ROOT.DS.'test_new_dir', SYSTEM.DS.'test_dir', ); foreach($test_dirs as $f){ is_dir($f) and rmdir($f); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tearDown(): void\n {\n parent::tearDown();\n\n Mockery::close();\n\n unset($this->faker, $this->waqi);\n }", "public function teardown()\n {\n //\n }", "protected function tearDown(): void\n\t{\n\t\tglobal $modSettings;\n\n\t\t// remove temporary test dat...
[ "0.7307295", "0.72373646", "0.72212124", "0.71885014", "0.7186963", "0.71493495", "0.7140486", "0.7134767", "0.71205044", "0.7103491", "0.70815605", "0.7079464", "0.7077445", "0.70528567", "0.70491225", "0.7033102", "0.70235026", "0.70154876", "0.7002158", "0.69997466", "0.69...
0.0
-1
Test for Directory::factory() The directory doesn't exist. Throws Kaili\DirectoryException because the provided directory doesn't exist.
public function test_factory_not_exist() { Directory::factory(ROOT.DS.'test_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function should_throw_if_trying_to_build_on_non_existing_directory(): void\n {\n $this->expectException(\\InvalidArgumentException::class);\n new DirectorySnapshot(__DIR__ . '/not-existing');\n }", "private function ensureDirectory() {\n\t\tif (!is_dir($this -> directory)) {\n\t\t\tif ...
[ "0.7088399", "0.6924278", "0.6888639", "0.68042946", "0.6631374", "0.6572095", "0.6568139", "0.6549179", "0.64917636", "0.6464703", "0.64470893", "0.64444333", "0.6375025", "0.63464355", "0.63353115", "0.63278794", "0.6325423", "0.6319147", "0.6303984", "0.6292826", "0.626997...
0.82290375
0
Test for Directory::create() The Directory already exist. Throws Exception because provided path is an already existent Directory
public function test_create_exists() { Directory::create(ROOT.DS.'application'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDirectoryIfNonExistent() {\n if (! file_exists($this->path)) {\n mkdir($this->path);\n }\n }", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($t...
[ "0.803957", "0.738031", "0.7285328", "0.7276571", "0.7262561", "0.7183224", "0.71716", "0.705012", "0.70488226", "0.70256615", "0.69991064", "0.69938815", "0.6983108", "0.6961843", "0.69514316", "0.6939701", "0.6902881", "0.68776363", "0.6841167", "0.68147177", "0.68039656", ...
0.74785715
1
Test for Directory::rename() Create a new directory named test_dir and renames it as test_new_dir. At the end of the test, remove the created directory.
public function test_rename() { $object = Directory::create(ROOT.DS.'test_dir'); $object->rename('test_new_dir'); $this->assertEquals($object->get_base_name(), 'test_new_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_rename_same_name()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_dir');\n $this->assertEquals($object->get_base_name(), 'test_dir');\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(s...
[ "0.7675573", "0.6942143", "0.6803566", "0.66557056", "0.6410179", "0.63514674", "0.63316065", "0.6303983", "0.62753636", "0.6271949", "0.6264431", "0.6144328", "0.6107304", "0.6092823", "0.60601956", "0.6049897", "0.6024232", "0.60035455", "0.59846485", "0.59535265", "0.59388...
0.8054311
0
Test for Directory::rename() Create a new Directory named test_dir and renames it with the same name. At the end of the test, remove the created directory.
public function test_rename_same_name() { $object = Directory::create(ROOT.DS.'test_dir'); $object->rename('test_dir'); $this->assertEquals($object->get_base_name(), 'test_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(sel...
[ "0.8073711", "0.69530237", "0.6793304", "0.67131215", "0.66003954", "0.63539195", "0.6330553", "0.62984866", "0.6267685", "0.6255804", "0.6138651", "0.61358964", "0.61334026", "0.609102", "0.6087658", "0.597927", "0.59581673", "0.5946811", "0.59413356", "0.59262115", "0.59253...
0.78430563
1
Test for Directory::move() Create the Directory test_dir in [ROOT] and moves it to [SYSTEM] At the end of the test, remove the moved directory.
public function test_move() { $object = Directory::create(ROOT.DS.'test_dir'); $object->move(SYSTEM); $this->assertTrue(is_dir(SYSTEM.DS.'test_dir')); $this->assertFalse(is_dir(ROOT.DS.'test_dir')); $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS....
[ "0.80949366", "0.7867393", "0.76190865", "0.7546802", "0.73030376", "0.7230169", "0.7162468", "0.6590736", "0.6350258", "0.6209349", "0.6183593", "0.6081983", "0.60330856", "0.5999443", "0.59931886", "0.5987112", "0.5961271", "0.59227955", "0.59041375", "0.5877521", "0.584598...
0.84177864
0
Test for Directory::move() Attempts to move [ROOT]/test.txt to [ROOT] with overwriting disabled Throws \Kaili\DirectoryException because Directory alredy exists
public function test_move_directory_exists() { $object = Directory::create(ROOT.DS.'test_dir'); $object->move(ROOT, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTru...
[ "0.8364826", "0.8341061", "0.8054002", "0.80286586", "0.78115845", "0.7408394", "0.7035016", "0.6758503", "0.66618764", "0.6528062", "0.6508351", "0.6483764", "0.6476313", "0.64304525", "0.6402691", "0.640205", "0.62653875", "0.62580246", "0.6214017", "0.6189024", "0.615714",...
0.84916425
0
Test for Directory::move() Attempts to move [ROOT]/index.php to [ROOT]/not_exist Throws \InvalidArgumentException because provided path doesn't exist
public function test_move_not_exists_dir() { $object = Directory::create(ROOT.DS.'test_dir'); $object->move(ROOT.DS.'not_exist'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_d...
[ "0.77261436", "0.7507489", "0.7113042", "0.6941977", "0.6908604", "0.67369854", "0.6474342", "0.6204443", "0.6170524", "0.6140496", "0.6086301", "0.6080597", "0.6074179", "0.60411793", "0.5988749", "0.5920087", "0.59006655", "0.58893067", "0.58556426", "0.58260906", "0.581966...
0.798785
0
Test for Directory::remove() Create and remove [ROOT]/test_dir
public function test_remove() { $path = ROOT.DS.'test_dir'; $object = Directory::create($path); $object->remove($path); $this->assertFalse(is_dir($path)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRemoveDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory, true]);\n\n $this->assertFileNotExists(vfsStream::url('foo'));\n }", "public function test...
[ "0.7788672", "0.76651603", "0.7491406", "0.73429984", "0.73013794", "0.71828717", "0.715201", "0.6991792", "0.69013095", "0.6786815", "0.6779039", "0.6778822", "0.66575205", "0.66531", "0.65665174", "0.65494186", "0.6527012", "0.6483709", "0.6471884", "0.6419089", "0.6408338"...
0.8669114
0
Test for Directory::scan() Scan the content of ROOT directory
public function test_scan() { $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system'); $object = Directory::factory(ROOT); $res = $object->scan(Directory::SORT_ASC); $output = array(); foreach($res as $f) $output[] = $f->get_base_name(); $this->assertEquals($content, $output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\...
[ "0.7979879", "0.77180135", "0.7239821", "0.71102506", "0.68057096", "0.676981", "0.65207386", "0.64884", "0.6479395", "0.639054", "0.6378024", "0.6366621", "0.63291353", "0.62446964", "0.61983824", "0.61747074", "0.6162355", "0.6128189", "0.6079859", "0.6079535", "0.6075999",...
0.77456445
1
Test for Directory::scan() Scan the content of ROOT directory in descending order
public function test_scan_sort_desc() { $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system'); $object = Directory::factory(ROOT); $res = $object->scan(Directory::SORT_DESC); $output = array(); foreach($res as $f) $output[] = $f->get_base_name(); $this->assertEquals(array_reverse($content), $output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($re...
[ "0.77819705", "0.7735031", "0.7294821", "0.7007625", "0.68574405", "0.6799736", "0.6560463", "0.65327024", "0.6521086", "0.6508652", "0.6382135", "0.63433135", "0.6287173", "0.62646174", "0.62332535", "0.6219239", "0.6212817", "0.61360383", "0.6128567", "0.6106466", "0.609829...
0.7612559
2
Test for Directory::scan() Scan only the directories inside ROOT directory
public function test_scan_directories() { $content = array('.','..','application','.git','nbproject','system'); $object = Directory::factory(ROOT); $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS); $this->assertEquals(count($content), count($res)); foreach($res as $path=>$dir){ $this->assertTrue(in_array($dir->get_base_name(), $content)); $this->assertInstanceOf('\Kaili\Directory', $dir); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\...
[ "0.7312299", "0.7297761", "0.7171603", "0.71259856", "0.7107098", "0.70851773", "0.6768123", "0.65986484", "0.6514543", "0.63404167", "0.63298833", "0.63052875", "0.6296188", "0.62949747", "0.6283482", "0.6276984", "0.6272302", "0.6215177", "0.6211419", "0.61895525", "0.61505...
0.7933779
0
Test for Directory::scan() Scan only the files inside ROOT directory
public function test_scan_files() { $content = array('.gitignore','.htaccess','index.php','README'); $object = Directory::factory(ROOT); $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES); $this->assertEquals(count($content), count($res)); foreach($res as $path=>$dir){ $this->assertTrue(in_array($dir->get_base_name(), $content)); $this->assertInstanceOf('\Kaili\File', $dir); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\...
[ "0.7491994", "0.7418604", "0.7250043", "0.71842724", "0.7012226", "0.688901", "0.6712443", "0.66900235", "0.6572419", "0.65611196", "0.6556684", "0.6530685", "0.65249497", "0.64954686", "0.6491414", "0.64674044", "0.64471996", "0.6423127", "0.64098424", "0.6407863", "0.634250...
0.7820266
0
Test for Directory::search() Search file 'index.php' inside the ROOT directory
public function test_search() { $object = Directory::factory(ROOT); $res = $object->search('/(index.php|.htaccess)/'); $this->assertArrayHasKey(ROOT.DS.'index.php', $res); $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function test_search_by_extension()\n {\n $object = Directory::factory...
[ "0.7856435", "0.7526942", "0.6122159", "0.61114746", "0.60262454", "0.59891254", "0.58569324", "0.5847987", "0.582122", "0.58177185", "0.58087236", "0.5745908", "0.57202494", "0.5702491", "0.5669456", "0.5634786", "0.56143713", "0.5592482", "0.55711865", "0.5551054", "0.55406...
0.8318728
0
Test for Directory::search_by_name() Search file 'index.php' inside the ROOT directory
public function test_search_by_name() { $object = Directory::factory(ROOT); $res = $object->search_by_name('index.php'); $this->assertArrayHasKey(ROOT.DS.'index.php', $res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "public function test_search...
[ "0.7803914", "0.74054193", "0.6096329", "0.59778947", "0.59626746", "0.5898367", "0.58588976", "0.5772092", "0.57219416", "0.56567097", "0.56024987", "0.55696607", "0.5523678", "0.55153424", "0.54849744", "0.5467967", "0.5423201", "0.5414956", "0.53814286", "0.5311357", "0.52...
0.8326893
0
Test for Directory::search_by_extension() Search files with 'php' extension inside the ROOT directory
public function test_search_by_extension() { $object = Directory::factory(ROOT); $res = $object->search_by_extension(array('php')); $this->assertArrayHasKey(ROOT.DS.'index.php', $res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _findExtensionFiles() {\r\n\t\r\n\t\t\tif (empty($this->_extensionsPath)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\r\n\t\t\t//make sure we only get the package files in that directory\r\n\t\t\t$zipFiles = JFolder::files($this->_extensionsPath, '\\.zip$', false, false);\r\n\t\t\t$gzFiles = JFolder::file...
[ "0.6378908", "0.62099826", "0.61495525", "0.6130767", "0.6104926", "0.6008885", "0.59576637", "0.5952251", "0.593186", "0.59039265", "0.58814347", "0.58732206", "0.5866185", "0.5841527", "0.584152", "0.58406514", "0.57603306", "0.5739005", "0.57352954", "0.572393", "0.5692", ...
0.84767115
0
Caso seja able_type deve ser ignorado
public function isToIgnoreColumn(): bool { if ($this->entity->code['name'] === 'deleted_at') { return true; } if (ArraySearcher::arraySearchByAttribute( $this->entity->code['name'], $this->parentEntity->system->relations, 'morph_type' ) ) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAllowedTypes() {\n return array('container', 'baseonly', 'substition','protected','disabled','formatting','paragraphs');\n }", "public function isAllowedDefault()\n {\n return !$this->crud->request['crud'];\n }", "public function getExplicitlyAllowAndDeny() {}", "public fun...
[ "0.6004903", "0.58311194", "0.58087206", "0.5798528", "0.57860863", "0.5763848", "0.5757639", "0.57420623", "0.57327193", "0.57321405", "0.57233804", "0.57055664", "0.5692895", "0.56898797", "0.56890625", "0.56840825", "0.56392884", "0.5582349", "0.5565974", "0.55518657", "0....
0.0
-1
'details' => [ 'slugify' => [ 'origin' => 'title', ], 'validation' => [ 'rule' => 'unique:pages,slug', ], ], [ 'default' => '', 'null' => '', 'options' => [ '' => ' None ', ], 'relationship' => [ 'key' => 'id', 'label' => 'name', ], ] Image 'details' => [ 'resize' => [ 'width' => '1000', 'height' => 'null', ], 'quality' => '70%',isBelongTo 'width' => '300', 'height' => '250', ], ], ], ],
public function mountDetails() { $haveDetails = false; $array = []; // $array['options'] = [ // '' => '-- None --', // ]; if ($relation = $this->isBelongTo()) { $relationData = $relation->toArray(); if (!isset($this->parentEntity->system->mapperTableToClasses[$relationData['name']])) { return null; //@todo tratar erro de tabela que nao existe } // name, key, label $haveDetails = true; if (is_array($relationClassName = $this->parentEntity->system->mapperTableToClasses[$relationData['name']])) { $relationClassName = $relationClassName[0]; } $array['model'] = $relationClassName; $array['table'] = $relationData['name']; $array['method'] = $relationData['name']; $array['type'] = 'belongsTo'; $array['column'] = $this->getColumnName(); $array['key'] = $relation->returnPrimaryKeyFromIndexes(); $array['label'] = $relation->getDisplayName(); $array['pivot_table'] = $relationData['name']; $array['pivot'] = 0; }else if ($relation = $this->isMorphTo()) { // Filtra o Primeiro // @todo Ajeitar aqu dps // if (!isset($relation['table_target']) || !isset($this->parentEntity->system->mapperTableToClasses[$relation['table_target']])) { // dd( // 'deu ruim aqui mountcolumn', // $relation // ); // return null; //@todo tratar erro de tabela que nao existe // } // name, key, label $haveDetails = true; // Get Relation Data $relationData = $relation['relations'][0]; // Aqui invez do modelo fica a coluna que armazena o modelo $array['model'] = $relationData['morph_type']; $array['table'] = $relation['name']; $array['method'] = $relation['name']; $array['type'] = 'morphTo'; $array['column'] = $this->getColumnName(); $array['key'] = $relationData['ownerKey']; // id, code $array['label'] = 'name'; $array['pivot'] = 0; if ($relationData['pivot']) { $array['pivot'] = 1; $array['pivot_table'] = $relationData['pivot']; dd( 'fazer pivon', $relation, $array ); } } // Belongs to many // if ($relation = $this->isBelongTo()) { // // name, key, label // $haveDetails = true; // $array['model'] = $relationClassName; // $array['table'] = $relation['roles']; // $array['type'] = 'belongsToMany'; // $array['column'] = $relation['id']; // $array['key'] = $relation['key']; // $array['label'] = $relation['ladisplayNamebel']; // $array['pivot_table'] = $relation['user_roles']; // $array['pivot'] = 1; // @todo // $array['taggable'] = 0; // @todo // } if (in_array($this->getColumnType(), ['date', 'datetime', 'timestamp'])) { $haveDetails = true; // $array['format'] = '%A %d %B %Y'; //formatLocalized for Carbon // $array['format'] = 'Y-m-d G:i:s'; } if (in_array($this->getColumnType(), ['checkbox'])) { $haveDetails = true; $array['on'] = true; $array['off'] = true; } if (in_array($this->getColumnType(), ['select_dropdown', 'select_multiple'])) { $haveDetails = true; $array['options'] = true; } if (in_array($this->getColumnType(), ['media_picker'])) { $haveDetails = true; $array['show_as_images'] = true; } if (!$haveDetails) { return null; } return $array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function beforeValidate()\n\t\t\t\t{\n if (!$this->exists && !$this->slug)\n $this->slug = Str::slug($this->firstname.\" \".$this->middlename.\" \".$this->lastname);\n\t\t\t\t}", "public function rules()\n {\n $page = $this->route('page');\n return [\n 'title'...
[ "0.62904805", "0.6211641", "0.6108396", "0.6044133", "0.6008199", "0.6007775", "0.5972313", "0.5932869", "0.59323895", "0.5920545", "0.5894382", "0.5887603", "0.5870198", "0.58572423", "0.58572423", "0.58572423", "0.58567053", "0.5840874", "0.5831277", "0.5822237", "0.5813489...
0.0
-1
name" => "gasto_MorphMany_person" "table_origin" => "gastos" "table_target" => "persons" "pivot" => 0 "type" => "MorphMany" "relations" => array:1 [ 0 => array:12 [ "origin_table_class" => "Telefonica\Models\Actors\Person" "origin_foreignKey" => "gastoable_id" "related_table_class" => "Casa\Models\Economic\Gasto" "is_inverse" => false "pivot" => false "name" => "gastos" "type" => "MorphMany" "model" => "Casa\Models\Economic\Gasto" "ownerKey" => "code" "foreignKey" => "gastoable_id" "morph_type" => "gastoable_type" "related_foreignKey" => "code" ]
protected function isMorphTo() { // if (isset($this->parentEntity->system->relationsMorphs[$this->getColumnName()])) { // return $this->parentEntity->system->relationsMorphs[$this->getColumnName()]; // } /** * Old Verifica pelo Atributo */ // if ($this->className==\Population\Models\Market\Abouts\Info::class // && $this->entity->code['name']!=='id'&& $this->entity->code['name']!=='text' // ) { if ($searchForeachKey = ArraySearcher::arraySearchByAttribute( $this->entity->code['name'], // $this->parentEntity->system->tables, $this->parentEntity->system->relations, 'foreignKey' ) ) { $isMorph = false; $found = []; foreach ($searchForeachKey as $valorFound) { if (in_array($this->parentEntity->system->relations[$valorFound]['type'], ['MorphMany', 'MorphTo'])) { $isMorph = true; $found[] = $this->parentEntity->system->relations[$valorFound]; } } // dd($found); if ($isMorph) { return $found[count($found)-1]; } } // dd( // $this->className, // $this->entity->code, // $this->renderDatabaseData // ); // } if (strpos($this->getColumnName(), 'able') !== false) { Log::channel('sitec-support')->warning( 'Problema no morph para coluna '.$this->getColumnName() ); // dd( // $this->getColumnName(), // 'debug1' // ); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function personas(){\n\n return $this->morphedByMany(Persona::class, 'cargoable'); //relacion muchos a muchos \"una persona tiene muchos cargos y un cargo tiene muchas personas\"\n }", "protected static function _relations() {\n\n\t}", "protected function relationships(): array\n {\n ...
[ "0.62810236", "0.62060964", "0.60583663", "0.5997038", "0.59445035", "0.59334034", "0.59182596", "0.59182596", "0.59177744", "0.59103364", "0.5897822", "0.5849077", "0.5845754", "0.5835123", "0.58214724", "0.58202934", "0.582007", "0.5818979", "0.5802637", "0.5800293", "0.579...
0.56968004
32
Form render function Construct and output the form we have gathered info about.
public function render($buffer=false) { //-------------------------------------------------------- // Inset Value Buffer //-------------------------------------------------------- ob_start(); //-------------------------------------------------------- // Data Output Buffer //-------------------------------------------------------- ob_start(); //-------------------------------------------------------- // Form Label //-------------------------------------------------------- if (isset($this->form_label)) { print new GenElement('form_label', $this->form_label); } //-------------------------------------------------------- // Headers //-------------------------------------------------------- $headers_arr = array(); for ($x = 0; $x < $this->cols; $x++) { if (isset($this->headers[$x])) { $headers_arr[] = $this->headers[$x]; } } print Format::array2xml('headers', $headers_arr); //-------------------------------------------------------- // Button Cell Attributes //-------------------------------------------------------- print Format::array2xml('button_cell_attrs', $this->button_cell_attrs); //-------------------------------------------------------- // Button(s) //-------------------------------------------------------- if (gettype($this->button) == 'array') { $buttons = array(); foreach ($this->button as $key => $value) { if (gettype($key) == 'integer') { $key = 'button_' . $key; } $buttons[$key] = array('name' => $key, 'value' => $this->xml_escape($value)); } print Format::array2xml('buttons', $buttons); } else { if ($this->button !== NULL) { print new GenElement('button', $this->xml_escape($this->button)); } } print new GenElement('columns', $this->cols); //-------------------------------------------------------- // Form content //-------------------------------------------------------- $curr_cols = 0; $colspan = 0; $row_begin = false; $row_end = false; //-------------------------------------------------------- // Hidden Form Elements //-------------------------------------------------------- $hid_elems = array(); foreach ($this->hidden_elements as $he_key => $hid_element) { ob_start(); $this->process_element($hid_element); $hid_elems[] = (!empty($this->xsl_template)) ? ($this->xml_escape(ob_get_clean())) : (ob_get_clean()); } print Format::array2xml('hidden_elements', $hid_elems); //-------------------------------------------------------- // Visible Form Elements //-------------------------------------------------------- ob_start(); $rows = 0; foreach ($this->form_elements as $element) { //-------------------------------------------------------- // Process the element: // -> object -> render, // -> text -> print, // -> array -> process elements //-------------------------------------------------------- ob_start(); $this->process_element($element[0]); $tmp_element = ob_get_clean(); if ($element[2] == 'cell') { //-------------------------------------------------------- // Start ROW //-------------------------------------------------------- if ($curr_cols == 0) { ob_start(); if ($rows % 2 == 1 && $this->alt_rows) { $this->set_row_attr($rows, 'class', 'alt'); } $row_attrs = (isset($this->row_attrs[$rows])) ? ($this->row_attrs[$rows]) : (array()); $row_begin = true; $row_end = false; $rows++; } //-------------------------------------------------------- // Build Form Element //-------------------------------------------------------- $colspan = $element[1] + 0; $fe_attrs = array('colspan' => $element[1]); foreach ($element[3] as $fe_attr_key => $fe_attr_val) { $fe_attrs[$fe_attr_key] = $fe_attr_val; } $fe_content = (!empty($this->xsl_template)) ? ($this->xml_escape($tmp_element)) : ($tmp_element); print new GenElement('form_element', $fe_content, $fe_attrs); //-------------------------------------------------------- // End ROW //-------------------------------------------------------- if ($curr_cols + $colspan >= $this->cols) { print new GenElement('row', ob_get_clean(), $row_attrs); $row_begin = false; $row_end = true; $curr_cols = 0; } else { $curr_cols += $colspan; } } else { print (!empty($this->xsl_template) && $element[2] != 'fieldset') ? ($this->xml_escape($tmp_element)) : ($tmp_element); } } //-------------------------------------------------------- // End ROW if not already terminated //-------------------------------------------------------- if (!$row_end && $row_begin && count($this->form_elements) > 0) { print new GenElement('row', ob_get_clean(), $row_attrs); } print new GenElement('elements', ob_get_clean()); print new GenElement('data', ob_get_clean()); $this->inset_val .= ob_get_clean(); return parent::render($buffer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function render(Form $form);", "public function buildForm() {\n\t\techo \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>$this->title</title>\n\t\t</head>\n\t\t<body>\n\t\t<form method=\\\"$this->method\\\">\";\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Check if email validation is requir...
[ "0.7521628", "0.75035536", "0.74701256", "0.7464486", "0.7251352", "0.72444326", "0.7197968", "0.7149646", "0.70878905", "0.70858693", "0.70759845", "0.7073373", "0.7055793", "0.7042068", "0.69897294", "0.6944643", "0.6944643", "0.6938831", "0.6911143", "0.69069535", "0.68658...
0.0
-1
Variable Setting Functions Set the number of columns in the form
public function set_columns($cols) { $this->cols = $cols + 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NumCols() {}", "function twentytwelve_store_store_columns( $columns ) {\n return $columns = 3;\n}", "public function setColumnCount( $count )\n {\n $this->columnsCount = (int) $count;\n }", "function setColumnsCount($columnsCount) {\t \r\n\t \t$this->columnsCount = $columnsCount;\r...
[ "0.6823111", "0.6318066", "0.63089025", "0.6251698", "0.60738176", "0.60009116", "0.59822005", "0.59822005", "0.59553087", "0.5951465", "0.5948436", "0.5909743", "0.58963764", "0.5889294", "0.5876958", "0.5833276", "0.5818485", "0.58072865", "0.5806525", "0.58016354", "0.5788...
0.61721516
4
Set the submit button description at the bottom of the page
public function set_button($button) { $this->button = $button; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function printFoot (){\n\t?>\t\t\n\t\t\t\t<p class='submit'>\n\t\t\t\t\t<input type='submit' name='Submit' value=\"<?php _e('Save changes') ?>\" class='button-primary' />\n\t\t\t\t</p>\t\t\t\t\n\t\t\t\t\n\t\t\t</form>\n\t\t</div>\n\t\t\n\t<?php\n\t}", "function common_footer($button = \"Submit Chan...
[ "0.7199268", "0.64905614", "0.6385173", "0.63238215", "0.63238215", "0.6237064", "0.61968434", "0.6146864", "0.6102555", "0.604184", "0.5992402", "0.59829915", "0.5968829", "0.59575856", "0.5909116", "0.5895505", "0.5882845", "0.5858683", "0.5856468", "0.5847951", "0.58426243...
0.0
-1
Turn off the submit button from showing
public function no_button() { $this->button = NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ShowForm()\n {\n return false;\n }", "static function pmpro_checkout_default_submit_button($show)\n\t\t{\n\t\t\tglobal $gateway, $pmpro_requirebilling;\n\t\t\t\n\t\t\t//show our submit buttons\n\t\t?>\n\t\t\n\t\t<span id=\"pmpro_fondy_checkout\" <?php if(($gateway != \"fondy\") || !$...
[ "0.67879474", "0.6736748", "0.6539108", "0.65021646", "0.6208563", "0.5987679", "0.58708537", "0.58625036", "0.5789363", "0.5782342", "0.5776321", "0.5755307", "0.5745507", "0.57309175", "0.5729202", "0.57260907", "0.57199514", "0.5675215", "0.56619215", "0.56619215", "0.5634...
0.6482295
4
Set the attributes for the table cell containing the form button(s)
public function set_button_attrs($button_attrs) { if (is_array($button_attrs)) { $this->button_cell_attrs = $button_attrs; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function inputAttributes()\n {\n $this->input_attributes['name'] = $this->name;\n $this->input_attributes['type'] = 'submit';\n $this->input_attributes['value'] = $this->params['title'];\n }", "function formProperties() {\n\t\tglobal $l_we_class;\n\n\t\t// Create table\n\t\t$...
[ "0.5834517", "0.5720483", "0.57074565", "0.55786395", "0.5570131", "0.5531497", "0.5462197", "0.5442811", "0.5442811", "0.5427319", "0.53662515", "0.5363505", "0.5363505", "0.53543967", "0.5331065", "0.52888775", "0.527464", "0.5266644", "0.52394706", "0.52268016", "0.5225646...
0.64959556
0
Set the form table headers
public function set_headers($headers) { if (is_array($headers)) { $this->headers = $headers; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getHeaders(){\n\t\t$thead=\"\";\n\t\tif(!empty($this->headers)){\n\t\t\t$thead=\"<thead>\";\n\t\t\t$thead.=\"<tr>\";\n\t\t\t$headerNumber=0;\n\t\t\t$fieldNumber=0;\n\t\t\t$count=count($this->headers)-1;\n\t\t\t\n\t\t\t//Busca si hay columnas anteriores a agregar\n\t\t\tif(!empty($this->prependedCo...
[ "0.70498425", "0.69664925", "0.68424946", "0.6802195", "0.6706529", "0.6661331", "0.658277", "0.6551673", "0.652902", "0.652844", "0.65116954", "0.6508501", "0.6476392", "0.64637625", "0.644055", "0.64275247", "0.6393936", "0.6389936", "0.636085", "0.63553476", "0.6351412", ...
0.0
-1
Set a row attribute
public function set_row_attr($row, $attr_name, $attr_val) { $row = (int)$row; $attr_name = (string)$attr_name; $attr_val = (string)$attr_val; if ($attr_name == '' || $attr_val == '') { return false; } if (isset($this->row_attrs[$row][$attr_name])) { $this->row_attrs[$row][$attr_name] .= ' ' . $attr_val; } else { $this->row_attrs[$row][$attr_name] = $attr_val; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTrTdAttr ($attr, $row=null) {\n if (is_numeric ($row))\n $this->_setAttr ($attr, $this->trtdAttr[$row]);\n else\n $this->_setAttr ($attr, $this->trtdAttr[]);\n }", "public function setRow($row)\n {\n $this->row = $row;\n }", "pu...
[ "0.7184818", "0.69530857", "0.6781479", "0.67430913", "0.65449625", "0.6439724", "0.64035505", "0.6400028", "0.6385595", "0.6361818", "0.6347521", "0.63459355", "0.63459355", "0.634324", "0.6320215", "0.6309764", "0.62964934", "0.6223196", "0.6202105", "0.6145299", "0.6120304...
0.71445227
1
Add a field to the form
public function add_element($form_element, $num_cols=1, $attrs=false) { if (!is_array($attrs)) { $attrs = array(); } array_push($this->form_elements, array($form_element, $num_cols, 'cell', $attrs)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addToField(\\Foundation\\Form\\Field $field);", "public function addField();", "function add_form_field($field, $error = \"\", $prefill = \"\"){\n\t\t$this->form_row($field, $error , $prefill );\n\t}", "public function add_field(form_item $field) {\n $this->_fields[] = $field;\n }", "pub...
[ "0.8481527", "0.8202712", "0.7757113", "0.7730563", "0.7713683", "0.7713683", "0.7540773", "0.7109803", "0.70277035", "0.6947579", "0.6947579", "0.69466215", "0.690043", "0.6864778", "0.6852245", "0.6815211", "0.67548513", "0.6719937", "0.67175573", "0.6715191", "0.6665339", ...
0.0
-1
Add a hidden field to the form
public function add_hidden($hidden_element) { array_push($this->hidden_elements, $hidden_element); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addHiddenField($name,$value) {\n $this->formLines[] = '<input type=\"hidden\" name=\"'.$name.'\" value=\"'.$value.'\">';\n }", "function form_element_hidden( $name, $value )\n{\n\treturn sprintf( \"<input type=\\\"hidden\\\" name=\\\"%s\\\" value=\\\"%s\\\" />\\n\",\n\t\t$name, $value )...
[ "0.81896937", "0.7471088", "0.73945504", "0.73820883", "0.7339564", "0.7285233", "0.72694016", "0.7255144", "0.7255144", "0.7136787", "0.7118489", "0.7048892", "0.7025444", "0.6974492", "0.69108635", "0.6904579", "0.68311906", "0.6816565", "0.6770386", "0.6768842", "0.6761963...
0.6277479
36
Add a text/html/markup to the form
public function add_text($content) { array_push($this->form_elements, array($content, 0, 'text')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function insert() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm(TRUE);\n\t\t$tpl->setContent($form->getHTML());\n\t}", "function form($config)\r\n\t{\r\n\t\t$html_text = $config['html_text'];\r\n\t?>\r\n\t\t<label for=\"<?php echo $this->get_field_id(\"html_text\"); ?>\">\r\n\t\t<p>HTML Text: \r\n\t\t\t<tex...
[ "0.68467826", "0.67169696", "0.6457358", "0.6275944", "0.6216518", "0.6159618", "0.61416394", "0.6109516", "0.60992604", "0.60989577", "0.60791516", "0.6074994", "0.6073958", "0.6073849", "0.60473025", "0.60404676", "0.6038483", "0.6034244", "0.6021038", "0.6013311", "0.60050...
0.66501206
2
Add a label field to the form
public function add_label($caption, $num_cols=1, $attrs=false, $attrs2=false) { if (!is_array($attrs)) { $attrs = array(); } if (!is_array($attrs2)) { $attrs2 = array(); } $obj_label = new GenElement('label', $caption, $attrs); $label = $obj_label->render(1); array_push($this->form_elements, array($label, $num_cols, 'cell', $attrs2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLabelField() \n {\n return \"label_label\";\n }", "public function label(){\n\t\treturn '<label class=\"control-label\" for=\"'.$this->name.'\">'.$this->label.'</label>';\n\t}", "abstract function add_label();", "public function getLabelField() {}", "public function insertFormLabel...
[ "0.7381184", "0.7369457", "0.72620726", "0.7213327", "0.7045663", "0.7036932", "0.7014325", "0.7014325", "0.7014325", "0.7014325", "0.699512", "0.698019", "0.69418037", "0.692387", "0.69060093", "0.6892339", "0.6871649", "0.68227684", "0.6796143", "0.679102", "0.6782588", "...
0.622009
91
Process the current form element passed (string, object, array)
protected function process_element($element) { switch (gettype($element)) { case 'object': $element->render(); break; case 'array': foreach ($element as $sub_element) { $this->process_element($sub_element); } break; default: print "$element\n"; break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function element_form($element, $record, $options = array())\n{\n $html = '';\n // If we have an array of Elements, loop through the form to display them.\n if (is_array($element)) {\n foreach ($element as $key => $e) {\n $html .= get_view()->elementForm($e, $record, $options);\n ...
[ "0.63590515", "0.58913165", "0.5772871", "0.5769119", "0.57338846", "0.5717434", "0.57105756", "0.56900483", "0.5642878", "0.56369543", "0.56261456", "0.5625934", "0.5571237", "0.5541327", "0.54879814", "0.5478652", "0.5417847", "0.5416506", "0.5415478", "0.5411728", "0.54012...
0.5677752
8
Start a fieldset in the form
public function start_fieldset($content='', $id='', $class='') { $fs_content = ''; $fs_attrs = array('marker' => 'start'); if (!empty($id)) { $fs_attrs['id'] = $id; } if (!empty($class)) { $fs_attrs['class'] = $class; } if (!empty($content)) { $obj_legend = new GenElement('legend', $this->xml_escape($content)); $fs_content = $obj_legend->render(1); } $fieldset = new GenElement('fieldset', $fs_content, $fs_attrs); array_push($this->form_elements, array($fieldset->render(1), 0, 'fieldset')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fieldset_start($name = '', $extra = [])\n {\n if (is_array($name)) {\n $extra = (array) $extra + $name;\n $name = '';\n }\n $extra['name'] = ($extra['name'] ?? null) ?: $name;\n $func = function ($extra, $r, $form) {\n if ($form->_fiel...
[ "0.72612387", "0.70918363", "0.67148805", "0.6539373", "0.6515504", "0.65149856", "0.64871615", "0.64215577", "0.64053863", "0.6384635", "0.63710517", "0.6319396", "0.6310746", "0.6280865", "0.6271539", "0.62677824", "0.6244518", "0.6211821", "0.6207928", "0.6198854", "0.6196...
0.7040626
2
End a fieldset in the form
public function end_fieldset() { $fs_attrs = array('marker' => 'end'); $fieldset = new GenElement('fieldset', '', $fs_attrs); array_push($this->form_elements, array($fieldset->render(1), 0, 'fieldset')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function end_fieldset()\n\t{\n\t\tif( $this->has_fieldset )\n\t\t\t$this->buffer.= '</fieldset>';\n\t\t$this->has_fieldset = false;\n\t}", "public static function fieldset_close() {\n\t\t\treturn '</fieldset>';\n\t\t}", "static function closeFieldset()\n {\n echo '</ul>';\n echo '</fiel...
[ "0.8683747", "0.7981708", "0.79485416", "0.7723414", "0.72680134", "0.7240373", "0.7168367", "0.7066881", "0.6913539", "0.6906262", "0.66773194", "0.66431904", "0.66132414", "0.65945315", "0.65435416", "0.651934", "0.6514329", "0.6514329", "0.65118724", "0.6454397", "0.640488...
0.88671374
0
Set alternating row class "alt"
public function set_alt_rows() { $this->alt_rows = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fancy_altrows($rows) {\r\n\tif(is_array($rows)) {\r\n\t\t$i = 0;\r\n\t\tforeach($rows as $text) { $i++; ?>\r\n\t\t\t\t\t<li class=\"<?php tablealt($i); ?>\"><?php echo $text; ?></li>\r\n<?php\r\n\t\t}\r\n\t}\r\n}", "function boxGetAltRowStyle($i, $classonly = false) {\n\t\tif ($i % 2 == 0)\n\t\t\t$ret =...
[ "0.65590525", "0.64634025", "0.6176579", "0.60998696", "0.5913443", "0.591332", "0.5154975", "0.51529646", "0.514892", "0.51306105", "0.50625557", "0.49814966", "0.4877604", "0.48713368", "0.48532298", "0.48380193", "0.47815675", "0.47287244", "0.4720446", "0.46988484", "0.46...
0.75887257
0
Turn off xsl transformation
public function no_xsl() { $this->xsl_template = ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function transformToXmlReturnsTransformedXml(): void\n {\n $this->baseXsltProcessor->returns(['transformToXml' => '<foo>']);\n assertThat($this->xslProcessor->toXML(), equals('<foo>'));\n }", "public function doXHTML_cleaning() {}", "protected function transform()\n {\n // ...
[ "0.58941406", "0.56895256", "0.5678719", "0.5654335", "0.55474824", "0.5529772", "0.552298", "0.5462376", "0.54589814", "0.5355058", "0.5347424", "0.53075933", "0.5186075", "0.511506", "0.5105281", "0.50885534", "0.50488853", "0.5037611", "0.5032306", "0.5014301", "0.49986935...
0.7720259
0
Create and use a hidden unique form key
public function use_key($key='form_key') { $stamp = date('U'); $this->add_hidden(new hidden($key, $stamp)); return $stamp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateFormkey()\n {\n $ip = $_SERVER['REMOTE_ADDR'];\n // mt_rand() is better than rand()\n $uniqid = uniqid(mt_rand(), true);\n\n return md5($ip . $uniqid);\n }", "public function getFormkey()\n {\n // generate the key and store it inside the class\...
[ "0.792427", "0.7291355", "0.7154968", "0.7058801", "0.6831539", "0.6754814", "0.6646691", "0.65696883", "0.6544463", "0.6499674", "0.6456416", "0.64436656", "0.6432139", "0.6326169", "0.6311642", "0.62961644", "0.6259598", "0.6257857", "0.6257024", "0.6251602", "0.62457824", ...
0.6738532
6
Bootstrap any application services.
public function boot() { $this->app['blade.compiler']->extend(function ($view) { return $this->app[BladeFiltersCompiler::class]->compile($view); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function bootstrap(): void\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n $this->app->loadDeferredProviders();\n }", "public function boot()\n {\n // Boot here application\n }", "public func...
[ "0.7342354", "0.72115344", "0.72045606", "0.71229565", "0.7110962", "0.7082294", "0.7077916", "0.70714337", "0.7052025", "0.70234996", "0.70118046", "0.7005517", "0.69550276", "0.6931787", "0.69304705", "0.6927122", "0.6910007", "0.69058853", "0.6900327", "0.689661", "0.68954...
0.0
-1
Creates a new Uptime check configuration. (uptimeCheckConfigs.create)
public function create($parent, UptimeCheckConfig $postBody, $optParams = []) { $params = ['parent' => $parent, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('create', [$params], UptimeCheckConfig::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function CreateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\CreateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monito...
[ "0.7086295", "0.66852397", "0.5832289", "0.58181393", "0.5645919", "0.5617374", "0.55739444", "0.53473675", "0.51100296", "0.5091077", "0.49437207", "0.47102794", "0.46942794", "0.45402044", "0.44555312", "0.44000417", "0.43998283", "0.4356518", "0.43465766", "0.43297982", "0...
0.80216384
0
Deletes an Uptime check configuration. Note that this method will fail if the Uptime check configuration is referenced by an alert policy or other dependent configs that would be rendered invalid by the deletion. (uptimeCheckConfigs.delete)
public function delete($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('delete', [$params], MonitoringEmpty::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function DeleteUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\DeleteUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig',\n $argument,\n ['\\Google\\Protobuf\\GPB...
[ "0.7359583", "0.60657585", "0.54425657", "0.5425039", "0.5347119", "0.5328237", "0.52433217", "0.5243305", "0.51132256", "0.50850207", "0.50649977", "0.50649256", "0.50477254", "0.50028634", "0.49690515", "0.4952889", "0.48913378", "0.4769733", "0.47678268", "0.47544557", "0....
0.39950687
79
Gets a single Uptime check configuration. (uptimeCheckConfigs.get)
public function get($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('get', [$params], UptimeCheckConfig::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUptimeCheckConfig()\n {\n return $this->uptime_check_config;\n }", "public function GetUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\GetUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.Upt...
[ "0.78731394", "0.6626676", "0.5898211", "0.5777897", "0.5675747", "0.56366116", "0.55743366", "0.5553726", "0.5539036", "0.5508878", "0.54915833", "0.54881966", "0.5483576", "0.5481618", "0.54761094", "0.5475268", "0.545728", "0.5454844", "0.5446216", "0.54440486", "0.5430929...
0.79686177
0
Lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations). (uptimeCheckConfigs.listProjectsUptimeCheckConfigs)
public function listProjectsUptimeCheckConfigs($parent, $optParams = []) { $params = ['parent' => $parent]; $params = array_merge($params, $optParams); return $this->call('list', [$params], ListUptimeCheckConfigsResponse::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ListUptimeCheckConfigs(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs',\n $argument,\n ['\\Google\\Cloud\\Monitorin...
[ "0.6722513", "0.5504905", "0.53350157", "0.52022237", "0.5178261", "0.49790195", "0.49472752", "0.47796518", "0.4686594", "0.4643526", "0.46052107", "0.4591228", "0.45873624", "0.4557695", "0.4524556", "0.45164093", "0.44967884", "0.4488663", "0.44674298", "0.44586378", "0.44...
0.7945477
0
Updates an Uptime check configuration. You can either replace the entire configuration with a new one or replace only certain fields in the current configuration by specifying the fields to be updated via updateMask. Returns the updated configuration. (uptimeCheckConfigs.patch)
public function patch($name, UptimeCheckConfig $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('patch', [$params], UptimeCheckConfig::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function UpdateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\UpdateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monito...
[ "0.6711495", "0.66990566", "0.5914926", "0.582598", "0.5785443", "0.56012374", "0.5382435", "0.49926636", "0.49801952", "0.48861706", "0.48679906", "0.48537675", "0.48073092", "0.47214732", "0.47213593", "0.46373323", "0.46329278", "0.46152425", "0.45887405", "0.45285544", "0...
0.77980983
0
sets up the DB connection and loads fixtures
protected function setUp() { self::bootKernel(); //Apply the primer DatabasePrimer::prime(self::$kernel); //Set entity manager $this->em = DatabasePrimer::$entityManager; $fixture = new ProfileFixtures(); $fixture->load($this->em); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUp() {\n\t\t$options = [\n\t\t\t'db' => [\n\t\t\t\t'adapter' => 'Connection',\n\t\t\t\t'connection' => $this->_connection,\n\t\t\t\t'fixtures' => $this->_fixtures\n\t\t\t]\n\t\t];\n\n\t\tFixtures::config($options);\n\t\tFixtures::save('db');\n\t}", "protected function fixture_setup() {\r\n ...
[ "0.8419189", "0.81207275", "0.7665418", "0.75528014", "0.74813294", "0.7425585", "0.74090296", "0.7379403", "0.73513526", "0.7260411", "0.72557414", "0.7246315", "0.7241855", "0.7216419", "0.71948284", "0.71937424", "0.71345687", "0.7131393", "0.7129719", "0.7129049", "0.7112...
0.6835197
41
Tears down DB connection and deletes DB
protected function tearDown() { $application = new Application(self::$kernel); $application->setAutoExit(false); $options = array('command' => 'doctrine:database:drop', '--force' => true); $application->run(new ArrayInput($options)); parent::tearDown(); $this->em->close(); $this->em = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _teardownDb()\n {\n list ($host, $port, $db) = $this->_getUrlParts();\n $db = trim($db, '/');\n \n try {\n Sopha_Db::deleteDb($db, $host, $port);\n } catch (Sopha_Db_Exception $e) {\n if ($e->getCode() != 404) {\n throw $...
[ "0.8563309", "0.7685049", "0.76681256", "0.7657197", "0.7602402", "0.75653803", "0.7516724", "0.75141233", "0.7496532", "0.74791545", "0.7469615", "0.74570525", "0.7436036", "0.7436036", "0.74286443", "0.7378944", "0.73700523", "0.7321816", "0.73142993", "0.731309", "0.731239...
0.0
-1
Test to ensure a user receives their own profile data
public function testGetOwnProfile() { $url = "http://127.0.0.1/app_test.php/profile/view/bucky-barnes"; $username = 'profileBucky@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Bucky Barnes', $response->body->data->user->name); $this->assertEquals(0, $response->body->data->relationships->isFriend); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProfileCheckIfUserExists()\n {\n\n }", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $...
[ "0.7678932", "0.76426554", "0.75188756", "0.73572254", "0.7291773", "0.71189636", "0.7094142", "0.7018698", "0.6958791", "0.6945694", "0.6921496", "0.67984915", "0.6791915", "0.66957873", "0.66834736", "0.6652722", "0.6599944", "0.6556649", "0.6546952", "0.65285903", "0.65273...
0.7338619
4
Test to ensure a not logged in user cannot get profile data
public function testGetProfileNotLoggedIn() { $url = "http://127.0.0.1/app_test.php/profile/view/bucky-barnes"; $response = \Httpful\Request::get($url)->send(); //ERROR Call to a member function getWellnessProfessional() on string (500 Internal Server Error) $this->assertEquals(302, $response->code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testManagerNotAccessProfileUser()\n\t{\n\t\t$this->login($this->users['sample2']['varName'], $this->passwordManager);\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextPresent('You don\\'t have access to this section.');\n\t}", "public function testGues...
[ "0.7578113", "0.74428815", "0.7123898", "0.69528604", "0.69355494", "0.6854474", "0.68390185", "0.6789364", "0.67766964", "0.6639339", "0.6553816", "0.6541412", "0.64906883", "0.64691174", "0.64636546", "0.6434995", "0.64103854", "0.6403959", "0.6402856", "0.6375673", "0.6369...
0.66595954
9
tests user looking at other user profile
public function testGetProfileOtherUserNoRel() { $url = "http://127.0.0.1/app_test.php/profile/view/steve-rogers"; $username = 'profileBucky@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Steve Rogers', $response->body->data->user->name); $this->assertEquals(0, $response->body->data->relationships->isFriend); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProfileCheckIfUserExists()\n {\n\n }", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $...
[ "0.75405914", "0.739358", "0.7171159", "0.708067", "0.7020314", "0.70177287", "0.6988417", "0.6980894", "0.6915305", "0.6895644", "0.6859885", "0.68140304", "0.6791535", "0.6789883", "0.6779884", "0.67381316", "0.6722318", "0.6647381", "0.66335344", "0.65784836", "0.651658", ...
0.6904997
9
tests getting friend's profile
public function testGetProfileOtherUserFriends() { $url = "http://127.0.0.1/app_test.php/profile/view/bruce-banner"; $username = 'profileBucky@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Bruce Banner', $response->body->data->user->name); $this->assertEquals(1, $response->body->data->relationships->isFriend); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\...
[ "0.76226526", "0.7584691", "0.72922677", "0.7016606", "0.6957223", "0.6950044", "0.6880951", "0.6863824", "0.6856816", "0.6786138", "0.6758383", "0.67314774", "0.66405886", "0.6620992", "0.6611972", "0.6545408", "0.65420955", "0.65275466", "0.65168256", "0.64682096", "0.64391...
0.7316204
2
tests getting supporter profile
public function testGetProfileOtherUserSupporter() { $url = "http://127.0.0.1/app_test.php/profile/view/tony-stark"; $username = 'profileBucky@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Tony Stark', $response->body->data->user->name); $this->assertEquals(1, $response->body->data->relationships->isSupportee); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testProfile() {\n $profile = <<<PROFILE_TEST\ncore_version_requirement: '*'\nname: The Perfect Profile\ntype: profile\ndescription: 'This profile makes D...
[ "0.7234903", "0.6723165", "0.66822654", "0.65449274", "0.65082306", "0.64712346", "0.63994133", "0.6393896", "0.63905436", "0.63622856", "0.6357651", "0.61896676", "0.61553925", "0.61525655", "0.6125855", "0.6113694", "0.60903585", "0.6070724", "0.60698146", "0.60694635", "0....
0.60819143
17
test getting WP profile no relation
public function testGetProfileWPNoRel() { $url = "http://127.0.0.1/app_test.php/profile/view/natasha-romanov"; $username = 'profileBucky@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Natasha Romanov', $response->body->data->user->name); $this->assertNotEquals(0, $response->body->data->user->isWellnessPro); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWPGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileNatasha@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password...
[ "0.7313183", "0.67644936", "0.6726738", "0.6717151", "0.6700389", "0.6694808", "0.65982246", "0.6515449", "0.6451861", "0.64039105", "0.63828796", "0.6347496", "0.633259", "0.62712973", "0.6269025", "0.6254397", "0.62381446", "0.62373203", "0.62109494", "0.6209512", "0.618217...
0.7236867
1
test getting WP profile relation exists
public function testGetProfileWPPatientRel() { $url = "http://127.0.0.1/app_test.php/profile/view/vision-jones"; $username = 'profileBucky@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Vision Jones', $response->body->data->user->name); $this->assertNotEquals(0, $response->body->data->user->isWellnessPro); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function _assertProfileExists($profile_uid)\n {\n }", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "public function testProfileCheckIfUserExists()\n {\n\n }", "function have_profile(){\n\tre...
[ "0.7234199", "0.70396787", "0.6914464", "0.6808734", "0.6591236", "0.64913315", "0.64902526", "0.6340507", "0.62700504", "0.6224946", "0.6170685", "0.61643016", "0.6145755", "0.6134113", "0.6117112", "0.60914314", "0.59851086", "0.59708875", "0.5958153", "0.58984065", "0.5875...
0.5386017
95
tests WP getting other user profile
public function testWPGetProfileOtherUserNoRel() { $url = "http://127.0.0.1/app_test.php/profile/view/bucky-barnes"; $username = 'profileNatasha@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Bucky Barnes', $response->body->data->user->name); $this->assertEquals(0, $response->body->data->user->isWellnessPro); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "abstract protected function getUserProfile();", "public function testWPGetProfileOtherUserPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/...
[ "0.7305726", "0.71837515", "0.7180283", "0.6933108", "0.68574077", "0.68501556", "0.677595", "0.6709536", "0.6694701", "0.6604053", "0.65933204", "0.6558116", "0.6557394", "0.65279", "0.63662887", "0.6222691", "0.62009585", "0.61989343", "0.61876166", "0.6178911", "0.61762846...
0.77301717
0
test WP getting patient profile
public function testWPGetProfileOtherUserPatientRel() { $url = "http://127.0.0.1/app_test.php/profile/view/bucky-barnes"; $username = 'profileVision@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Bucky Barnes', $response->body->data->user->name); $this->assertEquals(0, $response->body->data->user->isWellnessPro); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user...
[ "0.66872036", "0.6682553", "0.66458416", "0.6529471", "0.6407498", "0.640187", "0.6374029", "0.636708", "0.63409925", "0.625468", "0.6236356", "0.62344956", "0.62273055", "0.622525", "0.62183315", "0.6185998", "0.61758316", "0.60946333", "0.6046463", "0.59812826", "0.59422874...
0.7107858
0
test accessing profile of user who doesn't exist
public function testGetProfileUserNotExist() { $url = "http://127.0.0.1/app_test.php/profile/view/thor"; $username = 'profileBucky@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); //AppBundle:User object not found. (404 Not Found) $this->assertTrue($response->code === 404); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProfileCheckIfUserExists()\n {\n\n }", "public function testManagerNotAccessProfileUser()\n\t{\n\t\t$this->login($this->users['sample2']['varName'], $this->passwordManager);\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextPresent('You don\\'...
[ "0.7831292", "0.7644241", "0.74199146", "0.7416056", "0.7397465", "0.72869897", "0.7271586", "0.7172934", "0.71265423", "0.7055683", "0.70554346", "0.6997637", "0.6959192", "0.6916604", "0.6904384", "0.68995845", "0.6846829", "0.6842074", "0.6830752", "0.68129325", "0.676956"...
0.73234445
5
Fungsi untuk mendapatkan jadwal yang tersedia
private function dapatkanJadwal() { $waktu_ziarah = WaktuZiarah::get(); if (count($waktu_ziarah) === 0) { return [ [ 'id' => null, 'pesan' => "Jadwal tidak tersedia" ] ]; } return $waktu_ziarah; // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function karyawan(){\n $this->setActualJadwal(TRUE);\n $this->load->model('jadwal_detail_model', 'jdm');\n $periodeTerpilih = $this->input->post('periode');\n if(empty($periodeTerpilih)){\n $tanggalTerpilih = date('Y-m-d');\n }else{\n $tanggalTerpilih...
[ "0.71276146", "0.69400436", "0.66536534", "0.66297597", "0.65348506", "0.6526685", "0.64617735", "0.643403", "0.6424141", "0.64191353", "0.6401473", "0.6392963", "0.63841313", "0.6379349", "0.63656783", "0.63621783", "0.6358174", "0.63446474", "0.6338772", "0.63370633", "0.63...
0.6193172
37
Fungsi untuk mencari jenazah berdasarkan nama jenazah
public function cariJenazah(): void { $result = Jenazah::where('nama', 'LIKE', "%$this->namaJenazah%") ->get(['id', 'nama', 'blok']); if (count($result) === 0) { $result = [[ 'nama' => "Nama jenazah tidak ditemukan.", 'id' => null, 'blok' => null, ]]; } $this->suggestion_name = $result; // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tampilUrutNama(){\n require('DataMahasiswa.php');\n //Melakukan sorting nama secara ascending\n $nama = array_column($mahasiswa, 'Nama');\n array_multisort($nama, SORT_ASC, $mahasiswa);\n $namaMhs = \"\";\n // looping foreach\n foreach ($mahasiswa as $mhs =...
[ "0.71959734", "0.7045538", "0.7041303", "0.6950427", "0.6939956", "0.671326", "0.66707927", "0.6575008", "0.65719527", "0.65698344", "0.65399075", "0.6538477", "0.6532704", "0.6517709", "0.6481223", "0.64811945", "0.64699537", "0.64673024", "0.64531964", "0.6450529", "0.64280...
0.6739432
5
Fungsi untuk mendapatkan data lenkap dari jenazah berdasarkan nama yang di masukkan peziarah
public function dapatkanDataLenkap(string $id): void { try { $id = Crypt::decrypt($id); $jenazah_data = Jenazah::find($id); $this->namaJenazah = $jenazah_data->nama; $this->jenazah_id = $jenazah_data->id; $this->alamat_jenazah = $jenazah_data->alamat; $this->suggestion_name = []; // ... } catch (\Exception $exception) { $this->dispatchBrowserEvent('onActionInfo', [ 'type' => 'error', 'title' => "Error", 'message' => 'Data tidak ditemukan.', ]); // ... } // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function jumlahdata() {\r\n\t\t\treturn $this->db->count_all('tb_kelas');\t\t\t\r\n\t\t\t}", "function tampilUrutNama(){\n require('DataMahasiswa.php');\n //Melakukan sorting nama secara ascending\n $nama = array_column($mahasiswa, 'Nama');\n array_multisort($nama, SORT_ASC, $mahasisw...
[ "0.658215", "0.65003103", "0.6413224", "0.6362615", "0.63230926", "0.629799", "0.61734396", "0.60093755", "0.59709287", "0.58908755", "0.58825624", "0.58238286", "0.58049756", "0.5783349", "0.57729936", "0.5736681", "0.57201505", "0.57145363", "0.57129645", "0.570564", "0.570...
0.0
-1
Fungsi untuk menyimpan data yang telah diinput
public function simpan() { $aturan = [ 'nama' => ['required', 'min:2', 'max:150'], 'namaJenazah' => ['required'], 'email' => ['required', 'email', 'unique:peziarah,email'], 'tanggal_dipilih' => ['required'], 'waktu_dipilih' => ['required'], 'jenis_kelamin' => ['required'], 'no_hp' => ['required', 'numeric', 'unique:peziarah,no_hp'], ]; // Pesan validasi jika error $pesan = [ // Field nama 'nama.required' => 'Harap masukan nama peziarah!', 'nama.min' => 'Nama peziarah tidak boleh kurang dari 2 karakter', 'nama.max' => 'Nama peziarah tidak boleh lebug dari 150 karakter', // Field nama jenazah 'namaJenazah.required' => 'Harap masukkan nama dari jenazah!', // Field email 'email.required' => "Harap masukan email.", 'email.email' => "Harap masukan email yang valid/benar.", 'email.unique' => "Email ini telah terdaftar!, silahkan masukkan email baru.", // Field jadwal 'tanggal_dipilih.required' => 'Harap masukkan tanggal ziarah.', 'waktu_dipilih.required' => 'Silahkan memilih waktu ziarah.', // Field jenis kelamin 'jenis_kelamin.required' => "Silahkan masukkan jenis kelamin dari peziarah.", // Field no hp 'no_hp.required' => 'Silahkan masukkan no whatsapp yang aktif.', 'no_hp.numeric' => 'Kolom nomor hp hanya boleh berisikan angka.', 'no_hp.unique' => 'Nomor telepon(whatsapp) telah terdaftar!, Silahkan masukkan nomor baru.', ]; // validasi input $this->validate($aturan, $pesan); try { $data['nama'] = $this->nama; $data['jenazah_id'] = $this->jenazah_id; $data['jenis_kelamin'] = $this->jenis_kelamin; $data['email'] = $this->email; $data['no_hp'] = $this->no_hp; $jenazah = Jenazah::find($this->jenazah_id); $peziarah = $jenazah->peziarah()->create($data); if ($peziarah instanceof Peziarah) { $peziarah->waktu_ziarah()->attach($this->waktu_dipilih, [ 'tanggal_id' => $this->tanggal_dipilih, ]); $waktu_ziarah = WaktuZiarah::find($this->waktu_dipilih); $waktu_ziarah->tanggal()->where('tanggal_id', $this->tanggal_dipilih); // ... } if (!$peziarah) throw new \Exception("Gagal menambahkan peziarah."); // reset semua property user $this->reset( 'nama', 'namaJenazah', 'jenazah_id', 'jenis_kelamin', 'alamat_jenazah', 'waktu_dipilih', 'email', 'no_hp', ); $this->dapatkanJadwal(); return $this->dispatchBrowserEvent('onActionInfo', [ 'type' => 'success', 'title' => "Berhasil mendaftarkan peziarah!", 'message' => "Kami akan mengirimkan pemberitahuan terkait jadwal anda melalui email atau whatsapp yang telah anda masukkan & harap mematuhi protokol kesehatan.", ]); // ... } catch (\Exception $e) { $this->dispatchBrowserEvent('onActionInfo', [ 'type' => 'error', 'title' => "Error", 'message' => $e->getMessage(), ]); // ... } // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function input_data($data,$table){\n\t\t$this->db->insert($table,$data);//menginputkan data ke database dengan function input_data\n }", "public function input(){\n\t\t$nama = $this->input->post('nama');\n\t\t$instansi = $this->input->post('nama_instansi');\n\t\t$status = $this->input->post('status');\n\t\t$t...
[ "0.70207", "0.689755", "0.6679617", "0.6632788", "0.65572226", "0.6520138", "0.6492453", "0.64874566", "0.6442404", "0.6365272", "0.6360865", "0.63400966", "0.6327943", "0.631077", "0.628045", "0.6217633", "0.62124467", "0.6210119", "0.61954665", "0.6177942", "0.6172545", "...
0.0
-1
Register any application services.
public function register() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n $this->registerServices();\n }", "public function register()\n {\n $this->registerAssets();\n $this->registerServices();\n }", "public function register()\n\t{\n\n $this->registerUserService();\n $this->registerCountryService();\n ...
[ "0.7879658", "0.7600202", "0.74930716", "0.73852855", "0.736794", "0.7306089", "0.7291359", "0.72896826", "0.72802424", "0.7268026", "0.7267702", "0.72658145", "0.7249053", "0.72171587", "0.7208486", "0.7198799", "0.7196415", "0.719478", "0.7176513", "0.7176227", "0.7164647",...
0.0
-1